VS Code Copilot 配置文件提示未知工具警告
在使用 VS Code Copilot 时,配置文件 Ask.agent.md 可能会提示'未知工具'警告。
错误日志示例
{
"resource": "/d:/.vscode/User/globalStorage/github.copilot-chat/ask-agent/Ask.agent.md",
"owner": "prompts-diagnostics-provider",
"severity": 4,
"message": "未知工具 'github/issue_read'。",
"startLineNumber": 7,
"startColumn": 51,
"endLineNumber": 7,
"endColumn": 70
}
问题根源
这些警告通常由以下两种情况引起:
- 缺少对应扩展:部分工具需要安装特定扩展才能识别。
github/issue_read:GitHub 相关扩展github.vscode-pull-request-github/issue_fetch:GitHub Pull Requests 扩展github.vscode-pull-request-github/activePullRequest:GitHub Pull Requests 扩展
如果未安装 GitHub Pull Requests and Issues 扩展,VS Code 无法找到这些工具,从而报出'未知工具'警告。
- 内置工具 Bug:
github/issue_read来自 Copilot 内置工具,并非第三方扩展提供。VS Code 1.113 版本(2026-03-24 发布)引入了此问题,该工具被引用在所有三个内置 agent 文件中,但没有任何已安装扩展注册这个工具。这是 VS Code 团队成员已确认的 Bug,GitHub 上已有大量 Issue 报告(如 #302880、#304842、#304881 等)。

