diff --git a/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts b/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts index 9724532b252..17b18ffe506 100644 --- a/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts +++ b/src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts @@ -213,16 +213,18 @@ export class UiClientInstance extends Disposable { const uriScheme = URI.parse(targetPath).scheme; let url; - if (uriScheme === 'file') { - // If the path is for a file, start an HTML proxy server. + if (uriScheme === 'http' || uriScheme === 'https') { + // If the path is for a server, start a generic proxy server. url = await this._commandService.executeCommand( - 'positronProxy.startHtmlProxyServer', + 'positronProxy.startHttpProxyServer', targetPath ); - } else if (uriScheme === 'http' || uriScheme === 'https') { - // If the path is for a server, start a generic proxy server. + } else { + // Assume the path is for a file and start an HTML proxy server. + // The uriScheme could be 'file' in this case, or even 'C' if the path is for an HTML + // file on a Windows machine. url = await this._commandService.executeCommand( - 'positronProxy.startHttpProxyServer', + 'positronProxy.startHtmlProxyServer', targetPath ); }