Galaxy Code - VSCode Extension
AI-powered coding assistant extension for Visual Studio Code with an intuitive chat interface, similar to Claude Code.
Features
- Chat Interface: Interactive chat UI for conversations with AI
- Command Palette Integration: Quick access via
Cmd+P > Galaxy Code: Open new Tab
- Multiple AI Providers: Support for Gemini, Claude, and Ollama
- Code Understanding: Ask questions about your code, get explanations
- Code Generation: Generate code snippets, functions, and entire files
- Bug Fixing: Get help debugging and fixing issues
- Test Generation: Automatically generate tests for your code
- File Operations: Execute commands, open files, apply edits directly from chat
- Workspace Context: AI understands your current workspace, active file, and selections
Installation
From Source
- Clone this repository
- Navigate to
apps/extension/vscode
- Install dependencies:
bun install
- Build the extension:
bun run build
- Press
F5 in VSCode to launch the Extension Development Host
From VSIX
- Download the
.vsix file from releases
- In VSCode, go to Extensions view (
Cmd+Shift+X)
- Click the
... menu at the top right
- Select "Install from VSIX..."
- Choose the downloaded file
Configuration
- Open VSCode Settings (
Cmd+, or Ctrl+,)
- Search for "Galaxy Code"
- Configure the following:
{
"galaxy-code.provider": "gemini", // or "claude", "ollama"
"galaxy-code.apiKey": "your-api-key-here"
}
Get API Keys
Usage
Opening Galaxy Code Chat
Command Palette:
- Press
Cmd+P (Mac) or Ctrl+P (Windows/Linux)
- Type
>Galaxy Code: Open new Tab
- Press Enter
Keyboard Shortcut:
- Press
Cmd+Shift+G (Mac) or Ctrl+Shift+G (Windows/Linux)
Chat Commands
Once the chat is open:
- Ask Questions: Type your question in the input box
- Send Messages: Press
Enter to send (or click the send button)
- New Line: Press
Shift+Enter for multi-line input
- Clear History: Click the trash icon in the header
Example Prompts
Explain what this function does
Generate a React component for a user profile card
Find and fix the bug in the selected code
Write unit tests for this function
Refactor this code to use async/await
Features in Detail
Code Context Awareness
Galaxy Code automatically includes context about your workspace:
- Current active file
- Programming language
- Selected code (if any)
- Workspace root directory
Code Execution
When the AI suggests shell commands, you can click on code blocks to execute them directly in the integrated terminal.
File Navigation
The AI can reference specific files and line numbers. Click on file references to open them directly in the editor.
Markdown Support
All AI responses are rendered with full markdown support:
- Code syntax highlighting
- Tables
- Lists
- Blockquotes
- Links
Development
Project Structure
apps/extension/vscode/
├── src/
│ ├── extension.ts # Extension entry point
│ ├── providers/
│ │ └── ChatViewProvider.ts # Chat webview provider
│ ├── utils/
│ │ └── GalaxyOrchestrator.ts # AI orchestrator integration
│ └── webview/ # React chat UI
│ ├── App.tsx
│ ├── components/
│ │ ├── Header.tsx
│ │ ├── MessageList.tsx
│ │ ├── MessageItem.tsx
│ │ └── InputBox.tsx
│ └── index.tsx
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md
Build Scripts
bun run compile - Compile TypeScript extension code
bun run build:webview - Build React webview UI
bun run build - Build both extension and webview
bun run watch - Watch mode for development
bun run package - Package extension as .vsix
Running in Development
- Open the project in VSCode
- Run
bun install to install dependencies
- Press
F5 to start debugging
- A new VSCode window will open with the extension loaded
Debugging
- Extension code: Use VSCode debugger (F5)
- Webview: Open Developer Tools (
Help > Toggle Developer Tools)
Integration with Galaxy CLI
This extension integrates with the Galaxy CLI orchestrator for AI capabilities.
If Galaxy CLI is present in your workspace at terminal/galaxy_cli/, the extension will use it directly. Otherwise, it will use a built-in fallback.
Keyboard Shortcuts
| Shortcut |
Action |
Cmd+Shift+G (Mac) / Ctrl+Shift+G (Win/Linux) |
Open Galaxy Code Chat |
Enter |
Send message |
Shift+Enter |
New line in message |
Troubleshooting
Extension not loading
- Check that you've built the extension with
bun run build
- Reload VSCode window (
Cmd+R or Ctrl+R)
- Check the Output panel for errors
API key errors
- Verify your API key is correct in settings
- Check that you've selected the right provider
- Ensure you have internet connection (for Gemini/Claude)
Webview not displaying
- Check browser console in Developer Tools
- Rebuild webview:
bun run build:webview
- Clear VSCode cache and reload
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT License - see LICENSE file for details
Credits
Built with:
Made with ❤️ by the Galaxy Code team