@marimo-team/islands 0.23.14-dev19 → 0.23.14-dev21
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/{chat-ui-9wA4feLE.js → chat-ui-CO8WuXGb.js} +347 -143
- package/dist/{code-visibility-CxDvzm2S.js → code-visibility-CPWEmIAX.js} +163 -171
- package/dist/{html-to-image-DBHfshED.js → html-to-image-DLSOS-bE.js} +2298 -2267
- package/dist/main.js +333 -333
- package/dist/{process-output-Dw6We6B6.js → process-output-B9ysqk1y.js} +1 -1
- package/dist/{reveal-component-tJhA77Am.js → reveal-component-BJwt0B2_.js} +2 -2
- package/package.json +2 -2
- package/src/components/editor/errors/__tests__/auto-fix.test.ts +11 -107
- package/src/components/editor/errors/auto-fix.tsx +11 -31
- package/src/components/editor/output/MarimoTracebackOutput.tsx +2 -2
- package/src/core/ai/context/__tests__/registry.test.ts +133 -3
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +3 -1
- package/src/core/ai/context/providers/__tests__/error.test.ts +200 -15
- package/src/core/ai/context/providers/datasource.ts +27 -2
- package/src/core/ai/context/providers/error.ts +226 -36
- package/src/core/ai/context/registry.ts +77 -43
- package/src/core/codemirror/ai/resources.ts +15 -10
- package/src/core/errors/errors.ts +2 -1
- package/src/core/mime.ts +11 -4
- package/src/core/ai/context/providers/__tests__/__snapshots__/error.test.ts.snap +0 -3
|
@@ -6,7 +6,7 @@ import { _ as Logger, c as Objects, g as cn, h as Events, m as useComposedRefs,
|
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-COam1EG7.js";
|
|
9
|
-
import {
|
|
9
|
+
import { An as Wrench, B as isDataURLString, Bn as Eye, C as Accordion, E as AccordionTrigger, Fn as Minus, Ft as useChromeActions, Gt as DATA_TYPE_ICON, H as renderHTML, In as LoaderCircle, It as getFeatureFlag, Jn as import_lib, Kn as Braces, Kt as getDataTypeColor, L as base64ToUint8Array, M as DotFilledIcon, Mt as goToCellLine, N as PinLeftIcon, P as PinRightIcon, Pn as NotebookPen, Qt as getRequestClient, Rn as Info, Rt as adaptForLocalStorage, Sn as atomWithStorage, T as AccordionItem, Tn as Close$1, Tt as Checkbox, Ut as PluralWord, Vn as ExternalLink, Wn as CircleX, X as notebookAtom, _ as getDatasourceContext, an as getTracebackInfo, bn as jsonToMarkdown, bt as getCellDomProps, c as Popover, cn as filenameAtom, d as PopoverTrigger, dt as viewStateAtom, en as useRequestClient, et as useCellActions, fn as CellOutputId, ft as outputIsLoading, in as extractAllTracebackInfo, j as ChevronRightIcon, jn as Trash2, k as CheckIcon, l as PopoverClose, lt as kioskModeAtom, m as useExpandedOutput, mn as SCRATCH_CELL_ID, n as Spinner, nt as useCellNames, ot as AnsiUp, pn as HTMLCellId, q as getCellEditorView, qn as esm_default, r as MarkdownRenderer, rn as elementContainsMarimoCellFile, t as toPng, tt as useCellIds, u as PopoverContent, ut as useInstallAllowed, vt as sanitizeHtml, w as AccordionContent, xt as displayCellName, yn as jsonParseWithSpecialChar, yt as DATA_CELL_ID, z as extractBase64FromDataURL, zn as FileText, zt as jotaiJsonStorage, __tla as __tla_0 } from "./html-to-image-DLSOS-bE.js";
|
|
10
10
|
import { o as useSize, u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
11
11
|
import { c as Calendar, i as createReducerAndAtoms, r as Badge } from "./useLifecycle-CxffarYV.js";
|
|
12
12
|
import { a as ListFilter, i as Table$1, n as $fb18d541ea1ad717$export$ad991b66133851cf, o as ChartPie, r as $5a387cc49350e6db$export$722debc0e56fea39, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-CMnRuVmN.js";
|
|
@@ -23,7 +23,7 @@ import { a as prettyError, c as Portal$1, l as Root$4, n as ErrorBanner, o as Co
|
|
|
23
23
|
import { a as TooltipRoot, n as TooltipContent, o as TooltipTrigger, r as TooltipPortal, t as Tooltip } from "./tooltip-Czds6Qr8.js";
|
|
24
24
|
import { f as CopyClipboardIcon, t as _extends } from "./extends-9MVIxxRo.js";
|
|
25
25
|
import { r as KnownQueryParams } from "./constants-T20xxyNf.js";
|
|
26
|
-
import { D as useEvent_default, E as dequal, S as atom, T as getBuildingBlocks, _ as Provider, b as useSetAtom, c as resolvedMarimoConfigAtom, i as aiModelConfiguredAtom, m as useJotaiEffect, n as useTheme, r as aiFeaturesEnabledAtom, u as userConfigAtom, v as useAtom, w as buildStore, x as useStore, y as useAtomValue } from "./useTheme-yGsGEk82.js";
|
|
26
|
+
import { D as useEvent_default, E as dequal, S as atom, T as getBuildingBlocks, _ as Provider, b as useSetAtom, c as resolvedMarimoConfigAtom, i as aiModelConfiguredAtom, m as useJotaiEffect, n as useTheme, p as store, r as aiFeaturesEnabledAtom, u as userConfigAtom, v as useAtom, w as buildStore, x as useStore, y as useAtomValue } from "./useTheme-yGsGEk82.js";
|
|
27
27
|
import { $ as EditorView } from "./dist-U4F-tbMs.js";
|
|
28
28
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
29
29
|
import { c as uniqueBy, t as Arrays } from "./arrays-sEtDRoG4.js";
|
|
@@ -19353,7 +19353,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
19353
19353
|
fixType: "ai",
|
|
19354
19354
|
onFix: async (t2) => {
|
|
19355
19355
|
var _a3;
|
|
19356
|
-
let n = getDatasourceContext(t2.cellId), i = `Fix the SQL statement: ${e.msg}.`;
|
|
19356
|
+
let n = getDatasourceContext(t2.cellId, store), i = `Fix the SQL statement: ${e.msg}.`;
|
|
19357
19357
|
n && (i += `
|
|
19358
19358
|
Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletionCell({
|
|
19359
19359
|
cellId: t2.cellId,
|
|
@@ -19502,25 +19502,17 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
|
|
|
19502
19502
|
}, e[0] = t, e[1] = n, e[2] = i) : i = e[2], i;
|
|
19503
19503
|
}
|
|
19504
19504
|
var import_compiler_runtime$59 = require_compiler_runtime();
|
|
19505
|
-
function
|
|
19506
|
-
|
|
19505
|
+
function buildFixInChatPrompt(e, t) {
|
|
19506
|
+
if (e != null) return `@error://${e}
|
|
19507
19507
|
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
e2 && (i += `
|
|
19508
|
+
Please fix this error.`;
|
|
19509
|
+
let n = t == null ? void 0 : t.trim();
|
|
19510
|
+
return n ? `My code gives the following error. Please fix it:
|
|
19512
19511
|
|
|
19513
|
-
|
|
19514
|
-
}
|
|
19515
|
-
return i;
|
|
19516
|
-
}
|
|
19517
|
-
function buildFixPrompt(e, t) {
|
|
19518
|
-
return buildFixPromptFromText(e.map((e2) => "msg" in e2 && e2.msg ? e2.msg : e2.type).join("\n"), t, {
|
|
19519
|
-
includeDatasourceContext: e.some((e2) => e2.type === "sql-error")
|
|
19520
|
-
});
|
|
19512
|
+
${n}` : "Please fix this error.";
|
|
19521
19513
|
}
|
|
19522
19514
|
const AutoFixButton = (e) => {
|
|
19523
|
-
let t = (0, import_compiler_runtime$59.c)(
|
|
19515
|
+
let t = (0, import_compiler_runtime$59.c)(25), { errors: n, cellId: i, className: o } = e, s = useStore(), { createNewCell: c } = useCellActions(), d = useAtomValue(aiFeaturesEnabledAtom), f;
|
|
19524
19516
|
if (t[0] !== d || t[1] !== n) {
|
|
19525
19517
|
let e2;
|
|
19526
19518
|
t[3] === d ? e2 = t[4] : (e2 = (e3) => getAutoFixes(e3, {
|
|
@@ -19550,20 +19542,20 @@ Database schema: ${e2}`);
|
|
|
19550
19542
|
}
|
|
19551
19543
|
}), t2 == null ? void 0 : t2.focus();
|
|
19552
19544
|
}, t[5] = i, t[6] = c, t[7] = S, t[8] = v, t[9] = s, t[10] = w) : w = t[10];
|
|
19553
|
-
let E = w,
|
|
19554
|
-
t[11] !== i || t[12] !==
|
|
19545
|
+
let E = w, A;
|
|
19546
|
+
t[11] !== i || t[12] !== y ? (A = () => {
|
|
19555
19547
|
y({
|
|
19556
|
-
prompt:
|
|
19548
|
+
prompt: buildFixInChatPrompt(i)
|
|
19557
19549
|
});
|
|
19558
|
-
}, t[11] = i, t[12] =
|
|
19559
|
-
let
|
|
19560
|
-
t[
|
|
19561
|
-
let
|
|
19562
|
-
t[
|
|
19550
|
+
}, t[11] = i, t[12] = y, t[13] = A) : A = t[13];
|
|
19551
|
+
let M = A, I;
|
|
19552
|
+
t[14] === o ? I = t[15] : (I = cn("my-2", o), t[14] = o, t[15] = I);
|
|
19553
|
+
let z;
|
|
19554
|
+
t[16] !== S.description || t[17] !== S.fixType || t[18] !== S.title || t[19] !== E || t[20] !== M ? (z = S.fixType === "ai" ? (0, import_jsx_runtime.jsx)(AIFixButton, {
|
|
19563
19555
|
tooltip: S.description,
|
|
19564
19556
|
openPrompt: () => E(false),
|
|
19565
19557
|
applyAutofix: () => E(true),
|
|
19566
|
-
openChat:
|
|
19558
|
+
openChat: M
|
|
19567
19559
|
}) : (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
19568
19560
|
content: S.description,
|
|
19569
19561
|
align: "start",
|
|
@@ -19579,12 +19571,12 @@ Database schema: ${e2}`);
|
|
|
19579
19571
|
S.title
|
|
19580
19572
|
]
|
|
19581
19573
|
})
|
|
19582
|
-
}), t[
|
|
19583
|
-
let
|
|
19584
|
-
return t[
|
|
19585
|
-
className:
|
|
19586
|
-
children:
|
|
19587
|
-
}), t[
|
|
19574
|
+
}), t[16] = S.description, t[17] = S.fixType, t[18] = S.title, t[19] = E, t[20] = M, t[21] = z) : z = t[21];
|
|
19575
|
+
let U;
|
|
19576
|
+
return t[22] !== I || t[23] !== z ? (U = (0, import_jsx_runtime.jsx)("div", {
|
|
19577
|
+
className: I,
|
|
19578
|
+
children: z
|
|
19579
|
+
}), t[22] = I, t[23] = z, t[24] = U) : U = t[24], U;
|
|
19588
19580
|
};
|
|
19589
19581
|
var MODE_CONFIG = {
|
|
19590
19582
|
autofix: {
|
|
@@ -20121,18 +20113,18 @@ Database schema: ${e2}`);
|
|
|
20121
20113
|
}
|
|
20122
20114
|
let y, S, w, E, O, A;
|
|
20123
20115
|
if (t[2] !== f || t[3] !== i || t[4] !== s || t[5] !== o || t[6] !== n || t[7] !== c || t[8] !== v || t[9] !== _ || t[10] !== d) {
|
|
20124
|
-
let e2 = n.filter(_temp8), M2 = n.filter(_temp9), I2 = n.filter(_temp0), z = n.filter(_temp1), U = n.filter(_temp10), K = n.filter(_temp11), q = n.filter(_temp12),
|
|
20125
|
-
t[17] === s ?
|
|
20116
|
+
let e2 = n.filter(_temp8), M2 = n.filter(_temp9), I2 = n.filter(_temp0), z = n.filter(_temp1), U = n.filter(_temp10), K = n.filter(_temp11), q = n.filter(_temp12), J = n.filter(_temp13), Q = n.filter(_temp14), $ = n.filter(_temp15), Qq = n.filter(_temp16), $q = n.filter(_temp17), eJ = n.filter(_temp18), tJ;
|
|
20117
|
+
t[17] === s ? tJ = t[18] : (tJ = () => {
|
|
20126
20118
|
s.openApplication("scratchpad");
|
|
20127
|
-
}, t[17] = s, t[18] =
|
|
20128
|
-
let
|
|
20119
|
+
}, t[17] = s, t[18] = tJ);
|
|
20120
|
+
let nJ = tJ, rJ = () => {
|
|
20129
20121
|
let t2 = [];
|
|
20130
|
-
if (
|
|
20131
|
-
let e3 =
|
|
20122
|
+
if (Qq.length > 0 || $q.length > 0) {
|
|
20123
|
+
let e3 = Qq.some(_temp19), n2 = !e3 && Qq.some(_temp20);
|
|
20132
20124
|
t2.push((0, import_jsx_runtime.jsxs)("div", {
|
|
20133
20125
|
children: [
|
|
20134
|
-
|
|
20135
|
-
|
|
20126
|
+
Qq.map(_temp21),
|
|
20127
|
+
$q.map(_temp22),
|
|
20136
20128
|
e3 && (0, import_jsx_runtime.jsxs)(Button, {
|
|
20137
20129
|
size: "xs",
|
|
20138
20130
|
variant: "outline",
|
|
@@ -20163,8 +20155,8 @@ Database schema: ${e2}`);
|
|
|
20163
20155
|
}),
|
|
20164
20156
|
i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
|
|
20165
20157
|
errors: [
|
|
20166
|
-
|
|
20167
|
-
|
|
20158
|
+
...Qq,
|
|
20159
|
+
...$q
|
|
20168
20160
|
],
|
|
20169
20161
|
cellId: i
|
|
20170
20162
|
})
|
|
@@ -20325,7 +20317,7 @@ Database schema: ${e2}`);
|
|
|
20325
20317
|
size: "xs",
|
|
20326
20318
|
variant: "link",
|
|
20327
20319
|
className: "my-2 font-normal mx-0 px-0",
|
|
20328
|
-
onClick:
|
|
20320
|
+
onClick: nJ,
|
|
20329
20321
|
children: [
|
|
20330
20322
|
(0, import_jsx_runtime.jsx)(NotebookPen, {
|
|
20331
20323
|
className: "h-3"
|
|
@@ -20500,42 +20492,42 @@ Database schema: ${e2}`);
|
|
|
20500
20492
|
children: q.some(_temp31) ? "Ensure that the referenced cells define the required variables, or turn off strict execution." : "Something is wrong with your declarations. Fix any discrepancies, or turn off strict execution."
|
|
20501
20493
|
})
|
|
20502
20494
|
]
|
|
20503
|
-
}, "strict-exception")),
|
|
20495
|
+
}, "strict-exception")), J.length > 0 && t2.push((0, import_jsx_runtime.jsxs)("div", {
|
|
20504
20496
|
children: [
|
|
20505
|
-
|
|
20497
|
+
J.map(_temp32),
|
|
20506
20498
|
i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
|
|
20507
|
-
errors:
|
|
20499
|
+
errors: J,
|
|
20508
20500
|
cellId: i
|
|
20509
20501
|
})
|
|
20510
20502
|
]
|
|
20511
|
-
}, "internal")),
|
|
20503
|
+
}, "internal")), Q.length > 0 && t2.push((0, import_jsx_runtime.jsxs)("div", {
|
|
20512
20504
|
children: [
|
|
20513
|
-
|
|
20505
|
+
Q.map(_temp33),
|
|
20514
20506
|
i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
|
|
20515
|
-
errors:
|
|
20507
|
+
errors: Q,
|
|
20516
20508
|
cellId: i
|
|
20517
20509
|
})
|
|
20518
20510
|
]
|
|
20519
|
-
}, "ancestor-prevented")),
|
|
20511
|
+
}, "ancestor-prevented")), $.length > 0 && t2.push((0, import_jsx_runtime.jsxs)("div", {
|
|
20520
20512
|
children: [
|
|
20521
|
-
|
|
20513
|
+
$.map(_temp34),
|
|
20522
20514
|
i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
|
|
20523
|
-
errors:
|
|
20515
|
+
errors: $,
|
|
20524
20516
|
cellId: i
|
|
20525
20517
|
})
|
|
20526
20518
|
]
|
|
20527
|
-
}, "ancestor-stopped")),
|
|
20519
|
+
}, "ancestor-stopped")), eJ.length > 0 && t2.push((0, import_jsx_runtime.jsxs)("div", {
|
|
20528
20520
|
children: [
|
|
20529
|
-
|
|
20521
|
+
eJ.map(_temp35),
|
|
20530
20522
|
i && (0, import_jsx_runtime.jsx)(AutoFixButton, {
|
|
20531
|
-
errors:
|
|
20523
|
+
errors: eJ,
|
|
20532
20524
|
cellId: i,
|
|
20533
20525
|
className: "mt-2.5"
|
|
20534
20526
|
})
|
|
20535
20527
|
]
|
|
20536
20528
|
}, "sql-errors")), t2;
|
|
20537
|
-
},
|
|
20538
|
-
t[19] === v ?
|
|
20529
|
+
}, iJ;
|
|
20530
|
+
t[19] === v ? iJ = t[20] : (iJ = v && (0, import_jsx_runtime.jsxs)("div", {
|
|
20539
20531
|
className: "flex items-center gap-1 font-code text-[0.6875rem] uppercase tracking-wider text-muted-foreground/70",
|
|
20540
20532
|
children: [
|
|
20541
20533
|
v,
|
|
@@ -20547,22 +20539,22 @@ Database schema: ${e2}`);
|
|
|
20547
20539
|
})
|
|
20548
20540
|
})
|
|
20549
20541
|
]
|
|
20550
|
-
}), t[19] = v, t[20] =
|
|
20551
|
-
let
|
|
20552
|
-
t[21] !== _ || t[22] !== d ? (
|
|
20542
|
+
}), t[19] = v, t[20] = iJ);
|
|
20543
|
+
let aJ;
|
|
20544
|
+
t[21] !== _ || t[22] !== d ? (aJ = d && (0, import_jsx_runtime.jsx)(AlertTitle, {
|
|
20553
20545
|
className: `font-code font-medium ${_}`,
|
|
20554
20546
|
children: d
|
|
20555
|
-
}), t[21] = _, t[22] = d, t[23] =
|
|
20556
|
-
let
|
|
20557
|
-
t[24] !==
|
|
20547
|
+
}), t[21] = _, t[22] = d, t[23] = aJ) : aJ = t[23];
|
|
20548
|
+
let sJ;
|
|
20549
|
+
t[24] !== iJ || t[25] !== aJ ? (sJ = (0, import_jsx_runtime.jsxs)("div", {
|
|
20558
20550
|
className: "space-y-0.5",
|
|
20559
20551
|
children: [
|
|
20560
|
-
|
|
20561
|
-
|
|
20552
|
+
iJ,
|
|
20553
|
+
aJ
|
|
20562
20554
|
]
|
|
20563
|
-
}), t[24] =
|
|
20564
|
-
let lJ =
|
|
20565
|
-
y = Alert, E = f, t[27] === o ? O = t[28] : (O = cn("border-none font-code text-sm text-[0.84375rem] p-0 text-muted-foreground normal has-[svg]:pl-0 space-y-2", o), t[27] = o, t[28] = O), A = lJ, S = "flex flex-col gap-4", w =
|
|
20555
|
+
}), t[24] = iJ, t[25] = aJ, t[26] = sJ) : sJ = t[26];
|
|
20556
|
+
let lJ = sJ;
|
|
20557
|
+
y = Alert, E = f, t[27] === o ? O = t[28] : (O = cn("border-none font-code text-sm text-[0.84375rem] p-0 text-muted-foreground normal has-[svg]:pl-0 space-y-2", o), t[27] = o, t[28] = O), A = lJ, S = "flex flex-col gap-4", w = rJ(), t[2] = f, t[3] = i, t[4] = s, t[5] = o, t[6] = n, t[7] = c, t[8] = v, t[9] = _, t[10] = d, t[11] = y, t[12] = S, t[13] = w, t[14] = E, t[15] = O, t[16] = A;
|
|
20566
20558
|
} else y = t[11], S = t[12], w = t[13], E = t[14], O = t[15], A = t[16];
|
|
20567
20559
|
let M;
|
|
20568
20560
|
t[29] !== S || t[30] !== w ? (M = (0, import_jsx_runtime.jsx)("div", {
|
|
@@ -28679,59 +28671,59 @@ Database schema: ${e2}`);
|
|
|
28679
28671
|
onSelect: Functions.NOOP
|
|
28680
28672
|
});
|
|
28681
28673
|
Combobox = (e) => {
|
|
28682
|
-
let t = (0, import_compiler_runtime$35.c)(106), n, i, o, s, c, d, f, h, _, v, y, S, w, E, O, A, M, I, z, U, q, J, Q
|
|
28683
|
-
t[0] === e ? (n = t[1], i = t[2], o = t[3], s = t[4], c = t[5], d = t[6], f = t[7], h = t[8], _ = t[9], v = t[10], y = t[11], S = t[12], w = t[13], E = t[14], O = t[15], A = t[16], M = t[17], I = t[18], z = t[19], U = t[20],
|
|
28684
|
-
let
|
|
28685
|
-
t[25] !== v || t[26] !== w || t[27] !==
|
|
28674
|
+
let t = (0, import_compiler_runtime$35.c)(106), n, i, o, s, c, d, f, h, _, v, y, S, w, E, O, A, M, I, z, U, K, q, J, Q;
|
|
28675
|
+
t[0] === e ? (n = t[1], i = t[2], o = t[3], s = t[4], c = t[5], d = t[6], f = t[7], h = t[8], _ = t[9], v = t[10], y = t[11], S = t[12], w = t[13], E = t[14], O = t[15], A = t[16], M = t[17], I = t[18], z = t[19], U = t[20], K = t[21], q = t[22], J = t[23], Q = t[24]) : ({ children: n, displayValue: d, className: o, placeholder: E, value: Q, defaultValue: c, onValueChange: S, multiple: I, shouldFilter: z, filterFn: f, open: w, defaultOpen: s, onOpenChange: v, inputPlaceholder: U, search: M, onSearchChange: y, emptyState: K, chips: q, chipsClassName: i, keepPopoverOpenOnSelect: _, id: h, disabled: J, renderValue: O, ...A } = e, t[0] = e, t[1] = n, t[2] = i, t[3] = o, t[4] = s, t[5] = c, t[6] = d, t[7] = f, t[8] = h, t[9] = _, t[10] = v, t[11] = y, t[12] = S, t[13] = w, t[14] = E, t[15] = O, t[16] = A, t[17] = M, t[18] = I, t[19] = z, t[20] = U, t[21] = K, t[22] = q, t[23] = J, t[24] = Q);
|
|
28676
|
+
let $ = I === void 0 ? false : I, Qq = z === void 0 ? true : z, $q = U === void 0 ? "Search..." : U, eJ = K === void 0 ? "Nothing found." : K, tJ = q === void 0 ? false : q, nJ = J === void 0 ? false : J, rJ = s ?? false, iJ;
|
|
28677
|
+
t[25] !== v || t[26] !== w || t[27] !== rJ ? (iJ = {
|
|
28686
28678
|
prop: w,
|
|
28687
|
-
defaultProp:
|
|
28679
|
+
defaultProp: rJ,
|
|
28688
28680
|
onChange: v
|
|
28689
|
-
}, t[25] = v, t[26] = w, t[27] =
|
|
28690
|
-
let [
|
|
28691
|
-
t[29] === S ?
|
|
28681
|
+
}, t[25] = v, t[26] = w, t[27] = rJ, t[28] = iJ) : iJ = t[28];
|
|
28682
|
+
let [aJ, oJ] = useControllableState(iJ), sJ = aJ === void 0 ? false : aJ, cJ;
|
|
28683
|
+
t[29] === S ? cJ = t[30] : (cJ = (e2) => {
|
|
28692
28684
|
S == null ? void 0 : S(e2);
|
|
28693
|
-
}, t[29] = S, t[30] =
|
|
28694
|
-
let
|
|
28695
|
-
t[31] !== c || t[32] !==
|
|
28696
|
-
prop:
|
|
28685
|
+
}, t[29] = S, t[30] = cJ);
|
|
28686
|
+
let lJ;
|
|
28687
|
+
t[31] !== c || t[32] !== cJ || t[33] !== Q ? (lJ = {
|
|
28688
|
+
prop: Q,
|
|
28697
28689
|
defaultProp: c,
|
|
28698
|
-
onChange:
|
|
28699
|
-
}, t[31] = c, t[32] =
|
|
28700
|
-
let [
|
|
28701
|
-
t[35] ===
|
|
28702
|
-
let
|
|
28703
|
-
t[37] !== _ || t[38] !==
|
|
28690
|
+
onChange: cJ
|
|
28691
|
+
}, t[31] = c, t[32] = cJ, t[33] = Q, t[34] = lJ) : lJ = t[34];
|
|
28692
|
+
let [uJ, dJ] = useControllableState(lJ), fJ;
|
|
28693
|
+
t[35] === uJ ? fJ = t[36] : (fJ = (e2) => Array.isArray(uJ) ? uJ.includes(e2) : uJ === e2, t[35] = uJ, t[36] = fJ);
|
|
28694
|
+
let pJ = fJ, mJ;
|
|
28695
|
+
t[37] !== _ || t[38] !== $ || t[39] !== oJ || t[40] !== dJ || t[41] !== uJ ? (mJ = (e2) => {
|
|
28704
28696
|
let t2 = e2;
|
|
28705
|
-
if (
|
|
28706
|
-
let n2 =
|
|
28697
|
+
if ($) if (Array.isArray(uJ)) if (uJ.includes(t2)) {
|
|
28698
|
+
let n2 = uJ.filter((t3) => t3 !== e2);
|
|
28707
28699
|
t2 = n2.length > 0 ? n2 : [];
|
|
28708
28700
|
} else t2 = [
|
|
28709
|
-
...
|
|
28701
|
+
...uJ,
|
|
28710
28702
|
t2
|
|
28711
28703
|
];
|
|
28712
28704
|
else t2 = [
|
|
28713
28705
|
t2
|
|
28714
28706
|
];
|
|
28715
|
-
else
|
|
28716
|
-
|
|
28717
|
-
}, t[37] = _, t[38] =
|
|
28718
|
-
let
|
|
28719
|
-
t[43] !==
|
|
28707
|
+
else uJ === e2 && (t2 = null);
|
|
28708
|
+
dJ(t2), (_ ?? $) || oJ(false);
|
|
28709
|
+
}, t[37] = _, t[38] = $, t[39] = oJ, t[40] = dJ, t[41] = uJ, t[42] = mJ) : mJ = t[42];
|
|
28710
|
+
let hJ = mJ, _J;
|
|
28711
|
+
t[43] !== tJ || t[44] !== d || t[45] !== $ || t[46] !== E || t[47] !== uJ ? (_J = () => $ && tJ && E ? E : uJ == null ? E ?? "--" : Array.isArray(uJ) ? uJ.length === 0 ? E ?? "--" : uJ.length === 1 && d !== void 0 ? d(uJ[0]) : `${uJ.length} selected` : d === void 0 ? E ?? "--" : d(uJ), t[43] = tJ, t[44] = d, t[45] = $, t[46] = E, t[47] = uJ, t[48] = _J) : _J = t[48];
|
|
28720
28712
|
let vJ = _J, yJ;
|
|
28721
|
-
t[49] !==
|
|
28722
|
-
isSelected:
|
|
28723
|
-
onSelect:
|
|
28724
|
-
}, t[49] =
|
|
28713
|
+
t[49] !== hJ || t[50] !== pJ ? (yJ = {
|
|
28714
|
+
isSelected: pJ,
|
|
28715
|
+
onSelect: hJ
|
|
28716
|
+
}, t[49] = hJ, t[50] = pJ, t[51] = yJ) : yJ = t[51];
|
|
28725
28717
|
let bJ = yJ, xJ;
|
|
28726
28718
|
t[52] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (xJ = cn("relative"), t[52] = xJ) : xJ = t[52];
|
|
28727
|
-
let
|
|
28728
|
-
t[53] !==
|
|
28729
|
-
|
|
28730
|
-
}, t[53] =
|
|
28731
|
-
let
|
|
28732
|
-
t[56] !== o || t[57] !==
|
|
28719
|
+
let CJ;
|
|
28720
|
+
t[53] !== nJ || t[54] !== oJ ? (CJ = (e2) => {
|
|
28721
|
+
nJ && e2 || oJ(e2);
|
|
28722
|
+
}, t[53] = nJ, t[54] = oJ, t[55] = CJ) : CJ = t[55];
|
|
28723
|
+
let TJ = nJ && "cursor-not-allowed opacity-50", EJ;
|
|
28724
|
+
t[56] !== o || t[57] !== TJ ? (EJ = cn("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid", TJ, o), t[56] = o, t[57] = TJ, t[58] = EJ) : EJ = t[58];
|
|
28733
28725
|
let DJ;
|
|
28734
|
-
t[59] !== O || t[60] !== vJ || t[61] !==
|
|
28726
|
+
t[59] !== O || t[60] !== vJ || t[61] !== uJ ? (DJ = O ? O(uJ ?? null) : vJ(), t[59] = O, t[60] = vJ, t[61] = uJ, t[62] = DJ) : DJ = t[62];
|
|
28735
28727
|
let OJ;
|
|
28736
28728
|
t[63] === DJ ? OJ = t[64] : (OJ = (0, import_jsx_runtime.jsx)("span", {
|
|
28737
28729
|
className: "truncate flex-1 min-w-0",
|
|
@@ -28742,32 +28734,32 @@ Database schema: ${e2}`);
|
|
|
28742
28734
|
className: "ml-3 w-4 h-4 opacity-50 shrink-0"
|
|
28743
28735
|
}), t[65] = kJ) : kJ = t[65];
|
|
28744
28736
|
let AJ;
|
|
28745
|
-
t[66] !==
|
|
28737
|
+
t[66] !== nJ || t[67] !== h || t[68] !== sJ || t[69] !== EJ || t[70] !== OJ ? (AJ = (0, import_jsx_runtime.jsx)(PopoverTrigger, {
|
|
28746
28738
|
asChild: true,
|
|
28747
28739
|
children: (0, import_jsx_runtime.jsxs)("button", {
|
|
28748
28740
|
id: h,
|
|
28749
28741
|
type: "button",
|
|
28750
28742
|
className: EJ,
|
|
28751
|
-
"aria-expanded":
|
|
28752
|
-
"aria-disabled":
|
|
28743
|
+
"aria-expanded": sJ,
|
|
28744
|
+
"aria-disabled": nJ,
|
|
28753
28745
|
children: [
|
|
28754
28746
|
OJ,
|
|
28755
28747
|
kJ
|
|
28756
28748
|
]
|
|
28757
28749
|
})
|
|
28758
|
-
}), t[66] =
|
|
28750
|
+
}), t[66] = nJ, t[67] = h, t[68] = sJ, t[69] = EJ, t[70] = OJ, t[71] = AJ) : AJ = t[71];
|
|
28759
28751
|
let jJ;
|
|
28760
|
-
t[72] !==
|
|
28761
|
-
placeholder:
|
|
28752
|
+
t[72] !== $q || t[73] !== y || t[74] !== M ? (jJ = (0, import_jsx_runtime.jsx)(CommandInput, {
|
|
28753
|
+
placeholder: $q,
|
|
28762
28754
|
rootClassName: "px-1 h-8",
|
|
28763
28755
|
autoFocus: true,
|
|
28764
28756
|
value: M,
|
|
28765
28757
|
onValueChange: y
|
|
28766
|
-
}), t[72] =
|
|
28758
|
+
}), t[72] = $q, t[73] = y, t[74] = M, t[75] = jJ) : jJ = t[75];
|
|
28767
28759
|
let MJ;
|
|
28768
|
-
t[76] ===
|
|
28769
|
-
children:
|
|
28770
|
-
}), t[76] =
|
|
28760
|
+
t[76] === eJ ? MJ = t[77] : (MJ = (0, import_jsx_runtime.jsx)(CommandEmpty, {
|
|
28761
|
+
children: eJ
|
|
28762
|
+
}), t[76] = eJ, t[77] = MJ);
|
|
28771
28763
|
let NJ;
|
|
28772
28764
|
t[78] !== n || t[79] !== bJ ? (NJ = (0, import_jsx_runtime.jsx)(ComboboxContext, {
|
|
28773
28765
|
value: bJ,
|
|
@@ -28782,43 +28774,43 @@ Database schema: ${e2}`);
|
|
|
28782
28774
|
]
|
|
28783
28775
|
}), t[81] = MJ, t[82] = NJ, t[83] = PJ) : PJ = t[83];
|
|
28784
28776
|
let FJ;
|
|
28785
|
-
t[84] !== f || t[85] !==
|
|
28777
|
+
t[84] !== f || t[85] !== Qq || t[86] !== jJ || t[87] !== PJ ? (FJ = (0, import_jsx_runtime.jsx)(PopoverContent, {
|
|
28786
28778
|
className: "w-full min-w-(--radix-popover-trigger-width) p-0",
|
|
28787
28779
|
align: "start",
|
|
28788
28780
|
children: (0, import_jsx_runtime.jsxs)(Command, {
|
|
28789
28781
|
filter: f,
|
|
28790
|
-
shouldFilter:
|
|
28782
|
+
shouldFilter: Qq,
|
|
28791
28783
|
children: [
|
|
28792
28784
|
jJ,
|
|
28793
28785
|
PJ
|
|
28794
28786
|
]
|
|
28795
28787
|
})
|
|
28796
|
-
}), t[84] = f, t[85] =
|
|
28788
|
+
}), t[84] = f, t[85] = Qq, t[86] = jJ, t[87] = PJ, t[88] = FJ) : FJ = t[88];
|
|
28797
28789
|
let IJ;
|
|
28798
|
-
t[89] !==
|
|
28799
|
-
open:
|
|
28800
|
-
onOpenChange:
|
|
28790
|
+
t[89] !== sJ || t[90] !== CJ || t[91] !== AJ || t[92] !== FJ ? (IJ = (0, import_jsx_runtime.jsxs)(Popover, {
|
|
28791
|
+
open: sJ,
|
|
28792
|
+
onOpenChange: CJ,
|
|
28801
28793
|
children: [
|
|
28802
28794
|
AJ,
|
|
28803
28795
|
FJ
|
|
28804
28796
|
]
|
|
28805
|
-
}), t[89] =
|
|
28797
|
+
}), t[89] = sJ, t[90] = CJ, t[91] = AJ, t[92] = FJ, t[93] = IJ) : IJ = t[93];
|
|
28806
28798
|
let LJ;
|
|
28807
|
-
t[94] !==
|
|
28799
|
+
t[94] !== tJ || t[95] !== i || t[96] !== nJ || t[97] !== d || t[98] !== hJ || t[99] !== $ || t[100] !== uJ ? (LJ = $ && tJ && (0, import_jsx_runtime.jsx)("div", {
|
|
28808
28800
|
className: cn("flex flex-col gap-1 items-start", i),
|
|
28809
|
-
children: Array.isArray(
|
|
28801
|
+
children: Array.isArray(uJ) && uJ.map((e2) => e2 == null ? null : (0, import_jsx_runtime.jsxs)(Badge, {
|
|
28810
28802
|
variant: "secondary",
|
|
28811
28803
|
children: [
|
|
28812
28804
|
(d == null ? void 0 : d(e2)) ?? String(e2),
|
|
28813
28805
|
(0, import_jsx_runtime.jsx)(CircleX, {
|
|
28814
28806
|
onClick: () => {
|
|
28815
|
-
|
|
28807
|
+
nJ || hJ(e2);
|
|
28816
28808
|
},
|
|
28817
|
-
className: cn("w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer",
|
|
28809
|
+
className: cn("w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer", nJ && "pointer-events-none")
|
|
28818
28810
|
})
|
|
28819
28811
|
]
|
|
28820
28812
|
}, String(e2)))
|
|
28821
|
-
}), t[94] =
|
|
28813
|
+
}), t[94] = tJ, t[95] = i, t[96] = nJ, t[97] = d, t[98] = hJ, t[99] = $, t[100] = uJ, t[101] = LJ) : LJ = t[101];
|
|
28822
28814
|
let RJ;
|
|
28823
28815
|
return t[102] !== A || t[103] !== IJ || t[104] !== LJ ? (RJ = (0, import_jsx_runtime.jsxs)("div", {
|
|
28824
28816
|
className: xJ,
|
|
@@ -34580,51 +34572,51 @@ ${d}`,
|
|
|
34580
34572
|
triggerImmediately: e2
|
|
34581
34573
|
});
|
|
34582
34574
|
}, t[12] = d, t[13] = n, t[14] = K) : K = t[14];
|
|
34583
|
-
let q = K,
|
|
34584
|
-
t[15] !== a || t[16] !== d || t[17] !== _ ? (
|
|
34575
|
+
let q = K, Q;
|
|
34576
|
+
t[15] !== a || t[16] !== d || t[17] !== _ ? (Q = () => {
|
|
34585
34577
|
_({
|
|
34586
|
-
prompt:
|
|
34578
|
+
prompt: buildFixInChatPrompt(a, d)
|
|
34587
34579
|
});
|
|
34588
|
-
}, t[15] = a, t[16] = d, t[17] = _, t[18] =
|
|
34589
|
-
let
|
|
34590
|
-
t[19] === z ?
|
|
34591
|
-
let
|
|
34592
|
-
t[21] === z ?
|
|
34580
|
+
}, t[15] = a, t[16] = d, t[17] = _, t[18] = Q) : Q = t[18];
|
|
34581
|
+
let $ = Q, Qq;
|
|
34582
|
+
t[19] === z ? Qq = t[20] : (Qq = () => U(!z), t[19] = z, t[20] = Qq);
|
|
34583
|
+
let $q = z ? "Collapse traceback" : "Expand traceback", eJ;
|
|
34584
|
+
t[21] === z ? eJ = t[22] : (eJ = z ? (0, import_jsx_runtime.jsx)(ChevronDown, {
|
|
34593
34585
|
className: "h-3 w-3"
|
|
34594
34586
|
}) : (0, import_jsx_runtime.jsx)(ChevronRight, {
|
|
34595
34587
|
className: "h-3 w-3"
|
|
34596
|
-
}), t[21] = z, t[22] =
|
|
34597
|
-
let
|
|
34598
|
-
t[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
34588
|
+
}), t[21] = z, t[22] = eJ);
|
|
34589
|
+
let tJ;
|
|
34590
|
+
t[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (tJ = (0, import_jsx_runtime.jsx)("span", {
|
|
34599
34591
|
className: "text-[0.6875rem] uppercase tracking-wider",
|
|
34600
34592
|
children: "Traceback"
|
|
34601
|
-
}), t[23] =
|
|
34602
|
-
let
|
|
34603
|
-
t[24] !== z || t[25] !==
|
|
34593
|
+
}), t[23] = tJ) : tJ = t[23];
|
|
34594
|
+
let nJ;
|
|
34595
|
+
t[24] !== z || t[25] !== eJ || t[26] !== Qq || t[27] !== $q ? (nJ = (0, import_jsx_runtime.jsxs)("button", {
|
|
34604
34596
|
type: "button",
|
|
34605
|
-
onClick:
|
|
34597
|
+
onClick: Qq,
|
|
34606
34598
|
"aria-expanded": z,
|
|
34607
|
-
"aria-label":
|
|
34599
|
+
"aria-label": $q,
|
|
34608
34600
|
className: "self-start flex items-center gap-1 pt-2 text-muted-foreground/70 hover:text-muted-foreground transition-colors",
|
|
34609
34601
|
children: [
|
|
34610
|
-
|
|
34611
|
-
|
|
34602
|
+
eJ,
|
|
34603
|
+
tJ
|
|
34612
34604
|
]
|
|
34613
|
-
}), t[24] = z, t[25] =
|
|
34614
|
-
let
|
|
34615
|
-
t[29] !== s || t[30] !== z ? (
|
|
34605
|
+
}), t[24] = z, t[25] = eJ, t[26] = Qq, t[27] = $q, t[28] = nJ) : nJ = t[28];
|
|
34606
|
+
let rJ;
|
|
34607
|
+
t[29] !== s || t[30] !== z ? (rJ = z && (0, import_jsx_runtime.jsx)("div", {
|
|
34616
34608
|
className: "text-muted-foreground pr-4 text-xs overflow-auto",
|
|
34617
34609
|
children: s
|
|
34618
|
-
}), t[29] = s, t[30] = z, t[31] =
|
|
34619
|
-
let
|
|
34620
|
-
t[32] !== q || t[33] !==
|
|
34610
|
+
}), t[29] = s, t[30] = z, t[31] = rJ) : rJ = t[31];
|
|
34611
|
+
let iJ;
|
|
34612
|
+
t[32] !== q || t[33] !== $ || t[34] !== M ? (iJ = M && (0, import_jsx_runtime.jsx)(AIFixButton, {
|
|
34621
34613
|
tooltip: "Fix with AI",
|
|
34622
34614
|
openPrompt: () => q(false),
|
|
34623
34615
|
applyAutofix: () => q(true),
|
|
34624
|
-
openChat:
|
|
34625
|
-
}), t[32] = q, t[33] =
|
|
34626
|
-
let
|
|
34627
|
-
t[36] !== O || t[37] !== y ? (
|
|
34616
|
+
openChat: $
|
|
34617
|
+
}), t[32] = q, t[33] = $, t[34] = M, t[35] = iJ) : iJ = t[35];
|
|
34618
|
+
let aJ;
|
|
34619
|
+
t[36] !== O || t[37] !== y ? (aJ = O && (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
34628
34620
|
content: "Attach pdb to the exception point.",
|
|
34629
34621
|
children: (0, import_jsx_runtime.jsxs)(Button, {
|
|
34630
34622
|
size: "xs",
|
|
@@ -34641,9 +34633,9 @@ ${d}`,
|
|
|
34641
34633
|
"Launch debugger"
|
|
34642
34634
|
]
|
|
34643
34635
|
})
|
|
34644
|
-
}), t[36] = O, t[37] = y, t[38] =
|
|
34645
|
-
let
|
|
34646
|
-
t[39] !== d || t[40] !== i ? (
|
|
34636
|
+
}), t[36] = O, t[37] = y, t[38] = aJ) : aJ = t[38];
|
|
34637
|
+
let oJ;
|
|
34638
|
+
t[39] !== d || t[40] !== i ? (oJ = I && (0, import_jsx_runtime.jsxs)(DropdownMenu, {
|
|
34647
34639
|
children: [
|
|
34648
34640
|
(0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
|
|
34649
34641
|
asChild: true,
|
|
@@ -34711,25 +34703,25 @@ ${d}`,
|
|
|
34711
34703
|
]
|
|
34712
34704
|
})
|
|
34713
34705
|
]
|
|
34714
|
-
}), t[39] = d, t[40] = i, t[41] =
|
|
34715
|
-
let
|
|
34716
|
-
t[42] !==
|
|
34706
|
+
}), t[39] = d, t[40] = i, t[41] = oJ) : oJ = t[41];
|
|
34707
|
+
let cJ;
|
|
34708
|
+
t[42] !== iJ || t[43] !== aJ || t[44] !== oJ ? (cJ = (0, import_jsx_runtime.jsxs)("div", {
|
|
34717
34709
|
className: "flex gap-2",
|
|
34718
34710
|
children: [
|
|
34719
|
-
rJ,
|
|
34720
34711
|
iJ,
|
|
34721
|
-
aJ
|
|
34712
|
+
aJ,
|
|
34713
|
+
oJ
|
|
34722
34714
|
]
|
|
34723
|
-
}), t[42] =
|
|
34724
|
-
let
|
|
34725
|
-
return t[46] !==
|
|
34715
|
+
}), t[42] = iJ, t[43] = aJ, t[44] = oJ, t[45] = cJ) : cJ = t[45];
|
|
34716
|
+
let lJ;
|
|
34717
|
+
return t[46] !== nJ || t[47] !== rJ || t[48] !== cJ ? (lJ = (0, import_jsx_runtime.jsxs)("div", {
|
|
34726
34718
|
className: "flex flex-col gap-2 min-w-full w-fit",
|
|
34727
34719
|
children: [
|
|
34728
|
-
tJ,
|
|
34729
34720
|
nJ,
|
|
34730
|
-
|
|
34721
|
+
rJ,
|
|
34722
|
+
cJ
|
|
34731
34723
|
]
|
|
34732
|
-
}), t[46] =
|
|
34724
|
+
}), t[46] = nJ, t[47] = rJ, t[48] = cJ, t[49] = lJ) : lJ = t[49], lJ;
|
|
34733
34725
|
};
|
|
34734
34726
|
function lastLine(e) {
|
|
34735
34727
|
var _a2, _b;
|
|
@@ -36206,7 +36198,7 @@ ${d}`,
|
|
|
36206
36198
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
36207
36199
|
}
|
|
36208
36200
|
}
|
|
36209
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.14-
|
|
36201
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.14-dev21");
|
|
36210
36202
|
showCodeInRunModeAtom = atom(true);
|
|
36211
36203
|
atom(null);
|
|
36212
36204
|
var import_compiler_runtime = require_compiler_runtime();
|