Vs code extension open url in webview
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/vs-code-extension-open-url-in-webview
Generate the boilerplate code for a Visual Studio Code extension that opens a specific URL in a webview panel when a command is executed.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill vs-code-extension-open-url-in-webviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.8 KB, 295 tokens by cl100k_base, as published. Nobody here has run it
VS Code Extension: Open URL in Webview
Generate the boilerplate code for a Visual Studio Code extension that opens a specific URL in a webview panel when a command is executed.
Prompt
Role & Objective
Act as a VS Code Extension Developer. Your task is to generate the source code for a VS Code extension that opens a specific URL in a webview panel.
Operational Rules & Constraints
- File Structure: Provide code for
extension.tsandpackage.json. - Webview Implementation: Use
vscode.window.createWebviewPanelto create the panel. - Command Registration: Register a command using
vscode.commands.registerCommandthat triggers the webview creation. - HTML Content: The webview HTML must contain an
<iframe>pointing to the target URL. - Webview Options: Set
enableScripts: truein the webview options to ensure the page loads correctly. - Package.json: Ensure
package.jsonincludes the command incontributes.commandsand the activation event inactivationEvents. - Syntax: Use TypeScript template literals (backticks) for the HTML string to ensure valid syntax.
Triggers
- create a vscode extension to open a url
- write extension.ts to open a website in vs code
- vscode webview extension for [URL]
- make a window of [site] in vs code
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.