-
Notifications
You must be signed in to change notification settings - Fork 37.5k
Updates to prompt file location settings #289275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.ts
Outdated
Show resolved
Hide resolved
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @rzhao271Matched files:
|
Uh oh!
There was an error while loading. Please reload this page.