Repository navigation
Updates to prompt file location settings - #289275
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates prompt file path handling to enforce cross-platform compatibility by restricting path configurations to forward slashes only. The changes introduce a new chat.agentFilesLocations configuration key to replace the deprecated chat.modeFilesLocations, implement simplified path validation that rejects backslashes, and add warnings for deprecated glob pattern usage in prompt locations.
Changes:
- Introduces
AGENTS_LOCATION_KEYconfiguration and deprecatesMODE_LOCATION_KEY - Updates path validation to reject backslashes and require forward slashes for cross-platform sharing
- Adds glob pattern detection and warning mechanism for prompt and instruction file locations
- Registers new internal command
_listExtensionPromptFilesto enumerate extension-contributed prompt files
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/promptSyntax/utils/promptFilesLocator.test.ts | Adds tests for backslash rejection and introduces comprehensive test suite for the new hasGlobPattern function |
| src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.ts | Implements hasGlobPattern function, warnForGlobPatterns method, and introduces VALID_SIMPLIFIED_PATH_PATTERN with isValidSimplifiedPath function while deprecating skill-specific naming |
| src/vs/workbench/contrib/chat/common/promptSyntax/config/config.ts | Introduces AGENTS_LOCATION_KEY, deprecates MODE_LOCATION_KEY, updates getPromptFileLocationsConfigKey to return new key, and restricts isTildePath to forward slashes only |
| src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.ts | Adds _listExtensionPromptFiles internal command that lists all extension-contributed prompt files across all prompt types |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Adds new chat.agentFilesLocations configuration schema with simplified path validation, updates skills configuration to use new pattern, and updates validation error messages |
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
| @@ -273,8 +269,8 @@ export class PromptFilesLocator { | |||
| if (type === PromptsType.agent) { | |||
There was a problem hiding this comment.
Can this be removed? It's part of the settings defaults, right?
|
Raymond Zhao (@rzhao271) FYI additions to the settingsTree, in particular the preferencesValidation: https://github.com/microsoft/vscode/pull/289275/changes#diff-0be81775d72d1d46033f1e938ad95791f7c106d94467b9f4708bb07e3b174b37 the changes look good and straightforward to me so I gave the review approval. Please speak up if you want us to improve this. |
|
Paul (@pwang347) Nice PR! |
Uh oh!
There was an error while loading. Please reload this page.