Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Collab AINew to Visual Studio Code? Get it now.
Collab AI

Collab AI

Collab AI

|
13 installs
| (0) | Free
Integrate ChatGPT into VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🤖 Collab AI chat - VSCode Extension

Collab AI Searchbar is a powerful Visual Studio Code extension that integrates OpenAI's GPT models into your coding environment. It provides an intuitive chat interface and context-aware code actions to enhance your development workflow. With features like code explanation, refactoring, and documentation, it’s designed to streamline your coding experience directly within VSCode.


🚀 Features

  • 🔑 Secure Authentication:
    • Sign up with your email and webhook URLs to securely store session data.
    • Uses JWT-based session tokens to manage authentication and API keys.
  • 💬 Interactive Sidebar Chat:
    • Ask coding questions or get assistance directly from the sidebar.
    • Supports multi-turn conversations with chat history.
  • 🖱️ Right-Click Code Actions:
    • 💡 Explain Selection: Get detailed explanations of selected code.
    • 🔧 Refactor Code: Automatically refactor selected code for improved readability and performance.
    • 📃 Document Selection: Generate professional documentation for your code, including summaries, inline comments, and docstrings.
    • 📋 Apply Code: Seamlessly apply AI-generated code to your active editor with proper indentation.
  • 🧠 Powered by OpenAI:
    • Leverages gpt-4o-mini for intelligent code analysis and generation.
  • 📊 Usage Tracking:
    • Configurable prompt threshold to track and reset usage via a webhook.
  • 🖼️ Responsive UI:
    • Clean, modern chat interface with support for code blocks and an "Apply Code" button.
    • Displays typing indicators for a smooth user experience.
  • 🔒 Secure Storage:
    • Stores sensitive data like session tokens and API keys securely in VSCode’s global state.

🛠️ Installation

  1. Install the extension from the VSCode Marketplace (or sideload the .vsix file for local testing).

  2. Upon activation, the ChatGPT Searchbar panel will appear in the sidebar.

  3. Complete the setup by providing:

    • ✉️ Email Address: For user identification.
    • 🌐 Signup Webhook URL: Backend URL for user signup.
    • 📊 Track Usage Webhook URL: Backend URL for tracking prompt and token usage.
    • ⚠️ Prompt Threshold: Number of prompts before usage is reported and reset.
  4. Click Submit to authenticate and start using the extension.


💡 Usage

🗨️ Sidebar Chat

  1. Open the ChatGPT Searchbar view from the VSCode sidebar.
  2. Type your coding question or prompt in the input box.
  3. Receive responses with formatted code blocks and an option to apply code directly to your editor.

🖱️ Right-Click Code Actions

  1. Select a block of code in any editor.
  2. Right-click and choose one of the following:
    • 💡 Explain Selection: Get a detailed breakdown of what the selected code does.
    • 🔧 Refactor Code: Request AI-driven refactoring suggestions for cleaner, more efficient code.
    • 📃 Document Selection: Generate comprehensive documentation, including high-level summaries, inline comments, and docstrings.
  3. Use the Apply Code button in the chat response to insert AI-generated code into your editor.

🔑 Logout

  • Use the chatgpt-searchbar.logout command to clear your session and log out securely.

🧩 Settings

Setting Description
chatgptSessionToken Stores the JWT session token for authentication.
chatgptEmail Stores the user’s email address.
chatgptApiKey Stores the OpenAI API key securely.
backendSignupUrl URL for the signup webhook.
backendTrackUsageUrl URL for tracking prompt usage.
promptThreshold Number of prompts before usage is reported and reset.
promptCount Tracks the current number of prompts sent.

Sure! Here's an updated version of the document:


🛠 Supported Models

  • gpt-4o-mini (default model for all AI interactions)
  • 40 (available from July 2024)
  • 40-mini (available from July 2024)

🧑‍💻 Contributing

Interested in contributing? Feel free to:

  • Open an issue to report bugs or suggest features.
  • Fork the repository and submit a pull request with your improvements.

📝 License

MIT License © 2025


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