-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Add chat extension custom URI to allowed schemes for rendering #291455
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 adds support for the copilot-skill URI scheme to be rendered in chat markdown content without being sanitized away.
Changes:
- Added new
copilotSkillconstant to theSchemasnamespace for thecopilot-skillURI scheme - Included
Schemas.copilotSkillin 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 |
|
@mjbvz let me know if this change looks reasonable to you. Thanks! |
|
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: For DOM sanitize, can we not just allow '*'? My understanding is that in the end it's our opener that opens the editor. |
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.