尝试以扩展 VS Code 中的代理模式!

开源 AI 代码编辑器

下载 Visual Studio Code

使用 VS Code 即表示您同意其许可证隐私声明

任何模型,任何团队

开箱即用 Claude Sonnet 等 AI 模型,或携带您自己的密钥以访问来自 Azure、Anthropic、Google、Ollama、OpenAI 和 OpenRouter 的模型。

Dropdown menu in GitHub Copilot Chat displaying AI model options: 'Claude 3.7 Sonnet' selected, with other options like 'Claude 3.5 Sonnet', 'GPT 4.5', 'GPT 4o', and 'Manage Models...' Dropdown menu in GitHub Copilot Chat displaying AI model options: 'Claude 3.7 Sonnet' selected, with other options like 'Claude 3.5 Sonnet', 'GPT 4.5', 'GPT 4o', and 'Manage Models...'

您的代码库专家

您的代码库将在本地和远程(GitHub 上)被索引,以理解相关内容,从而实现快速、具有上下文感知能力的交互。

A VS Code chat prompt. The prompt includes codebase and file context by writing #codebase and #file:HistoryView.swift in the message. A VS Code chat prompt. The prompt includes codebase and file context by writing #codebase and #file:HistoryView.swift in the message.

以您团队的方式工作的 AI

使用自定义指令和可重用的提示文件,根据您的工作流程、工具和项目来个性化交互。

Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'. Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'.

免费使用 VS Code 中的 AI 功能

无需试用,无需信用卡。只需您的 GitHub 帐户。

免费试用

代理模式

处理复杂的多步骤任务。代理模式会读取您的代码库,跨文件建议编辑,运行终端命令,并对编译或测试失败做出响应——所有这些都在一个循环中进行,直到任务完成。通过 VS Code 扩展和模型上下文协议 (MCP) 服务器,进一步优化代理模式以适应您团队的工作流程。

使用代理模式构建
VS Code window showing a code editor with projects.tsx open, alongside a chat panel in Agent mode. The chat discusses an open issue from GitHub. VS Code window showing a code editor with projects.tsx open, alongside a chat panel in Agent mode. The chat discusses an open issue from GitHub.

下一步编辑建议

在您编码时,VS Code 会预测您的下一步操作。使用 Tab 键即可在编辑器中接受由 AI 驱动的建议。它会根据您已进行的编辑,智能地推荐要更改的内容和位置。

使用 AI 驱动的建议进行编码
Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next edit suggestions is suggesting how to complete the implementation. Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next edit suggestions is suggesting how to complete the implementation.

用任何语言编码

VS Code 支持几乎所有主流编程语言。其中一些是内置的,如 JavaScript、TypeScript、CSS 和 HTML,但其他语言的扩展可以在 VS Code 市场中找到。

JavaScript 图标JavaScript
TypeScript 图标TypeScript
Python 图标Python
C# 图标C#
C++ 图标C++
HTML 图标HTML
Java 图标Java
JSON 图标JSON
PHP 图标PHP
Markdown 图标Markdown
Powershell 图标Powershell
YAML 图标YAML

完全可定制

自定义您的 VS Code 用户界面和布局,使其适应您的编码风格。

颜色主题让您可以修改 VS Code 用户界面中的颜色,以适应您的偏好和工作环境。

设置同步功能使您可以在不同的 VS Code 实例之间共享您的用户设置。

配置文件让您可以创建多套自定义设置,并在它们之间快速切换或与他人共享。

Selecting the GitHub Dark theme with a quick pick Selecting the GitHub Dark theme with a quick pick

随处编码

无论您是连接到云端、远程仓库,还是在浏览器中使用 VS Code 网页版 (vscode.dev),都可以在您最高效的地方进行编码。

内置源代码管理为您提供开箱即用的 Git 支持。许多其他源代码管理提供商可通过扩展获得。

GitHub Codespaces为任何活动提供云端开发环境——无论是长期项目,还是像审查拉取请求这样的短期任务。

vscode.dev in an Edge browser tab vscode.dev in an Edge browser tab

通过丰富功能进行编码

一个编辑器远不止于此。无论是使用内置功能还是丰富的扩展,总有适合每个人的东西。