Use proper virtual file system for prompt files provider extension API#289234
Merged
Use proper virtual file system for prompt files provider extension API#289234
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the chat prompt files provider API to use a proper virtual file system (vscode-chat-prompt) for inline prompt content, enabling consumers (including extensions) to read prompt content via the standard file APIs.
Changes:
- Expands the proposed prompt resource descriptor typing and updates ext host types accordingly.
- Introduces a
vscode-chat-promptfile system provider backed by the in-memory prompt content store. - Adds supporting plumbing: URI normalization for content lookup, an internal command to list extension prompt files, and markdown sanitization allowance for the new scheme.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts | Updates proposed API types so chat resources use a unified descriptor shape. |
| src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.ts | Adds an internal command to enumerate extension-contributed prompt files. |
| src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptContentStore.ts | Normalizes vscode-chat-prompt URIs for stable content lookup across metadata variants. |
| src/vs/workbench/contrib/chat/browser/promptSyntax/chatPromptFileSystemProvider.ts | Adds an IFileSystemProvider for vscode-chat-prompt URIs to support workspace.fs reads. |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Ensures the new provider module is loaded/registered in the workbench. |
| src/vs/workbench/api/common/extHostTypes.ts | Aligns ext host wrapper types with the updated resource descriptor type. |
| src/vs/workbench/api/common/extHostChatAgents2.ts | Generates typed virtual URIs for inline prompt content and converts descriptors to IPC resources. |
| src/vs/base/browser/markdownRenderer.ts | Allows vscode-chat-prompt links through markdown sanitization. |
DonJayamanne
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.