Skip to content

Commit 8ae05ab

Browse files
committed
use the latest blocks package.
1 parent 4fa78e2 commit 8ae05ab

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@
21102110
},
21112111
"dependencies": {
21122112
"@c4312/evt": "^0.1.1",
2113-
"@deepnote/blocks": "^1.1.0",
2113+
"@deepnote/blocks": "^1.2.0",
21142114
"@enonic/fnv-plus": "^1.3.0",
21152115
"@jupyter-widgets/base": "^6.0.8",
21162116
"@jupyter-widgets/controls": "^5.0.9",

src/kernels/execution/cellExecutionCreator.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,18 @@ export class NotebookCellExecutionWrapper implements NotebookCellExecution {
6060
// Allow this to be called more than once (so we can switch out a kernel during running a cell)
6161
if (!this.started) {
6262
this._started = true;
63-
this._impl.start(startTime);
64-
this._startTime = startTime;
65-
// We clear the output as soon as we start,
66-
// We generally start with a time, when we receive a response from the kernel,
67-
// indicating the fact that the kernel has started processing the output.
68-
// That's when we clear the output. (ideally it should be cleared as soon as its queued, but thats an upstream core issue).
63+
64+
// Clear outputs immediately on first start if configured to do so
65+
// This ensures old outputs are removed before any new outputs arrive from the kernel
6966
if (this.clearOutputOnStartWithTime) {
70-
logger.trace(`Start cell ${this.cell.index} execution @ ${startTime} (clear output)`);
67+
logger.trace(`Start cell ${this.cell.index} execution (clear output)`);
7168
this._impl.clearOutput().then(noop, noop);
72-
} else {
69+
}
70+
71+
this._impl.start(startTime);
72+
this._startTime = startTime;
73+
74+
if (startTime) {
7375
logger.trace(`Start cell ${this.cell.index} execution @ ${startTime}`);
7476
}
7577
}

0 commit comments

Comments
 (0)