Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ChatAI CopilotNew to Visual Studio Code? Get it now.
ChatAI Copilot

ChatAI Copilot

Samarth Nagpal

|
60 installs
| (0) | Free
Copilot-like AI code assistant using custom Chat AI endpoint
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ChatAI Copilot

A powerful VS Code extension that provides AI-powered code assistance using your custom Chat AI endpoint. Get intelligent code completions, explanations, and chat-based assistance directly in your editor.

Features

  • 💬 Conversational AI Assistant: Chat naturally with an AI that asks thoughtful questions about your code
  • 🤖 AI-Powered Chat Panel: Interactive chat interface for code-related questions and assistance
  • ✨ Smart Code Completions: Get intelligent inline suggestions as you type
  • 📝 Docstring Generation: Automatically generate documentation for your functions
  • 🔍 Code Explanation: Get detailed explanations of selected code
  • ⚙️ Easy Configuration: Simple setup for your custom AI endpoint
  • 🎨 VS Code Theme Integration: Seamlessly integrates with your editor's theme

Installation

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

Or install from the command line:

code --install-extension SamarthNagpal.chatai-copilot

Screenshots

Screenshots coming soon! The extension features a beautiful dark blue glass theme with conversational AI assistance.

Features Showcased:

  • Chat Panel: Interactive conversational AI assistance
  • Autocomplete: AI-powered code suggestions
  • Hover Tooltips: Intelligent code insights
  • Multi-language Support: Works with 20+ programming languages
  • Modern UI: Dark blue glass morphism design

Quick Start with GPT-4o

  1. Get an OpenAI API Key:

    • Visit OpenAI Platform
    • Create a new API key
    • Copy the key (it starts with sk-)
  2. Configure the Extension:

    • Open Command Palette (Ctrl+Shift+P)
    • Run ChatAI: Configure API Endpoint and Key
    • Select "OpenAI (GPT-4o)"
    • Paste your OpenAI API key
  3. Start Using:

    • Open a code file
    • Run ChatAI: Open Chat Panel to start chatting with GPT-4o
    • Or just start typing - you'll get inline suggestions automatically!

Configuration

Before using the extension, you need to configure your AI service. The extension supports both OpenAI and custom API endpoints.

Option 1: OpenAI (Recommended)

  1. Open the Command Palette (Ctrl+Shift+P)
  2. Run ChatAI: Configure API Endpoint and Key
  3. Select "OpenAI (GPT-4o)" from the dropdown
  4. Enter your OpenAI API key
  5. The extension will automatically configure for GPT-4o

Option 2: Custom API Endpoint

  1. Open the Command Palette (Ctrl+Shift+P)
  2. Run ChatAI: Configure API Endpoint and Key
  3. Select "Custom API Endpoint" from the dropdown
  4. Enter your Chat AI API endpoint URL
  5. Enter your API key or access token

Configuration Settings

The extension adds the following settings to VS Code:

  • chatai-copilot.endpoint: Your AI service endpoint URL (automatically set for OpenAI)
  • chatai-copilot.apiKey: Your API key or access token
  • chatai-copilot.model: The AI model to use (default: gpt-4o for OpenAI)

Usage

Chat Panel

  • Command: ChatAI: Open Chat Panel
  • Opens an interactive chat interface for conversational coding assistance
  • Ask questions about your code, get explanations, or just chat about what you're working on
  • The AI will ask thoughtful questions to help you think deeper about your implementation

AI Autocomplete

  • Automatic: Get intelligent suggestions as you type in supported languages
  • Manual Trigger: ChatAI: Trigger AI Autocomplete - Get on-demand suggestions
  • Context-Aware: AI analyzes your code context for relevant completions
  • Multi-language: Supports 20+ programming languages and file types

AI-Powered Autocomplete

  • Intelligent Suggestions: Get context-aware autocomplete suggestions as you type
  • Multi-language Support: Works with Python, JavaScript, TypeScript, Java, C#, C++, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, HTML, CSS, JSON, YAML, and Markdown
  • Smart Context Analysis: AI analyzes your code context to provide relevant suggestions
  • Manual Trigger: Use ChatAI: Trigger AI Autocomplete command for on-demand suggestions
  • Inline Completions: Ghost text suggestions appear as you type
  • Hover Tooltips: AI-powered code review and suggestions on hover

Generate Docstring

  • Command: ChatAI: Generate Docstring
  • Automatically generates documentation for your functions (coming soon)

Explain Code

  • Command: ChatAI: Explain Code
  • Get detailed explanations of selected code (coming soon)

Requirements

  • VS Code version 1.101.0 or higher
  • A valid Chat AI endpoint and API key
  • Internet connection for API calls

API Requirements

OpenAI API (Recommended)

The extension is optimized for OpenAI's API format. When using OpenAI, the extension automatically:

  • Uses the correct endpoint: https://api.openai.com/v1/chat/completions
  • Formats requests according to OpenAI's chat completions API
  • Handles authentication with Bearer tokens
  • Supports GPT-4o, GPT-4, GPT-3.5-turbo, and other OpenAI models

Custom API Endpoint

Your custom Chat AI endpoint should accept POST requests with the following format:

{
  "messages": [
    {"role": "system", "content": "You are a code analysis assistant..."},
    {"role": "user", "content": "Your question or code context"}
  ],
  "temperature": 0.3,
  "max_tokens": 1000
}

And return responses in this format:

{
  "choices": [
    {
      "message": {
        "content": "AI response text"
      }
    }
  ]
}

Troubleshooting

"Error contacting ChatAI endpoint"

  • Verify your endpoint URL is correct and accessible
  • Check that your API key is valid and not expired
  • Ensure your endpoint accepts the expected request format
  • Check the Output panel (Log: Extension Host) for detailed error messages

"No workspace is open"

  • Open a folder or workspace in VS Code before using the extension

Authentication Errors (401)

  • Verify your API key is correct
  • Some endpoints require OAuth 2 access tokens instead of simple API keys
  • Check the API documentation for the correct authentication method

Development

Building from Source

  1. Clone the repository:
git clone https://github.com/samarthify/chatai-copilot.git
cd chatai-copilot
  1. Install dependencies:
npm install
  1. Build the extension:
npm run compile
  1. Press F5 in VS Code to launch the Extension Development Host

Project Structure

chatai-copilot/
├── src/
│   └── extension.ts          # Main extension code
├── package.json              # Extension manifest
├── README.md                 # This file
└── webpack.config.js         # Build configuration

Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

  • Issues: GitHub Issues
  • Documentation: GitHub README

Release Notes

0.0.1

  • Initial release
  • Chat panel with AI integration
  • Inline code completions
  • Configuration management
  • Support for Python, JavaScript, and TypeScript

Enjoy coding with AI assistance! 🚀

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