A VS Code plugin that supports OpenAI-compatible APIs, providing Ask and Edit modes to help developers improve coding efficiency. (一个支持OpenAI兼容API的VS Code插件,提供“询问”和“编辑”模式以帮助开发者提高编码效率。)
Features (功能)
Supports OpenAI-compatible APIs, configurable URL, API key, and model (支持OpenAI兼容的API,可配置URL、API密钥和模型)
Ask Mode: Ask questions to AI and get code-related answers (询问模式:向AI提问并获取与代码相关的答案)
Edit Mode: Let AI analyze current code and provide modification suggestions, automatically applied to the file (编辑模式:让AI分析当前代码并提供修改建议,并自动应用到文件中)
Provides project file structure information to help AI better understand context (提供项目文件结构信息以帮助AI更好地理解上下文)
Supports shortcut operations (支持快捷操作)
Configuration (配置)
Search for "AI Assistant" in VS Code settings, or click the configuration button in the top right corner of the plugin to configure the following options: (在VS Code设置中搜索“AI助手”,或点击插件右上角的配置按钮来配置以下选项:)
codeAIJinghouyu.url: API URL (default is OpenAI API address) (codeAIJinghouyu.url:API地址(默认为OpenAI API地址))
codeAIJinghouyu.apiKey: API Key (required) (codeAIJinghouyu.apiKey:API密钥(必填))
codeAIJinghouyu.model: Model Name (default is gpt-3.5-turbo) (codeAIJinghouyu.model:模型名称(默认为gpt-3.5-turbo))
codeAIJinghouyu.maxTokens: Maximum Tokens (default is 2048) (codeAIJinghouyu.maxTokens:最大令牌数(默认为2048))
codeAIJinghouyu.temperature: Temperature Parameter (default is 0.7) (codeAIJinghouyu.temperature:温度参数(默认为0.7))
Usage (使用方法)
Edit Mode (编辑模式)
Open the code file you want to modify (打开你想要修改的代码文件)
Open the plugin and select Edit mode (打开插件并选择编辑模式)
Directly propose the functionality to implement; AI will analyze the code and return modification results (直接提出要实现的功能;AI将分析代码并返回修改结果)
Click Accept All to overwrite original code, or choose to view differences to see changes. (点击全部接受以覆盖原始代码,或者选择查看差异以查看更改。)
Ask Mode (询问模式)
Select Ask mode in the plugin interface (在插件界面中选择询问模式)
LLM can chat freely (currently not including code context) (LLM可以自由聊天(目前不包括代码上下文))
Future Plans (未来计划)
Support streaming display (支持流式显示)
Support Agent mode, engineering code understanding, multi-file editing (支持代理模式、工程化代码理解和多文件编辑)