Visual Studio Code 标志

编辑器集成

VS Code 扩展

把 PromptFlowEngine 的提示词优化直接带入你的开发流程。描述一项修改,扩展就会基于相关文件生成结构化提示词,为其防范密钥泄露,并帮助你审查结果。

  • 进程内运行
  • 隐私防护
  • VS Code Marketplace

功能介绍

AI 编程助手拿到规格说明时,比拿到一句话时表现得更好。这个扩展围绕一个循环构建:代码库、提示词、AI、代码库。你选择范围,用自己的话描述修改,它就会生成附带相关代码的分节工程提示词。

文件会按与任务的相关度进行筛选和评分,因此提示词只携带真正重要的那几个文件,而不是整个仓库。在任何内容发送到聊天之前,隐私防护会扫描凭据和个人数据,并可以拦截、脱敏或询问你。

当助手编辑了你的文件后,审查步骤会打开源代码管理,并可以根据修改过的文件生成审查提示词,对照原始任务进行检查。扩展以 promptflow-ai.ide-extension 的名称发布在 Visual Studio Marketplace 上,也可以从仓库构建为 .vsix 包。

实际示例

从一句话任务到工程提示词

与扩展执行的完全相同的重构,由引擎在构建本页面时生成。在编辑器中,你工作区里的相关文件会作为另一个部分加入。 引擎的检查结果和生成的提示词以英文显示,与引擎和 API 返回的内容完全一致。

你输入的内容

14 token
add rate limiting to the public API and make sure existing clients keep working
你的内容行数
2
新增指导
15
部分数
8

AI 收到的内容

100/100
## Role
Act as a senior software engineer.

## Objective
Add rate limiting to the public API.

## Requirements
- Make sure existing clients keep working.
- Follow the conventions, naming, and structure already used in the codebase.
- Handle invalid input and failure paths explicitly.

## Constraints
- Do not change unrelated code, and do not add dependencies unless the task requires them.
- Keep existing public interfaces and API contracts unchanged.

## Edge cases
- Invalid, missing, and oversized input.
- Unauthenticated, unauthorized, and rate-limited requests.

## Testing
- Success responses: status code and response shape.
- Validation and error responses.
- Add tests for the new behavior, including failure paths.
- Run the existing test suite and report the result.

## Acceptance criteria
- The new behavior works as described in the objective.
- All tests pass and no unrelated files are changed.

## Expected output
- Return every change as a unified diff or as complete new and updated files.
- List the design decisions and assumptions you made.

由引擎在构建本页面时计算得出。 在界面中,每一行新增内容都标注为引擎指导,不适用的可以删除。

主要优势

功能

适用人群

使用场景

常见问题

扩展上架 Visual Studio Marketplace 了吗?

已上架。在 VS Code 的扩展视图中搜索 PromptFlowEngine,或运行 code --install-extension promptflow-ai.ide-extension。你也可以从仓库构建 .vsix 包。

它会把我的代码发送到任何地方吗?

不会。引擎在 VS Code 内部运行。只有当你在隐私防护检查后选择把生成的提示词发送到 AI 聊天时,代码才会离开你的电脑。

它需要 GitHub Copilot 吗?

不需要。“发送到 AI 聊天”在可用时使用 VS Code Chat,否则会复制提示词,因此适用于任何助手。

它自己会调用语言模型吗?

不会。提示词由确定性规则生成,因此相同的任务和文件会生成相同的提示词。

所有产品都运行同一个引擎,组合使用时不会出现意外差异。

了解背后的技巧

来自提示词工程知识中心的指南,讲解本产品所运用的理念。

无论在哪里使用 AI,都是同一个引擎。

免费、确定性、保护隐私。无需注册。