Use extension location instead of remote for asWebviewUri

This commit is contained in:
Matt Bierner
2021-05-20 10:32:36 -07:00
parent 0b355ffc89
commit 2270c36cff
3 changed files with 15 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import { CellEditType, IImmediateCellEditOperation, NotebookCellExecutionState,
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { asArray } from 'vs/base/common/arrays';
import { ILogService } from 'vs/platform/log/common/log';
import { Schemas } from 'vs/base/common/network';
interface IKernelData {
extensionId: ExtensionIdentifier,
@@ -190,7 +191,10 @@ export class ExtHostNotebookKernels implements ExtHostNotebookKernelsShape {
return that._proxy.$postMessage(handle, editor && that._extHostNotebook.getIdByEditor(editor), message);
},
asWebviewUri(uri: URI) {
return asWebviewUri(String(handle), uri, that._initData.remote.authority);
const remoteAuthority = extension.extensionLocation.scheme === Schemas.vscodeRemote
? that._initData.remote.authority
: undefined;
return asWebviewUri(String(handle), uri, remoteAuthority);
},
// --- priority
updateNotebookAffinity(notebook, priority) {