feat(vscode): request embedded chrome via ?embed=vscode

This commit is contained in:
Kayshen-X 2026-07-18 14:56:24 +08:00
parent 9a7bed58e3
commit 9b2de75979

View file

@ -214,7 +214,7 @@ export class PenEditorProvider implements vscode.CustomEditorProvider<PenDocumen
): Promise<void> {
const key = document.uri.fsPath;
const nonce = makeNonce();
const external = await vscode.env.asExternalUri(vscode.Uri.parse(`${client.baseUrl}/`));
const external = await vscode.env.asExternalUri(vscode.Uri.parse(`${client.baseUrl}/?embed=vscode`));
panel.webview.html = buildWebviewHtml({ iframeSrc: external.toString(), nonce });
const host = this.makeHost(document, panel, watcherState);