-
Notifications
You must be signed in to change notification settings - Fork 4
gemini client integrated #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant WebSocketServer
participant SessionManager
participant GeminiAgent
participant GeminiClient
participant MCPServer
participant ControllerBridge
User->>WebSocketServer: "Connect WebSocket"
WebSocketServer->>SessionManager: "createSession(agentConfig)"
SessionManager->>GeminiAgent: "create agent"
WebSocketServer-->>User: "connection event"
User->>WebSocketServer: "send message"
WebSocketServer->>SessionManager: "markProcessing()"
WebSocketServer->>GeminiAgent: "execute(message)"
GeminiAgent->>GeminiAgent: "init() - fetch config"
GeminiAgent->>GeminiClient: "initialize with MCP server"
GeminiAgent->>GeminiClient: "sendMessageStream()"
loop "Multi-turn conversation"
GeminiClient-->>GeminiAgent: "stream events"
GeminiAgent->>GeminiEventFormatter: "format(event)"
GeminiEventFormatter-->>WebSocketServer: "FormattedEvent"
WebSocketServer-->>User: "formatted event"
alt "Tool call required"
GeminiAgent->>MCPServer: "executeToolCall()"
MCPServer->>ControllerBridge: "browser automation"
ControllerBridge-->>MCPServer: "tool result"
MCPServer-->>GeminiAgent: "tool response"
GeminiAgent->>GeminiClient: "continue with tool results"
end
end
GeminiAgent-->>WebSocketServer: "completion event"
WebSocketServer->>SessionManager: "markIdle()"
WebSocketServer-->>User: "completion"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 2 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
| * Gemini CLI Event Formatter | ||
| * | ||
| * Maps GeminiEventType to FormattedEvent: | ||
| * - Content: Accumulate text chunks, emit as 'response' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Comment says 'emit as response' but formatContent returns null and doesn't emit response events
| * - Content: Accumulate text chunks, emit as 'response' | |
| * - Content: Accumulate text chunks (don't emit response events) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/agent/src/agent/GeminiAgent.formatter.ts
Line: 12:12
Comment:
**syntax:** Comment says 'emit as response' but formatContent returns null and doesn't emit response events
```suggestion
* - Content: Accumulate text chunks (don't emit response events)
```
How can I resolve this? If you propose a fix, please make it concise.| * Execute a task using Gemini CLI and stream formatted events | ||
| * | ||
| * @param message - User's natural language request | ||
| * @yields Formatteint instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Typo in JSDoc comment: 'Formatteint' should be 'FormattedEvent'
| * @yields Formatteint instances | |
| * @yields FormattedEvent instances |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/agent/src/agent/GeminiAgent.ts
Line: 181:181
Comment:
**syntax:** Typo in JSDoc comment: 'Formatteint' should be 'FormattedEvent'
```suggestion
* @yields FormattedEvent instances
```
How can I resolve this? If you propose a fix, please make it concise.
No description provided.