diff --git a/src/platform/common/platform/fileSystem.ts b/src/platform/common/platform/fileSystem.ts index 8cfcd11e7a6..d3aaff3c43b 100644 --- a/src/platform/common/platform/fileSystem.ts +++ b/src/platform/common/platform/fileSystem.ts @@ -34,9 +34,7 @@ export class FileSystem implements IFileSystem { } async getFiles(dir: vscode.Uri): Promise { - console.log('getFiles', { dir }); const files = await this.vscfs.readDirectory(dir); - console.log({ files }); return files.filter((f) => f[1] === vscode.FileType.File).map((f) => vscode.Uri.file(f[0])); } diff --git a/src/webviews/extension-side/variablesView/variableView.ts b/src/webviews/extension-side/variablesView/variableView.ts index a004801f5fe..067509eebdd 100644 --- a/src/webviews/extension-side/variablesView/variableView.ts +++ b/src/webviews/extension-side/variablesView/variableView.ts @@ -2,9 +2,8 @@ // Licensed under the MIT License. 'use strict'; import '../../../platform/common/extensions'; - import { Uri, WebviewView as vscodeWebviewView } from 'vscode'; - +import { joinPath } from '../../../platform/vscode-path/resources'; import { captureTelemetry, sendTelemetryEvent } from '../../../telemetry'; import { INotebookWatcher, IVariableViewPanelMapping } from './types'; import { VariableViewMessageListener } from './variableViewMessageListener'; @@ -58,14 +57,14 @@ export class VariableView extends WebviewViewHost imp private readonly commandManager: ICommandManager, private readonly documentManager: IDocumentManager ) { - const variableViewDir = Uri.joinPath(context.extensionUri, 'out', 'webviews', 'webview-side', 'viewers'); + const variableViewDir = joinPath(context.extensionUri, 'out', 'webviews', 'webview-side', 'viewers'); super( configuration, workspaceService, (c, d) => new VariableViewMessageListener(c, d), provider, variableViewDir, - [Uri.joinPath(variableViewDir, 'variableView.js')] + [joinPath(variableViewDir, 'variableView.js')] ); // Sign up if the active variable view notebook is changed, restarted or updated diff --git a/src/webviews/extension-side/webviews/webview.ts b/src/webviews/extension-side/webviews/webview.ts index 915d26b1db4..ceea1c06ee3 100644 --- a/src/webviews/extension-side/webviews/webview.ts +++ b/src/webviews/extension-side/webviews/webview.ts @@ -72,33 +72,12 @@ export abstract class Webview implements IWebview { // eslint-disable-next-line @typescript-eslint/no-explicit-any protected async generateLocalReactHtml() { - console.log('AAAAAA'); if (!this.webviewHost?.webview) { throw new Error('WebView not initialized, too early to get a Uri'); } - console.log('BBBBBB'); const uriBase = this.webviewHost?.webview.asWebviewUri(this.options.cwd).toString(); - console.log({ uriBase }); const uris = this.options.scripts.map((script) => this.webviewHost!.webview!.asWebviewUri(script)); - console.log({ uris }); - let testFiles: Uri[] = []; - try { - testFiles = await this.fs.getFiles(this.options.rootPath); - } catch (e) { - console.log(e); - } - - console.log({ testFiles }); - - // This method must be called so VSC is aware of files that can be pulled. - // Allow js and js.map files to be loaded by webpack in the webview. - testFiles - .filter((f) => { - const ext = uriPath.extname(f).toLowerCase(); - return ext === '.js' || ext === '.js.map'; - }) - .forEach((f) => this.webviewHost?.webview!.asWebviewUri(f)); const rootPath = this.webviewHost.webview.asWebviewUri(this.options.rootPath).toString(); const fontAwesomePath = this.webviewHost.webview @@ -114,7 +93,6 @@ export abstract class Webview implements IWebview { ) ) .toString(); - console.log({ rootPath, fontAwesomePath }); // Change to `true` to force on Test middleware for our react code const forceTestMiddleware = 'false'; @@ -160,7 +138,6 @@ export abstract class Webview implements IWebview { try { if (this.webviewHost?.webview) { const localFilesExist = await Promise.all(this.options.scripts.map((s) => this.fs.exists(s))); - console.log({ scripts: this.options.scripts, localFilesExist }); if (localFilesExist.every((exists) => exists === true)) { // Call our special function that sticks this script inside of an html page // and translates all of the paths to vscode-resource URIs