feat: integrate skill into URL handler #290764
Open
+53
−0
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.
Description
This PR adds support for automating the installation of "skills" (multi-file folders) via the
chat-skill/installURL handler. This enables a streamlined workflow where users can install complex skills by clicking a single link (e.g.,vscode:chat-skill/install?url=...) that points to a JSON manifest.This PR resolves #290735
The handler:
nameproperty from the manifest to determine the local folder name (ensuring consistency and validity).Changes
PromptUrlHandler.ts:chat-skill/installpath.name(must exist in manifest, must be a valid filename, must not already exist on disk).mkdir -pbehavior).Validation
valid-layers-check: Pass
compilation: Pass
Testing
{ "name": "algorithmic-art", "files": [ { "source": "https://raw.githubusercontent.com/.../SKILL.md", "destination": "SKILL.md" }, { "source": "https://raw.githubusercontent.com/.../script.js", "destination": "templates/script.js" } ] }vscode:chat-skill/install?url=<RAW_URL_TO_MANIFEST>algorithmic-artis created and contains the files with the correct structure.Example manifest file:
https://gist.githubusercontent.com/bencoz/b3e03b778c3892127e36e0fe3da2a0d6/raw/80be47aa6d9e86c6acde993ccfab1e932cac0bca/algorithmic-art-skill.json