Fix Altair save button in the interactive window (#151389)
Altair save as button doesn't work in the interactive window Fixes #150323pull/151389/merge
parent
9545af80f6
commit
da6e512e13
|
@ -37,7 +37,6 @@ import { preloadsScriptStr, RendererMetadata } from 'vs/workbench/contrib/notebo
|
|||
import { transformWebviewThemeVars } from 'vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping';
|
||||
import { MarkupCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel';
|
||||
import { CellUri, INotebookRendererInfo, NotebookSetting, RendererMessagingSpec } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
||||
import { INotebookKernel } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
|
||||
import { IScopedRendererMessaging } from 'vs/workbench/contrib/notebook/common/notebookRendererMessagingService';
|
||||
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
|
||||
|
@ -136,7 +135,6 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
|
|||
@ILanguageService private readonly languageService: ILanguageService,
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
|
||||
@INotebookExecutionStateService notebookExecutionStateService: INotebookExecutionStateService
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -859,7 +857,9 @@ var requirejs = (function() {
|
|||
return;
|
||||
}
|
||||
|
||||
const defaultDir = dirname(this.documentUri);
|
||||
const defaultDir = this.documentUri.scheme === Schemas.vscodeInteractive ?
|
||||
this.workspaceContextService.getWorkspace().folders[0]?.uri ?? await this.fileDialogService.defaultFilePath() :
|
||||
dirname(this.documentUri);
|
||||
let defaultName: string;
|
||||
if (event.downloadName) {
|
||||
defaultName = event.downloadName;
|
||||
|
|
Loading…
Reference in New Issue