@marimo-team/islands 0.23.11-dev27 → 0.23.11-dev29
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-Bf2NICxi.js → chat-ui-m1SnDPdw.js} +119 -90
- package/dist/{code-visibility-B_yzWRMv.js → code-visibility-BtAh8-ga.js} +5 -5
- package/dist/main.js +7 -7
- package/dist/{reveal-component-fxfTFY2x.js → reveal-component-CiJIhe23.js} +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-display.tsx +5 -0
- package/src/components/chat/chat-panel.tsx +4 -0
- package/src/components/chat/tool-call/tool-call-view.tsx +4 -0
- package/src/components/chat/tool-call/tool-history-row.tsx +26 -5
- package/src/components/data-table/TableTopBar.tsx +4 -4
- package/src/components/data-table/__tests__/data-table.test.tsx +28 -0
- package/src/components/data-table/data-table.tsx +3 -3
- package/src/plugins/impl/DataTablePlugin.tsx +4 -5
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +1 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
|
@@ -72,6 +72,17 @@ var Ban = createLucideIcon("ban", [["path", {
|
|
|
72
72
|
}], ["path", {
|
|
73
73
|
d: "m9 11 3 3L22 4",
|
|
74
74
|
key: "1pflzl"
|
|
75
|
+
}]]), CircleSlash = createLucideIcon("circle-slash", [["circle", {
|
|
76
|
+
cx: "12",
|
|
77
|
+
cy: "12",
|
|
78
|
+
r: "10",
|
|
79
|
+
key: "1mglay"
|
|
80
|
+
}], ["line", {
|
|
81
|
+
x1: "9",
|
|
82
|
+
x2: "15",
|
|
83
|
+
y1: "15",
|
|
84
|
+
y2: "9",
|
|
85
|
+
key: "1dfufj"
|
|
75
86
|
}]]), Paperclip = createLucideIcon("paperclip", [["path", {
|
|
76
87
|
d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
|
|
77
88
|
key: "1miecu"
|
|
@@ -6796,27 +6807,35 @@ var import_compiler_runtime$3 = require_compiler_runtime(), STATUS_LABEL = {
|
|
|
6796
6807
|
"approval-responded": "Awaiting result",
|
|
6797
6808
|
"output-available": "Done",
|
|
6798
6809
|
"output-denied": "Denied"
|
|
6799
|
-
},
|
|
6800
|
-
|
|
6810
|
+
}, PENDING_STATES = /* @__PURE__ */ new Set([
|
|
6811
|
+
"input-streaming",
|
|
6812
|
+
"input-available",
|
|
6813
|
+
"approval-responded"
|
|
6814
|
+
]), StatusIcon = (e18) => {
|
|
6815
|
+
let m = (0, import_compiler_runtime$3.c)(5), { state: h, interrupted: g } = e18;
|
|
6816
|
+
if (g) {
|
|
6817
|
+
let e19;
|
|
6818
|
+
return m[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleSlash, { className: "h-3 w-3 text-muted-foreground" }), m[0] = e19) : e19 = m[0], e19;
|
|
6819
|
+
}
|
|
6801
6820
|
switch (h) {
|
|
6802
6821
|
case "input-streaming":
|
|
6803
6822
|
case "input-available":
|
|
6804
6823
|
case "approval-responded": {
|
|
6805
6824
|
let e19;
|
|
6806
|
-
return m[
|
|
6825
|
+
return m[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "h-3 w-3 animate-spin" }), m[1] = e19) : e19 = m[1], e19;
|
|
6807
6826
|
}
|
|
6808
6827
|
case "output-available": {
|
|
6809
6828
|
let e19;
|
|
6810
|
-
return m[
|
|
6829
|
+
return m[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheckBig, { className: "h-3 w-3 text-(--grass-11)" }), m[2] = e19) : e19 = m[2], e19;
|
|
6811
6830
|
}
|
|
6812
6831
|
case "output-denied": {
|
|
6813
6832
|
let e19;
|
|
6814
|
-
return m[
|
|
6833
|
+
return m[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ban, { className: "h-3 w-3 text-muted-foreground" }), m[3] = e19) : e19 = m[3], e19;
|
|
6815
6834
|
}
|
|
6816
6835
|
default: {
|
|
6817
6836
|
logNever(h);
|
|
6818
6837
|
let e19;
|
|
6819
|
-
return m[
|
|
6838
|
+
return m[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrench, { className: "h-3 w-3" }), m[4] = e19) : e19 = m[4], e19;
|
|
6820
6839
|
}
|
|
6821
6840
|
}
|
|
6822
6841
|
};
|
|
@@ -6835,36 +6854,41 @@ function getTriggerToneClass(e18) {
|
|
|
6835
6854
|
}
|
|
6836
6855
|
}
|
|
6837
6856
|
const ToolHistoryRow = (e18) => {
|
|
6838
|
-
let m = (0, import_compiler_runtime$3.c)(
|
|
6839
|
-
m[0]
|
|
6840
|
-
let
|
|
6841
|
-
m[
|
|
6842
|
-
let D;
|
|
6843
|
-
m[4] === g ? D = m[5] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusIcon, { state: g }), m[4] = g, m[5] = D);
|
|
6844
|
-
let O = STATUS_LABEL[g], k;
|
|
6845
|
-
m[6] === h ? k = m[7] : (k = formatToolName(h), m[6] = h, m[7] = k);
|
|
6846
|
-
let A;
|
|
6847
|
-
m[8] === k ? A = m[9] : (A = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
6848
|
-
className: "font-mono text-xs",
|
|
6849
|
-
children: k
|
|
6850
|
-
}), m[8] = k, m[9] = A);
|
|
6857
|
+
let m = (0, import_compiler_runtime$3.c)(34), { toolName: h, state: g, input: v, result: y, approval: b, index: x, className: S, isActive: w } = e18, T = x === void 0 ? 0 : x, E = w === void 0 ? true : w, D;
|
|
6858
|
+
m[0] !== E || m[1] !== g ? (D = !E && PENDING_STATES.has(g), m[0] = E, m[1] = g, m[2] = D) : D = m[2];
|
|
6859
|
+
let O = D, k = `tool-${T}`, A;
|
|
6860
|
+
m[3] === S ? A = m[4] : (A = cn("w-full", S), m[3] = S, m[4] = A);
|
|
6851
6861
|
let j;
|
|
6852
|
-
m[
|
|
6862
|
+
m[5] !== O || m[6] !== g ? (j = cn("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline", O ? "text-muted-foreground" : getTriggerToneClass(g)), m[5] = O, m[6] = g, m[7] = j) : j = m[7];
|
|
6863
|
+
let M;
|
|
6864
|
+
m[8] !== O || m[9] !== g ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusIcon, {
|
|
6865
|
+
state: g,
|
|
6866
|
+
interrupted: O
|
|
6867
|
+
}), m[8] = O, m[9] = g, m[10] = M) : M = m[10];
|
|
6868
|
+
let N = O ? "Interrupted" : STATUS_LABEL[g], P;
|
|
6869
|
+
m[11] === h ? P = m[12] : (P = formatToolName(h), m[11] = h, m[12] = P);
|
|
6870
|
+
let F;
|
|
6871
|
+
m[13] === P ? F = m[14] : (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
6872
|
+
className: "font-mono text-xs",
|
|
6873
|
+
children: P
|
|
6874
|
+
}), m[13] = P, m[14] = F);
|
|
6875
|
+
let I;
|
|
6876
|
+
m[15] !== F || m[16] !== M || m[17] !== N ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
6853
6877
|
className: "flex items-center gap-1",
|
|
6854
6878
|
children: [
|
|
6855
|
-
|
|
6856
|
-
|
|
6879
|
+
M,
|
|
6880
|
+
N,
|
|
6857
6881
|
":",
|
|
6858
|
-
|
|
6882
|
+
F
|
|
6859
6883
|
]
|
|
6860
|
-
}), m[
|
|
6861
|
-
let
|
|
6862
|
-
m[
|
|
6863
|
-
className:
|
|
6864
|
-
children:
|
|
6865
|
-
}), m[
|
|
6866
|
-
let
|
|
6867
|
-
m[
|
|
6884
|
+
}), m[15] = F, m[16] = M, m[17] = N, m[18] = I) : I = m[18];
|
|
6885
|
+
let z;
|
|
6886
|
+
m[19] !== I || m[20] !== j ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
|
|
6887
|
+
className: j,
|
|
6888
|
+
children: I
|
|
6889
|
+
}), m[19] = I, m[20] = j, m[21] = z) : z = m[21];
|
|
6890
|
+
let B;
|
|
6891
|
+
m[22] !== b || m[23] !== v || m[24] !== y || m[25] !== g ? (B = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
|
|
6868
6892
|
className: "py-2 px-2",
|
|
6869
6893
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HistoryContent, {
|
|
6870
6894
|
state: g,
|
|
@@ -6872,20 +6896,20 @@ const ToolHistoryRow = (e18) => {
|
|
|
6872
6896
|
result: y,
|
|
6873
6897
|
approval: b
|
|
6874
6898
|
})
|
|
6875
|
-
}), m[
|
|
6876
|
-
let
|
|
6877
|
-
m[
|
|
6899
|
+
}), m[22] = b, m[23] = v, m[24] = y, m[25] = g, m[26] = B) : B = m[26];
|
|
6900
|
+
let V;
|
|
6901
|
+
m[27] !== z || m[28] !== B ? (V = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
|
|
6878
6902
|
value: "tool-call",
|
|
6879
6903
|
className: "border-0",
|
|
6880
|
-
children: [
|
|
6881
|
-
}), m[
|
|
6882
|
-
let
|
|
6883
|
-
return m[
|
|
6904
|
+
children: [z, B]
|
|
6905
|
+
}), m[27] = z, m[28] = B, m[29] = V) : V = m[29];
|
|
6906
|
+
let H;
|
|
6907
|
+
return m[30] !== V || m[31] !== k || m[32] !== A ? (H = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
|
|
6884
6908
|
type: "single",
|
|
6885
6909
|
collapsible: true,
|
|
6886
|
-
className:
|
|
6887
|
-
children:
|
|
6888
|
-
},
|
|
6910
|
+
className: A,
|
|
6911
|
+
children: V
|
|
6912
|
+
}, k), m[30] = V, m[31] = k, m[32] = A, m[33] = H) : H = m[33], H;
|
|
6889
6913
|
};
|
|
6890
6914
|
var HistoryContent = (e18) => {
|
|
6891
6915
|
let m = (0, import_compiler_runtime$3.c)(16), { state: h, input: g, result: _, approval: v } = e18;
|
|
@@ -6926,7 +6950,7 @@ var HistoryContent = (e18) => {
|
|
|
6926
6950
|
}
|
|
6927
6951
|
}, import_compiler_runtime$2 = require_compiler_runtime();
|
|
6928
6952
|
const ToolCallView = (e18) => {
|
|
6929
|
-
let m = (0, import_compiler_runtime$2.c)(
|
|
6953
|
+
let m = (0, import_compiler_runtime$2.c)(27), { toolName: h, state: g, result: _, errorText: v, input: y, approval: b, onApprove: x, index: S, className: C, isLive: w, isActive: T } = e18, E = w === void 0 ? true : w, D = T === void 0 ? true : T;
|
|
6930
6954
|
switch (g) {
|
|
6931
6955
|
case "approval-requested": {
|
|
6932
6956
|
if (b != null && x != null) {
|
|
@@ -6940,23 +6964,24 @@ const ToolCallView = (e18) => {
|
|
|
6940
6964
|
}), m[0] = b, m[1] = C, m[2] = y, m[3] = x, m[4] = h, m[5] = e20) : e20 = m[5], e20;
|
|
6941
6965
|
}
|
|
6942
6966
|
let e19;
|
|
6943
|
-
return m[6] !== C || m[7] !== S || m[8] !== y || m[9] !== h ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolHistoryRow, {
|
|
6967
|
+
return m[6] !== C || m[7] !== S || m[8] !== y || m[9] !== D || m[10] !== h ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolHistoryRow, {
|
|
6944
6968
|
toolName: h,
|
|
6945
6969
|
state: "input-available",
|
|
6946
6970
|
input: y,
|
|
6947
6971
|
index: S,
|
|
6948
|
-
className: C
|
|
6949
|
-
|
|
6972
|
+
className: C,
|
|
6973
|
+
isActive: D
|
|
6974
|
+
}), m[6] = C, m[7] = S, m[8] = y, m[9] = D, m[10] = h, m[11] = e19) : e19 = m[11], e19;
|
|
6950
6975
|
}
|
|
6951
6976
|
case "output-error": {
|
|
6952
6977
|
let e19;
|
|
6953
|
-
return m[
|
|
6978
|
+
return m[12] !== C || m[13] !== v || m[14] !== y || m[15] !== E || m[16] !== h ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolErrorCard, {
|
|
6954
6979
|
toolName: h,
|
|
6955
6980
|
input: y,
|
|
6956
6981
|
errorText: v,
|
|
6957
|
-
isLive:
|
|
6982
|
+
isLive: E,
|
|
6958
6983
|
className: C
|
|
6959
|
-
}), m[
|
|
6984
|
+
}), m[12] = C, m[13] = v, m[14] = y, m[15] = E, m[16] = h, m[17] = e19) : e19 = m[17], e19;
|
|
6960
6985
|
}
|
|
6961
6986
|
case "input-streaming":
|
|
6962
6987
|
case "input-available":
|
|
@@ -6964,74 +6989,77 @@ const ToolCallView = (e18) => {
|
|
|
6964
6989
|
case "output-available":
|
|
6965
6990
|
case "output-denied": {
|
|
6966
6991
|
let e19;
|
|
6967
|
-
return m[
|
|
6992
|
+
return m[18] !== b || m[19] !== C || m[20] !== S || m[21] !== y || m[22] !== D || m[23] !== _ || m[24] !== g || m[25] !== h ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolHistoryRow, {
|
|
6968
6993
|
toolName: h,
|
|
6969
6994
|
state: g,
|
|
6970
6995
|
input: y,
|
|
6971
6996
|
result: _,
|
|
6972
6997
|
approval: b,
|
|
6973
6998
|
index: S,
|
|
6974
|
-
className: C
|
|
6975
|
-
|
|
6999
|
+
className: C,
|
|
7000
|
+
isActive: D
|
|
7001
|
+
}), m[18] = b, m[19] = C, m[20] = S, m[21] = y, m[22] = D, m[23] = _, m[24] = g, m[25] = h, m[26] = e19) : e19 = m[26], e19;
|
|
6976
7002
|
}
|
|
6977
7003
|
default:
|
|
6978
7004
|
return logNever(g), null;
|
|
6979
7005
|
}
|
|
6980
|
-
}, renderUIMessage = ({ message: e18, isStreamingReasoning: m, isLast: g,
|
|
6981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: e18.parts.map((e19, m2) =>
|
|
6982
|
-
function
|
|
6983
|
-
if (isToolPart(
|
|
6984
|
-
index:
|
|
6985
|
-
toolName:
|
|
6986
|
-
result:
|
|
6987
|
-
errorText:
|
|
7006
|
+
}, renderUIMessage = ({ message: e18, isStreamingReasoning: m, isLast: g, isActive: _, addToolApprovalResponse: v }) => {
|
|
7007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: e18.parts.map((e19, m2) => y(e19, m2)) });
|
|
7008
|
+
function y(y2, b) {
|
|
7009
|
+
if (isToolPart(y2)) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallView, {
|
|
7010
|
+
index: b,
|
|
7011
|
+
toolName: y2.type,
|
|
7012
|
+
result: y2.output,
|
|
7013
|
+
errorText: y2.state === "output-error" ? y2.errorText : void 0,
|
|
6988
7014
|
className: "my-2",
|
|
6989
|
-
state:
|
|
6990
|
-
input:
|
|
6991
|
-
approval:
|
|
6992
|
-
onApprove:
|
|
6993
|
-
isLive: g
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
7015
|
+
state: y2.state,
|
|
7016
|
+
input: y2.input,
|
|
7017
|
+
approval: y2.approval,
|
|
7018
|
+
onApprove: v,
|
|
7019
|
+
isLive: g,
|
|
7020
|
+
isActive: _
|
|
7021
|
+
}, b);
|
|
7022
|
+
if (isDataPart(y2)) return Logger.debug("Found data part", y2), null;
|
|
7023
|
+
switch (y2.type) {
|
|
6997
7024
|
case "text":
|
|
6998
|
-
return
|
|
7025
|
+
return y2.text.includes("<marimo-") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderHTML({ html: y2.text }) }, b) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownRenderer, { content: y2.text }, b);
|
|
6999
7026
|
case "reasoning":
|
|
7000
7027
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReasoningAccordion, {
|
|
7001
|
-
reasoning:
|
|
7002
|
-
index:
|
|
7003
|
-
isStreaming: m && g &&
|
|
7004
|
-
},
|
|
7028
|
+
reasoning: y2.text,
|
|
7029
|
+
index: b,
|
|
7030
|
+
isStreaming: m && g && b === (e18.parts.length || 0) - 1
|
|
7031
|
+
}, b);
|
|
7005
7032
|
case "file":
|
|
7006
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AttachmentRenderer, { attachment:
|
|
7033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AttachmentRenderer, { attachment: y2 }, b);
|
|
7007
7034
|
case "dynamic-tool":
|
|
7008
7035
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallView, {
|
|
7009
|
-
toolName:
|
|
7010
|
-
result:
|
|
7011
|
-
errorText:
|
|
7012
|
-
state:
|
|
7013
|
-
input:
|
|
7014
|
-
approval:
|
|
7015
|
-
onApprove:
|
|
7016
|
-
isLive: g
|
|
7017
|
-
|
|
7036
|
+
toolName: y2.toolName,
|
|
7037
|
+
result: y2.output,
|
|
7038
|
+
errorText: y2.state === "output-error" ? y2.errorText : void 0,
|
|
7039
|
+
state: y2.state,
|
|
7040
|
+
input: y2.input,
|
|
7041
|
+
approval: y2.approval,
|
|
7042
|
+
onApprove: v,
|
|
7043
|
+
isLive: g,
|
|
7044
|
+
isActive: _
|
|
7045
|
+
}, b);
|
|
7018
7046
|
case "source-document":
|
|
7019
7047
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SourceChip, {
|
|
7020
7048
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileText, { className: "h-3 w-3 shrink-0" }),
|
|
7021
|
-
title:
|
|
7022
|
-
subtitle:
|
|
7023
|
-
},
|
|
7049
|
+
title: y2.title,
|
|
7050
|
+
subtitle: y2.filename
|
|
7051
|
+
}, b);
|
|
7024
7052
|
case "source-url":
|
|
7025
7053
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SourceChip, {
|
|
7026
7054
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { className: "h-3 w-3 shrink-0" }),
|
|
7027
|
-
title:
|
|
7028
|
-
subtitle:
|
|
7029
|
-
href:
|
|
7030
|
-
},
|
|
7055
|
+
title: y2.title ?? y2.url,
|
|
7056
|
+
subtitle: y2.title ? y2.url : void 0,
|
|
7057
|
+
href: y2.url
|
|
7058
|
+
}, b);
|
|
7031
7059
|
case "step-start":
|
|
7032
7060
|
return null;
|
|
7033
7061
|
default:
|
|
7034
|
-
return logNever(
|
|
7062
|
+
return logNever(y2), null;
|
|
7035
7063
|
}
|
|
7036
7064
|
}
|
|
7037
7065
|
};
|
|
@@ -7735,6 +7763,7 @@ const Chatbot = (e18) => {
|
|
|
7735
7763
|
message: e19,
|
|
7736
7764
|
isStreamingReasoning: B === "streaming",
|
|
7737
7765
|
isLast: g2,
|
|
7766
|
+
isActive: K,
|
|
7738
7767
|
addToolApprovalResponse: g2 ? G : void 0
|
|
7739
7768
|
})
|
|
7740
7769
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -34027,7 +34027,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
|
|
|
34027
34027
|
var NOOP_ON_SEARCH = () => {
|
|
34028
34028
|
};
|
|
34029
34029
|
let TableTopBar;
|
|
34030
|
-
TableTopBar = ({ table: e,
|
|
34030
|
+
TableTopBar = ({ table: e, showSearch: t, searchQuery: n, onSearchQueryChange: i, reloading: o, showChartBuilder: s, isChartBuilderOpen: c, toggleDisplayHeader: d, showTableExplorer: f, togglePanel: _, isAnyPanelOpen: v, downloadAs: y, sizeBytes: S, sizeBytesIsLoading: w }) => {
|
|
34031
34031
|
let [E, O] = (0, import_react.useState)(n || ""), A = useDebounce(E, 500), M = useEvent_default(i ?? NOOP_ON_SEARCH), I = import_react.useRef(null);
|
|
34032
34032
|
return (0, import_react.useEffect)(() => {
|
|
34033
34033
|
M(A);
|
|
@@ -34070,7 +34070,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
|
|
|
34070
34070
|
]
|
|
34071
34071
|
}),
|
|
34072
34072
|
(0, import_jsx_runtime.jsxs)("div", {
|
|
34073
|
-
className: "flex items-center shrink-0",
|
|
34073
|
+
className: "flex items-center shrink-0 ml-auto",
|
|
34074
34074
|
children: [
|
|
34075
34075
|
(0, import_jsx_runtime.jsx)(ColumnVisibilityDropdown, {
|
|
34076
34076
|
table: e
|
|
@@ -34109,7 +34109,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
|
|
|
34109
34109
|
]
|
|
34110
34110
|
});
|
|
34111
34111
|
};
|
|
34112
|
-
DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: t, maxHeight: n, columns: i, data: o, rawData: s, selection: c, totalColumns: d, totalRows: f, sizeBytes: _, sizeBytesIsLoading: v, manualSorting: y = false, sorting: S, setSorting: w, rowSelection: E, cellSelection: O, cellStyling: A, hoverTemplate: M, cellHoverTexts: I, paginationState: z, setPaginationState: U, downloadAs: K, manualPagination: q = false, pagination: J = false, onRowSelectionChange: Q, onCellSelectionChange: $, getRowIds: Iq,
|
|
34112
|
+
DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: t, maxHeight: n, columns: i, data: o, rawData: s, selection: c, totalColumns: d, totalRows: f, sizeBytes: _, sizeBytesIsLoading: v, manualSorting: y = false, sorting: S, setSorting: w, rowSelection: E, cellSelection: O, cellStyling: A, hoverTemplate: M, cellHoverTexts: I, paginationState: z, setPaginationState: U, downloadAs: K, manualPagination: q = false, pagination: J = false, onRowSelectionChange: Q, onCellSelectionChange: $, getRowIds: Iq, showSearch: Lq = false, searchQuery: Rq, onSearchQueryChange: zq, showFilters: Bq = false, filters: Vq, onFiltersChange: Hq, calculateTopKRows: Uq, reloading: Wq, freezeColumnsLeft: Gq, freezeColumnsRight: Kq, hiddenColumns: qq, toggleDisplayHeader: Jq, showChartBuilder: Yq, isChartBuilderOpen: Xq, showPageSizeSelector: Zq, showTableExplorer: Qq, togglePanel: $q, isPanelOpen: eJ, isAnyPanelOpen: tJ, viewedRowIdx: nJ, onViewedRowChange: rJ, renderTableExplorerPanel: iJ }) => {
|
|
34113
34113
|
let [aJ, oJ] = import_react.useState(false), { locale: sJ } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), { columnPinning: cJ, setColumnPinning: lJ } = useColumnPinning(Gq, Kq), { columnVisibility: uJ, setColumnVisibility: dJ } = useColumnVisibility(qq);
|
|
34114
34114
|
import_react.useEffect(() => {
|
|
34115
34115
|
let e2;
|
|
@@ -34227,7 +34227,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
|
|
|
34227
34227
|
children: [
|
|
34228
34228
|
(0, import_jsx_runtime.jsx)(TableTopBar, {
|
|
34229
34229
|
table: pJ,
|
|
34230
|
-
|
|
34230
|
+
showSearch: Lq,
|
|
34231
34231
|
searchQuery: Rq,
|
|
34232
34232
|
onSearchQueryChange: zq,
|
|
34233
34233
|
reloading: Wq,
|
|
@@ -35996,7 +35996,7 @@ ${d}`,
|
|
|
35996
35996
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
35997
35997
|
}
|
|
35998
35998
|
}
|
|
35999
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.11-
|
|
35999
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.11-dev29");
|
|
36000
36000
|
showCodeInRunModeAtom = atom(true);
|
|
36001
36001
|
atom(null);
|
|
36002
36002
|
var import_compiler_runtime = require_compiler_runtime();
|
package/dist/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { $ as reducer, B as safeExtractSetUIElementMessageBuffers, Bn as CircleA
|
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BbqSm5gU.js";
|
|
27
27
|
import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist-Dk6PV_d3.js";
|
|
28
28
|
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-f8-xgaui.js";
|
|
29
|
-
import { $ as contextAwarePanelOpen, $t as $fae977aafc393c5c$export$6b862160d295c8e, A as prettifyRowCount, At as SELECT_COLUMN_ID, B as DatePicker, Bt as TabsContent, C as downloadSizeLimitAtom, Ct as DelayMount, D as ErrorState, Dt as loadTableAndRawData, E as EmptyState, Et as getPageIndexForRow, F as ContextMenuSeparator, Ft as Maps, G as CommandEmpty, Gt as ChartLoadingState, H as Combobox, Ht as TabsTrigger, I as ContextMenuTrigger, It as dateToLocalISODate, J as CommandList, Jt as RenderTextWithLinks, K as CommandInput, Kt as LazyVegaEmbed, L as useInternalStateWithSync, Lt as dateToLocalISODateTime, M as ContextMenu, Mt as toFieldTypes, N as ContextMenuContent, Nt as getMimeValues, O as LoadingState, Ot as loadTableData, P as ContextMenuItem, Pt as isNullishFilter, Q as PANEL_TYPES, Qt as $fae977aafc393c5c$export$588937bcd60ade55, R as useSelectList, Rt as dateToLocalISOTime, S as Filenames, St as ColumnChartSpecModel, T as ColumnPreviewContainer, Tt as usePrevious$1, U as ComboboxItem, Ut as ChartErrorState, V as DateRangePicker, Vt as TabsList, W as Command, Wt as ChartInfoState, X as smartMatch, Xt as HtmlOutput, Y as CommandSeparator, Yt as Kbd, Z as ContextAwarePanelItem, Zt as EmotionCacheProvider, _ as ADD_PRINTING_CLASS, _t as NAMELESS_COLUMN_PREFIX, an as Ellipsis, at as Toggle, b as downloadHTMLAsImage, bt as renderCellValue, c as Slide, cn as ChevronsUpDown, d as RadioGroupItem, dn as ChevronsDownUp, dt as Table, en as TextWrap, et as contextAwarePanelOwner, f as JsonOutput, fn as ChevronLeft, ft as TableBody, g as InstallPackageButton, gt as TableRow, h as DataTable, ht as TableHeader, it as slotsController, j as getColumnCountForDisplay, jt as TOO_MANY_ROWS, k as prettifyRowColumnCount, kt as INDEX_COLUMN_NAME, l as Switch, ln as ChevronsRight, lt as Fill, m as OutputRenderer, mt as TableHead, n as marimoVersionAtom, nn as Funnel, nt as isCellAwareAtom, o as SLIDE_TYPE_OPTIONS_BY_VALUE, on as Download, p as OutputArea, pn as ArrowDownWideNarrow, pt as TableCell, q as CommandItem, qt as useOverflowDetection, r as showCodeInRunModeAtom, rn as EyeOff, rt as SlotNames, sn as Code, t as useNotebookCodeAvailable, tn as GripHorizontal, tt as contextAwarePanelType, u as RadioGroup, un as ChevronsLeft, ut as Provider$1, v as downloadBlob, vt as generateColumns, w as ColumnName, wt as useIntersectionObserver, x as Progress, xt as ColumnChartContext, y as downloadByURL, yt as inferFieldTypes, z as CompactChipRow, zt as Tabs, __tla as __tla_2 } from "./code-visibility-
|
|
29
|
+
import { $ as contextAwarePanelOpen, $t as $fae977aafc393c5c$export$6b862160d295c8e, A as prettifyRowCount, At as SELECT_COLUMN_ID, B as DatePicker, Bt as TabsContent, C as downloadSizeLimitAtom, Ct as DelayMount, D as ErrorState, Dt as loadTableAndRawData, E as EmptyState, Et as getPageIndexForRow, F as ContextMenuSeparator, Ft as Maps, G as CommandEmpty, Gt as ChartLoadingState, H as Combobox, Ht as TabsTrigger, I as ContextMenuTrigger, It as dateToLocalISODate, J as CommandList, Jt as RenderTextWithLinks, K as CommandInput, Kt as LazyVegaEmbed, L as useInternalStateWithSync, Lt as dateToLocalISODateTime, M as ContextMenu, Mt as toFieldTypes, N as ContextMenuContent, Nt as getMimeValues, O as LoadingState, Ot as loadTableData, P as ContextMenuItem, Pt as isNullishFilter, Q as PANEL_TYPES, Qt as $fae977aafc393c5c$export$588937bcd60ade55, R as useSelectList, Rt as dateToLocalISOTime, S as Filenames, St as ColumnChartSpecModel, T as ColumnPreviewContainer, Tt as usePrevious$1, U as ComboboxItem, Ut as ChartErrorState, V as DateRangePicker, Vt as TabsList, W as Command, Wt as ChartInfoState, X as smartMatch, Xt as HtmlOutput, Y as CommandSeparator, Yt as Kbd, Z as ContextAwarePanelItem, Zt as EmotionCacheProvider, _ as ADD_PRINTING_CLASS, _t as NAMELESS_COLUMN_PREFIX, an as Ellipsis, at as Toggle, b as downloadHTMLAsImage, bt as renderCellValue, c as Slide, cn as ChevronsUpDown, d as RadioGroupItem, dn as ChevronsDownUp, dt as Table, en as TextWrap, et as contextAwarePanelOwner, f as JsonOutput, fn as ChevronLeft, ft as TableBody, g as InstallPackageButton, gt as TableRow, h as DataTable, ht as TableHeader, it as slotsController, j as getColumnCountForDisplay, jt as TOO_MANY_ROWS, k as prettifyRowColumnCount, kt as INDEX_COLUMN_NAME, l as Switch, ln as ChevronsRight, lt as Fill, m as OutputRenderer, mt as TableHead, n as marimoVersionAtom, nn as Funnel, nt as isCellAwareAtom, o as SLIDE_TYPE_OPTIONS_BY_VALUE, on as Download, p as OutputArea, pn as ArrowDownWideNarrow, pt as TableCell, q as CommandItem, qt as useOverflowDetection, r as showCodeInRunModeAtom, rn as EyeOff, rt as SlotNames, sn as Code, t as useNotebookCodeAvailable, tn as GripHorizontal, tt as contextAwarePanelType, u as RadioGroup, un as ChevronsLeft, ut as Provider$1, v as downloadBlob, vt as generateColumns, w as ColumnName, wt as useIntersectionObserver, x as Progress, xt as ColumnChartContext, y as downloadByURL, yt as inferFieldTypes, z as CompactChipRow, zt as Tabs, __tla as __tla_2 } from "./code-visibility-BtAh8-ga.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-B3NOEiY5.js";
|
|
31
31
|
import { t as Check } from "./check-BCaJeT-J.js";
|
|
32
32
|
import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$2, N as usePrevious$2, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as Trigger$1, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-J57tzLr3.js";
|
|
@@ -8558,7 +8558,7 @@ let __tla = Promise.all([
|
|
|
8558
8558
|
};
|
|
8559
8559
|
}
|
|
8560
8560
|
};
|
|
8561
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
8561
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-m1SnDPdw.js").then((e) => ({
|
|
8562
8562
|
default: e.Chatbot
|
|
8563
8563
|
}))), messageSchema = array(object({
|
|
8564
8564
|
id: string(),
|
|
@@ -14152,6 +14152,7 @@ ${c}
|
|
|
14152
14152
|
showColumnExplorer: boolean().default(true),
|
|
14153
14153
|
showRowExplorer: boolean().default(true),
|
|
14154
14154
|
showChartBuilder: boolean().default(true),
|
|
14155
|
+
showSearch: boolean().default(true),
|
|
14155
14156
|
rowHeaders: columnToFieldTypesSchema,
|
|
14156
14157
|
freezeColumnsLeft: array(string()).optional(),
|
|
14157
14158
|
freezeColumnsRight: array(string()).optional(),
|
|
@@ -14262,7 +14263,6 @@ ${c}
|
|
|
14262
14263
|
...e.data,
|
|
14263
14264
|
...e.functions,
|
|
14264
14265
|
host: e.host,
|
|
14265
|
-
enableSearch: true,
|
|
14266
14266
|
data: e.data.data,
|
|
14267
14267
|
value: e.value,
|
|
14268
14268
|
setValue: e.setValue,
|
|
@@ -14520,7 +14520,7 @@ ${c}
|
|
|
14520
14520
|
}), r[115] = _W, r[116] = OW, r[117] = kW) : kW = r[117], kW;
|
|
14521
14521
|
});
|
|
14522
14522
|
LoadingDataTableComponent.displayName = "LoadingDataTableComponent";
|
|
14523
|
-
var DataTableComponent = ({ label: e, data: r, rawData: c, totalRows: l, sizeBytes: u, sizeBytesIsLoading: d, maxColumns: f, pagination: p, selection: m, value: h, showFilters: g, showDownload: _, showPageSizeSelector: v, showColumnExplorer: y, showRowExplorer: b, showChartBuilder: S, showDataTypes: w, rowHeaders: T, fieldTypes: O, paginationState: j, setPaginationState: M, download_as: I, columnSummaries: L, className: R, setValue: z, sorting: B, setSorting: H,
|
|
14523
|
+
var DataTableComponent = ({ label: e, data: r, rawData: c, totalRows: l, sizeBytes: u, sizeBytesIsLoading: d, maxColumns: f, pagination: p, selection: m, value: h, showFilters: g, showDownload: _, showPageSizeSelector: v, showColumnExplorer: y, showRowExplorer: b, showChartBuilder: S, showDataTypes: w, rowHeaders: T, fieldTypes: O, paginationState: j, setPaginationState: M, download_as: I, columnSummaries: L, className: R, setValue: z, sorting: B, setSorting: H, showSearch: W, searchQuery: G, setSearchQuery: q, filters: qU, setFilters: Z, reloading: JU, freezeColumnsLeft: YU, freezeColumnsRight: XU, hiddenColumns: ZU, textJustifyColumns: QU, wrappedColumns: $U, columnWidths: eW, headerTooltip: tW, totalColumns: nW, get_row_ids: rW, cellStyles: iW, hoverTemplate: aW, cellHoverTexts: oW, toggleDisplayHeader: sW, isChartBuilderOpen: cW, calculate_top_k_rows: lW, preview_column: uW, getRow: dW, cellId: fW, maxHeight: pW }) => {
|
|
14524
14524
|
let mW = (0, import_react.useId)(), [hW, gW] = (0, import_react.useState)(0), { isPanelOpen: _W, isAnyPanelOpen: vW, togglePanel: yW, panelType: bW, setPanelType: xW } = usePanelOwnership(mW, fW), SW = (0, import_react.useMemo)(() => {
|
|
14525
14525
|
if (!L || !O || !L.stats) return ColumnChartSpecModel.EMPTY;
|
|
14526
14526
|
let e2 = toFieldTypes(O);
|
|
@@ -14695,7 +14695,7 @@ ${c}
|
|
|
14695
14695
|
hoverTemplate: aW,
|
|
14696
14696
|
cellHoverTexts: oW,
|
|
14697
14697
|
downloadAs: _ ? I : void 0,
|
|
14698
|
-
|
|
14698
|
+
showSearch: W,
|
|
14699
14699
|
searchQuery: G,
|
|
14700
14700
|
onSearchQueryChange: q,
|
|
14701
14701
|
showFilters: g,
|
|
@@ -16923,7 +16923,7 @@ ${c}
|
|
|
16923
16923
|
showDownload: u,
|
|
16924
16924
|
download_as: _,
|
|
16925
16925
|
get_size_bytes: v,
|
|
16926
|
-
|
|
16926
|
+
showSearch: false,
|
|
16927
16927
|
showFilters: false,
|
|
16928
16928
|
search: g,
|
|
16929
16929
|
showColumnSummaries: false,
|
|
@@ -36190,7 +36190,7 @@ ${c}
|
|
|
36190
36190
|
function _temp2$2(e) {
|
|
36191
36191
|
e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
|
|
36192
36192
|
}
|
|
36193
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
36193
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-CiJIhe23.js"));
|
|
36194
36194
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
36195
36195
|
var _a3;
|
|
36196
36196
|
let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { slideCells: h, skippedIds: g, noOutputIds: _, slideTypes: v, startCellIndex: y } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
|
|
@@ -9,7 +9,7 @@ import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
|
9
9
|
import { lt as kioskModeAtom } from "./html-to-image-BJbLjZyG.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BbqSm5gU.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-Dk6PV_d3.js";
|
|
12
|
-
import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelResizeHandle, i as DEFAULT_DECK_TRANSITION, in as Expand, ot as Panel, rn as EyeOff, s as SlideSidebar, sn as Code, st as PanelGroup, t as useNotebookCodeAvailable } from "./code-visibility-
|
|
12
|
+
import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelResizeHandle, i as DEFAULT_DECK_TRANSITION, in as Expand, ot as Panel, rn as EyeOff, s as SlideSidebar, sn as Code, st as PanelGroup, t as useNotebookCodeAvailable } from "./code-visibility-BtAh8-ga.js";
|
|
13
13
|
import { X as useDebouncedCallback } from "./input-Cn-SZdXY.js";
|
|
14
14
|
import "./toDate-B4-pUFYh.js";
|
|
15
15
|
import "./react-dom-BTJzcVJ9.js";
|
package/package.json
CHANGED
|
@@ -20,11 +20,14 @@ export const renderUIMessage = ({
|
|
|
20
20
|
message,
|
|
21
21
|
isStreamingReasoning,
|
|
22
22
|
isLast,
|
|
23
|
+
isActive,
|
|
23
24
|
addToolApprovalResponse,
|
|
24
25
|
}: {
|
|
25
26
|
message: UIMessage;
|
|
26
27
|
isStreamingReasoning: boolean;
|
|
27
28
|
isLast: boolean;
|
|
29
|
+
/** Whether the chat is currently streaming/submitting a response. */
|
|
30
|
+
isActive: boolean;
|
|
28
31
|
addToolApprovalResponse?: ChatAddToolApproveResponseFunction;
|
|
29
32
|
}) => {
|
|
30
33
|
return (
|
|
@@ -49,6 +52,7 @@ export const renderUIMessage = ({
|
|
|
49
52
|
approval={part.approval}
|
|
50
53
|
onApprove={addToolApprovalResponse}
|
|
51
54
|
isLive={isLast}
|
|
55
|
+
isActive={isActive}
|
|
52
56
|
/>
|
|
53
57
|
);
|
|
54
58
|
}
|
|
@@ -102,6 +106,7 @@ export const renderUIMessage = ({
|
|
|
102
106
|
approval={part.approval}
|
|
103
107
|
onApprove={addToolApprovalResponse}
|
|
104
108
|
isLive={isLast}
|
|
109
|
+
isActive={isActive}
|
|
105
110
|
/>
|
|
106
111
|
);
|
|
107
112
|
case "source-document":
|
|
@@ -143,6 +143,7 @@ interface ChatMessageProps {
|
|
|
143
143
|
onEdit: (index: number, newValue: string) => void;
|
|
144
144
|
isStreamingReasoning: boolean;
|
|
145
145
|
isLast: boolean;
|
|
146
|
+
isActive: boolean;
|
|
146
147
|
addToolApprovalResponse?: ChatAddToolApproveResponseFunction;
|
|
147
148
|
}
|
|
148
149
|
|
|
@@ -153,6 +154,7 @@ const ChatMessageDisplay: React.FC<ChatMessageProps> = memo(
|
|
|
153
154
|
onEdit,
|
|
154
155
|
isStreamingReasoning,
|
|
155
156
|
isLast,
|
|
157
|
+
isActive,
|
|
156
158
|
addToolApprovalResponse,
|
|
157
159
|
}) => {
|
|
158
160
|
const renderUserMessage = (message: UIMessage) => {
|
|
@@ -205,6 +207,7 @@ const ChatMessageDisplay: React.FC<ChatMessageProps> = memo(
|
|
|
205
207
|
message,
|
|
206
208
|
isStreamingReasoning,
|
|
207
209
|
isLast,
|
|
210
|
+
isActive,
|
|
208
211
|
addToolApprovalResponse,
|
|
209
212
|
})}
|
|
210
213
|
</div>
|
|
@@ -780,6 +783,7 @@ const ChatPanelBody = () => {
|
|
|
780
783
|
onEdit={handleMessageEdit}
|
|
781
784
|
isStreamingReasoning={isStreamingReasoning}
|
|
782
785
|
isLast={idx === messages.length - 1}
|
|
786
|
+
isActive={isLoading}
|
|
783
787
|
addToolApprovalResponse={addToolApprovalResponse}
|
|
784
788
|
/>
|
|
785
789
|
))}
|
|
@@ -24,6 +24,7 @@ interface ToolCallViewProps {
|
|
|
24
24
|
* (the user has moved on).
|
|
25
25
|
*/
|
|
26
26
|
isLive?: boolean;
|
|
27
|
+
isActive?: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export const ToolCallView: React.FC<ToolCallViewProps> = ({
|
|
@@ -37,6 +38,7 @@ export const ToolCallView: React.FC<ToolCallViewProps> = ({
|
|
|
37
38
|
index,
|
|
38
39
|
className,
|
|
39
40
|
isLive = true,
|
|
41
|
+
isActive = true,
|
|
40
42
|
}) => {
|
|
41
43
|
switch (state) {
|
|
42
44
|
case "approval-requested":
|
|
@@ -61,6 +63,7 @@ export const ToolCallView: React.FC<ToolCallViewProps> = ({
|
|
|
61
63
|
input={input}
|
|
62
64
|
index={index}
|
|
63
65
|
className={className}
|
|
66
|
+
isActive={isActive}
|
|
64
67
|
/>
|
|
65
68
|
);
|
|
66
69
|
|
|
@@ -89,6 +92,7 @@ export const ToolCallView: React.FC<ToolCallViewProps> = ({
|
|
|
89
92
|
approval={approval}
|
|
90
93
|
index={index}
|
|
91
94
|
className={className}
|
|
95
|
+
isActive={isActive}
|
|
92
96
|
/>
|
|
93
97
|
);
|
|
94
98
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
BanIcon,
|
|
5
|
+
CheckCircleIcon,
|
|
6
|
+
CircleSlashIcon,
|
|
7
|
+
Loader2,
|
|
8
|
+
WrenchIcon,
|
|
9
|
+
} from "lucide-react";
|
|
4
10
|
import React from "react";
|
|
5
11
|
import {
|
|
6
12
|
Accordion,
|
|
@@ -29,7 +35,19 @@ const STATUS_LABEL: Record<HistoryState, string> = {
|
|
|
29
35
|
"output-denied": "Denied",
|
|
30
36
|
};
|
|
31
37
|
|
|
32
|
-
const
|
|
38
|
+
const PENDING_STATES = new Set<HistoryState>([
|
|
39
|
+
"input-streaming",
|
|
40
|
+
"input-available",
|
|
41
|
+
"approval-responded",
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
const StatusIcon: React.FC<{ state: HistoryState; interrupted: boolean }> = ({
|
|
45
|
+
state,
|
|
46
|
+
interrupted,
|
|
47
|
+
}) => {
|
|
48
|
+
if (interrupted) {
|
|
49
|
+
return <CircleSlashIcon className="h-3 w-3 text-muted-foreground" />;
|
|
50
|
+
}
|
|
33
51
|
switch (state) {
|
|
34
52
|
case "input-streaming":
|
|
35
53
|
case "input-available":
|
|
@@ -69,6 +87,7 @@ interface ToolHistoryRowProps {
|
|
|
69
87
|
approval?: ToolApproval;
|
|
70
88
|
index?: number;
|
|
71
89
|
className?: string;
|
|
90
|
+
isActive?: boolean;
|
|
72
91
|
}
|
|
73
92
|
|
|
74
93
|
export const ToolHistoryRow: React.FC<ToolHistoryRowProps> = ({
|
|
@@ -79,7 +98,9 @@ export const ToolHistoryRow: React.FC<ToolHistoryRowProps> = ({
|
|
|
79
98
|
approval,
|
|
80
99
|
index = 0,
|
|
81
100
|
className,
|
|
101
|
+
isActive = true,
|
|
82
102
|
}) => {
|
|
103
|
+
const interrupted = !isActive && PENDING_STATES.has(state);
|
|
83
104
|
return (
|
|
84
105
|
<Accordion
|
|
85
106
|
key={`tool-${index}`}
|
|
@@ -91,12 +112,12 @@ export const ToolHistoryRow: React.FC<ToolHistoryRowProps> = ({
|
|
|
91
112
|
<AccordionTrigger
|
|
92
113
|
className={cn(
|
|
93
114
|
"h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline",
|
|
94
|
-
getTriggerToneClass(state),
|
|
115
|
+
interrupted ? "text-muted-foreground" : getTriggerToneClass(state),
|
|
95
116
|
)}
|
|
96
117
|
>
|
|
97
118
|
<span className="flex items-center gap-1">
|
|
98
|
-
<StatusIcon state={state} />
|
|
99
|
-
{STATUS_LABEL[state]}:
|
|
119
|
+
<StatusIcon state={state} interrupted={interrupted} />
|
|
120
|
+
{interrupted ? "Interrupted" : STATUS_LABEL[state]}:
|
|
100
121
|
<code className="font-mono text-xs">
|
|
101
122
|
{formatToolName(toolName)}
|
|
102
123
|
</code>
|
|
@@ -27,7 +27,7 @@ const NOOP_ON_SEARCH = () => {
|
|
|
27
27
|
|
|
28
28
|
interface TableTopBarProps<TData> extends Partial<ExportActionProps> {
|
|
29
29
|
table: Table<TData>;
|
|
30
|
-
|
|
30
|
+
showSearch: boolean;
|
|
31
31
|
searchQuery?: string;
|
|
32
32
|
onSearchQueryChange?: (query: string) => void;
|
|
33
33
|
reloading?: boolean;
|
|
@@ -43,7 +43,7 @@ interface TableTopBarProps<TData> extends Partial<ExportActionProps> {
|
|
|
43
43
|
|
|
44
44
|
export const TableTopBar = <TData,>({
|
|
45
45
|
table,
|
|
46
|
-
|
|
46
|
+
showSearch,
|
|
47
47
|
searchQuery,
|
|
48
48
|
onSearchQueryChange,
|
|
49
49
|
reloading,
|
|
@@ -68,7 +68,7 @@ export const TableTopBar = <TData,>({
|
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<div className="flex items-center h-10 px-2 border-b gap-2">
|
|
71
|
-
{onSearchQueryChange &&
|
|
71
|
+
{onSearchQueryChange && showSearch && (
|
|
72
72
|
<div className="flex flex-1 items-center gap-1 px-2 rounded-sm focus-within:ring-1 focus-within:ring-border transition-shadow">
|
|
73
73
|
<SearchIcon className="w-4 h-4 text-muted-foreground shrink-0" />
|
|
74
74
|
<input
|
|
@@ -99,7 +99,7 @@ export const TableTopBar = <TData,>({
|
|
|
99
99
|
</div>
|
|
100
100
|
)}
|
|
101
101
|
|
|
102
|
-
<div className="flex items-center shrink-0">
|
|
102
|
+
<div className="flex items-center shrink-0 ml-auto">
|
|
103
103
|
<ColumnVisibilityDropdown table={table} />
|
|
104
104
|
{showChartBuilder && (
|
|
105
105
|
<Button
|
|
@@ -69,6 +69,34 @@ describe("DataTable", () => {
|
|
|
69
69
|
expect(commonProps.rowSelection).toEqual(initialRowSelection);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
it("hides the search bar when showSearch is false", () => {
|
|
73
|
+
const columns: ColumnDef<TestData>[] = [
|
|
74
|
+
{ accessorKey: "name", header: "Name" },
|
|
75
|
+
];
|
|
76
|
+
const commonProps = {
|
|
77
|
+
data: [{ id: 1, name: "Test 1" }] as TestData[],
|
|
78
|
+
columns,
|
|
79
|
+
totalRows: 1,
|
|
80
|
+
totalColumns: 1,
|
|
81
|
+
pagination: false,
|
|
82
|
+
onSearchQueryChange: () => {},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const { rerender } = render(
|
|
86
|
+
<TooltipProvider>
|
|
87
|
+
<DataTable {...commonProps} showSearch={true} />
|
|
88
|
+
</TooltipProvider>,
|
|
89
|
+
);
|
|
90
|
+
expect(screen.queryByPlaceholderText("Search...")).not.toBeNull();
|
|
91
|
+
|
|
92
|
+
rerender(
|
|
93
|
+
<TooltipProvider>
|
|
94
|
+
<DataTable {...commonProps} showSearch={false} />
|
|
95
|
+
</TooltipProvider>,
|
|
96
|
+
);
|
|
97
|
+
expect(screen.queryByPlaceholderText("Search...")).toBeNull();
|
|
98
|
+
});
|
|
99
|
+
|
|
72
100
|
it("shows the hoverTemplate text as a styled tooltip on hover", async () => {
|
|
73
101
|
vi.useFakeTimers();
|
|
74
102
|
interface RowData {
|
|
@@ -104,7 +104,7 @@ interface DataTableProps<TData> extends Partial<ExportActionProps> {
|
|
|
104
104
|
onCellSelectionChange?: OnChangeFn<CellSelectionState>;
|
|
105
105
|
getRowIds?: GetRowIds;
|
|
106
106
|
// Search
|
|
107
|
-
|
|
107
|
+
showSearch?: boolean;
|
|
108
108
|
searchQuery?: string;
|
|
109
109
|
onSearchQueryChange?: (query: string) => void;
|
|
110
110
|
showFilters?: boolean;
|
|
@@ -159,7 +159,7 @@ const DataTableInternal = <TData,>({
|
|
|
159
159
|
onRowSelectionChange,
|
|
160
160
|
onCellSelectionChange,
|
|
161
161
|
getRowIds,
|
|
162
|
-
|
|
162
|
+
showSearch = false,
|
|
163
163
|
searchQuery,
|
|
164
164
|
onSearchQueryChange,
|
|
165
165
|
showFilters = false,
|
|
@@ -357,7 +357,7 @@ const DataTableInternal = <TData,>({
|
|
|
357
357
|
>
|
|
358
358
|
<TableTopBar
|
|
359
359
|
table={table}
|
|
360
|
-
|
|
360
|
+
showSearch={showSearch}
|
|
361
361
|
searchQuery={searchQuery}
|
|
362
362
|
onSearchQueryChange={onSearchQueryChange}
|
|
363
363
|
reloading={reloading}
|
|
@@ -181,6 +181,7 @@ interface Data<T> {
|
|
|
181
181
|
maxHeight?: number;
|
|
182
182
|
selection: DataTableSelection;
|
|
183
183
|
showDownload: boolean;
|
|
184
|
+
showSearch: boolean;
|
|
184
185
|
showFilters: boolean;
|
|
185
186
|
showColumnSummaries: boolean | "stats" | "chart";
|
|
186
187
|
showDataTypes: boolean;
|
|
@@ -267,6 +268,7 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
|
|
|
267
268
|
showColumnExplorer: z.boolean().default(true),
|
|
268
269
|
showRowExplorer: z.boolean().default(true),
|
|
269
270
|
showChartBuilder: z.boolean().default(true),
|
|
271
|
+
showSearch: z.boolean().default(true),
|
|
270
272
|
rowHeaders: columnToFieldTypesSchema,
|
|
271
273
|
freezeColumnsLeft: z.array(z.string()).optional(),
|
|
272
274
|
freezeColumnsRight: z.array(z.string()).optional(),
|
|
@@ -385,7 +387,6 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
|
|
|
385
387
|
{...props.data}
|
|
386
388
|
{...props.functions}
|
|
387
389
|
host={props.host}
|
|
388
|
-
enableSearch={true}
|
|
389
390
|
data={props.data.data}
|
|
390
391
|
value={props.value}
|
|
391
392
|
setValue={props.setValue}
|
|
@@ -470,8 +471,6 @@ interface DataTableProps<T> extends Data<T>, DataTableFunctions {
|
|
|
470
471
|
// Selection
|
|
471
472
|
value: S;
|
|
472
473
|
setValue: (value: S) => void;
|
|
473
|
-
// Search
|
|
474
|
-
enableSearch: boolean;
|
|
475
474
|
// Filters
|
|
476
475
|
enableFilters?: boolean;
|
|
477
476
|
cellStyles?: CellStyleState | null;
|
|
@@ -841,7 +840,7 @@ const DataTableComponent = ({
|
|
|
841
840
|
setValue,
|
|
842
841
|
sorting,
|
|
843
842
|
setSorting,
|
|
844
|
-
|
|
843
|
+
showSearch,
|
|
845
844
|
searchQuery,
|
|
846
845
|
setSearchQuery,
|
|
847
846
|
filters,
|
|
@@ -1146,7 +1145,7 @@ const DataTableComponent = ({
|
|
|
1146
1145
|
hoverTemplate={hoverTemplate}
|
|
1147
1146
|
cellHoverTexts={cellHoverTexts}
|
|
1148
1147
|
downloadAs={showDownload ? downloadAs : undefined}
|
|
1149
|
-
|
|
1148
|
+
showSearch={showSearch}
|
|
1150
1149
|
searchQuery={searchQuery}
|
|
1151
1150
|
onSearchQueryChange={setSearchQuery}
|
|
1152
1151
|
showFilters={showFilters}
|
|
@@ -94,7 +94,7 @@ describe("LoadingDataTableComponent", () => {
|
|
|
94
94
|
hasStableRowId: false,
|
|
95
95
|
lazy: false,
|
|
96
96
|
host,
|
|
97
|
-
|
|
97
|
+
showSearch: true,
|
|
98
98
|
value: [] as (number | string | { rowId: string; columnName?: string })[],
|
|
99
99
|
setValue,
|
|
100
100
|
download_as: vi.fn() as DownloadAsArgs,
|
|
@@ -338,7 +338,7 @@ export const DataFrameComponent = memo(
|
|
|
338
338
|
showDownload={showDownload}
|
|
339
339
|
download_as={download_as}
|
|
340
340
|
get_size_bytes={get_size_bytes}
|
|
341
|
-
|
|
341
|
+
showSearch={false}
|
|
342
342
|
showFilters={false}
|
|
343
343
|
search={search}
|
|
344
344
|
showColumnSummaries={false}
|