Gemma Local Code Mentor (VS Code Extension)
Gemma Local Code Mentor helps you understand and transform code from inside the editor, using a local backend by default.
What this extension provides
- Explain selected code
- Suggest refactors for selected code
- Generate tests from selected code
- Summarize the current file
- Summarize architecture from repository context
- Ask questions about the repository
- Open the Gemma side panel
- Toggle Local Only mode
Available commands
Gemma: Explain Selection
Gemma: Refactor Selection
Gemma: Generate Tests
Gemma: Summarize File
Gemma: Summarize Architecture
Gemma: Ask Repository
Gemma: Toggle Local Only Mode
Gemma: Open Panel
Requirements
- VS Code compatible with extension engine
^1.90.0
- Running backend service (default:
http://localhost:8765)
Configuration
Set these in VS Code settings:
gemmaCodeMentor.backendUrl (default: http://localhost:8765)
gemmaCodeMentor.localOnly (default: true)
gemmaCodeMentor.modelMode (auto | fast | deep)
gemmaCodeMentor.fastModel
gemmaCodeMentor.deepModel
gemmaCodeMentor.maxContextTokens
gemmaCodeMentor.temperature
gemmaCodeMentor.enableRepoIndex
gemmaCodeMentor.requestTimeoutMs
Install for development
cd extension
npm install
npm run compile
Then open this project in VS Code and press F5 to launch an Extension Development Host.
Package and install as VSIX
cd extension
npm install
npx @vscode/vsce package
The package command writes gemma-local-code-mentor-<version>.vsix in this folder.
Install it from the editor:
- Open Extensions view.
- Click
... menu.
- Select
Install from VSIX....
- Choose the packaged VSIX file.
Quick verification
- Confirm backend is running on configured
backendUrl.
- Open a code file and select a snippet.
- Run
Gemma: Explain Selection from Command Palette.
- Verify a response appears without connection errors.
| |