Skip to content

Updates to prompt file location settings - #289275

Merged
Paul (pwang347) merged 7 commits into
mainfrom
pawang/promptFilePaths
Jan 21, 2026
Merged

Paul (pwang347) merged 7 commits into
mainfrom
pawang/promptFilePaths

Conversation

@pwang347

@pwang347 Paul (pwang347) commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor
image image

Copilot AI review requested due to automatic review settings January 21, 2026 00:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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_KEY configuration and deprecates MODE_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 _listExtensionPromptFiles to 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

@pwang347
Paul (pwang347) marked this pull request as ready for review January 21, 2026 03:06
@vs-code-engineering

vs-code-engineering Bot commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Raymond Zhao (@rzhao271)

Matched files:

  • src/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css
  • src/vs/workbench/contrib/preferences/browser/settingsTree.ts
  • src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts

@pwang347 Paul (pwang347) changed the title Update prompt file paths Updates to prompt file location settings Jan 21, 2026
@pwang347
Paul (pwang347) enabled auto-merge (squash) January 21, 2026 03:08
@vs-code-engineering vs-code-engineering Bot added this to the January 2026 milestone Jan 21, 2026
@@ -273,8 +269,8 @@ export class PromptFilesLocator {
if (type === PromptsType.agent) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed? It's part of the settings defaults, right?

@pwang347
Paul (pwang347) merged commit bdc563a into main Jan 21, 2026
31 of 33 checks passed
@pwang347
Paul (pwang347) deleted the pawang/promptFilePaths branch January 21, 2026 14:55
@aeschli

Copy link
Copy Markdown
Contributor

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.

@aeschli

Copy link
Copy Markdown
Contributor

Paul (@pwang347) Nice PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants