测试开发vscode插件
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
钟良源 196a5eba2a refactor(extension): 重构 AI聊天扩展 6 months ago
.idea feat(.gitignore): 添加git忽略文件 6 months ago
.vscode feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
media feat(extension): 增加工作区变更管理和代码差异对比功能- 新增工作区变更列表,显示文件状态和变更内容 6 months ago
src refactor(extension): 重构 AI聊天扩展 6 months ago
.gitignore feat(.gitignore): 添加git忽略文件 6 months ago
.npmrc feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
.vscode-test.mjs feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
.vscodeignore refactor(extension): 重构 AI聊天扩展 6 months ago
CHANGELOG.md feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
README.md docs(ai-chat): 更新 README 文档 6 months ago
eslint.config.mjs feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
package-lock.json refactor(extension): 重构 AI Chat功能 6 months ago
package.json feat(package): 增加编辑器启动时加载插件 6 months ago
tsconfig.json refactor(extension): 重构 AI Chat功能 6 months ago
tsconfig.tsbuildinfo feat:vscode插件开发,ai对话插件功能基本完成 7 months ago
vsc-extension-quickstart.md feat:vscode插件开发,ai对话插件功能基本完成 7 months ago

README.md

AI Chat

AI Chat 是一个 Visual Studio Code 扩展,允许您直接从状态栏打开 AI 聊天 Webview 面板。通过这个扩展,您可以方便地与 AI 进行交互,而无需离开编辑器环境。

功能特性

  • 状态栏快速访问:通过点击状态栏按钮快速打开 AI 聊天面板
  • 代码上下文支持:可以将当前文件作为上下文发送给 AI
  • 代码片段交互:选中代码后通过右键菜单将代码添加到对话中
  • 智能代码差异对比AI 提供的代码修改将以差异对比形式展示
  • 工作区文件管理:可以接受或拒绝 AI 建议的代码变更
  • 辅助侧边栏集成:在 VS Code 的辅助侧边栏中直接使用 AI Chat

使用方法

  1. 安装扩展后,您会在 VS Code 状态栏看到一个 "AI Chat" 按钮
  2. 点击按钮打开聊天面板
  3. 可以通过以下方式提供上下文:
    • 点击面板中的 "+" 按钮选择文件作为上下文
    • 在编辑器中选中代码,右键选择"添加至对话"
  4. 输入您的问题并与 AI 进行交互
  5. 如果 AI 提供了代码修改建议,您可以:
    • 查看代码差异
    • 接受或拒绝变更

扩展命令

  • ai-chat.openWebview:打开 AI Chat 面板
  • extension.addToChat:将选中的代码添加到对话中

快捷操作

  • 右键菜单:在编辑器中选中代码后,可通过右键菜单快速添加到对话
  • 状态栏按钮:点击状态栏的 "AI Chat" 按钮快速打开面板

技术细节

本扩展使用以下技术构建:

扩展通过 Webview 技术实现富交互界面,并与 AI 后端服务通信以提供智能代码辅助功能。

注意事项

此扩展需要访问 AI 后端服务才能正常工作。默认配置使用内部测试服务,实际使用时可能需要配置自己的 API 服务地址。

Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • myExtension.enable: Enable/disable this extension.
  • myExtension.thing: Set to blah to do something.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.

For more information

Enjoy!