@marimo-team/islands 0.25.3-dev447 → 0.25.3-dev453
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/{ErrorBoundary-DVbdKroW.js → ErrorBoundary-CIYMOu2p.js} +1 -1
- package/dist/assets/__vite-browser-external-D2z_TiUO.js +1 -0
- package/dist/assets/{worker-BUqfWMtI.js → worker-DLJ9P24O.js} +2 -2
- package/dist/{chat-ui-9oyUBL6M.js → chat-ui-DEHpKH2l.js} +17 -19
- package/dist/{code-visibility-DmsDqWUx.js → code-visibility-BQE60zOk.js} +7 -7
- package/dist/{common-BDo_Jwoz.js → common-DfUux6zJ.js} +4902 -4893
- package/dist/{data-grid-overlay-editor-CpHB_knU.js → data-grid-overlay-editor-B9zW4oN1.js} +1 -1
- package/dist/{error-entries-CWdDf7iZ.js → error-entries-BG7ifiDg.js} +1368 -996
- package/dist/{feedback-button-B_Wmi4to.js → feedback-button-BEUh4iQQ.js} +129 -129
- package/dist/{glide-data-editor-CMiIW5WP.js → glide-data-editor-CbdIXPTZ.js} +3 -3
- package/dist/{globals-DaC3pk9F.js → globals-BkxG-Y8L.js} +1 -1
- package/dist/{html-to-image-CexRSGAZ.js → html-to-image-9HLBGrIx.js} +4115 -4103
- package/dist/main.js +6562 -6671
- package/dist/{number-overlay-editor-Dd4cOJ5I.js → number-overlay-editor-BFzdth50.js} +1 -1
- package/dist/{process-output-hcyVRJCC.js → process-output-B8HPq5iZ.js} +2 -2
- package/dist/{reveal-component-CTmvBdvu.js → reveal-component-DK_-9fAX.js} +166 -167
- package/package.json +1 -1
- package/src/__mocks__/executions.ts +7 -4
- package/src/__mocks__/notebook.ts +20 -4
- package/src/components/editor/cell/DeleteButton.tsx +2 -2
- package/src/components/editor/cell/StopButton.tsx +2 -2
- package/src/components/editor/cell/useRunCells.ts +0 -3
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +1 -1
- package/src/components/editor/notebook-cell.tsx +4 -35
- package/src/components/editor/output/ansi-reduce.ts +124 -61
- package/src/components/editor/output/console/ConsoleOutput.tsx +7 -25
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +15 -44
- package/src/components/editor/renderers/cells-renderer.tsx +2 -5
- package/src/components/editor/renderers/grid-layout/__tests__/grid-layout.test.tsx +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +3 -6
- package/src/components/editor/stdin-blocking-alert.tsx +14 -18
- package/src/components/scratchpad/scratchpad.test.tsx +1 -1
- package/src/components/scratchpad/scratchpad.tsx +5 -6
- package/src/components/slides/__tests__/cell-output-block.test.tsx +2 -2
- package/src/components/slides/__tests__/slide-cell-view.test.tsx +2 -2
- package/src/components/tracing/tracing-spec.ts +11 -1
- package/src/components/tracing/tracing.tsx +4 -0
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +10 -20
- package/src/core/ai/context/providers/__tests__/error.test.ts +5 -27
- package/src/core/ai/context/providers/cell-output.ts +4 -12
- package/src/core/cells/__tests__/cell.test.ts +1 -169
- package/src/core/cells/__tests__/cells.test.ts +32 -709
- package/src/core/cells/__tests__/clear-outputs.test.ts +21 -14
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +71 -2
- package/src/core/cells/__tests__/logs.test.ts +18 -29
- package/src/core/cells/__tests__/runs.test.ts +128 -431
- package/src/core/cells/__tests__/session.test.ts +9 -9
- package/src/core/cells/actions.ts +29 -7
- package/src/core/cells/cell.ts +1 -96
- package/src/core/cells/cells.ts +147 -117
- package/src/core/cells/collapseConsoleOutputs.tsx +71 -40
- package/src/core/cells/command-console.ts +46 -0
- package/src/core/cells/execution-console.ts +230 -0
- package/src/core/cells/focus.ts +9 -29
- package/src/core/cells/logs.ts +10 -2
- package/src/core/cells/runs.ts +62 -118
- package/src/core/cells/session.ts +2 -2
- package/src/core/cells/types.ts +30 -23
- package/src/core/cells/useAnswerPrompt.ts +29 -0
- package/src/core/errors/error-entries.ts +3 -4
- package/src/core/executions/__tests__/atoms.test.ts +6 -20
- package/src/core/executions/__tests__/input.test.ts +3 -3
- package/src/core/executions/__tests__/output-lifecycle.test.ts +2 -8
- package/src/core/executions/atoms.ts +2 -21
- package/src/core/executions/index.ts +2 -1
- package/src/core/executions/input.ts +4 -3
- package/src/core/executions/output.ts +3 -3
- package/src/core/islands/__tests__/bridge.test.ts +59 -0
- package/src/core/islands/bootstrap.ts +29 -12
- package/src/core/islands/bridge.ts +67 -13
- package/src/core/kernel/handlers.ts +2 -21
- package/src/core/kernel/messages.ts +0 -1
- package/src/core/network/types.ts +0 -1
- package/src/core/notebook/document/__tests__/codemirror.test.ts +1 -0
- package/src/core/notebook/replica/__tests__/executions.test.ts +1 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +113 -0
- package/src/core/notebook/replica/replica.ts +106 -12
- package/src/core/notebook/replica/resources/executions.ts +57 -4
- package/src/core/session/__tests__/backend.test.ts +2 -4
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +1 -0
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +601 -35
- package/src/core/session/useNotebookReplica.ts +20 -6
- package/src/core/session/useNotebookSession.tsx +63 -33
- package/src/core/static/virtual-file-tracker.ts +26 -8
- package/src/stories/layout/vertical/one-column.stories.tsx +18 -12
- package/dist/assets/__vite-browser-external-CpRgw4M_.js +0 -1
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +0 -68
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -703
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
} from "@/core/notebook/document/__tests__/fixtures";
|
|
14
14
|
import { executions } from "@/core/notebook/replica/resources/executions";
|
|
15
15
|
import { clearAllCellOutputsAtom, clearCellOutputAtom } from "../actions";
|
|
16
|
-
import { notebookAtom } from "../cells";
|
|
16
|
+
import { cellRuntimeAtom, notebookAtom } from "../cells";
|
|
17
|
+
import { EMBEDDED } from "../session";
|
|
17
18
|
import type { ConsoleOutputMessage } from "../types";
|
|
18
19
|
|
|
19
20
|
const A = cellId("a");
|
|
@@ -47,16 +48,24 @@ function setup() {
|
|
|
47
48
|
MockNotebook.notebookState({
|
|
48
49
|
cellData: { [A]: {}, [B]: {} },
|
|
49
50
|
cellRuntime: {
|
|
50
|
-
[A]: {
|
|
51
|
-
[B]: {
|
|
51
|
+
[A]: { embeddedConsole: [STDOUT, PROMPT] },
|
|
52
|
+
[B]: { embeddedConsole: [STDOUT] },
|
|
52
53
|
},
|
|
53
54
|
}),
|
|
54
55
|
);
|
|
55
56
|
MockExecutions.seed(
|
|
56
57
|
store,
|
|
57
58
|
[
|
|
58
|
-
MockExecutions.shown(
|
|
59
|
-
|
|
59
|
+
MockExecutions.shown(
|
|
60
|
+
A,
|
|
61
|
+
{ mimetype: "text/plain", data: "a" },
|
|
62
|
+
{ runtime_id: EMBEDDED },
|
|
63
|
+
),
|
|
64
|
+
MockExecutions.shown(
|
|
65
|
+
B,
|
|
66
|
+
{ mimetype: "text/plain", data: "b" },
|
|
67
|
+
{ runtime_id: EMBEDDED },
|
|
68
|
+
),
|
|
60
69
|
],
|
|
61
70
|
null,
|
|
62
71
|
DOCUMENT,
|
|
@@ -70,12 +79,10 @@ describe("clearCellOutputAtom", () => {
|
|
|
70
79
|
store.set(clearCellOutputAtom, { cellId: A });
|
|
71
80
|
|
|
72
81
|
expect(store.get(cellOutputAtom(A))).toBeNull();
|
|
73
|
-
expect(store.get(
|
|
74
|
-
PROMPT,
|
|
75
|
-
]);
|
|
82
|
+
expect(store.get(cellRuntimeAtom(A)).consoleOutputs).toEqual([PROMPT]);
|
|
76
83
|
expect(store.get(cellOutputAtom(B))?.data).toBe("b");
|
|
77
|
-
expect(store.get(
|
|
78
|
-
|
|
84
|
+
expect(store.get(cellRuntimeAtom(B)).consoleOutputs).toMatchObject([
|
|
85
|
+
{ channel: "stdout", data: "printed" },
|
|
79
86
|
]);
|
|
80
87
|
});
|
|
81
88
|
});
|
|
@@ -143,9 +150,9 @@ describe("clearAllCellOutputsAtom", () => {
|
|
|
143
150
|
expect(store.get(cellOutputAtom(A))).toBeNull();
|
|
144
151
|
expect(store.get(cellOutputAtom(B))).toBeNull();
|
|
145
152
|
const { cellRuntime } = store.get(notebookAtom);
|
|
146
|
-
expect(cellRuntime[A].
|
|
147
|
-
expect(cellRuntime[B].
|
|
148
|
-
expect(before.cellRuntime[A].
|
|
149
|
-
expect(before.cellRuntime[B].
|
|
153
|
+
expect(cellRuntime[A].embeddedConsole).toEqual([PROMPT]);
|
|
154
|
+
expect(cellRuntime[B].embeddedConsole).toEqual([]);
|
|
155
|
+
expect(before.cellRuntime[A].embeddedConsole).toEqual([STDOUT, PROMPT]);
|
|
156
|
+
expect(before.cellRuntime[B].embeddedConsole).toEqual([STDOUT]);
|
|
150
157
|
});
|
|
151
158
|
});
|
|
@@ -6,10 +6,79 @@ import type { ConsoleOutputMessage } from "@/core/cells/types";
|
|
|
6
6
|
import type { OutputMessage } from "@/core/kernel/messages";
|
|
7
7
|
import {
|
|
8
8
|
collapseConsoleOutputs,
|
|
9
|
+
collapseConsoleBatch,
|
|
9
10
|
maybeMakeOutputStateful,
|
|
10
11
|
} from "../collapseConsoleOutputs";
|
|
11
12
|
|
|
12
13
|
describe("collapseConsoleOutputs", () => {
|
|
14
|
+
it("keeps an unanswered prompt visible when later writes fill the console", () => {
|
|
15
|
+
const prompt: ConsoleOutputMessage = {
|
|
16
|
+
channel: "stdin",
|
|
17
|
+
mimetype: "text/password",
|
|
18
|
+
data: "Password: ",
|
|
19
|
+
timestamp: 0,
|
|
20
|
+
input_id: "p1",
|
|
21
|
+
};
|
|
22
|
+
const output: OutputMessage = {
|
|
23
|
+
channel: "stdout",
|
|
24
|
+
mimetype: "text/plain",
|
|
25
|
+
data: "line\n".repeat(5001),
|
|
26
|
+
timestamp: 1,
|
|
27
|
+
};
|
|
28
|
+
for (const collapse of [collapseConsoleOutputs, collapseConsoleBatch]) {
|
|
29
|
+
expect(collapse([prompt, output])).toContain(prompt);
|
|
30
|
+
expect(collapse([{ ...prompt, response: "" }, output])).toHaveLength(2);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("renders a split escape sequence the same live and after replay", () => {
|
|
35
|
+
const start = StatefulOutputMessage.create({
|
|
36
|
+
channel: "stdout",
|
|
37
|
+
mimetype: "text/plain",
|
|
38
|
+
data: "abc\u001B[",
|
|
39
|
+
timestamp: 0,
|
|
40
|
+
});
|
|
41
|
+
const finish = { ...start, data: "2KX" };
|
|
42
|
+
expect(start.appendData(finish.data).data).toBe(" X");
|
|
43
|
+
expect(start.appendData("2KY").data).toBe(" Y");
|
|
44
|
+
expect(
|
|
45
|
+
collapseConsoleBatch([{ ...start, data: "abc\u001B[" }, finish])[0].data,
|
|
46
|
+
).toBe(" X");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it.each(["1A\rupdated", "1;1Hoverwritten\u001B[5001;1Hupdated"])(
|
|
50
|
+
"keeps a split cursor sequence across the live line limit (%j)",
|
|
51
|
+
(completion) => {
|
|
52
|
+
const start: ConsoleOutputMessage = {
|
|
53
|
+
channel: "stdout",
|
|
54
|
+
mimetype: "text/plain",
|
|
55
|
+
data: `${"old\n".repeat(5000)}working\nlast\u001B[`,
|
|
56
|
+
timestamp: 0,
|
|
57
|
+
};
|
|
58
|
+
const finish = { ...start, data: completion };
|
|
59
|
+
const live = collapseConsoleOutputs([
|
|
60
|
+
...collapseConsoleOutputs([start]),
|
|
61
|
+
finish,
|
|
62
|
+
]);
|
|
63
|
+
const replay = collapseConsoleBatch([start, finish]);
|
|
64
|
+
expect(live.map((row) => row.data)).toEqual(
|
|
65
|
+
replay.map((row) => row.data),
|
|
66
|
+
);
|
|
67
|
+
expect(live.at(-1)?.data).toBe(`${"old\n".repeat(4998)}updated\nlast`);
|
|
68
|
+
},
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
it("preserves a static traceback row during replay", () => {
|
|
72
|
+
const traceback: OutputMessage = {
|
|
73
|
+
channel: "stderr",
|
|
74
|
+
mimetype: "application/vnd.marimo+traceback",
|
|
75
|
+
traceback_format: "text",
|
|
76
|
+
data: "ValueError: expected <column>",
|
|
77
|
+
timestamp: 0,
|
|
78
|
+
};
|
|
79
|
+
expect(collapseConsoleBatch([traceback])[0]).toBe(traceback);
|
|
80
|
+
});
|
|
81
|
+
|
|
13
82
|
it("should collapse last two text/plain outputs on the same channel", () => {
|
|
14
83
|
const consoleOutputs: OutputMessage[] = [
|
|
15
84
|
{
|
|
@@ -64,7 +133,7 @@ describe("collapseConsoleOutputs", () => {
|
|
|
64
133
|
},
|
|
65
134
|
];
|
|
66
135
|
const result = collapseConsoleOutputs(consoleOutputs);
|
|
67
|
-
expect(result).
|
|
136
|
+
expect(result).toMatchObject(consoleOutputs);
|
|
68
137
|
});
|
|
69
138
|
|
|
70
139
|
it("should not collapse outputs of different mimetypes", () => {
|
|
@@ -83,7 +152,7 @@ describe("collapseConsoleOutputs", () => {
|
|
|
83
152
|
},
|
|
84
153
|
];
|
|
85
154
|
const result = collapseConsoleOutputs(consoleOutputs);
|
|
86
|
-
expect(result).
|
|
155
|
+
expect(result).toMatchObject(consoleOutputs);
|
|
87
156
|
});
|
|
88
157
|
|
|
89
158
|
it("should handle carriage returns", () => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
|
4
4
|
import { cellId } from "@/__tests__/branded";
|
|
5
|
-
import type {
|
|
5
|
+
import type { CellLogMessage } from "../logs";
|
|
6
6
|
import { formatLogTimestamp, getCellLogsForMessage } from "../logs";
|
|
7
7
|
|
|
8
8
|
// Stable mock reference so every (re)import of use-toast sees the same spy,
|
|
@@ -23,7 +23,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
test("handles text/plain MIME type on stdout", () => {
|
|
26
|
-
const cellMessage:
|
|
26
|
+
const cellMessage: CellLogMessage = {
|
|
27
27
|
cell_id: cellId("cell-1"),
|
|
28
28
|
console: [
|
|
29
29
|
{
|
|
@@ -34,7 +34,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
34
34
|
},
|
|
35
35
|
],
|
|
36
36
|
output: null,
|
|
37
|
-
status: "idle",
|
|
38
37
|
timestamp: 0,
|
|
39
38
|
};
|
|
40
39
|
|
|
@@ -50,7 +49,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
test("handles text/plain MIME type on stderr", () => {
|
|
53
|
-
const cellMessage:
|
|
52
|
+
const cellMessage: CellLogMessage = {
|
|
54
53
|
cell_id: cellId("cell-2"),
|
|
55
54
|
console: [
|
|
56
55
|
{
|
|
@@ -61,7 +60,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
61
60
|
},
|
|
62
61
|
],
|
|
63
62
|
output: null,
|
|
64
|
-
status: "idle",
|
|
65
63
|
timestamp: 0,
|
|
66
64
|
};
|
|
67
65
|
|
|
@@ -77,7 +75,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
77
75
|
});
|
|
78
76
|
|
|
79
77
|
test("handles text/html MIME type and strips HTML tags", () => {
|
|
80
|
-
const cellMessage:
|
|
78
|
+
const cellMessage: CellLogMessage = {
|
|
81
79
|
cell_id: cellId("cell-3"),
|
|
82
80
|
console: [
|
|
83
81
|
{
|
|
@@ -88,7 +86,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
88
86
|
},
|
|
89
87
|
],
|
|
90
88
|
output: null,
|
|
91
|
-
status: "idle",
|
|
92
89
|
timestamp: 0,
|
|
93
90
|
};
|
|
94
91
|
|
|
@@ -104,7 +101,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
104
101
|
});
|
|
105
102
|
|
|
106
103
|
test("handles text/html MIME type on stderr", () => {
|
|
107
|
-
const cellMessage:
|
|
104
|
+
const cellMessage: CellLogMessage = {
|
|
108
105
|
cell_id: cellId("cell-4"),
|
|
109
106
|
console: [
|
|
110
107
|
{
|
|
@@ -115,7 +112,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
115
112
|
},
|
|
116
113
|
],
|
|
117
114
|
output: null,
|
|
118
|
-
status: "idle",
|
|
119
115
|
timestamp: 0,
|
|
120
116
|
};
|
|
121
117
|
|
|
@@ -131,7 +127,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
131
127
|
});
|
|
132
128
|
|
|
133
129
|
test("handles application/vnd.marimo+traceback MIME type and strips HTML", () => {
|
|
134
|
-
const cellMessage:
|
|
130
|
+
const cellMessage: CellLogMessage = {
|
|
135
131
|
cell_id: cellId("cell-5"),
|
|
136
132
|
console: [
|
|
137
133
|
{
|
|
@@ -142,7 +138,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
142
138
|
},
|
|
143
139
|
],
|
|
144
140
|
output: null,
|
|
145
|
-
status: "idle",
|
|
146
141
|
timestamp: 0,
|
|
147
142
|
};
|
|
148
143
|
|
|
@@ -156,7 +151,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
156
151
|
});
|
|
157
152
|
|
|
158
153
|
test("handles multiple console outputs with different MIME types", () => {
|
|
159
|
-
const cellMessage:
|
|
154
|
+
const cellMessage: CellLogMessage = {
|
|
160
155
|
cell_id: cellId("cell-7"),
|
|
161
156
|
console: [
|
|
162
157
|
{
|
|
@@ -179,7 +174,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
179
174
|
},
|
|
180
175
|
],
|
|
181
176
|
output: null,
|
|
182
|
-
status: "idle",
|
|
183
177
|
timestamp: 0,
|
|
184
178
|
};
|
|
185
179
|
|
|
@@ -195,7 +189,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
195
189
|
const now = Date.now();
|
|
196
190
|
vi.spyOn(Date, "now").mockReturnValue(now);
|
|
197
191
|
|
|
198
|
-
const cellMessage:
|
|
192
|
+
const cellMessage: CellLogMessage = {
|
|
199
193
|
cell_id: cellId("cell-8"),
|
|
200
194
|
console: [
|
|
201
195
|
{
|
|
@@ -206,7 +200,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
206
200
|
},
|
|
207
201
|
],
|
|
208
202
|
output: null,
|
|
209
|
-
status: "idle",
|
|
210
203
|
timestamp: 0,
|
|
211
204
|
};
|
|
212
205
|
|
|
@@ -217,7 +210,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
217
210
|
});
|
|
218
211
|
|
|
219
212
|
test("ignores unsupported MIME types", () => {
|
|
220
|
-
const cellMessage:
|
|
213
|
+
const cellMessage: CellLogMessage = {
|
|
221
214
|
cell_id: cellId("cell-9"),
|
|
222
215
|
console: [
|
|
223
216
|
{
|
|
@@ -228,7 +221,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
228
221
|
},
|
|
229
222
|
],
|
|
230
223
|
output: null,
|
|
231
|
-
status: "idle",
|
|
232
224
|
timestamp: 0,
|
|
233
225
|
};
|
|
234
226
|
|
|
@@ -238,7 +230,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
238
230
|
});
|
|
239
231
|
|
|
240
232
|
test("ignores non-logging channels", () => {
|
|
241
|
-
const cellMessage:
|
|
233
|
+
const cellMessage: CellLogMessage = {
|
|
242
234
|
cell_id: cellId("cell-10"),
|
|
243
235
|
console: [
|
|
244
236
|
{
|
|
@@ -249,7 +241,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
249
241
|
},
|
|
250
242
|
],
|
|
251
243
|
output: null,
|
|
252
|
-
status: "idle",
|
|
253
244
|
timestamp: 0,
|
|
254
245
|
};
|
|
255
246
|
|
|
@@ -259,11 +250,10 @@ describe("getCellLogsForMessage", () => {
|
|
|
259
250
|
});
|
|
260
251
|
|
|
261
252
|
test("returns empty array when console is null", () => {
|
|
262
|
-
const cellMessage:
|
|
253
|
+
const cellMessage: CellLogMessage = {
|
|
263
254
|
cell_id: cellId("cell-11"),
|
|
264
|
-
console: null as unknown as
|
|
255
|
+
console: null as unknown as CellLogMessage["console"],
|
|
265
256
|
output: null,
|
|
266
|
-
status: "idle",
|
|
267
257
|
timestamp: 0,
|
|
268
258
|
};
|
|
269
259
|
|
|
@@ -273,7 +263,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
273
263
|
});
|
|
274
264
|
|
|
275
265
|
test("handles complex HTML with nested elements in text/html", () => {
|
|
276
|
-
const cellMessage:
|
|
266
|
+
const cellMessage: CellLogMessage = {
|
|
277
267
|
cell_id: cellId("cell-12"),
|
|
278
268
|
console: [
|
|
279
269
|
{
|
|
@@ -284,7 +274,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
284
274
|
},
|
|
285
275
|
],
|
|
286
276
|
output: null,
|
|
287
|
-
status: "idle",
|
|
288
277
|
timestamp: 0,
|
|
289
278
|
};
|
|
290
279
|
|
|
@@ -295,7 +284,7 @@ describe("getCellLogsForMessage", () => {
|
|
|
295
284
|
});
|
|
296
285
|
|
|
297
286
|
test("handles marimo-error channel as stderr level", () => {
|
|
298
|
-
const cellMessage:
|
|
287
|
+
const cellMessage: CellLogMessage = {
|
|
299
288
|
cell_id: cellId("cell-13"),
|
|
300
289
|
console: [
|
|
301
290
|
{
|
|
@@ -306,7 +295,6 @@ describe("getCellLogsForMessage", () => {
|
|
|
306
295
|
},
|
|
307
296
|
],
|
|
308
297
|
output: null,
|
|
309
|
-
status: "idle",
|
|
310
298
|
timestamp: 0,
|
|
311
299
|
};
|
|
312
300
|
|
|
@@ -340,7 +328,9 @@ describe("getCellLogsForMessage - internal error toast", () => {
|
|
|
340
328
|
vi.clearAllMocks();
|
|
341
329
|
});
|
|
342
330
|
|
|
343
|
-
const makeErrorCellMessage = (
|
|
331
|
+
const makeErrorCellMessage = (
|
|
332
|
+
id: CellLogMessage["cell_id"],
|
|
333
|
+
): CellLogMessage => ({
|
|
344
334
|
cell_id: id,
|
|
345
335
|
console: [],
|
|
346
336
|
output: {
|
|
@@ -355,8 +345,7 @@ describe("getCellLogsForMessage - internal error toast", () => {
|
|
|
355
345
|
],
|
|
356
346
|
channel: "marimo-error",
|
|
357
347
|
timestamp: 0,
|
|
358
|
-
} as unknown as
|
|
359
|
-
status: "idle",
|
|
348
|
+
} as unknown as CellLogMessage["output"],
|
|
360
349
|
timestamp: 0,
|
|
361
350
|
});
|
|
362
351
|
|