Skip to content

Commit 20f9418

Browse files
authored
Get the completion panel working (#1739)
* Get the completion panel working * Address review comments * Address XSS vulnerability by sanitizing HTML snippets before rendering in suggestions panel webview
1 parent e2bf13c commit 20f9418

File tree

6 files changed

+333
-19
lines changed

6 files changed

+333
-19
lines changed

.esbuild.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const baseNodeBuildOptions = {
5050
},
5151
} satisfies esbuild.BuildOptions;
5252

53+
const webviewBuildOptions = {
54+
...baseBuildOptions,
55+
platform: 'browser',
56+
target: 'es2024', // Electron 34 -> Chrome 132 -> ES2024
57+
entryPoints: [
58+
{ in: 'src/extension/completions-core/vscode-node/extension/src/copilotPanel/webView/suggestionsPanelWebview.ts', out: 'suggestionsPanelWebview' },
59+
],
60+
} satisfies esbuild.BuildOptions;
61+
5362
const nodeExtHostTestGlobs = [
5463
'src/**/vscode/**/*.test.{ts,tsx}',
5564
'src/**/vscode-node/**/*.test.{ts,tsx}',
@@ -355,6 +364,7 @@ async function main() {
355364
esbuild.build(nodeSimulationWorkbenchUIBuildOptions),
356365
esbuild.build(nodeExtHostSimulationTestOptions),
357366
esbuild.build(typeScriptServerPluginBuildOptions),
367+
esbuild.build(webviewBuildOptions),
358368
]);
359369
}
360370
}

0 commit comments

Comments
 (0)