mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -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> {
|
||||
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 untitledUri = uri.with({ authority: '', scheme: 'untitled', path: untitledUriPath });
|
||||
this._notebookService.openNotebook(untitledUri, {
|
||||
initialContent: modelContents,
|
||||
initialContent: JSON.stringify(modelContents),
|
||||
preserveFocus: true
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user