Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ai-crNew to Visual Studio Code? Get it now.
ai-cr

ai-cr

zengyufan

|
3 installs
| (1) | Free
基于 AI 的代码评审工具,自动对比当前分支与 Master 分支差异
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Code Review (AI 代码评审)

一款基于 AI 的代码评审工具,自动对比当前分支与 Master/Main 分支的差异,并提供详细的代码审查建议。

功能特点

  • 自动对比当前分支与主干分支(默认 origin/master)
  • 使用 AI 智能分析代码变更
  • 提供详细的 Code Review 反馈报告

使用方法

  1. 在插件市场搜索 ai-cr 并安装,勾选自动更新。
  2. 在 VS Code 中打开你的项目(必须是一个 Git 仓库)。
  3. 打开命令面板(快捷键 Cmd+Shift+P 或 Ctrl+Shift+P)。
  4. 输入并运行命令 AI Code Review: Compare with Master。
  5. 如果是第一次使用,系统会提示你输入 API Key (从【360 智脑】https://ai.360.com/open 获取)。

配置说明

本插件支持自定义配置,你可以通过以下步骤修改配置:

  1. 在 VS Code 中打开设置(快捷键 Cmd+, 或 Ctrl+,)。
  2. 在搜索框中输入 ai-cr。
  3. 你可以看到以下配置项:

配置项详情

配置 ID 描述 默认值
ai-cr.apiKey AI 服务的 API Key。首次使用时会提示输入,也可手动修改。 (空)
ai-cr.targetBranch 目标分支名称。用于指定与当前分支进行对比的基准分支。 origin/master

修改目标分支示例:

如果你的主干分支是 main 而不是 master,请将 ai-cr.targetBranch 修改为 origin/main。

通过 settings.json 配置

你也可以直接在项目的 .vscode/settings.json 或全局 settings.json 中添加以下配置:

{
  "ai-cr.apiKey": "sk-xxxxxxxxxxxxxxxxxxxxxxxx",
  "ai-cr.targetBranch": "origin/main"
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft