Skip to content

fix: respect chat.promptFilesLocations ordering for file discovery#308171

Open
maruthang wants to merge 1 commit intomicrosoft:mainfrom
maruthang:fix/issue-305876-prompt-files-ordering
Open

fix: respect chat.promptFilesLocations ordering for file discovery#308171
maruthang wants to merge 1 commit intomicrosoft:mainfrom
maruthang:fix/issue-305876-prompt-files-ordering

Conversation

@maruthang
Copy link
Copy Markdown
Contributor

Summary

  • Fixed getSourceFoldersInDiscoveryOrder() to preserve the user's configured ordering in chat.promptFilesLocations instead of hardcoding user-before-local
  • Added listAllFilesInOrder() method to PromptFilesLocator that returns files with storage metadata in their configured order
  • Updated computeListPromptFiles() in promptsServiceImpl.ts to use the new ordered listing instead of making separate user/local calls that always put user first

Test plan

  • Configure chat.promptFilesLocations with local paths before user paths (e.g., { ".prompts": true, "~/prompts": true })
  • Verify that prompt files from .prompts appear before those from ~/prompts in the prompt file picker
  • Verify the reverse ordering also works when user paths are configured first
  • Verify default behavior (no custom ordering) still works correctly
  • Verify the debug panel source folder diagnostics reflect the configured order

Fixes #305876

The getSourceFoldersInDiscoveryOrder method now preserves the
configuration order instead of hardcoding user-before-local.
Added listAllFilesInOrder to return files with storage metadata
in their configured order, and updated computeListPromptFiles
to use it instead of separate user/local calls.

Fixes microsoft#305876
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat.promptFilesLocations ordering ignored

2 participants