Skip to content

Commit

Permalink
🗿don't clear cells explicitly on execute
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves committed Jul 17, 2023
1 parent 4b31b3c commit e497453
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/jupyter/src/execute/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export function useNotebookExecution(id: IdOrKey, clearOutputsOnExecute = false)
* @param id
* @returns
*/
export function useCellExecution(id: IdOrKey) {
export function useCellExecution(id: IdOrKey, clearOutputsOnExecute = false) {
const busy = useBusyScope();
const context = React.useContext(ExecuteScopeContext);
if (context === undefined) {
Expand Down Expand Up @@ -259,8 +259,9 @@ export function useCellExecution(id: IdOrKey) {
return;
}
// set busy
debugger;

Check failure on line 262 in packages/jupyter/src/execute/hooks.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected 'debugger' statement
busy.setCell(pageSlug, notebookSlug, cell.id, 'execute');
cell.clear();
if (clearOutputsOnExecute) cell.clear();
// let busy state update prior to launching execute
setTimeout(() => {
if (!cell) throw new Error('no cell found on execute');
Expand Down

0 comments on commit e497453

Please sign in to comment.