chatgpt-vscode  by mpociot

VS Code extension for interacting with ChatGPT

created 2 years ago
4,980 stars

Top 10.2% on sourcepulse

GitHubView on GitHub
Project Summary

This VSCode extension enables direct interaction with OpenAI's ChatGPT from within the editor, allowing users to ask general questions or query code snippets. It targets developers and researchers seeking to leverage AI for code explanation, refactoring, optimization, and problem-solving directly in their workflow.

How It Works

The extension integrates with ChatGPT via an unofficial API, requiring a session token for authentication. It provides a sidebar panel for direct querying and context-aware commands accessible via right-click menus on selected code. Conversation context is maintained for follow-up questions, enhancing iterative development and inquiry.

Quick Start & Requirements

  • Install from the VSCode Marketplace or a .vsix file.
  • Requires a ChatGPT session token (__Secure-next-auth.session-token) obtained from chat.openai.com via browser developer tools.
  • Configure the token in VSCode settings (SESSION_TOKEN).
  • Official documentation: https://github.com/mpociot/chatgpt-vscode

Highlighted Details

  • Context menu commands for code explanation, refactoring, problem finding, and optimization.
  • Ability to insert AI-generated code snippets directly into the editor.
  • Maintains conversational context for follow-up queries.
  • Supports custom prompts for context menu commands.

Maintenance & Community

  • Project is sponsored by "What The Diff".
  • Inspired by and based on barnesoir/chatgpt-vscode-plugin and gencay/vscode-chatgpt.
  • Open to feedback and contributions.

Licensing & Compatibility

  • License: MIT.
  • Compatible with VSCode.

Limitations & Caveats

The extension is described as a proof of concept and may contain limitations or bugs. It relies on an unofficial API, which could be subject to changes or deprecation by OpenAI.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
13 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.