From 6b458202a3447c3030ed6e7170867a5acc88e4c8 Mon Sep 17 00:00:00 2001 From: sharon wang Date: Wed, 2 Oct 2024 14:15:18 -0400 Subject: [PATCH] always send html plot content to a proxy server we determine the appropriate proxy server type (static HTML or generic HTTP) based on the URI scheme of the file path. --- .../languageRuntime/common/languageRuntimeUiClient.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts b/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts index e35ffea1725..9724532b252 100644 --- a/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts +++ b/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts @@ -161,14 +161,9 @@ export class UiClientInstance extends Disposable { // Wrap the ShowHtmlFile event to start a proxy server for the HTML file. this._register(this._comm.onDidShowHtmlFile(async e => { - let uri: URI; try { - if (e.path.endsWith('.html') || e.path.endsWith('.htm')) { - // Start an HTML proxy server for the file - uri = await this.startHtmlProxyServer(e.path); - } else { - uri = URI.parse(e.path); - } + // Start an HTML proxy server for the file + const uri = await this.startHtmlProxyServer(e.path); if (e.is_plot) { // Check the configuration to see if we should open the plot