Skip to content

Conversation

@pwang347
Copy link
Member

@pwang347 pwang347 commented Jan 29, 2026

Problem: extension-provided URIs can use virtual file systems. URI scheme check currently rejects those, but we don't want to remove this check. I think we can just check if the files were extension-contributed.

image

Copilot AI review requested due to automatic review settings January 29, 2026 00:14
@pwang347 pwang347 marked this pull request as ready for review January 29, 2026 00:24
Copy link
Contributor

Copilot AI left a 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 adds support for the copilot-skill URI scheme to be rendered in chat markdown content without being sanitized away.

Changes:

  • Added new copilotSkill constant to the Schemas namespace for the copilot-skill URI scheme
  • Included Schemas.copilotSkill in the list of allowed link schemes for chat markdown rendering

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/base/common/network.ts Added new copilotSkill scheme constant with documentation
src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts Added import for Schemas and included copilotSkill in allowed link schemes

zhichli
zhichli previously approved these changes Jan 29, 2026
@pwang347 pwang347 marked this pull request as draft January 29, 2026 00:32
@pwang347 pwang347 requested review from aeschli and mjbvz January 29, 2026 01:18
@pwang347 pwang347 marked this pull request as ready for review January 29, 2026 01:20
@pwang347
Copy link
Member Author

@mjbvz let me know if this change looks reasonable to you. Thanks!

@aeschli
Copy link
Contributor

aeschli commented Jan 29, 2026

The solution seems to be to specific to prompt files.

The workspace can be opened on a virtual filesystem, we use virtual file systems for many things: vscode-userdata, vscode,, 'untitled' generated JSON schemas, notebook cells. Most of them are valid URIs to be opened.

For DOM sanitize, can we not just allow '*'? My understanding is that in the end it's our opener that opens the editor.

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.

4 participants