SR command to read last REPL execution (#233372)

* SR command to read last REPL execution

* use error details

* just use the values within the error

* test error collection

* combine output helpers

* auto read item executed in REPL

* switch order so universal hotkey is in a11y help

* combine adjacent stream outputs

* self-review
This commit is contained in:
Aaron Munger
2024-11-08 14:34:33 -08:00
committed by GitHub
parent ec168810ca
commit 5f1771cb50
21 changed files with 295 additions and 169 deletions

View File

@@ -199,7 +199,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
@IBulkEditService private readonly _bulkEditService: IBulkEditService,
@IUndoRedoService private readonly _undoService: IUndoRedoService,
@ITextModelService private readonly _textModelService: ITextModelService,
@INotebookExecutionStateService notebookExecutionStateService: INotebookExecutionStateService,
@INotebookExecutionStateService private readonly notebookExecutionStateService: INotebookExecutionStateService,
) {
super();
@@ -363,6 +363,11 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
return this._selectionCollection.selections;
}
getMostRecentlyExecutedCell(): ICellViewModel | undefined {
const handle = this.notebookExecutionStateService.getLastCompletedCellForNotebook(this._notebook.uri);
return handle !== undefined ? this.getCellByHandle(handle) : undefined;
}
setEditorFocus(focused: boolean) {
this._focused = focused;
}