-
Notifications
You must be signed in to change notification settings - Fork 1
support for gemini extension #32
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
Conversation
WalkthroughAdds a GoReleaser build target and artifact for a Gemini CLI extension with Windows packaging rules, adds a Gemini extension manifest Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant GeminiCLI as Gemini CLI (host)
participant Extension as gemini-extension.json
participant MCP as suprsend (binary)
User->>GeminiCLI: Start Gemini with extensions
GeminiCLI->>Extension: Load manifest `gemini-extension.json`
Note right of Extension: name: "suprsend"\nversion: "0.1.1"
GeminiCLI->>MCP: Spawn command: ${extensionPath}${/}suprsend (arg: start-mcp-server)
MCP-->>GeminiCLI: MCP handshake / ready
GeminiCLI-->>User: Extension available
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
| { | ||
| "name": "suprsend", | ||
| "version": "0.1.0", | ||
| "mcpServers": { | ||
| "suprsend": { | ||
| "command": "${extensionPath}${/}suprsend" | ||
| } | ||
| } | ||
| } No newline at end of file |
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.
Fix Windows command path
The manifest hardcodes "command": "${extensionPath}${/}suprsend", but the Go build emits suprsend.exe on Windows. Gemini launches the binary by exact path, so on Windows this will fail because the file lacks the .exe suffix. Please either ship a filename without the .exe suffix or make the manifest Windows-aware (e.g., include a wrapper script or add the .exe suffix conditionally) so Windows users can launch the extension.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
mgmnt/client.go (1)
98-103: Excellent refactor tourl.JoinPathfor security and correctness.Replacing string concatenation with
url.JoinPathis a significant improvement:
- Properly encodes path segments (e.g., if
workspacecontains special characters)- Prevents potential path traversal or injection issues
- Handles URL separators correctly
- Error handling is appropriate
Minor observability suggestion: Consider using
log.Errorinstead oflog.Infofor error cases to improve log filtering and alerting. This applies to the error logs throughout this function (lines 100, 105, 113, 120).To improve observability, apply this diff:
requestURL, err := url.JoinPath(c.hub_base_URL, "v1", workspace, "ws_key", "bridge") if err != nil { - log.Info("Error joining URL path: ", err) + log.Error("Error joining URL path: ", err) return "", "", err } req, err := http.NewRequest("GET", requestURL, nil) if err != nil { - log.Info("Error creating request: ", err) + log.Error("Error creating request: ", err) return "", "", err }And similarly for lines 113 and 120:
response, err := client.Do(req) if err != nil { - log.Info("Error sending request: ", err) + log.Error("Error sending request: ", err) return "", "", err }body, err := io.ReadAll(response.Body) if err != nil { - log.Info("Error reading response body: ", err) + log.Error("Error reading response body: ", err) return "", "", err }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
gemini-extension.json(1 hunks)mgmnt/client.go(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- gemini-extension.json
🧰 Additional context used
📓 Path-based instructions (1)
mgmnt/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/cli-structure.mdc)
Place management and client-related Go code under the mgmnt/ directory
Files:
mgmnt/client.go
🔇 Additional comments (1)
mgmnt/client.go (1)
8-8: LGTM!The import of
net/urlis appropriate and necessary for theurl.JoinPathusage below.
Summary by CodeRabbit
New Features
Chores
Bug Fixes