-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releasechat-promptsPrompt and Instruction files related issuesPrompt and Instruction files related issues
Milestone
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version:
Version: 1.106.0 (user setup)
Commit: ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57
Date: 2025-11-11T16:02:25.943Z
Electron: 37.7.0
ElectronBuildId: 12597478
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
- OS Version: Window 11, MacOS
Steps to Reproduce:
- https://github.blog/changelog/2025-11-12-copilot-code-review-and-coding-agent-now-support-agent-specific-instructions/
- https://docs.github.com/ko/copilot/how-tos/configure-custom-instructions/add-repository-instructions#creating-path-specific-custom-instructions
According to the GitHub blog guide above, the excludeAgent property in the instructions file should be provided as a string.
vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.ts
Lines 390 to 399 in 858b6b7
| private validateExcludeAgent(attributes: IHeaderAttribute[], report: (markers: IMarkerData) => void): undefined { | |
| const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.excludeAgent); | |
| if (!attribute) { | |
| return; | |
| } | |
| if (attribute.value.type !== 'array') { | |
| report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be an array."), attribute.value.range, MarkerSeverity.Error)); | |
| return; | |
| } | |
| } |
In the actual code logic, it throws an error if the value isn’t an array.
Providing the value as an array doesn’t cause a syntax error.
However, since the only valid values are code-review or coding-agent the input should be a string.
Otherwise, the guide should be updated to specify an array instead of a string.
play-miyata and ThomSMG
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releasechat-promptsPrompt and Instruction files related issuesPrompt and Instruction files related issues