mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-25 09:50:51 +01:00
Remove root path from local notebook roots
This is no longer needed now that we don't include requireJS
This commit is contained in:
@@ -9,8 +9,8 @@ import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { getExtensionForMimeType } from 'vs/base/common/mime';
|
||||
import { FileAccess, Schemas } from 'vs/base/common/network';
|
||||
import { isMacintosh, isWeb } from 'vs/base/common/platform';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { dirname, joinPath } from 'vs/base/common/resources';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as UUID from 'vs/base/common/uuid';
|
||||
@@ -35,7 +35,7 @@ import { IScopedRendererMessaging } from 'vs/workbench/contrib/notebook/common/n
|
||||
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
|
||||
import { IWebviewService, WebviewContentPurpose, WebviewElement } from 'vs/workbench/contrib/webview/browser/webview';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { ICreationRequestMessage, IMarkupCellInitialization, FromWebviewMessage, IClickedDataUrlMessage, IContentWidgetTopRequest, IControllerPreload, ToWebviewMessage, IAckOutputHeight } from './webviewMessages';
|
||||
import { FromWebviewMessage, IAckOutputHeight, IClickedDataUrlMessage, IContentWidgetTopRequest, IControllerPreload, ICreationRequestMessage, IMarkupCellInitialization, ToWebviewMessage } from './webviewMessages';
|
||||
|
||||
export interface ICachedInset<K extends ICommonCellInfo> {
|
||||
outputId: string;
|
||||
@@ -658,15 +658,12 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
|
||||
}
|
||||
|
||||
private _createInset(webviewService: IWebviewService, content: string) {
|
||||
const rootPath = isWeb ? FileAccess.asBrowserUri('', require) : FileAccess.asFileUri('', require);
|
||||
|
||||
const workspaceFolders = this.contextService.getWorkspace().folders.map(x => x.uri);
|
||||
|
||||
this.localResourceRootsCache = [
|
||||
...this.notebookService.getNotebookProviderResourceRoots(),
|
||||
...this.notebookService.getRenderers().map(x => dirname(x.entrypoint)),
|
||||
...workspaceFolders,
|
||||
rootPath,
|
||||
];
|
||||
|
||||
const webview = webviewService.createWebviewElement(this.id, {
|
||||
|
||||
Reference in New Issue
Block a user