@marimo-team/islands 0.25.3-dev388 → 0.25.3-dev394
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-BpCrAeX0.js → ConnectedDataExplorerComponent-1DGGwl88.js} +9 -9
- package/dist/{ErrorBoundary-_mFP3LkM.js → ErrorBoundary-DDIASniH.js} +6 -6
- package/dist/{abnfDiagram-VCTEODGH-ZqNgGZlz.js → abnfDiagram-VCTEODGH-CeQEbVik.js} +2 -2
- package/dist/{any-language-editor-CFbAr7vc.js → any-language-editor-C_s_ZoaK.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-BEUaR96d.js → architectureDiagram-5GKGNRK7-C8xUpTAb.js} +1 -1
- package/dist/{assertNever-5uYEbJc8.js → assertNever-DXGfUmPW.js} +2 -2
- package/dist/assets/__vite-browser-external-C9HF3uHE.js +1 -0
- package/dist/assets/worker-B4Cpvr8b.js +171 -0
- package/dist/{chat-ui-BKSYhGMh.js → chat-ui-B6bY_0LF.js} +774 -774
- package/dist/{check-BbhVyViy.js → check-ywinAQy6.js} +1 -1
- package/dist/{chunk-IMKFNOWR-BdEPmWQI.js → chunk-IMKFNOWR-DY7AWyNi.js} +1 -1
- package/dist/{chunk-SHT3W25Y-IvvXM3xf.js → chunk-SHT3W25Y-D4epY9MY.js} +1 -1
- package/dist/{chunk-SVP7TREG-C_qpJUv1.js → chunk-SVP7TREG-CKsl2Q6r.js} +1 -1
- package/dist/{chunk-TICWLB2K-C4agYVWP.js → chunk-TICWLB2K-CMsD2y0F.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-CT2iq8uF.js → classDiagram-ZZMXUADV-C4FsLnvt.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-Coe_dD0r.js → classDiagram-v2-VYDZK3BY-BJRuFZeI.js} +2 -2
- package/dist/{code-visibility-DkMNjdNe.js → code-visibility-CByYqwFv.js} +13 -13
- package/dist/{common-Ces9ooG_.js → common-KkgATX2Y.js} +4918 -4910
- package/dist/{config-DJ8M-gPL.js → config-DOwBtRkI.js} +3 -3
- package/dist/{copy-icon-xWvA8ybp.js → copy-icon-BKcX0ltw.js} +2 -2
- package/dist/{createReducer-fp0gX_9U.js → createReducer-Bjx6kuxh.js} +1 -1
- package/dist/{cynefinDiagram-5FMLGOSQ-D0LKziUu.js → cynefinDiagram-5FMLGOSQ-DyI_lSsn.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-Cmgziaw8.js → dagre-GXQ25YYZ-Buoy6sX-.js} +1 -1
- package/dist/{data-grid-overlay-editor-uNMslVKY.js → data-grid-overlay-editor-BHrTJhN3.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-D-lZsALU.js → diagram-S7CK7UJ4-CbSD1DUy.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-TcbdsFoT.js → diagram-UQ7AKVKN-Dapj2rQm.js} +1 -1
- package/dist/{diagram-VX7I27RA-D5BqZi1q.js → diagram-VX7I27RA-CxA3txtC.js} +1 -1
- package/dist/{diagram-Z3DM3KII-MNc7jqvr.js → diagram-Z3DM3KII-BEZqz916.js} +1 -1
- package/dist/{dialog-Cm0VGdxc.js → dialog-mwa6XN15.js} +2 -2
- package/dist/{dropdown-menu-DfamXjVI.js → dropdown-menu-CmgUseHo.js} +5 -5
- package/dist/duckdb-keywords-CdzX4o33.js +3 -0
- package/dist/{ebnfDiagram-PWID7BFC-Cxt6ywyX.js → ebnfDiagram-PWID7BFC-Dmw-1JV3.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-BLF-askI.js → erDiagram-RLTQ6QDP-DZpG4cbm.js} +1 -1
- package/dist/{error-banner-k06CAftu.js → error-banner-CHPLqogX.js} +1 -1
- package/dist/{error-entries-rtPWQkJk.js → error-entries-Bk96zt4w.js} +825 -690
- package/dist/{feedback-button-i960qUnq.js → feedback-button-2FaWjlaR.js} +12 -12
- package/dist/{flowDiagram-HODETNUW-CsLw2mWn.js → flowDiagram-HODETNUW-B02oHnBv.js} +2 -2
- package/dist/{formats-DQ-qq-dU.js → formats-BDqe9cfr.js} +1 -1
- package/dist/{glide-data-editor-_EEhlGzS.js → glide-data-editor-B9Yq6Wg1.js} +11 -11
- package/dist/{glide-utils-CHrghEu-.js → glide-utils-DYKWS2YV.js} +2 -2
- package/dist/{globals-DKkjIolp.js → globals-S4D5AVKN.js} +3 -3
- package/dist/{html-to-image-B5nTOeMI.js → html-to-image-BauFF9F_.js} +4842 -4821
- package/dist/{infoDiagram-27XIBGKW-CdSApBWg.js → infoDiagram-27XIBGKW-BPbQHO9m.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-BnzQ8SI5.js → ishikawaDiagram-5VMMS53U-DmnKSNi7.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-D2llTpeX.js → kanban-definition-UXKFOSKX-u5PZbsBe.js} +1 -1
- package/dist/main.js +6236 -6175
- package/dist/{mermaid-BcNMyKmf.js → mermaid-ffopDjig.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-uoEsfD5R.js → mindmap-definition-YA3MSWOX-CX187lhP.js} +1 -1
- package/dist/{number-overlay-editor-D5U7jbrh.js → number-overlay-editor-l7DB2HCO.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DTWrE0S4.js → pegDiagram-XKGWAZYB-Bj6HGPak.js} +2 -2
- package/dist/{pencil-weySvN0N.js → pencil-CijoRsa3.js} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-COME2oGN.js → pieDiagram-E7YTZNPT-C_wIgDJM.js} +1 -1
- package/dist/{process-output-DNxpsd4n.js → process-output-Deae7dX1.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-CUeFcNTY.js → railroadDiagram-O6MQD6OU-CwoJvnvC.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-BUR4lDZG.js → requirementDiagram-BXWQKSXE-C8JuhLLL.js} +1 -1
- package/dist/{reveal-component-BM9TozVQ.js → reveal-component-VR4UzAUv.js} +37 -37
- package/dist/{select-Ca-POp4c.js → select-DW32QOzC.js} +4 -4
- package/dist/{sequenceDiagram-WJ2MYXX4-CSPmml3q.js → sequenceDiagram-WJ2MYXX4-RbrRdoiV.js} +1 -1
- package/dist/{spec-BgSMwzks.js → spec-Ww0JjShW.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-BDUC8Pi9.js → stateDiagram-D77RDMKH-DWdIvCnU.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BH-qyk8a.js → stateDiagram-v2-MP3YSRHH-BG0j9crW.js} +2 -2
- package/dist/{static-state-Cqzv5X7B.js → static-state-CnQdTBTW.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-CLE9Kiir.js → swimlanes-42K2YHIH-B6zUw4gq.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-Cv8kWAeA.js → swimlanesDiagram-VR7AAH4N-DjVEnsIG.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-fbRGX21i.js → timeline-definition-24CTP7MA-DSAxwqnC.js} +1 -1
- package/dist/{toast-0xspcdmv.js → toast-Crofa36R.js} +3 -3
- package/dist/{tooltip-BwlFTaNy.js → tooltip-Bg-SDCwa.js} +1 -1
- package/dist/{use-restore-focus-fKgXR0nb.js → use-restore-focus-CE9Sflmg.js} +1298 -1283
- package/dist/{useDateFormatter-B7LvPmsw.js → useDateFormatter-D5fsC9ot.js} +2 -2
- package/dist/{useDeepCompareMemoize-OhBYt-q2.js → useDeepCompareMemoize-Bvrue1iy.js} +1 -1
- package/dist/{useLifecycle-D9xcFAIN.js → useLifecycle-Ctr5lECo.js} +1 -1
- package/dist/{vega-component-Chak9Aon.js → vega-component-DQZhTzVQ.js} +6 -6
- package/dist/{vennDiagram-4TSXK5OY-BzKtg8gL.js → vennDiagram-4TSXK5OY-FAGYRdBj.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-R0SgDvz1.js → wardleyDiagram-VM6X3IG4-BlB973r1.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-DRskTHEM.js → xychartDiagram-S5SC5T6Z-CywvmjIK.js} +1 -1
- package/package.json +2 -2
- package/src/__mocks__/executions.ts +48 -8
- package/src/__mocks__/notebook.ts +20 -42
- package/src/components/app-config/__tests__/add-model-discovery.test.tsx +255 -0
- package/src/components/app-config/__tests__/model-discovery.test.tsx +183 -0
- package/src/components/app-config/ai-config.tsx +20 -24
- package/src/components/app-config/model-discovery.tsx +118 -184
- package/src/components/app-config/model-provider-config.ts +25 -0
- package/src/components/editor/Output.tsx +5 -4
- package/src/components/editor/__tests__/data-attributes.test.tsx +1 -6
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +11 -16
- package/src/components/editor/__tests__/output-persistence.test.tsx +6 -24
- package/src/components/editor/actions/__tests__/useSetOutputsExpanded.test.ts +6 -8
- package/src/components/editor/actions/useSetOutputsExpanded.ts +12 -4
- package/src/components/editor/cell/cell-context-menu.tsx +3 -2
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +89 -72
- package/src/components/editor/notebook-cell.tsx +15 -10
- package/src/components/editor/output/console/process-output.ts +4 -2
- package/src/components/editor/renderers/cells-renderer.tsx +3 -1
- package/src/components/editor/renderers/grid-layout/__tests__/grid-layout.test.tsx +5 -11
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +9 -8
- package/src/components/editor/renderers/types.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/utils.ts +4 -4
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +5 -8
- package/src/components/scratchpad/scratchpad.tsx +6 -2
- package/src/components/slides/__tests__/cell-output-block.test.tsx +7 -8
- package/src/components/slides/__tests__/minimap-actions.test.tsx +3 -3
- package/src/components/slides/__tests__/slide-cell-view.test.tsx +1 -0
- package/src/components/slides/slide-cell-view.tsx +1 -3
- package/src/components/slides/slide.tsx +3 -3
- package/src/core/ai/context/__tests__/registry.test.ts +7 -11
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +113 -35
- package/src/core/ai/context/providers/__tests__/error.test.ts +74 -191
- package/src/core/ai/context/providers/cell-output.ts +11 -6
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +8 -103
- package/src/core/cells/__tests__/cells.test.ts +40 -292
- package/src/core/cells/__tests__/clear-outputs.test.ts +151 -0
- package/src/core/cells/__tests__/harness.ts +14 -12
- package/src/core/cells/__tests__/layout.test.ts +20 -26
- package/src/core/cells/__tests__/notebook-outline.test.ts +49 -43
- package/src/core/cells/__tests__/session.test.ts +26 -146
- package/src/core/cells/actions.ts +49 -9
- package/src/core/cells/cell.ts +0 -13
- package/src/core/cells/cells.ts +53 -62
- package/src/core/cells/focus.ts +6 -1
- package/src/core/cells/layout.ts +2 -3
- package/src/core/cells/outputs.ts +2 -2
- package/src/core/cells/session.ts +3 -38
- package/src/core/cells/types.ts +6 -8
- package/src/core/cells/utils.ts +4 -3
- package/src/core/codemirror/ai/__tests__/resources.test.ts +7 -11
- package/src/core/config/config-schema.ts +15 -0
- package/src/core/errors/__tests__/error-entries.test.ts +52 -18
- package/src/core/errors/error-entries.ts +21 -11
- package/src/core/executions/__tests__/freshness.test.ts +7 -4
- package/src/core/executions/__tests__/hooks.test.tsx +5 -1
- package/src/core/executions/__tests__/interrupt.test.ts +2 -0
- package/src/core/executions/__tests__/output-lifecycle.test.ts +201 -0
- package/src/core/executions/__tests__/output.test.ts +87 -3
- package/src/core/executions/__tests__/select.test.ts +17 -10
- package/src/core/executions/atoms.ts +73 -15
- package/src/core/executions/freshness.ts +1 -1
- package/src/core/executions/hooks.ts +18 -8
- package/src/core/executions/index.ts +6 -0
- package/src/core/executions/output.ts +122 -38
- package/src/core/executions/select.ts +2 -2
- package/src/core/export/__tests__/hooks.test.ts +20 -29
- package/src/core/export/hooks.ts +7 -9
- package/src/core/islands/__tests__/iframe-resizer.test.ts +91 -0
- package/src/core/islands/__tests__/main.test.ts +17 -0
- package/src/core/islands/components/__tests__/web-components.test.tsx +13 -15
- package/src/core/islands/components/output-wrapper.tsx +15 -20
- package/src/core/islands/iframe-resizer.ts +38 -0
- package/src/core/islands/main.ts +3 -0
- package/src/core/lifecycle/render-policy.ts +7 -4
- package/src/core/network/__tests__/ai.test.ts +41 -0
- package/src/core/network/ai.ts +12 -0
- package/src/core/notebook/document/__tests__/codemirror.test.ts +2 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +19 -0
- package/src/core/notebook/replica/__tests__/results.test.ts +45 -16
- package/src/core/notebook/replica/index.ts +1 -1
- package/src/core/notebook/replica/replica.ts +19 -4
- package/src/core/notebook/replica/resources/executions.ts +100 -9
- package/src/core/notebook/replica/resources/results.ts +46 -31
- package/src/core/transports/__tests__/static.test.ts +5 -3
- package/src/stories/cell.stories.tsx +40 -30
- package/src/stories/layout/vertical/one-column.stories.tsx +15 -7
- package/dist/assets/__vite-browser-external-C5NhJPNJ.js +0 -1
- package/dist/assets/worker-D-n8vtGi.js +0 -171
- package/dist/duckdb-keywords-BGArYVVK.js +0 -3
package/src/core/cells/cell.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type {
|
|
|
5
5
|
CellRunStatus,
|
|
6
6
|
} from "@/core/executions";
|
|
7
7
|
import { extractAllTracebackInfo, type TracebackInfo } from "@/utils/traceback";
|
|
8
|
-
import { parseOutline } from "../dom/outline";
|
|
9
8
|
import type { CellMessage, OutputMessage } from "../kernel/messages";
|
|
10
9
|
import { collapseConsoleOutputs } from "./collapseConsoleOutputs";
|
|
11
10
|
import type { CellRuntimeState, ConsoleOutputMessage } from "./types";
|
|
@@ -35,16 +34,6 @@ export function transitionCell(
|
|
|
35
34
|
if (message.status === "queued") {
|
|
36
35
|
nextCell.debuggerActive = false;
|
|
37
36
|
}
|
|
38
|
-
// A skipped cell's output is the notice that an ancestor stopped it, which
|
|
39
|
-
// has nothing to do with the run that is starting.
|
|
40
|
-
if (
|
|
41
|
-
message.status === "running" &&
|
|
42
|
-
errorTypes(cell.output).some((type) => type.includes("ancestor"))
|
|
43
|
-
) {
|
|
44
|
-
nextCell.output = null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
nextCell.output = message.output ?? nextCell.output;
|
|
48
37
|
// Tri-state partial update: an omitted field (undefined) leaves the hint
|
|
49
38
|
// unchanged; null explicitly clears it; a string sets it.
|
|
50
39
|
if (message.serialization !== undefined) {
|
|
@@ -95,8 +84,6 @@ export function transitionCell(
|
|
|
95
84
|
]);
|
|
96
85
|
}
|
|
97
86
|
nextCell.consoleOutputs = consoleOutputs;
|
|
98
|
-
// Derive outline from output
|
|
99
|
-
nextCell.outline = parseOutline(nextCell.output);
|
|
100
87
|
|
|
101
88
|
// Transition PDB
|
|
102
89
|
const newConsoleOutputs = [message.console].flat().filter(Boolean);
|
package/src/core/cells/cells.ts
CHANGED
|
@@ -7,9 +7,13 @@ import { createRef, type ReducerWithoutAction } from "react";
|
|
|
7
7
|
import type { CellHandle } from "@/components/editor/notebook-cell";
|
|
8
8
|
import type { EditableDocument, Placement } from "@/core/notebook/document";
|
|
9
9
|
import {
|
|
10
|
+
type CellOutput,
|
|
10
11
|
cellExecutionInputsAtom,
|
|
11
12
|
cellExecutionView,
|
|
12
13
|
cellFreshnessAtom,
|
|
14
|
+
cellOutlineAtom,
|
|
15
|
+
cellOutputAtom,
|
|
16
|
+
releaseCellOutputAtoms,
|
|
13
17
|
} from "@/core/executions";
|
|
14
18
|
import type { CellColumnId } from "./layout";
|
|
15
19
|
import { invariant } from "@/utils/invariant";
|
|
@@ -37,6 +41,7 @@ import {
|
|
|
37
41
|
type CellRuntimeState,
|
|
38
42
|
createCell,
|
|
39
43
|
createCellRuntimeState,
|
|
44
|
+
type RuntimeCell,
|
|
40
45
|
} from "./types";
|
|
41
46
|
import {
|
|
42
47
|
canUndoDeletes,
|
|
@@ -230,8 +235,8 @@ const {
|
|
|
230
235
|
});
|
|
231
236
|
},
|
|
232
237
|
/**
|
|
233
|
-
* Start each cell's runtime over for a new kernel. WASM keeps the
|
|
234
|
-
* its mount-time snapshot gave it.
|
|
238
|
+
* Start each cell's runtime over for a new kernel. WASM keeps the console
|
|
239
|
+
* output its mount-time snapshot gave it.
|
|
235
240
|
*/
|
|
236
241
|
resetCellRuntimes: (state) => {
|
|
237
242
|
const preserveSnapshot = isWasm();
|
|
@@ -241,7 +246,7 @@ const {
|
|
|
241
246
|
const hasSnapshot =
|
|
242
247
|
preserveSnapshot &&
|
|
243
248
|
previous !== undefined &&
|
|
244
|
-
|
|
249
|
+
previous.consoleOutputs.length > 0;
|
|
245
250
|
cellRuntime[cellId] = hasSnapshot ? previous : createCellRuntimeState();
|
|
246
251
|
}
|
|
247
252
|
return { ...state, cellRuntime };
|
|
@@ -291,48 +296,35 @@ const {
|
|
|
291
296
|
cellLogs: [],
|
|
292
297
|
};
|
|
293
298
|
},
|
|
294
|
-
clearCellOutput: (state, action: { cellId: CellId }) => {
|
|
295
|
-
const { cellId } = action;
|
|
296
|
-
return updateCellRuntimeState({
|
|
297
|
-
state,
|
|
298
|
-
cellId,
|
|
299
|
-
cellReducer: (cell) => ({
|
|
300
|
-
...cell,
|
|
301
|
-
output: null,
|
|
302
|
-
consoleOutputs: [],
|
|
303
|
-
}),
|
|
304
|
-
});
|
|
305
|
-
},
|
|
306
299
|
clearCellConsoleOutput: (state, action: { cellId: CellId }) => {
|
|
307
|
-
|
|
308
|
-
return updateCellRuntimeState({
|
|
309
|
-
state,
|
|
310
|
-
cellId,
|
|
311
|
-
cellReducer: (cell) => ({
|
|
312
|
-
...cell,
|
|
313
|
-
// Remove everything except unresponsed stdin
|
|
314
|
-
consoleOutputs: cell.consoleOutputs.filter(
|
|
315
|
-
(output) => output.channel === "stdin" && output.response == null,
|
|
316
|
-
),
|
|
317
|
-
}),
|
|
318
|
-
});
|
|
300
|
+
return clearConsoleOutputs(state, [action.cellId]);
|
|
319
301
|
},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
for (const cellId of state.cellIds) {
|
|
323
|
-
newCellRuntime[cellId] = {
|
|
324
|
-
...newCellRuntime[cellId],
|
|
325
|
-
output: null,
|
|
326
|
-
consoleOutputs: [],
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
return {
|
|
330
|
-
...state,
|
|
331
|
-
cellRuntime: newCellRuntime,
|
|
332
|
-
};
|
|
302
|
+
clearCellConsoleOutputs: (state, action: { cellIds: readonly CellId[] }) => {
|
|
303
|
+
return clearConsoleOutputs(state, action.cellIds);
|
|
333
304
|
},
|
|
334
305
|
});
|
|
335
306
|
|
|
307
|
+
function clearConsoleOutputs(
|
|
308
|
+
state: NotebookState,
|
|
309
|
+
cellIds: readonly CellId[],
|
|
310
|
+
): NotebookState {
|
|
311
|
+
const cellRuntime = { ...state.cellRuntime };
|
|
312
|
+
for (const cellId of cellIds) {
|
|
313
|
+
const cell = cellRuntime[cellId];
|
|
314
|
+
if (cell === undefined) {
|
|
315
|
+
Logger.warn(`Cell ${cellId} not found in state`);
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
cellRuntime[cellId] = {
|
|
319
|
+
...cell,
|
|
320
|
+
consoleOutputs: cell.consoleOutputs.filter(
|
|
321
|
+
(output) => output.channel === "stdin" && output.response == null,
|
|
322
|
+
),
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
return { ...state, cellRuntime };
|
|
326
|
+
}
|
|
327
|
+
|
|
336
328
|
// Helper function to update a cell in the array
|
|
337
329
|
function updateCellRuntimeState({
|
|
338
330
|
state,
|
|
@@ -397,23 +389,23 @@ export const needsRunAtom = atom((get) =>
|
|
|
397
389
|
);
|
|
398
390
|
|
|
399
391
|
export const cellErrorsAtom = atom((get) => {
|
|
400
|
-
const { cellIds,
|
|
392
|
+
const { cellIds, cellData } = get(notebookAtom);
|
|
401
393
|
const errors = cellIds
|
|
402
394
|
.map((cellId) => {
|
|
403
|
-
const
|
|
395
|
+
const output = get(cellOutputAtom(cellId));
|
|
404
396
|
const { name } = cellData[cellId];
|
|
405
|
-
if (isErrorMime(
|
|
397
|
+
if (output !== null && isErrorMime(output.mimetype)) {
|
|
406
398
|
// Filter out ancestor-stopped errors
|
|
407
399
|
// These are errors that are caused by a cell that was stopped,
|
|
408
400
|
// but nothing the user can take action on.
|
|
409
|
-
invariant(Array.isArray(
|
|
410
|
-
const nonAncestorErrors =
|
|
401
|
+
invariant(Array.isArray(output.data), "Expected array data");
|
|
402
|
+
const nonAncestorErrors = output.data.filter(
|
|
411
403
|
(error) => !error.type.includes("ancestor"),
|
|
412
404
|
);
|
|
413
405
|
|
|
414
406
|
if (nonAncestorErrors.length > 0) {
|
|
415
407
|
return {
|
|
416
|
-
output: { ...
|
|
408
|
+
output: { ...output, data: nonAncestorErrors },
|
|
417
409
|
cellId: cellId,
|
|
418
410
|
cellName: name,
|
|
419
411
|
};
|
|
@@ -428,28 +420,25 @@ export const cellErrorsAtom = atom((get) => {
|
|
|
428
420
|
|
|
429
421
|
/**
|
|
430
422
|
* The outline of each cell whose output has a heading. Compared by value, so
|
|
431
|
-
* readers are left alone by the
|
|
423
|
+
* readers are left alone by the runs that change no heading.
|
|
432
424
|
*/
|
|
433
425
|
export const cellOutlinesAtom = createDeepEqualAtom(
|
|
434
426
|
atom((get) => {
|
|
435
427
|
const outlines: Partial<Record<CellId, Outline>> = {};
|
|
436
|
-
for (const
|
|
437
|
-
get(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
outlines[id] = runtime.outline;
|
|
428
|
+
for (const cellId of get(cellIdsAtom)) {
|
|
429
|
+
const outline = get(cellOutlineAtom(cellId));
|
|
430
|
+
if (outline !== null && outline.items.length > 0) {
|
|
431
|
+
outlines[cellId] = outline;
|
|
441
432
|
}
|
|
442
433
|
}
|
|
443
434
|
return outlines;
|
|
444
435
|
}),
|
|
445
436
|
);
|
|
446
437
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return mergeOutlines(outlines);
|
|
452
|
-
});
|
|
438
|
+
/** The notebook's table of contents, in document order. */
|
|
439
|
+
export const notebookOutline = atom((get) =>
|
|
440
|
+
mergeOutlines(get(cellIdsAtom).map((cellId) => get(cellOutlineAtom(cellId)))),
|
|
441
|
+
);
|
|
453
442
|
|
|
454
443
|
export const cellErrorCount = atom((get) => get(cellErrorsAtom).length);
|
|
455
444
|
|
|
@@ -524,8 +513,6 @@ const cellDataAtoms = splitAtom(
|
|
|
524
513
|
);
|
|
525
514
|
export const useCellDataAtoms = () => useAtom(cellDataAtoms);
|
|
526
515
|
|
|
527
|
-
export const cellsRuntimeAtom = atom((get) => get(notebookAtom).cellRuntime);
|
|
528
|
-
|
|
529
516
|
export const hasCellsAtom = atom((get) => get(notebookAtom).cellIds.length > 0);
|
|
530
517
|
export const cellDataAtom = atomFamily((cellId: CellId) =>
|
|
531
518
|
atom((get) => get(notebookAtom).cellData[cellId]),
|
|
@@ -550,6 +537,7 @@ export function releaseCellAtoms(cellId: CellId) {
|
|
|
550
537
|
cellDataAtom.remove(cellId);
|
|
551
538
|
cellRuntimeAtom.remove(cellId);
|
|
552
539
|
cellHandleAtom.remove(cellId);
|
|
540
|
+
releaseCellOutputAtoms(cellId);
|
|
553
541
|
}
|
|
554
542
|
|
|
555
543
|
/** Subscribes to reactive updates of the cell's data. */
|
|
@@ -587,13 +575,16 @@ export const ensureCellEditorView = (cellId: CellId) => {
|
|
|
587
575
|
return getCellEditorView(cellId);
|
|
588
576
|
};
|
|
589
577
|
|
|
578
|
+
/** The document's cells with their runtime state and what each shows. */
|
|
590
579
|
export function flattenTopLevelNotebookCells(
|
|
591
580
|
state: NotebookState,
|
|
592
|
-
|
|
581
|
+
outputs: ReadonlyMap<CellId, CellOutput>,
|
|
582
|
+
): RuntimeCell[] {
|
|
593
583
|
const { cellIds, cellData, cellRuntime } = state;
|
|
594
584
|
return cellIds.map((cellId) => ({
|
|
595
585
|
...cellData[cellId],
|
|
596
586
|
...cellRuntime[cellId],
|
|
587
|
+
output: outputs.get(cellId) ?? null,
|
|
597
588
|
}));
|
|
598
589
|
}
|
|
599
590
|
|
|
@@ -630,7 +621,7 @@ export function createTracebackInfoAtom(
|
|
|
630
621
|
}
|
|
631
622
|
|
|
632
623
|
// Syntax errors
|
|
633
|
-
const output =
|
|
624
|
+
const output = get(cellOutputAtom(cellId));
|
|
634
625
|
if (output?.mimetype === "application/vnd.marimo+error") {
|
|
635
626
|
const errors = output.data;
|
|
636
627
|
if (Array.isArray(errors)) {
|
package/src/core/cells/focus.ts
CHANGED
|
@@ -5,9 +5,11 @@ import { atom, useAtomValue } from "jotai";
|
|
|
5
5
|
import { createReducerAndAtoms } from "@/utils/createReducer";
|
|
6
6
|
import {
|
|
7
7
|
type CellExecutionInputs,
|
|
8
|
+
type CellOutput,
|
|
8
9
|
type CellRunStatus,
|
|
9
10
|
cellExecutionInputsAtom,
|
|
10
11
|
cellExecutionView,
|
|
12
|
+
cellOutputAtom,
|
|
11
13
|
} from "@/core/executions";
|
|
12
14
|
import type { CellConfig } from "../network/types";
|
|
13
15
|
import { type NotebookState, notebookAtom } from "./cells";
|
|
@@ -100,6 +102,7 @@ export const lastFocusedCellAtom = atom<{
|
|
|
100
102
|
cellId,
|
|
101
103
|
get(notebookAtom),
|
|
102
104
|
get(cellExecutionInputsAtom),
|
|
105
|
+
get(cellOutputAtom(cellId)),
|
|
103
106
|
);
|
|
104
107
|
});
|
|
105
108
|
|
|
@@ -109,6 +112,7 @@ export function cellFocusDetailsAtom(cellId: CellId) {
|
|
|
109
112
|
cellId,
|
|
110
113
|
get(notebookAtom),
|
|
111
114
|
get(cellExecutionInputsAtom),
|
|
115
|
+
get(cellOutputAtom(cellId)),
|
|
112
116
|
);
|
|
113
117
|
});
|
|
114
118
|
}
|
|
@@ -117,6 +121,7 @@ function cellFocusDetails(
|
|
|
117
121
|
cellId: CellId,
|
|
118
122
|
notebookState: NotebookState,
|
|
119
123
|
executions: CellExecutionInputs,
|
|
124
|
+
output: CellOutput | null,
|
|
120
125
|
) {
|
|
121
126
|
const { cellData, cellHandles, cellRuntime } = notebookState;
|
|
122
127
|
const data = cellData[cellId];
|
|
@@ -135,7 +140,7 @@ function cellFocusDetails(
|
|
|
135
140
|
status: execution.status,
|
|
136
141
|
blocked: execution.blocked,
|
|
137
142
|
getEditorView: getEditorView,
|
|
138
|
-
hasOutput:
|
|
143
|
+
hasOutput: output !== null,
|
|
139
144
|
hasConsoleOutput: runtime?.consoleOutputs != null,
|
|
140
145
|
};
|
|
141
146
|
}
|
package/src/core/cells/layout.ts
CHANGED
|
@@ -138,9 +138,8 @@ export function deriveLayout(
|
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* The layout of the notebook's cells: the document's order and columns,
|
|
141
|
-
* this browser's column ids and folds, and the
|
|
142
|
-
*
|
|
143
|
-
* TODO(MO-8404): Outlines come from the host.
|
|
141
|
+
* this browser's column ids and folds, and the headings in each cell's
|
|
142
|
+
* output.
|
|
144
143
|
*/
|
|
145
144
|
export const layoutAtom = atom((get): Layout => {
|
|
146
145
|
const model = get(activeDocumentModelAtom);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useNotebookCellConfig,
|
|
8
8
|
useNotebookDocumentEdit,
|
|
9
9
|
} from "../notebook/document";
|
|
10
|
-
import type {
|
|
10
|
+
import type { CellOutput } from "../executions";
|
|
11
11
|
import { viewStateAtom } from "../mode";
|
|
12
12
|
import { type CellId, SCRATCH_CELL_ID } from "./ids";
|
|
13
13
|
|
|
@@ -73,7 +73,7 @@ export function useExpandedConsoleOutput(cellId: CellId) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export function isOutputEmpty(
|
|
76
|
-
output:
|
|
76
|
+
output: Pick<CellOutput, "data"> | undefined | null,
|
|
77
77
|
): boolean {
|
|
78
78
|
if (output == null) {
|
|
79
79
|
return true;
|
|
@@ -6,7 +6,6 @@ import type * as Protocol from "@marimo-team/client/protocol";
|
|
|
6
6
|
import type * as api from "@marimo-team/marimo-api";
|
|
7
7
|
import { mergeArray } from "@/utils/edit-distance";
|
|
8
8
|
import { Logger } from "@/utils/Logger";
|
|
9
|
-
import { parseOutline } from "../dom/outline";
|
|
10
9
|
import type { StaticNotebookSnapshot } from "../transports/static";
|
|
11
10
|
import { CellId, SETUP_CELL_ID } from "./ids";
|
|
12
11
|
import { DEFAULT_CELL_NAME } from "./names";
|
|
@@ -277,44 +276,10 @@ function createCellRuntimeFromSession(
|
|
|
277
276
|
return runtimeState;
|
|
278
277
|
}
|
|
279
278
|
|
|
280
|
-
const primaryOutput = primaryOutputOf(sessionCell);
|
|
281
|
-
|
|
282
|
-
if (primaryOutput) {
|
|
283
|
-
if (primaryOutput.type === "error") {
|
|
284
|
-
runtimeState.output = {
|
|
285
|
-
channel: "marimo-error",
|
|
286
|
-
data: [
|
|
287
|
-
{
|
|
288
|
-
type: "exception",
|
|
289
|
-
exception_type: primaryOutput.ename,
|
|
290
|
-
msg: primaryOutput.evalue,
|
|
291
|
-
raising_cell: null,
|
|
292
|
-
traceback: normalizeTraceback(primaryOutput.traceback),
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
mimetype: "application/vnd.marimo+error",
|
|
296
|
-
timestamp: DEFAULT_TIMESTAMP,
|
|
297
|
-
};
|
|
298
|
-
} else if (primaryOutput.type === "data") {
|
|
299
|
-
const mimeType = Object.keys(primaryOutput.data)[0];
|
|
300
|
-
const data = Object.values(primaryOutput.data)[0];
|
|
301
|
-
runtimeState.output = {
|
|
302
|
-
channel: "output",
|
|
303
|
-
data: data as {},
|
|
304
|
-
mimetype: mimeType as "application/json",
|
|
305
|
-
timestamp: DEFAULT_TIMESTAMP,
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
if (runtimeState.output && primaryOutput.code !== undefined) {
|
|
309
|
-
runtimeState.output.code = primaryOutput.code;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
279
|
const consoleOutputs = sessionCell.console || [];
|
|
314
280
|
|
|
315
281
|
return {
|
|
316
282
|
...runtimeState,
|
|
317
|
-
outline: runtimeState.output ? parseOutline(runtimeState.output) : null,
|
|
318
283
|
consoleOutputs: consoleOutputs.map((consoleOutput) => {
|
|
319
284
|
// Handle StreamMediaOutput (type: "streamMedia")
|
|
320
285
|
if (consoleOutput.type === "streamMedia") {
|
|
@@ -351,9 +316,9 @@ function createCellRuntimeFromSession(
|
|
|
351
316
|
/**
|
|
352
317
|
* Read the session and notebook a page embeds.
|
|
353
318
|
*
|
|
354
|
-
* The cells become a host snapshot the replica starts from,
|
|
355
|
-
*
|
|
356
|
-
* carries no cells.
|
|
319
|
+
* The cells become a host snapshot the replica starts from, with the
|
|
320
|
+
* session's outputs as its results. Its console output seeds each cell's
|
|
321
|
+
* runtime until the kernel speaks. Null when the page carries no cells.
|
|
357
322
|
*/
|
|
358
323
|
export function readExport({
|
|
359
324
|
session,
|
package/src/core/cells/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CellOutput } from "../executions";
|
|
3
4
|
import type { OutputMessage } from "../kernel/messages";
|
|
4
5
|
import type { CellConfig } from "../network/types";
|
|
5
6
|
import type { CellId } from "./ids";
|
|
6
7
|
import { DEFAULT_CELL_NAME } from "./names";
|
|
7
|
-
import type { Outline } from "./outline";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a new cell with default state.
|
|
@@ -42,8 +42,6 @@ export function createCellRuntimeState(
|
|
|
42
42
|
state?: Partial<CellRuntimeState>,
|
|
43
43
|
): CellRuntimeState {
|
|
44
44
|
return {
|
|
45
|
-
outline: null,
|
|
46
|
-
output: null,
|
|
47
45
|
consoleOutputs: [],
|
|
48
46
|
debuggerActive: false,
|
|
49
47
|
...state,
|
|
@@ -70,10 +68,6 @@ export interface CellData {
|
|
|
70
68
|
* TODO(MO-8407): Delete.
|
|
71
69
|
*/
|
|
72
70
|
export interface CellRuntimeState {
|
|
73
|
-
/** a message encoding the cell's output. TODO(MO-8404) */
|
|
74
|
-
output: OutputMessage | null;
|
|
75
|
-
/** TOC outline. TODO(MO-8404) */
|
|
76
|
-
outline: Outline | null;
|
|
77
71
|
/** messages encoding the cell's console outputs. TODO(MO-8405) */
|
|
78
72
|
consoleOutputs: ConsoleOutputMessage[];
|
|
79
73
|
/** debugger active */
|
|
@@ -82,7 +76,11 @@ export interface CellRuntimeState {
|
|
|
82
76
|
serialization?: string | null;
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
|
|
79
|
+
/** A cell as the layout renderers take it, with what it shows from the host. */
|
|
80
|
+
export type RuntimeCell = CellData &
|
|
81
|
+
CellRuntimeState & {
|
|
82
|
+
output: CellOutput | null;
|
|
83
|
+
};
|
|
86
84
|
|
|
87
85
|
export type WithResponse<T> = T & {
|
|
88
86
|
/**
|
package/src/core/cells/utils.ts
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import type { EditorView } from "@codemirror/view";
|
|
4
4
|
import {
|
|
5
|
+
type CellError,
|
|
5
6
|
type CellExecutionInputs,
|
|
6
7
|
type CellExecutionView,
|
|
7
8
|
type CellFreshness,
|
|
8
9
|
type CellFreshnessLookup,
|
|
10
|
+
type CellOutput,
|
|
9
11
|
cellExecutionView,
|
|
10
12
|
} from "@/core/executions";
|
|
11
13
|
import type { Executions } from "@/core/notebook/replica";
|
|
12
14
|
import { Objects } from "@/utils/objects";
|
|
13
|
-
import type { MarimoError, OutputMessage } from "../kernel/messages";
|
|
14
15
|
import { isErrorMime } from "../mime";
|
|
15
16
|
import type { NotebookState } from "./cells";
|
|
16
17
|
import type { CellId } from "./ids";
|
|
@@ -231,7 +232,7 @@ export function shouldHidePublishedCell({
|
|
|
231
232
|
errored: boolean;
|
|
232
233
|
interrupted: boolean;
|
|
233
234
|
stopped: boolean;
|
|
234
|
-
output:
|
|
235
|
+
output: CellOutput | null;
|
|
235
236
|
showErrorTracebacks: boolean;
|
|
236
237
|
}): boolean {
|
|
237
238
|
const outputIsError = isErrorMime(output?.mimetype);
|
|
@@ -240,7 +241,7 @@ export function shouldHidePublishedCell({
|
|
|
240
241
|
outputIsError &&
|
|
241
242
|
Array.isArray(output?.data) &&
|
|
242
243
|
output.data.some(
|
|
243
|
-
(e:
|
|
244
|
+
(e: CellError) =>
|
|
244
245
|
e.type === "exception" && "traceback" in e && e.traceback,
|
|
245
246
|
);
|
|
246
247
|
return (errored || interrupted || stopped || outputIsError) && !hasTraceback;
|
|
@@ -8,7 +8,6 @@ import { MockNotebook } from "@/__mocks__/notebook";
|
|
|
8
8
|
import { getAIContextRegistry } from "@/core/ai/context/context";
|
|
9
9
|
import { ErrorContextProvider } from "@/core/ai/context/providers/error";
|
|
10
10
|
import { AIContextRegistry } from "@/core/ai/context/registry";
|
|
11
|
-
import { notebookAtom } from "@/core/cells/cells";
|
|
12
11
|
import { CellId } from "@/core/cells/ids";
|
|
13
12
|
import { resourceExtension } from "../resources";
|
|
14
13
|
|
|
@@ -29,16 +28,13 @@ describe("resource tooltips", () => {
|
|
|
29
28
|
beforeEach(() => {
|
|
30
29
|
vi.clearAllMocks();
|
|
31
30
|
const store = createStore();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
]),
|
|
41
|
-
);
|
|
31
|
+
MockNotebook.withErrors(store, [
|
|
32
|
+
{
|
|
33
|
+
cellId: CellId.create(),
|
|
34
|
+
cellName: "Cell 1",
|
|
35
|
+
error: { kind: "exception", name: "RuntimeError", message },
|
|
36
|
+
},
|
|
37
|
+
]);
|
|
42
38
|
provider = new ErrorContextProvider(store);
|
|
43
39
|
resource = provider.getItems()[1];
|
|
44
40
|
vi.mocked(getAIContextRegistry).mockReturnValue(
|
|
@@ -223,6 +223,21 @@ export const UserConfigSchema = z
|
|
|
223
223
|
.prefault(() => ({})),
|
|
224
224
|
server: z
|
|
225
225
|
.looseObject({
|
|
226
|
+
host: z.string().optional(),
|
|
227
|
+
port: z.number().int().min(0).max(65535).nullish(),
|
|
228
|
+
proxy: z.string().nullish(),
|
|
229
|
+
base_url: z.string().optional(),
|
|
230
|
+
allow_origins: z.array(z.string()).optional(),
|
|
231
|
+
headless: z.boolean().optional(),
|
|
232
|
+
watch: z.boolean().optional(),
|
|
233
|
+
skew_protection: z.boolean().optional(),
|
|
234
|
+
timeout: z.number().nullish(),
|
|
235
|
+
session_ttl: z.number().int().nullish(),
|
|
236
|
+
token: z.boolean().optional(),
|
|
237
|
+
token_password: z.string().nullish(),
|
|
238
|
+
token_password_file: z.string().nullish(),
|
|
239
|
+
include_code: z.boolean().optional(),
|
|
240
|
+
redirect_console_to_browser: z.boolean().optional(),
|
|
226
241
|
skip_update_check: z.boolean().optional(),
|
|
227
242
|
session_cookie_secure: z.boolean().optional(),
|
|
228
243
|
session_secret: z.string().nullish().prefault(null),
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { createStore } from "jotai";
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { MockExecutions } from "@/__mocks__/executions";
|
|
5
6
|
import { MockNotebook } from "@/__mocks__/notebook";
|
|
6
7
|
import { cellId } from "@/__tests__/branded";
|
|
7
8
|
import { notebookAtom } from "@/core/cells/cells";
|
|
9
|
+
import {
|
|
10
|
+
cell,
|
|
11
|
+
document as documentOf,
|
|
12
|
+
withCells,
|
|
13
|
+
} from "@/core/notebook/document/__tests__/fixtures";
|
|
8
14
|
import {
|
|
9
15
|
type CellErrorEntry,
|
|
10
16
|
formatCellError,
|
|
@@ -32,33 +38,61 @@ describe("formatCellError", () => {
|
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
describe("getCellErrorEntries", () => {
|
|
35
|
-
it("pairs an error with the source that raised it, not a later
|
|
41
|
+
it("pairs an error with the source that raised it, not a later draft", () => {
|
|
36
42
|
const id = cellId("c1");
|
|
37
43
|
const store = createStore();
|
|
38
44
|
store.set(
|
|
39
45
|
notebookAtom,
|
|
40
46
|
MockNotebook.notebookState({
|
|
41
47
|
cellData: { [id]: { code: "print('fixed')" } },
|
|
42
|
-
cellRuntime: {
|
|
43
|
-
[id]: {
|
|
44
|
-
output: {
|
|
45
|
-
channel: "marimo-error",
|
|
46
|
-
mimetype: "application/vnd.marimo+error",
|
|
47
|
-
data: [
|
|
48
|
-
{
|
|
49
|
-
type: "exception",
|
|
50
|
-
exception_type: "ZeroDivisionError",
|
|
51
|
-
msg: "division by zero",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
timestamp: 0,
|
|
55
|
-
code: "1 / 0",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
48
|
}),
|
|
60
49
|
);
|
|
50
|
+
MockExecutions.seed(
|
|
51
|
+
store,
|
|
52
|
+
[MockExecutions.failed(id, {}, { code_fingerprint: "ran" })],
|
|
53
|
+
null,
|
|
54
|
+
withCells(
|
|
55
|
+
documentOf(),
|
|
56
|
+
{
|
|
57
|
+
c1: null,
|
|
58
|
+
c2: null,
|
|
59
|
+
[id]: cell(id, "1 / 0", { code_fingerprint: "ran" }),
|
|
60
|
+
},
|
|
61
|
+
[id],
|
|
62
|
+
),
|
|
63
|
+
);
|
|
61
64
|
|
|
62
65
|
expect(getCellErrorEntries(store)[0]?.cellCode).toBe("1 / 0");
|
|
63
66
|
});
|
|
67
|
+
|
|
68
|
+
it("falls back to the cell's current source once an edit is confirmed", () => {
|
|
69
|
+
const id = cellId("c1");
|
|
70
|
+
const store = createStore();
|
|
71
|
+
MockNotebook.withErrors(store, [
|
|
72
|
+
{
|
|
73
|
+
cellId: id,
|
|
74
|
+
cellName: "c1",
|
|
75
|
+
code: "1 / 0",
|
|
76
|
+
error: {
|
|
77
|
+
kind: "exception",
|
|
78
|
+
name: "ZeroDivisionError",
|
|
79
|
+
message: "division by zero",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
|
|
84
|
+
expect(getCellErrorEntries(store)).toEqual([
|
|
85
|
+
expect.objectContaining({
|
|
86
|
+
cellId: id,
|
|
87
|
+
cellCode: "1 / 0",
|
|
88
|
+
errorData: [
|
|
89
|
+
expect.objectContaining({
|
|
90
|
+
type: "exception",
|
|
91
|
+
exception_type: "ZeroDivisionError",
|
|
92
|
+
msg: "division by zero",
|
|
93
|
+
}),
|
|
94
|
+
],
|
|
95
|
+
}),
|
|
96
|
+
]);
|
|
97
|
+
});
|
|
64
98
|
});
|