Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodexpilotNew to Visual Studio Code? Get it now.
Codexpilot

Codexpilot

codexpilot

|
15 installs
| (0) | Free
Chat with Google's Gemini AI using codebase context via '@' mentions for intelligent code assistance
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codexpilot

Codexpilot Icon

Version Installs Rating

Codexpilot is a VS Code extension that integrates Google's Gemini AI to provide intelligent code assistance with codebase context. Simply chat with Gemini and reference your project files using '@' mentions to get contextually relevant help with your code.

Features

  • Google Gemini Integration: Powered by Google's advanced Gemini 1.5 Pro model for intelligent code understanding and generation
  • Automatic Context Tracking: The currently active file is automatically added to the chat context with a toggle to control inclusion
  • Codebase Context via '@' Mentions: Easily reference additional files in your workspace by typing '@' to provide context to the AI
  • Hybrid Context Model: Combines auto-tracked current file with persistent manually added files for comprehensive context
  • File Search: Quick access to recent files or search your entire workspace
  • Streaming Responses: See AI responses in real-time as they're generated
  • Stop Generation: Cancel an in-progress AI response at any time with the Stop button
  • Input Validation: Character limit with visual feedback prevents oversized queries
  • Rich Markdown Rendering: Beautiful formatting with syntax highlighting for code blocks
  • Code Actions: Copy code snippets to clipboard or insert them directly at your cursor position
  • Chat Management: Start new conversations with a single click
  • Secure API Key Storage: Your Gemini API key is securely stored using VS Code's built-in secret storage

Requirements

  • Visual Studio Code v1.74.0 or higher
  • Google AI Studio API Key for Gemini

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Codexpilot"
  4. Click Install

Getting Started

Obtaining a Gemini API Key

To use Codexpilot, you'll need a Google AI Studio API key:

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Navigate to the API keys section
  4. Create a new API key
  5. Copy the key for use in Codexpilot

Setting Your API Key

Before using Codexpilot, you need to set your Gemini API key:

  1. Open the Command Palette (Ctrl+Shift+P)
  2. Type "Codexpilot: Set Gemini API Key"
  3. Paste your API key when prompted
  4. Your key will be securely stored in VS Code's secret storage

How to Use

Accessing the Chat View

  1. Click the Codexpilot rocket icon in the Activity Bar
  2. The chat interface will appear in the sidebar

Starting a Chat

  1. Type your question or request in the input box at the bottom of the chat view
  2. Press Enter or click the Send button to submit your message
  3. The input has a character limit (4000 chars) with visual feedback to prevent oversized queries
  4. The Send button is automatically disabled when the input area is empty

Controlling Generation

  1. While the AI is generating a response, the Send button changes to a Stop button
  2. Click the Stop button to cancel the generation at any point
  3. When stopped, your original query is restored in the input area for editing
  4. A simple "Stopped." indicator replaces the loading message

File Context Management

Automatic Context Tracking

  • The currently active file in your editor is automatically added to the chat context
  • This auto-tracked file is marked as "Current" in the context area
  • You can temporarily exclude the auto-tracked file by clicking the eye icon on its pill
  • The auto-context visibility resets to "included" when you switch to a different file

Adding Additional File Context (@ Mentions)

  1. Type '@' in your message to trigger the file selector
  2. Choose from recently accessed files or search for a specific file
  3. Select a file to add it to your message context
  4. You can add multiple files by using '@' multiple times
  5. Manually added files persist in the context until explicitly removed
  6. The AI will use all included files (auto-tracked and manually added) as context when generating responses

Removing File Context

  • For manually added files: Click the 'x' on any file pill in the context area to remove that file
  • For the auto-tracked file: Use the eye icon to toggle its inclusion without removing it from tracking

Interacting with Responses

  • Copy Code: Click the Copy button next to any code block to copy it to your clipboard
  • Insert Code: Click the Insert button to insert code directly at your cursor position in the active editor

Managing Chats

  • Click the New Chat button (+ icon) in the header to start a fresh conversation
  • Access settings and other options from the header controls

Screenshots

Known Issues / Limitations

  • Large files may be truncated when added to context due to model token limits
  • The extension requires an active internet connection to communicate with the Gemini API
  • Some complex code structures may not be perfectly understood by the AI

Release Notes

0.1.2

  • Added input validation with max character limit (4000 chars) and visual feedback
  • Added stop generation capability with Send/Stop button toggle
  • Added edit query on stop feature that restores original text when generation is cancelled
  • Improved UI feedback for stopped generation with a simple "Stopped." indicator
  • Enhanced send button behavior (disabled when empty, enabled with text)

0.1.1

  • Added automatic context tracking for the active editor file
  • Added eye icon toggle to control inclusion of auto-tracked file in context
  • Implemented hybrid context model (auto-current + manual persistent)
  • Improved context UI with distinct styling for auto-tracked vs. manually added files

0.1.0

  • Initial release of Codexpilot
  • Core features: Gemini chat, file context via '@' mentions, code actions
  • Markdown rendering with syntax highlighting
  • Streaming responses

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This extension is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft