mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix parameterized notebook output (#15233)
This commit is contained in:
@@ -363,11 +363,14 @@ export class RunParametersAction extends TooltipFromLabelAction {
|
|||||||
**/
|
**/
|
||||||
public async openParameterizedNotebook(uri: URI): Promise<void> {
|
public async openParameterizedNotebook(uri: URI): Promise<void> {
|
||||||
const editor = this._notebookService.findNotebookEditor(uri);
|
const editor = this._notebookService.findNotebookEditor(uri);
|
||||||
let modelContents = JSON.stringify(editor.model.toJSON());
|
let modelContents = editor.model.toJSON();
|
||||||
|
modelContents.cells.forEach(cell => {
|
||||||
|
cell.outputs = [];
|
||||||
|
});
|
||||||
let untitledUriPath = this._notebookService.getUntitledUriPath(path.basename(uri.fsPath));
|
let untitledUriPath = this._notebookService.getUntitledUriPath(path.basename(uri.fsPath));
|
||||||
let untitledUri = uri.with({ authority: '', scheme: 'untitled', path: untitledUriPath });
|
let untitledUri = uri.with({ authority: '', scheme: 'untitled', path: untitledUriPath });
|
||||||
this._notebookService.openNotebook(untitledUri, {
|
this._notebookService.openNotebook(untitledUri, {
|
||||||
initialContent: modelContents,
|
initialContent: JSON.stringify(modelContents),
|
||||||
preserveFocus: true
|
preserveFocus: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user