MCPcopy Index your code
hub / github.com/microsoft/SandDance / newPanel

Function newPanel

extensions/common-backend/src/panel.ts:12–32  ·  view source on GitHub ↗
(context: vscode.ExtensionContext, uriFsPath: string, uriTabName?: string)

Source from the content-addressed store, hash-verified

10}
11
12export function newPanel(context: vscode.ExtensionContext, uriFsPath: string, uriTabName?: string) {
13 const webViewWithUri: WebViewWithUri = {
14 panel: vscode.window.createWebviewPanel(
15 'sandDance',
16 `SandDance: ${path.basename(uriTabName || uriFsPath)}`,
17 vscode.ViewColumn.One,
18 {
19 enableScripts: true,
20 // Only allow the webview to access resources in our extension's media directory
21 localResourceRoots: [
22 vscode.Uri.file(path.join(context.extensionPath, 'resources')),
23 ],
24 retainContextWhenHidden: true,
25 },
26 ),
27 uriFsPath,
28 };
29 const webView = webViewWithUri.panel.webview;
30 webViewWithUri.panel.webview.html = getWebviewContent(webView, context.extensionPath, uriFsPath);
31 return webViewWithUri;
32}

Callers 2

viewInSandDanceFunction · 0.90
activateFunction · 0.90

Calls 1

getWebviewContentFunction · 0.90

Tested by

no test coverage detected