drizzle-cube 0.4.8 → 0.4.10
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/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/{handler-odjn7MIB.js → handler-CySCodwi.js} +336 -210
- package/dist/adapters/{handler-BLcxTuwi.cjs → handler-e6zofK2k.cjs} +13 -13
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +4 -4
- package/dist/client/chunks/{analysis-builder-Bov_gLsf.js → analysis-builder-BMmWeFPr.js} +138 -138
- package/dist/client/chunks/{analysis-builder-Bov_gLsf.js.map → analysis-builder-BMmWeFPr.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-NBk6y0md.js → analysis-builder-shared-D56zYeV0.js} +713 -787
- package/dist/client/chunks/analysis-builder-shared-D56zYeV0.js.map +1 -0
- package/dist/client/chunks/{chart-area-QKKboTbq.js → chart-area-BJAgusst.js} +2 -2
- package/dist/client/chunks/{chart-area-QKKboTbq.js.map → chart-area-BJAgusst.js.map} +1 -1
- package/dist/client/chunks/chart-bar-Blypx8O4.js +267 -0
- package/dist/client/chunks/chart-bar-Blypx8O4.js.map +1 -0
- package/dist/client/chunks/{chart-line-C7YcMWBw.js → chart-line-zi6olZet.js} +2 -2
- package/dist/client/chunks/{chart-line-C7YcMWBw.js.map → chart-line-zi6olZet.js.map} +1 -1
- package/dist/client/chunks/{charts-loader-HYQFVOo4.js → charts-loader-CH0_S06T.js} +4 -4
- package/dist/client/chunks/{charts-loader-HYQFVOo4.js.map → charts-loader-CH0_S06T.js.map} +1 -1
- package/dist/client/chunks/{components-O0hh7ooo.js → components-ClQziOcT.js} +1495 -1416
- package/dist/client/chunks/components-ClQziOcT.js.map +1 -0
- package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +1 -0
- package/dist/client/components.js +8 -8
- package/dist/client/index.js +655 -584
- package/dist/client/index.js.map +1 -1
- package/dist/client/stores/notebookStore.d.ts +2 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +13 -13
- package/dist/server/index.js +1824 -1698
- package/package.json +1 -1
- package/dist/client/chunks/analysis-builder-shared-NBk6y0md.js.map +0 -1
- package/dist/client/chunks/chart-bar-HpXF42H1.js +0 -254
- package/dist/client/chunks/chart-bar-HpXF42H1.js.map +0 -1
- package/dist/client/chunks/components-O0hh7ooo.js.map +0 -1
package/dist/client/index.js
CHANGED
|
@@ -1,192 +1,227 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as a, jsxs as
|
|
4
|
-
import
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { f as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { E as
|
|
14
|
-
import { u as
|
|
15
|
-
import { c as
|
|
16
|
-
import { e as
|
|
17
|
-
import { c as
|
|
18
|
-
import { T as
|
|
19
|
-
import { createExplainQueryKey as
|
|
20
|
-
import { i as
|
|
21
|
-
import { h as
|
|
22
|
-
const
|
|
1
|
+
import { D as J, A as H, e as G, P as X } from "./chunks/components-ClQziOcT.js";
|
|
2
|
+
import { i as Je, a as He, C as Ge, h as Xe, g as Ye, b as Ze, j as et, f as tt, d as st, M as at, c as ct, n as ot, T as rt, R as nt, Q as dt, O as it, S as lt, V as ut, I as mt, H as pt, K as ht, W as ft, G as gt, J as bt, X as yt, L as xt, N as Ct, U as vt, Y as kt, Z as Nt, z as wt, q as St, x as Dt, t as Mt, s as At, w as Tt, p as It, v as Et, o as Bt, r as Rt, y as Lt, u as Qt, k as Ft, l as Pt, m as Vt, F as _t, E as jt, B as Kt } from "./chunks/components-ClQziOcT.js";
|
|
3
|
+
import { jsx as a, jsxs as y, Fragment as Y } from "react/jsx-runtime";
|
|
4
|
+
import L, { useRef as N, createContext as Z, useContext as ee, useState as F, useCallback as p, useEffect as Q } from "react";
|
|
5
|
+
import { c as te, d as se, e as ae, s as ce, f as K } from "./chunks/vendor-AVsJ2ni0.js";
|
|
6
|
+
import { a as P } from "./chunks/icons-DAeqv1iX.js";
|
|
7
|
+
import { D as Ot, h as qt, i as $t, b as zt, e as Wt, f as Jt, g as Ht, r as Gt, c as Xt, s as Yt } from "./chunks/icons-DAeqv1iX.js";
|
|
8
|
+
import { Q as oe } from "./chunks/chart-markdown-Du4Z2iqK.js";
|
|
9
|
+
import { f as re } from "./chunks/providers-CgxXm6Ll.js";
|
|
10
|
+
import { h as es, a as ts, S as ss, e as as, d as cs, i as os, b as rs, g as ns, u as ds, j as is, c as ls, w as us } from "./chunks/providers-CgxXm6Ll.js";
|
|
11
|
+
import { L as ps, u as hs } from "./chunks/charts-core-DmGfleFz.js";
|
|
12
|
+
import { L as gs, g as bs, c as ys, b as xs, i as Cs, p as vs, a as ks } from "./chunks/charts-loader-CH0_S06T.js";
|
|
13
|
+
import { E as ws, a as Ss, p as Ds, q as Ms, m as As, l as Ts, r as Is, C as Es, D as Bs, o as Rs, B as Ls, n as Qs, w as Fs, t as Ps, d as Vs, f as _s, s as js, e as Ks, i as Us, c as Os, h as qs, g as $s, u as zs, b as Ws, y as Js, A as Hs, x as Gs, k as Xs, v as Ys, z as Zs, j as ea } from "./chunks/analysis-builder-shared-D56zYeV0.js";
|
|
14
|
+
import { u as sa } from "./chunks/chart-bubble-Bf42A1-B.js";
|
|
15
|
+
import { c as ca, f as oa } from "./chunks/index-CApFCBF9.js";
|
|
16
|
+
import { e as na, c as da, l as ia, h as la, k as ua, j as ma, i as pa, m as ha, g as fa, f as ga, u as ba, u as ya, d as xa, b as Ca, a as va, v as ka } from "./chunks/useDirtyStateTracking-Cu1HSjmo.js";
|
|
17
|
+
import { c as wa, b as Sa, f as Da, g as Ma, a as Aa, i as Ta, t as Ia } from "./chunks/funnel-utils-CyonoNeC.js";
|
|
18
|
+
import { T as Ba, c as Ra, g as La, a as Qa, i as Fa, r as Pa, s as Va, b as _a, w as ja } from "./chunks/theme-Dp3hFed1.js";
|
|
19
|
+
import { createExplainQueryKey as Ua, useDryRunQueries as Oa, useDryRunQuery as qa, useExplainAI as $a, useExplainQuery as za, useMultiDryRunQueries as Wa } from "./hooks.js";
|
|
20
|
+
import { i as Ha, a as Ga } from "./chunks/flow-utils-CjQZG5qq.js";
|
|
21
|
+
import { h as Ya } from "./chunks/syntaxHighlighting-BQfjio-i.js";
|
|
22
|
+
const O = () => ({
|
|
23
23
|
blocks: [],
|
|
24
24
|
messages: [],
|
|
25
25
|
isStreaming: !1,
|
|
26
26
|
sessionId: null,
|
|
27
27
|
inputValue: ""
|
|
28
28
|
});
|
|
29
|
-
function
|
|
29
|
+
function ne(e, t) {
|
|
30
30
|
return {
|
|
31
31
|
// Block actions
|
|
32
|
-
addBlock: (s) =>
|
|
32
|
+
addBlock: (s) => e((c) => ({
|
|
33
33
|
blocks: [...c.blocks, s]
|
|
34
34
|
})),
|
|
35
|
-
removeBlock: (s) =>
|
|
36
|
-
blocks: c.blocks.filter((
|
|
35
|
+
removeBlock: (s) => e((c) => ({
|
|
36
|
+
blocks: c.blocks.filter((r) => r.id !== s)
|
|
37
37
|
})),
|
|
38
|
-
moveBlock: (s, c) =>
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
if (c === "up" &&
|
|
42
|
-
if (c === "down" &&
|
|
43
|
-
const n = [...
|
|
44
|
-
return [n[
|
|
38
|
+
moveBlock: (s, c) => e((r) => {
|
|
39
|
+
const o = r.blocks.findIndex((d) => d.id === s);
|
|
40
|
+
if (o === -1) return {};
|
|
41
|
+
if (c === "up" && o === 0) return {};
|
|
42
|
+
if (c === "down" && o === r.blocks.length - 1) return {};
|
|
43
|
+
const n = [...r.blocks], u = c === "up" ? o - 1 : o + 1;
|
|
44
|
+
return [n[o], n[u]] = [n[u], n[o]], { blocks: n };
|
|
45
45
|
}),
|
|
46
|
+
updateBlock: (s, c) => e((r) => ({
|
|
47
|
+
blocks: r.blocks.map(
|
|
48
|
+
(o) => o.id === s && o.type === "portlet" ? { ...o, ...c } : o
|
|
49
|
+
)
|
|
50
|
+
})),
|
|
46
51
|
// Chat actions
|
|
47
|
-
addMessage: (s) =>
|
|
52
|
+
addMessage: (s) => e((c) => ({
|
|
48
53
|
messages: [...c.messages, s]
|
|
49
54
|
})),
|
|
50
|
-
appendToLastAssistantMessage: (s) =>
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
...
|
|
54
|
-
content:
|
|
55
|
-
}), { messages:
|
|
55
|
+
appendToLastAssistantMessage: (s) => e((c) => {
|
|
56
|
+
const r = [...c.messages], o = r[r.length - 1];
|
|
57
|
+
return o && o.role === "assistant" && (r[r.length - 1] = {
|
|
58
|
+
...o,
|
|
59
|
+
content: o.content + s
|
|
60
|
+
}), { messages: r };
|
|
56
61
|
}),
|
|
57
|
-
addToolCallToLastAssistant: (s) =>
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
...
|
|
61
|
-
toolCalls: [...
|
|
62
|
-
}), { messages:
|
|
62
|
+
addToolCallToLastAssistant: (s) => e((c) => {
|
|
63
|
+
const r = [...c.messages], o = r[r.length - 1];
|
|
64
|
+
return o && o.role === "assistant" && (r[r.length - 1] = {
|
|
65
|
+
...o,
|
|
66
|
+
toolCalls: [...o.toolCalls || [], s]
|
|
67
|
+
}), { messages: r };
|
|
63
68
|
}),
|
|
64
|
-
updateLastToolCall: (s) =>
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
const n = [...
|
|
68
|
-
|
|
69
|
+
updateLastToolCall: (s) => e((c) => {
|
|
70
|
+
const r = [...c.messages], o = r[r.length - 1];
|
|
71
|
+
if (o?.role === "assistant" && o.toolCalls?.length) {
|
|
72
|
+
const n = [...o.toolCalls], u = s.id ? n.findIndex((d) => d.id === s.id) : n.length - 1;
|
|
73
|
+
u !== -1 && (n[u] = { ...n[u], ...s }, r[r.length - 1] = { ...o, toolCalls: n });
|
|
69
74
|
}
|
|
70
|
-
return { messages:
|
|
75
|
+
return { messages: r };
|
|
71
76
|
}),
|
|
72
77
|
// Session/UI actions
|
|
73
|
-
setIsStreaming: (s) =>
|
|
74
|
-
setSessionId: (s) =>
|
|
75
|
-
setInputValue: (s) =>
|
|
78
|
+
setIsStreaming: (s) => e({ isStreaming: s }),
|
|
79
|
+
setSessionId: (s) => e({ sessionId: s }),
|
|
80
|
+
setInputValue: (s) => e({ inputValue: s }),
|
|
76
81
|
// Persistence
|
|
77
82
|
save: () => {
|
|
78
|
-
const s =
|
|
83
|
+
const s = t();
|
|
79
84
|
return {
|
|
80
85
|
blocks: s.blocks,
|
|
81
86
|
messages: s.messages
|
|
82
87
|
};
|
|
83
88
|
},
|
|
84
|
-
load: (s) =>
|
|
89
|
+
load: (s) => e({
|
|
85
90
|
blocks: s.blocks || [],
|
|
86
91
|
messages: s.messages || []
|
|
87
92
|
}),
|
|
88
93
|
// Reset
|
|
89
|
-
reset: () =>
|
|
94
|
+
reset: () => e(O())
|
|
90
95
|
};
|
|
91
96
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
...
|
|
98
|
-
...
|
|
97
|
+
function de() {
|
|
98
|
+
const e = O();
|
|
99
|
+
return se()(
|
|
100
|
+
ae(
|
|
101
|
+
ce((t, s) => ({
|
|
102
|
+
...e,
|
|
103
|
+
...ne(t, s)
|
|
99
104
|
})),
|
|
100
105
|
{ name: "NotebookStore" }
|
|
101
106
|
)
|
|
102
107
|
);
|
|
103
108
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
children:
|
|
107
|
-
initialConfig:
|
|
109
|
+
const q = Z(null);
|
|
110
|
+
function ie({
|
|
111
|
+
children: e,
|
|
112
|
+
initialConfig: t
|
|
108
113
|
}) {
|
|
109
|
-
const s =
|
|
114
|
+
const s = N(null);
|
|
110
115
|
if (!s.current) {
|
|
111
|
-
const c =
|
|
112
|
-
|
|
116
|
+
const c = de();
|
|
117
|
+
t && c.getState().load(t), s.current = c;
|
|
113
118
|
}
|
|
114
|
-
return /* @__PURE__ */ a(
|
|
119
|
+
return /* @__PURE__ */ a(q.Provider, { value: s.current, children: e });
|
|
115
120
|
}
|
|
116
|
-
function
|
|
117
|
-
const
|
|
118
|
-
if (!
|
|
121
|
+
function D(e) {
|
|
122
|
+
const t = ee(q);
|
|
123
|
+
if (!t)
|
|
119
124
|
throw new Error("useNotebookStore must be used within NotebookStoreProvider");
|
|
120
|
-
return
|
|
125
|
+
return te(t, e);
|
|
121
126
|
}
|
|
122
|
-
const
|
|
123
|
-
messages:
|
|
124
|
-
isStreaming:
|
|
125
|
-
inputValue:
|
|
126
|
-
}),
|
|
127
|
-
addMessage:
|
|
128
|
-
appendToLastAssistantMessage:
|
|
129
|
-
addToolCallToLastAssistant:
|
|
130
|
-
updateLastToolCall:
|
|
131
|
-
setIsStreaming:
|
|
132
|
-
setInputValue:
|
|
133
|
-
setSessionId:
|
|
134
|
-
}),
|
|
135
|
-
addBlock:
|
|
136
|
-
removeBlock:
|
|
137
|
-
moveBlock:
|
|
138
|
-
|
|
139
|
-
|
|
127
|
+
const le = (e) => e.blocks, _e = (e) => e.messages, je = (e) => e.isStreaming, Ke = (e) => e.sessionId, Ue = (e) => e.inputValue, ue = (e) => ({
|
|
128
|
+
messages: e.messages,
|
|
129
|
+
isStreaming: e.isStreaming,
|
|
130
|
+
inputValue: e.inputValue
|
|
131
|
+
}), me = (e) => ({
|
|
132
|
+
addMessage: e.addMessage,
|
|
133
|
+
appendToLastAssistantMessage: e.appendToLastAssistantMessage,
|
|
134
|
+
addToolCallToLastAssistant: e.addToolCallToLastAssistant,
|
|
135
|
+
updateLastToolCall: e.updateLastToolCall,
|
|
136
|
+
setIsStreaming: e.setIsStreaming,
|
|
137
|
+
setInputValue: e.setInputValue,
|
|
138
|
+
setSessionId: e.setSessionId
|
|
139
|
+
}), pe = (e) => ({
|
|
140
|
+
addBlock: e.addBlock,
|
|
141
|
+
removeBlock: e.removeBlock,
|
|
142
|
+
moveBlock: e.moveBlock,
|
|
143
|
+
updateBlock: e.updateBlock
|
|
144
|
+
}), V = { width: "16px", height: "16px", color: "currentColor" }, he = P("chevronUp"), fe = P("chevronDown"), ge = P("edit"), be = P("delete"), ye = L.memo(function({
|
|
145
|
+
block: t,
|
|
140
146
|
onRemove: s,
|
|
141
147
|
onMoveUp: c,
|
|
142
|
-
onMoveDown:
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
onMoveDown: r,
|
|
149
|
+
onEdit: o,
|
|
150
|
+
isFirst: n,
|
|
151
|
+
isLast: u
|
|
145
152
|
}) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
153
|
+
const [d, g] = F(null), h = p((x) => {
|
|
154
|
+
g(x);
|
|
155
|
+
}, []);
|
|
156
|
+
return /* @__PURE__ */ y("div", { className: "dc:relative dc:mb-4 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:flex dc:flex-col", children: [
|
|
157
|
+
/* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-3 dc:py-1.5 dc:border-b border-dc-border dc:shrink-0 bg-dc-surface-secondary dc:rounded-t-lg", children: [
|
|
158
|
+
/* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:gap-2 dc:flex-1 dc:min-w-0", children: [
|
|
159
|
+
/* @__PURE__ */ a("h3", { className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate", children: t.title || "Untitled" }),
|
|
160
|
+
d && /* @__PURE__ */ a(
|
|
161
|
+
J,
|
|
162
|
+
{
|
|
163
|
+
chartConfig: d.chartConfig,
|
|
164
|
+
displayConfig: d.displayConfig,
|
|
165
|
+
queryObject: d.queryObject,
|
|
166
|
+
data: d.data,
|
|
167
|
+
chartType: d.chartType,
|
|
168
|
+
cacheInfo: d.cacheInfo ?? void 0
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:gap-1 dc:shrink-0 dc:ml-4 dc:-mr-2", children: [
|
|
173
|
+
!n && /* @__PURE__ */ a(
|
|
174
|
+
"button",
|
|
175
|
+
{
|
|
176
|
+
onClick: () => c(t.id),
|
|
177
|
+
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
178
|
+
title: "Move up",
|
|
179
|
+
children: /* @__PURE__ */ a(he, { style: V })
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
!u && /* @__PURE__ */ a(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
onClick: () => r(t.id),
|
|
186
|
+
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
187
|
+
title: "Move down",
|
|
188
|
+
children: /* @__PURE__ */ a(fe, { style: V })
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ a(
|
|
192
|
+
"button",
|
|
193
|
+
{
|
|
194
|
+
onClick: () => o(t),
|
|
195
|
+
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
196
|
+
title: "Edit visualization",
|
|
197
|
+
children: /* @__PURE__ */ a(ge, { style: V })
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
/* @__PURE__ */ a(
|
|
201
|
+
"button",
|
|
202
|
+
{
|
|
203
|
+
onClick: () => s(t.id),
|
|
204
|
+
className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
|
|
205
|
+
title: "Remove",
|
|
206
|
+
children: /* @__PURE__ */ a(be, { style: V })
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] })
|
|
175
210
|
] }),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
q,
|
|
211
|
+
/* @__PURE__ */ a("div", { className: "dc:flex-1 dc:min-h-0", children: /* @__PURE__ */ a(
|
|
212
|
+
H,
|
|
179
213
|
{
|
|
180
|
-
query:
|
|
181
|
-
chartType:
|
|
182
|
-
chartConfig:
|
|
183
|
-
displayConfig:
|
|
214
|
+
query: t.query,
|
|
215
|
+
chartType: t.chartType,
|
|
216
|
+
chartConfig: t.chartConfig,
|
|
217
|
+
displayConfig: t.displayConfig,
|
|
184
218
|
height: 400,
|
|
185
|
-
eagerLoad: !0
|
|
219
|
+
eagerLoad: !0,
|
|
220
|
+
onDebugDataReady: h
|
|
186
221
|
}
|
|
187
222
|
) })
|
|
188
223
|
] });
|
|
189
|
-
}),
|
|
224
|
+
}), xe = {
|
|
190
225
|
overrides: {
|
|
191
226
|
h1: { props: { className: "dc:text-lg dc:font-bold text-dc-text dc:mb-2 dc:mt-3" } },
|
|
192
227
|
h2: { props: { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2 dc:mt-3" } },
|
|
@@ -207,20 +242,20 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
|
|
|
207
242
|
td: { props: { className: "dc:px-3 dc:py-2 dc:text-sm text-dc-text border-dc-border dc:border-b" } },
|
|
208
243
|
tr: { props: { className: "dc:hover:opacity-80" } }
|
|
209
244
|
}
|
|
210
|
-
},
|
|
211
|
-
block:
|
|
245
|
+
}, Ce = L.memo(function({
|
|
246
|
+
block: t,
|
|
212
247
|
onRemove: s,
|
|
213
248
|
onMoveUp: c,
|
|
214
|
-
onMoveDown:
|
|
215
|
-
isFirst:
|
|
249
|
+
onMoveDown: r,
|
|
250
|
+
isFirst: o,
|
|
216
251
|
isLast: n
|
|
217
252
|
}) {
|
|
218
|
-
return /* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
-
!
|
|
253
|
+
return /* @__PURE__ */ y("div", { className: "dc:group dc:relative dc:mb-4", children: [
|
|
254
|
+
/* @__PURE__ */ y("div", { className: "dc:absolute dc:right-2 dc:top-2 dc:z-10 dc:flex dc:gap-1 dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity", children: [
|
|
255
|
+
!o && /* @__PURE__ */ a(
|
|
221
256
|
"button",
|
|
222
257
|
{
|
|
223
|
-
onClick: () => c(
|
|
258
|
+
onClick: () => c(t.id),
|
|
224
259
|
className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
|
|
225
260
|
title: "Move up",
|
|
226
261
|
children: "▲"
|
|
@@ -229,7 +264,7 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
|
|
|
229
264
|
!n && /* @__PURE__ */ a(
|
|
230
265
|
"button",
|
|
231
266
|
{
|
|
232
|
-
onClick: () =>
|
|
267
|
+
onClick: () => r(t.id),
|
|
233
268
|
className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
|
|
234
269
|
title: "Move down",
|
|
235
270
|
children: "▼"
|
|
@@ -238,270 +273,306 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
|
|
|
238
273
|
/* @__PURE__ */ a(
|
|
239
274
|
"button",
|
|
240
275
|
{
|
|
241
|
-
onClick: () => s(
|
|
276
|
+
onClick: () => s(t.id),
|
|
242
277
|
className: "dc:p-1 dc:rounded dc:text-xs text-dc-error dc:hover:opacity-80 bg-dc-surface border-dc-border dc:border",
|
|
243
278
|
title: "Remove",
|
|
244
279
|
children: "✕"
|
|
245
280
|
}
|
|
246
281
|
)
|
|
247
282
|
] }),
|
|
248
|
-
|
|
249
|
-
/* @__PURE__ */ a("div", { className: "dc:rounded-lg dc:p-4 bg-dc-surface border-dc-border dc:border", children: /* @__PURE__ */ a(
|
|
283
|
+
t.title && /* @__PURE__ */ a("h4", { className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2 dc:px-1", children: t.title }),
|
|
284
|
+
/* @__PURE__ */ a("div", { className: "dc:rounded-lg dc:p-4 bg-dc-surface border-dc-border dc:border", children: /* @__PURE__ */ a(oe, { options: xe, children: t.content }) })
|
|
250
285
|
] });
|
|
251
|
-
}),
|
|
252
|
-
const
|
|
286
|
+
}), ve = L.memo(function() {
|
|
287
|
+
const t = D(le), { removeBlock: s, moveBlock: c, updateBlock: r } = D(K(pe)), o = N(null), [n, u] = F(null), d = N(t.length);
|
|
253
288
|
Q(() => {
|
|
254
|
-
|
|
255
|
-
}, [
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
289
|
+
t.length > d.current && o.current?.scrollIntoView({ behavior: "smooth" }), d.current = t.length;
|
|
290
|
+
}, [t.length]);
|
|
291
|
+
const g = p((i) => s(i), [s]), h = p((i) => c(i, "up"), [c]), x = p((i) => c(i, "down"), [c]), m = p((i) => u(i), []), b = p((i) => {
|
|
292
|
+
if (!n) return;
|
|
293
|
+
const w = G(i), { analysisConfig: k } = w;
|
|
294
|
+
if (k) {
|
|
295
|
+
const v = k.charts[k.analysisType];
|
|
296
|
+
r(n.id, {
|
|
297
|
+
title: i.title,
|
|
298
|
+
query: JSON.stringify(k.query),
|
|
299
|
+
chartType: v?.chartType || "bar",
|
|
300
|
+
chartConfig: v?.chartConfig,
|
|
301
|
+
displayConfig: v?.displayConfig
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
u(null);
|
|
305
|
+
}, [n, r]);
|
|
306
|
+
return t.length === 0 ? /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ y("div", { className: "dc:text-center dc:max-w-sm dc:px-6", children: [
|
|
259
307
|
/* @__PURE__ */ a("h3", { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2", children: "Your notebook is empty" }),
|
|
260
308
|
/* @__PURE__ */ a("p", { className: "dc:text-sm text-dc-text-secondary", children: "Ask the AI assistant a question about your data. Charts and insights will appear here as the assistant analyzes your data." })
|
|
261
|
-
] }) }) : /* @__PURE__ */
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
return
|
|
265
|
-
|
|
309
|
+
] }) }) : /* @__PURE__ */ y("div", { className: "dc:h-full dc:overflow-y-auto dc:p-4", children: [
|
|
310
|
+
t.map((i, w) => {
|
|
311
|
+
const k = w === 0, v = w === t.length - 1;
|
|
312
|
+
return i.type === "portlet" ? /* @__PURE__ */ a(
|
|
313
|
+
ye,
|
|
266
314
|
{
|
|
267
|
-
block:
|
|
268
|
-
onRemove:
|
|
269
|
-
onMoveUp:
|
|
270
|
-
onMoveDown:
|
|
271
|
-
|
|
272
|
-
|
|
315
|
+
block: i,
|
|
316
|
+
onRemove: g,
|
|
317
|
+
onMoveUp: h,
|
|
318
|
+
onMoveDown: x,
|
|
319
|
+
onEdit: m,
|
|
320
|
+
isFirst: k,
|
|
321
|
+
isLast: v
|
|
273
322
|
},
|
|
274
|
-
|
|
275
|
-
) :
|
|
276
|
-
|
|
323
|
+
i.id
|
|
324
|
+
) : i.type === "markdown" ? /* @__PURE__ */ a(
|
|
325
|
+
Ce,
|
|
277
326
|
{
|
|
278
|
-
block:
|
|
279
|
-
onRemove:
|
|
280
|
-
onMoveUp:
|
|
281
|
-
onMoveDown:
|
|
282
|
-
isFirst:
|
|
283
|
-
isLast:
|
|
327
|
+
block: i,
|
|
328
|
+
onRemove: g,
|
|
329
|
+
onMoveUp: h,
|
|
330
|
+
onMoveDown: x,
|
|
331
|
+
isFirst: k,
|
|
332
|
+
isLast: v
|
|
284
333
|
},
|
|
285
|
-
|
|
334
|
+
i.id
|
|
286
335
|
) : null;
|
|
287
336
|
}),
|
|
288
|
-
/* @__PURE__ */ a("div", { ref: o })
|
|
337
|
+
/* @__PURE__ */ a("div", { ref: o }),
|
|
338
|
+
/* @__PURE__ */ a(
|
|
339
|
+
X,
|
|
340
|
+
{
|
|
341
|
+
isOpen: !!n,
|
|
342
|
+
onClose: () => u(null),
|
|
343
|
+
onSave: b,
|
|
344
|
+
portlet: n ? {
|
|
345
|
+
id: n.id,
|
|
346
|
+
title: n.title,
|
|
347
|
+
query: n.query,
|
|
348
|
+
chartType: n.chartType,
|
|
349
|
+
chartConfig: n.chartConfig,
|
|
350
|
+
displayConfig: n.displayConfig,
|
|
351
|
+
w: 5,
|
|
352
|
+
h: 4,
|
|
353
|
+
x: 0,
|
|
354
|
+
y: 0
|
|
355
|
+
} : null,
|
|
356
|
+
title: "Edit Visualization",
|
|
357
|
+
submitText: "Update"
|
|
358
|
+
}
|
|
359
|
+
)
|
|
289
360
|
] });
|
|
290
361
|
});
|
|
291
|
-
function
|
|
362
|
+
function ke(e) {
|
|
292
363
|
const {
|
|
293
|
-
agentEndpoint:
|
|
364
|
+
agentEndpoint: t,
|
|
294
365
|
agentApiKey: s,
|
|
295
366
|
onAddPortlet: c,
|
|
296
|
-
onAddMarkdown:
|
|
297
|
-
onTextDelta:
|
|
367
|
+
onAddMarkdown: r,
|
|
368
|
+
onTextDelta: o,
|
|
298
369
|
onToolStart: n,
|
|
299
|
-
onToolResult:
|
|
300
|
-
onTurnComplete:
|
|
301
|
-
onDone:
|
|
370
|
+
onToolResult: u,
|
|
371
|
+
onTurnComplete: d,
|
|
372
|
+
onDone: g,
|
|
302
373
|
onError: h
|
|
303
|
-
} =
|
|
304
|
-
function
|
|
305
|
-
switch (
|
|
374
|
+
} = e, { cubeApi: x } = re(), m = N(null), [b, i] = F(!1), w = p(async (v, C) => {
|
|
375
|
+
function S(f) {
|
|
376
|
+
switch (f.type) {
|
|
306
377
|
case "text_delta":
|
|
307
|
-
|
|
378
|
+
o(f.data);
|
|
308
379
|
break;
|
|
309
380
|
case "tool_use_start":
|
|
310
|
-
n(
|
|
381
|
+
n(f.data.id, f.data.name, f.data.input);
|
|
311
382
|
break;
|
|
312
383
|
case "tool_use_result":
|
|
313
|
-
|
|
384
|
+
u(f.data.id, f.data.name, f.data.result);
|
|
314
385
|
break;
|
|
315
386
|
case "add_portlet":
|
|
316
387
|
c({
|
|
317
|
-
...
|
|
388
|
+
...f.data,
|
|
318
389
|
type: "portlet"
|
|
319
390
|
});
|
|
320
391
|
break;
|
|
321
392
|
case "add_markdown":
|
|
322
|
-
|
|
323
|
-
...
|
|
393
|
+
r({
|
|
394
|
+
...f.data,
|
|
324
395
|
type: "markdown"
|
|
325
396
|
});
|
|
326
397
|
break;
|
|
327
398
|
case "turn_complete":
|
|
328
|
-
|
|
399
|
+
d?.();
|
|
329
400
|
break;
|
|
330
401
|
case "done":
|
|
331
|
-
|
|
402
|
+
g(f.data.sessionId);
|
|
332
403
|
break;
|
|
333
404
|
case "error":
|
|
334
|
-
h(
|
|
405
|
+
h(f.data.message);
|
|
335
406
|
break;
|
|
336
407
|
}
|
|
337
408
|
}
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
|
|
409
|
+
m.current && m.current.abort();
|
|
410
|
+
const A = new AbortController();
|
|
411
|
+
m.current = A, i(!0);
|
|
341
412
|
try {
|
|
342
|
-
const
|
|
413
|
+
const f = x.apiUrl || "/cubejs-api/v1", M = t || `${f}/agent/chat`, I = {
|
|
343
414
|
"Content-Type": "application/json",
|
|
344
|
-
...
|
|
415
|
+
...x.headers
|
|
345
416
|
};
|
|
346
|
-
s && (
|
|
347
|
-
const
|
|
417
|
+
s && (I["X-Agent-Api-Key"] = s);
|
|
418
|
+
const E = await fetch(M, {
|
|
348
419
|
method: "POST",
|
|
349
|
-
headers:
|
|
350
|
-
credentials:
|
|
420
|
+
headers: I,
|
|
421
|
+
credentials: x.credentials ?? "include",
|
|
351
422
|
body: JSON.stringify({
|
|
352
|
-
message:
|
|
353
|
-
...
|
|
423
|
+
message: v,
|
|
424
|
+
...C ? { sessionId: C } : {}
|
|
354
425
|
}),
|
|
355
|
-
signal:
|
|
426
|
+
signal: A.signal
|
|
356
427
|
});
|
|
357
|
-
if (!
|
|
358
|
-
const
|
|
359
|
-
throw new Error(
|
|
428
|
+
if (!E.ok) {
|
|
429
|
+
const l = await E.json().catch(() => ({}));
|
|
430
|
+
throw new Error(l.error || `Agent request failed: ${E.status}`);
|
|
360
431
|
}
|
|
361
|
-
if (!
|
|
432
|
+
if (!E.body)
|
|
362
433
|
throw new Error("No response body received");
|
|
363
|
-
const
|
|
364
|
-
let
|
|
434
|
+
const _ = E.body.getReader(), j = new TextDecoder();
|
|
435
|
+
let B = "";
|
|
365
436
|
for (; ; ) {
|
|
366
|
-
const { done:
|
|
367
|
-
if (
|
|
368
|
-
|
|
369
|
-
const
|
|
437
|
+
const { done: l, value: R } = await _.read();
|
|
438
|
+
if (l) break;
|
|
439
|
+
B += j.decode(R, { stream: !0 });
|
|
440
|
+
const T = B.split(`
|
|
370
441
|
|
|
371
442
|
`);
|
|
372
|
-
|
|
373
|
-
for (const
|
|
374
|
-
const z =
|
|
443
|
+
B = T.pop() || "";
|
|
444
|
+
for (const $ of T) {
|
|
445
|
+
const z = $.trim().split(`
|
|
375
446
|
`);
|
|
376
|
-
for (const
|
|
377
|
-
if (
|
|
447
|
+
for (const U of z)
|
|
448
|
+
if (U.startsWith("data: "))
|
|
378
449
|
try {
|
|
379
|
-
const
|
|
380
|
-
|
|
450
|
+
const W = JSON.parse(U.slice(6));
|
|
451
|
+
S(W);
|
|
381
452
|
} catch {
|
|
382
453
|
}
|
|
383
454
|
}
|
|
384
455
|
}
|
|
385
|
-
if (
|
|
386
|
-
const
|
|
456
|
+
if (B.trim()) {
|
|
457
|
+
const l = B.trim().split(`
|
|
387
458
|
`);
|
|
388
|
-
for (const R of
|
|
459
|
+
for (const R of l)
|
|
389
460
|
if (R.startsWith("data: "))
|
|
390
461
|
try {
|
|
391
|
-
const
|
|
392
|
-
|
|
462
|
+
const T = JSON.parse(R.slice(6));
|
|
463
|
+
S(T);
|
|
393
464
|
} catch {
|
|
394
465
|
}
|
|
395
466
|
}
|
|
396
|
-
} catch (
|
|
397
|
-
|
|
467
|
+
} catch (f) {
|
|
468
|
+
f.name !== "AbortError" && h(f instanceof Error ? f.message : "Stream failed");
|
|
398
469
|
} finally {
|
|
399
|
-
|
|
470
|
+
i(!1), m.current = null;
|
|
400
471
|
}
|
|
401
|
-
}, [
|
|
402
|
-
|
|
472
|
+
}, [x, t, s, c, r, o, n, u, d, g, h]), k = p(() => {
|
|
473
|
+
m.current && (m.current.abort(), m.current = null, i(!1));
|
|
403
474
|
}, []);
|
|
404
475
|
return {
|
|
405
|
-
sendMessage:
|
|
476
|
+
sendMessage: w,
|
|
406
477
|
isStreaming: b,
|
|
407
|
-
abort:
|
|
478
|
+
abort: k
|
|
408
479
|
};
|
|
409
480
|
}
|
|
410
|
-
function
|
|
411
|
-
const
|
|
412
|
-
let s =
|
|
481
|
+
function Ne(e) {
|
|
482
|
+
const t = [];
|
|
483
|
+
let s = e, c = 0;
|
|
413
484
|
for (; s; ) {
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
const [, n,
|
|
417
|
-
n &&
|
|
418
|
-
/* @__PURE__ */ a("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children:
|
|
419
|
-
), s =
|
|
485
|
+
const r = s.match(/^(.*?)`([^`]+)`(.*)$/);
|
|
486
|
+
if (r) {
|
|
487
|
+
const [, n, u, d] = r;
|
|
488
|
+
n && t.push(/* @__PURE__ */ a("span", { children: n }, c++)), t.push(
|
|
489
|
+
/* @__PURE__ */ a("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children: u }, c++)
|
|
490
|
+
), s = d;
|
|
420
491
|
continue;
|
|
421
492
|
}
|
|
422
|
-
const
|
|
423
|
-
if (
|
|
424
|
-
const [, n,
|
|
425
|
-
n &&
|
|
493
|
+
const o = s.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
|
|
494
|
+
if (o) {
|
|
495
|
+
const [, n, u, d] = o;
|
|
496
|
+
n && t.push(/* @__PURE__ */ a("span", { children: n }, c++)), t.push(/* @__PURE__ */ a("strong", { className: "dc:font-semibold", children: u }, c++)), s = d;
|
|
426
497
|
continue;
|
|
427
498
|
}
|
|
428
|
-
|
|
499
|
+
t.push(/* @__PURE__ */ a("span", { children: s }, c));
|
|
429
500
|
break;
|
|
430
501
|
}
|
|
431
|
-
return
|
|
502
|
+
return t;
|
|
432
503
|
}
|
|
433
|
-
const
|
|
504
|
+
const we = {
|
|
434
505
|
discover_cubes: "Discovering cubes",
|
|
435
506
|
get_cube_metadata: "Reading metadata",
|
|
436
507
|
execute_query: "Executing query",
|
|
437
508
|
add_portlet: "Adding visualization",
|
|
438
509
|
add_markdown: "Adding explanation"
|
|
439
510
|
};
|
|
440
|
-
function
|
|
441
|
-
const [
|
|
442
|
-
return /* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
511
|
+
function Se({ toolCall: e }) {
|
|
512
|
+
const [t, s] = F(!1), c = we[e.name] || e.name, r = e.status === "running";
|
|
513
|
+
return /* @__PURE__ */ y("div", { className: "dc:my-1 dc:text-xs", children: [
|
|
514
|
+
/* @__PURE__ */ y(
|
|
444
515
|
"button",
|
|
445
516
|
{
|
|
446
|
-
onClick: () => s(!
|
|
517
|
+
onClick: () => s(!t),
|
|
447
518
|
className: "dc:flex dc:items-center dc:gap-1.5 text-dc-text-secondary dc:hover:opacity-80 dc:transition-opacity",
|
|
448
519
|
children: [
|
|
449
|
-
|
|
450
|
-
/* @__PURE__ */
|
|
520
|
+
r ? /* @__PURE__ */ a("span", { className: "dc:inline-block dc:w-3 dc:h-3 dc:border-2 border-dc-accent dc:border-t-transparent dc:rounded-full dc:animate-spin" }) : /* @__PURE__ */ a("span", { className: "dc:text-xs", children: e.status === "error" ? "✗" : "✓" }),
|
|
521
|
+
/* @__PURE__ */ y("span", { children: [
|
|
451
522
|
c,
|
|
452
|
-
|
|
523
|
+
r ? "..." : ""
|
|
453
524
|
] }),
|
|
454
|
-
!
|
|
525
|
+
!r && /* @__PURE__ */ a("span", { className: "dc:text-[10px] dc:opacity-60", children: t ? "▲" : "▼" })
|
|
455
526
|
]
|
|
456
527
|
}
|
|
457
528
|
),
|
|
458
|
-
|
|
529
|
+
t && e.result != null && /* @__PURE__ */ a("pre", { className: "dc:mt-1 dc:p-2 dc:rounded dc:text-[11px] dc:overflow-x-auto dc:max-h-32 dc:overflow-y-auto bg-dc-surface-secondary text-dc-text-secondary", children: typeof e.result == "string" ? e.result : JSON.stringify(e.result, null, 2) })
|
|
459
530
|
] });
|
|
460
531
|
}
|
|
461
|
-
const
|
|
462
|
-
const s =
|
|
463
|
-
return !s && !c && !
|
|
532
|
+
const De = L.memo(function({ message: t }) {
|
|
533
|
+
const s = t.role === "user", c = !!t.content?.trim(), r = t.toolCalls && t.toolCalls.length > 0;
|
|
534
|
+
return !s && !c && !r ? null : /* @__PURE__ */ a("div", { className: `dc:flex dc:mb-3 ${s ? "dc:justify-end" : "dc:justify-start"}`, children: /* @__PURE__ */ y(
|
|
464
535
|
"div",
|
|
465
536
|
{
|
|
466
537
|
className: `dc:max-w-[85%] dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm ${s ? "bg-dc-accent text-dc-accent-text dc:rounded-br-sm" : "bg-dc-surface-secondary text-dc-text dc:rounded-bl-sm"}`,
|
|
467
538
|
children: [
|
|
468
|
-
c && /* @__PURE__ */ a("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: s ?
|
|
469
|
-
|
|
539
|
+
c && /* @__PURE__ */ a("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: s ? t.content : Ne(t.content) }),
|
|
540
|
+
r && /* @__PURE__ */ a("div", { className: c ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "", children: t.toolCalls.map((o, n) => /* @__PURE__ */ a(Se, { toolCall: o }, o.id || n)) })
|
|
470
541
|
]
|
|
471
542
|
}
|
|
472
543
|
) });
|
|
473
|
-
}),
|
|
474
|
-
value:
|
|
544
|
+
}), Me = L.memo(function({
|
|
545
|
+
value: t,
|
|
475
546
|
onChange: s,
|
|
476
547
|
onSend: c,
|
|
477
|
-
onStop:
|
|
478
|
-
onContinue:
|
|
548
|
+
onStop: r,
|
|
549
|
+
onContinue: o,
|
|
479
550
|
isStreaming: n = !1,
|
|
480
|
-
showContinue:
|
|
481
|
-
disabled:
|
|
482
|
-
placeholder:
|
|
551
|
+
showContinue: u = !1,
|
|
552
|
+
disabled: d = !1,
|
|
553
|
+
placeholder: g = "Ask about your data..."
|
|
483
554
|
}) {
|
|
484
|
-
const h =
|
|
555
|
+
const h = N(null);
|
|
485
556
|
Q(() => {
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
}, [
|
|
489
|
-
const
|
|
490
|
-
(
|
|
491
|
-
|
|
557
|
+
const m = h.current;
|
|
558
|
+
m && (m.style.height = "auto", m.style.height = `${Math.min(m.scrollHeight, 150)}px`);
|
|
559
|
+
}, [t]);
|
|
560
|
+
const x = p(
|
|
561
|
+
(m) => {
|
|
562
|
+
m.key === "Enter" && !m.shiftKey && (m.preventDefault(), !d && t.trim() && c());
|
|
492
563
|
},
|
|
493
|
-
[
|
|
564
|
+
[d, t, c]
|
|
494
565
|
);
|
|
495
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ y("div", { className: "dc:flex dc:gap-2 dc:items-end dc:p-3 border-dc-border dc:border-t", children: [
|
|
496
567
|
/* @__PURE__ */ a(
|
|
497
568
|
"textarea",
|
|
498
569
|
{
|
|
499
570
|
ref: h,
|
|
500
|
-
value:
|
|
501
|
-
onChange: (
|
|
502
|
-
onKeyDown:
|
|
503
|
-
placeholder:
|
|
504
|
-
disabled:
|
|
571
|
+
value: t,
|
|
572
|
+
onChange: (m) => s(m.target.value),
|
|
573
|
+
onKeyDown: x,
|
|
574
|
+
placeholder: g,
|
|
575
|
+
disabled: d,
|
|
505
576
|
rows: 1,
|
|
506
577
|
className: "dc:flex-1 dc:resize-none dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm bg-dc-surface-secondary text-dc-text border-dc-border dc:border dc:outline-none dc:focus:ring-1 focus:ring-dc-accent dc:disabled:opacity-50"
|
|
507
578
|
}
|
|
@@ -509,16 +580,16 @@ const xe = B.memo(function({ message: e }) {
|
|
|
509
580
|
n ? /* @__PURE__ */ a(
|
|
510
581
|
"button",
|
|
511
582
|
{
|
|
512
|
-
onClick:
|
|
583
|
+
onClick: r,
|
|
513
584
|
className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors text-dc-error border-dc-border dc:border dc:hover:opacity-80 dc:shrink-0",
|
|
514
585
|
children: "Stop"
|
|
515
586
|
}
|
|
516
|
-
) : /* @__PURE__ */
|
|
517
|
-
|
|
587
|
+
) : /* @__PURE__ */ y(Y, { children: [
|
|
588
|
+
u && !t.trim() && /* @__PURE__ */ a(
|
|
518
589
|
"button",
|
|
519
590
|
{
|
|
520
591
|
onClick: () => {
|
|
521
|
-
|
|
592
|
+
o?.(), h.current?.focus();
|
|
522
593
|
},
|
|
523
594
|
className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors border-dc-border dc:border text-dc-text-secondary dc:hover:opacity-80 dc:shrink-0",
|
|
524
595
|
children: "Continue"
|
|
@@ -528,201 +599,201 @@ const xe = B.memo(function({ message: e }) {
|
|
|
528
599
|
"button",
|
|
529
600
|
{
|
|
530
601
|
onClick: c,
|
|
531
|
-
disabled:
|
|
602
|
+
disabled: d || !t.trim(),
|
|
532
603
|
className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors bg-dc-accent text-dc-accent-text dc:hover:opacity-90 dc:disabled:opacity-40 dc:disabled:cursor-not-allowed dc:shrink-0",
|
|
533
604
|
children: "Send"
|
|
534
605
|
}
|
|
535
606
|
)
|
|
536
607
|
] })
|
|
537
608
|
] });
|
|
538
|
-
}),
|
|
539
|
-
agentEndpoint:
|
|
609
|
+
}), Ae = L.memo(function({
|
|
610
|
+
agentEndpoint: t,
|
|
540
611
|
agentApiKey: s,
|
|
541
612
|
onClear: c
|
|
542
613
|
}) {
|
|
543
|
-
const
|
|
544
|
-
addMessage:
|
|
614
|
+
const r = N(null), o = N(!1), { messages: n, isStreaming: u, inputValue: d } = D(K(ue)), {
|
|
615
|
+
addMessage: g,
|
|
545
616
|
appendToLastAssistantMessage: h,
|
|
546
|
-
addToolCallToLastAssistant:
|
|
547
|
-
updateLastToolCall:
|
|
617
|
+
addToolCallToLastAssistant: x,
|
|
618
|
+
updateLastToolCall: m,
|
|
548
619
|
setIsStreaming: b,
|
|
549
|
-
setInputValue:
|
|
550
|
-
setSessionId:
|
|
551
|
-
} =
|
|
552
|
-
|
|
620
|
+
setInputValue: i,
|
|
621
|
+
setSessionId: w
|
|
622
|
+
} = D(K(me)), k = D((l) => l.sessionId), v = D((l) => l.addBlock), C = D((l) => l.reset), S = p(() => {
|
|
623
|
+
o.current && (o.current = !1, g({
|
|
553
624
|
id: `msg-${Date.now()}`,
|
|
554
625
|
role: "assistant",
|
|
555
626
|
content: "",
|
|
556
627
|
toolCalls: [],
|
|
557
628
|
timestamp: Date.now()
|
|
558
629
|
}));
|
|
559
|
-
}, [
|
|
630
|
+
}, [g]), A = N(n.length);
|
|
560
631
|
Q(() => {
|
|
561
|
-
n.length >
|
|
632
|
+
n.length > A.current && r.current?.scrollIntoView({ behavior: "smooth" }), A.current = n.length;
|
|
562
633
|
}, [n]);
|
|
563
|
-
const { sendMessage:
|
|
564
|
-
agentEndpoint:
|
|
634
|
+
const { sendMessage: f, abort: M } = ke({
|
|
635
|
+
agentEndpoint: t,
|
|
565
636
|
agentApiKey: s,
|
|
566
|
-
onTextDelta:
|
|
567
|
-
|
|
568
|
-
}, [
|
|
569
|
-
onToolStart:
|
|
570
|
-
|
|
571
|
-
}, [
|
|
572
|
-
onToolResult:
|
|
573
|
-
|
|
574
|
-
}, [
|
|
575
|
-
onAddPortlet:
|
|
576
|
-
|
|
577
|
-
}, [
|
|
578
|
-
onAddMarkdown:
|
|
579
|
-
|
|
580
|
-
}, [
|
|
581
|
-
onTurnComplete:
|
|
582
|
-
|
|
637
|
+
onTextDelta: p((l) => {
|
|
638
|
+
S(), h(l);
|
|
639
|
+
}, [S, h]),
|
|
640
|
+
onToolStart: p((l, R, T) => {
|
|
641
|
+
S(), x({ id: l, name: R, input: T, status: "running" });
|
|
642
|
+
}, [S, x]),
|
|
643
|
+
onToolResult: p((l, R, T) => {
|
|
644
|
+
m({ id: l, status: "complete", result: T });
|
|
645
|
+
}, [m]),
|
|
646
|
+
onAddPortlet: p((l) => {
|
|
647
|
+
v(l);
|
|
648
|
+
}, [v]),
|
|
649
|
+
onAddMarkdown: p((l) => {
|
|
650
|
+
v(l);
|
|
651
|
+
}, [v]),
|
|
652
|
+
onTurnComplete: p(() => {
|
|
653
|
+
o.current = !0;
|
|
583
654
|
}, []),
|
|
584
|
-
onDone:
|
|
585
|
-
|
|
586
|
-
}, [
|
|
587
|
-
onError:
|
|
588
|
-
|
|
655
|
+
onDone: p((l) => {
|
|
656
|
+
o.current = !1, w(l), b(!1);
|
|
657
|
+
}, [w, b]),
|
|
658
|
+
onError: p((l) => {
|
|
659
|
+
S(), h(`
|
|
589
660
|
|
|
590
|
-
Error: ${
|
|
591
|
-
}, [
|
|
592
|
-
}),
|
|
593
|
-
!
|
|
661
|
+
Error: ${l}`), b(!1);
|
|
662
|
+
}, [S, h, b])
|
|
663
|
+
}), I = p((l) => {
|
|
664
|
+
!l || u || (o.current = !1, g({
|
|
594
665
|
id: `msg-${Date.now()}`,
|
|
595
666
|
role: "user",
|
|
596
|
-
content:
|
|
667
|
+
content: l,
|
|
597
668
|
timestamp: Date.now()
|
|
598
|
-
}),
|
|
669
|
+
}), g({
|
|
599
670
|
id: `msg-${Date.now() + 1}`,
|
|
600
671
|
role: "assistant",
|
|
601
672
|
content: "",
|
|
602
673
|
toolCalls: [],
|
|
603
674
|
timestamp: Date.now()
|
|
604
|
-
}),
|
|
605
|
-
}, [
|
|
606
|
-
|
|
607
|
-
}, [
|
|
608
|
-
|
|
609
|
-
}, [
|
|
610
|
-
|
|
611
|
-
}, [
|
|
612
|
-
|
|
613
|
-
}, [
|
|
614
|
-
return /* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
675
|
+
}), i(""), b(!0), f(l, k));
|
|
676
|
+
}, [u, g, i, b, f, k]), E = p(() => {
|
|
677
|
+
I(d.trim());
|
|
678
|
+
}, [d, I]), _ = p(() => {
|
|
679
|
+
M(), b(!1);
|
|
680
|
+
}, [M, b]), j = p(() => {
|
|
681
|
+
i("");
|
|
682
|
+
}, [i]), B = p(() => {
|
|
683
|
+
M(), b(!1), C(), c?.();
|
|
684
|
+
}, [M, b, C, c]);
|
|
685
|
+
return /* @__PURE__ */ y("div", { className: "dc:flex dc:flex-col dc:h-full bg-dc-surface", children: [
|
|
686
|
+
/* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-4 dc:py-3 border-dc-border dc:border-b", children: [
|
|
616
687
|
/* @__PURE__ */ a("h3", { className: "dc:text-sm dc:font-semibold text-dc-text", children: "AI Assistant" }),
|
|
617
688
|
n.length > 0 && /* @__PURE__ */ a(
|
|
618
689
|
"button",
|
|
619
690
|
{
|
|
620
|
-
onClick:
|
|
621
|
-
disabled:
|
|
691
|
+
onClick: B,
|
|
692
|
+
disabled: u,
|
|
622
693
|
className: "dc:text-xs dc:px-2 dc:py-1 dc:rounded text-dc-text-secondary dc:hover:opacity-80 dc:disabled:opacity-40",
|
|
623
694
|
title: "Clear notebook and chat",
|
|
624
695
|
children: "Clear"
|
|
625
696
|
}
|
|
626
697
|
)
|
|
627
698
|
] }),
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
n.length === 0 ? /* @__PURE__ */ a(
|
|
630
|
-
/* @__PURE__ */ a("div", { ref:
|
|
699
|
+
/* @__PURE__ */ y("div", { className: "dc:flex-1 dc:overflow-y-auto dc:px-4 dc:py-3", children: [
|
|
700
|
+
n.length === 0 ? /* @__PURE__ */ a(Te, {}) : n.map((l) => /* @__PURE__ */ a(De, { message: l }, l.id)),
|
|
701
|
+
/* @__PURE__ */ a("div", { ref: r })
|
|
631
702
|
] }),
|
|
632
703
|
/* @__PURE__ */ a(
|
|
633
|
-
|
|
704
|
+
Me,
|
|
634
705
|
{
|
|
635
|
-
value:
|
|
636
|
-
onChange:
|
|
637
|
-
onSend:
|
|
638
|
-
onStop:
|
|
639
|
-
onContinue:
|
|
640
|
-
isStreaming:
|
|
641
|
-
showContinue: !
|
|
706
|
+
value: d,
|
|
707
|
+
onChange: i,
|
|
708
|
+
onSend: E,
|
|
709
|
+
onStop: _,
|
|
710
|
+
onContinue: j,
|
|
711
|
+
isStreaming: u,
|
|
712
|
+
showContinue: !u && n.length > 0
|
|
642
713
|
}
|
|
643
714
|
)
|
|
644
715
|
] });
|
|
645
716
|
});
|
|
646
|
-
function
|
|
647
|
-
return /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */
|
|
717
|
+
function Te() {
|
|
718
|
+
return /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ y("div", { className: "dc:text-center dc:max-w-xs", children: [
|
|
648
719
|
/* @__PURE__ */ a("div", { className: "dc:text-lg dc:font-semibold text-dc-text dc:mb-2", children: "Data Analysis Assistant" }),
|
|
649
720
|
/* @__PURE__ */ a("p", { className: "dc:text-sm text-dc-text-secondary dc:mb-4", children: "Ask me about your data and I'll create visualizations and insights." }),
|
|
650
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ y("div", { className: "dc:space-y-2 dc:text-xs text-dc-text-muted", children: [
|
|
651
722
|
/* @__PURE__ */ a("p", { children: '"Show me employee productivity trends"' }),
|
|
652
723
|
/* @__PURE__ */ a("p", { children: '"What are the top departments by headcount?"' }),
|
|
653
724
|
/* @__PURE__ */ a("p", { children: '"Compare revenue across product categories"' })
|
|
654
725
|
] })
|
|
655
726
|
] }) });
|
|
656
727
|
}
|
|
657
|
-
function
|
|
658
|
-
agentEndpoint:
|
|
659
|
-
agentApiKey:
|
|
728
|
+
function Ie({
|
|
729
|
+
agentEndpoint: e,
|
|
730
|
+
agentApiKey: t,
|
|
660
731
|
onSave: s,
|
|
661
732
|
onDirtyStateChange: c,
|
|
662
|
-
className:
|
|
733
|
+
className: r
|
|
663
734
|
}) {
|
|
664
|
-
const [
|
|
735
|
+
const [o, n] = F(60), u = N(null), d = N(!1), g = D((C) => C.blocks.length), h = D((C) => C.messages.length), x = D((C) => C.save), m = N({ blockCount: g, msgCount: h });
|
|
665
736
|
Q(() => {
|
|
666
|
-
const
|
|
667
|
-
c?.(
|
|
668
|
-
}, [
|
|
669
|
-
const b =
|
|
670
|
-
|
|
671
|
-
const
|
|
737
|
+
const C = g !== m.current.blockCount || h !== m.current.msgCount;
|
|
738
|
+
c?.(C);
|
|
739
|
+
}, [g, h, c]);
|
|
740
|
+
const b = N(), i = N(s);
|
|
741
|
+
i.current = s;
|
|
742
|
+
const w = N(g > 0 || h > 0);
|
|
672
743
|
Q(() => {
|
|
673
|
-
if ((
|
|
744
|
+
if ((g > 0 || h > 0) && (w.current = !0), !(!i.current || !w.current))
|
|
674
745
|
return b.current && clearTimeout(b.current), b.current = setTimeout(() => {
|
|
675
|
-
const
|
|
676
|
-
|
|
746
|
+
const C = x();
|
|
747
|
+
i.current?.(C);
|
|
677
748
|
}, 1e3), () => {
|
|
678
749
|
b.current && clearTimeout(b.current);
|
|
679
750
|
};
|
|
680
|
-
}, [
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
}, []),
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
const
|
|
688
|
-
n(Math.min(Math.max(
|
|
689
|
-
},
|
|
690
|
-
|
|
751
|
+
}, [g, h, x]);
|
|
752
|
+
const k = p(() => {
|
|
753
|
+
i.current && (b.current && clearTimeout(b.current), i.current({ blocks: [], messages: [] }));
|
|
754
|
+
}, []), v = p((C) => {
|
|
755
|
+
C.preventDefault(), d.current = !0;
|
|
756
|
+
const S = (f) => {
|
|
757
|
+
if (!d.current || !u.current) return;
|
|
758
|
+
const M = u.current.getBoundingClientRect(), I = (f.clientX - M.left) / M.width * 100;
|
|
759
|
+
n(Math.min(Math.max(I, 30), 80));
|
|
760
|
+
}, A = () => {
|
|
761
|
+
d.current = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", A);
|
|
691
762
|
};
|
|
692
|
-
document.addEventListener("mousemove",
|
|
763
|
+
document.addEventListener("mousemove", S), document.addEventListener("mouseup", A);
|
|
693
764
|
}, []);
|
|
694
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ y(
|
|
695
766
|
"div",
|
|
696
767
|
{
|
|
697
|
-
ref:
|
|
698
|
-
className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${
|
|
768
|
+
ref: u,
|
|
769
|
+
className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${r || ""}`,
|
|
699
770
|
children: [
|
|
700
771
|
/* @__PURE__ */ a(
|
|
701
772
|
"div",
|
|
702
773
|
{
|
|
703
774
|
className: "dc:h-full dc:overflow-hidden",
|
|
704
|
-
style: { width: `${
|
|
705
|
-
children: /* @__PURE__ */ a(
|
|
775
|
+
style: { width: `${o}%` },
|
|
776
|
+
children: /* @__PURE__ */ a(ve, {})
|
|
706
777
|
}
|
|
707
778
|
),
|
|
708
779
|
/* @__PURE__ */ a(
|
|
709
780
|
"div",
|
|
710
781
|
{
|
|
711
782
|
className: "dc:w-1 dc:h-full dc:cursor-col-resize dc:flex-shrink-0 dc:transition-colors bg-dc-border dc:hover:bg-dc-accent",
|
|
712
|
-
onMouseDown:
|
|
783
|
+
onMouseDown: v
|
|
713
784
|
}
|
|
714
785
|
),
|
|
715
786
|
/* @__PURE__ */ a(
|
|
716
787
|
"div",
|
|
717
788
|
{
|
|
718
789
|
className: "dc:h-full dc:overflow-hidden",
|
|
719
|
-
style: { width: `${100 -
|
|
790
|
+
style: { width: `${100 - o}%` },
|
|
720
791
|
children: /* @__PURE__ */ a(
|
|
721
|
-
|
|
792
|
+
Ae,
|
|
722
793
|
{
|
|
723
|
-
agentEndpoint:
|
|
724
|
-
agentApiKey:
|
|
725
|
-
onClear:
|
|
794
|
+
agentEndpoint: e,
|
|
795
|
+
agentApiKey: t,
|
|
796
|
+
onClear: k
|
|
726
797
|
}
|
|
727
798
|
)
|
|
728
799
|
}
|
|
@@ -731,26 +802,26 @@ function Ne({
|
|
|
731
802
|
}
|
|
732
803
|
);
|
|
733
804
|
}
|
|
734
|
-
const
|
|
735
|
-
config:
|
|
805
|
+
const Oe = L.memo(function({
|
|
806
|
+
config: t,
|
|
736
807
|
...s
|
|
737
808
|
}) {
|
|
738
|
-
return /* @__PURE__ */ a(
|
|
809
|
+
return /* @__PURE__ */ a(ie, { initialConfig: t, children: /* @__PURE__ */ a(Ie, { ...s }) });
|
|
739
810
|
});
|
|
740
|
-
function
|
|
811
|
+
function qe() {
|
|
741
812
|
return /* @__PURE__ */ a("div", { children: "Analytics Page - Coming in Phase 4" });
|
|
742
813
|
}
|
|
743
|
-
const
|
|
744
|
-
function
|
|
745
|
-
className:
|
|
814
|
+
const Ee = P("segment");
|
|
815
|
+
function $e({
|
|
816
|
+
className: e = ""
|
|
746
817
|
}) {
|
|
747
818
|
return /* @__PURE__ */ a(
|
|
748
819
|
"div",
|
|
749
820
|
{
|
|
750
|
-
className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${
|
|
751
|
-
children: /* @__PURE__ */
|
|
821
|
+
className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${e}`,
|
|
822
|
+
children: /* @__PURE__ */ y("div", { className: "dc:text-center", children: [
|
|
752
823
|
/* @__PURE__ */ a(
|
|
753
|
-
|
|
824
|
+
Ee,
|
|
754
825
|
{
|
|
755
826
|
className: "dc:w-8 dc:h-8 dc:mx-auto dc:mb-2 text-dc-text-muted dc:opacity-50"
|
|
756
827
|
}
|
|
@@ -761,178 +832,178 @@ function Pe({
|
|
|
761
832
|
);
|
|
762
833
|
}
|
|
763
834
|
export {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
835
|
+
Oe as AgenticNotebook,
|
|
836
|
+
Je as AnalysisBuilder,
|
|
837
|
+
He as AnalyticsDashboard,
|
|
838
|
+
qe as AnalyticsPage,
|
|
839
|
+
H as AnalyticsPortlet,
|
|
840
|
+
Ge as ChartErrorBoundary,
|
|
841
|
+
Xe as ConfirmModal,
|
|
842
|
+
es as CubeClient,
|
|
843
|
+
ts as CubeProvider,
|
|
844
|
+
Ot as DEFAULT_ICONS,
|
|
845
|
+
Ye as DashboardEditModal,
|
|
846
|
+
Ze as DashboardGrid,
|
|
847
|
+
et as DashboardStoreProvider,
|
|
848
|
+
$e as DashboardThumbnailPlaceholder,
|
|
849
|
+
tt as DrillBreadcrumb,
|
|
850
|
+
st as DrillMenu,
|
|
851
|
+
ws as ExecutionPlanPanel,
|
|
852
|
+
Ss as ExplainAIPanel,
|
|
853
|
+
gs as LazyChart,
|
|
854
|
+
ps as LoadingIndicator,
|
|
855
|
+
at as Modal,
|
|
856
|
+
ie as NotebookStoreProvider,
|
|
857
|
+
X as PortletAnalysisModal,
|
|
858
|
+
ct as PortletContainer,
|
|
859
|
+
ss as ScrollContainerProvider,
|
|
860
|
+
Ba as THEME_PRESETS,
|
|
861
|
+
Ra as applyTheme,
|
|
862
|
+
wa as buildFunnelConfigFromQueries,
|
|
863
|
+
Sa as buildServerFunnelQuery,
|
|
864
|
+
as as captureThumbnail,
|
|
865
|
+
Ds as compressAndEncode,
|
|
866
|
+
cs as createCubeClient,
|
|
867
|
+
ca as createDashboardLayout,
|
|
868
|
+
ot as createDashboardStore,
|
|
869
|
+
rt as createDefaultConfig,
|
|
870
|
+
nt as createDefaultFlowConfig,
|
|
871
|
+
dt as createDefaultFunnelConfig,
|
|
872
|
+
it as createDefaultQueryConfig,
|
|
873
|
+
lt as createDefaultRetentionConfig,
|
|
874
|
+
ut as createDefaultWorkspace,
|
|
875
|
+
Ua as createExplainQueryKey,
|
|
876
|
+
na as createFlowQueryKey,
|
|
877
|
+
da as createFunnelQueryKey,
|
|
878
|
+
de as createNotebookStore,
|
|
879
|
+
Ms as decodeAndDecompress,
|
|
880
|
+
As as detectAsymmetricDateRanges,
|
|
881
|
+
Ts as detectMeasureCollisions,
|
|
882
|
+
oa as formatChartData,
|
|
883
|
+
Da as formatDuration,
|
|
884
|
+
ia as generateQueryLabel,
|
|
885
|
+
Is as generateShareUrl,
|
|
886
|
+
Es as getAvailableBindingKeyDimensions,
|
|
887
|
+
bs as getAvailableChartTypes,
|
|
888
|
+
Ma as getBindingKeyField,
|
|
889
|
+
Bs as getBindingKeyLabel,
|
|
890
|
+
qt as getChartTypeIcon,
|
|
891
|
+
la as getCombinedFields,
|
|
892
|
+
Aa as getCubeNameFromQuery,
|
|
893
|
+
$t as getFieldTypeIcon,
|
|
894
|
+
P as getIcon,
|
|
895
|
+
zt as getIconData,
|
|
896
|
+
Wt as getIconRegistry,
|
|
897
|
+
Jt as getIconsByCategory,
|
|
898
|
+
Ht as getMeasureTypeIcon,
|
|
899
|
+
ua as getQueryIndices,
|
|
900
|
+
ma as getQueryLabels,
|
|
901
|
+
La as getTheme,
|
|
902
|
+
Qa as getThemeVariable,
|
|
903
|
+
ys as getUnavailableChartTypes,
|
|
904
|
+
Rs as getValidationSummary,
|
|
905
|
+
Ya as highlightCodeBlocks,
|
|
906
|
+
xs as isChartTypeAvailable,
|
|
907
|
+
Fa as isDarkMode,
|
|
908
|
+
mt as isFlowConfig,
|
|
909
|
+
pt as isFunnelConfig,
|
|
910
|
+
Ta as isFunnelData,
|
|
911
|
+
Ls as isMinimumFunnelConfigValid,
|
|
912
|
+
ht as isMultiQuery,
|
|
913
|
+
ft as isMultiQueryConfig,
|
|
914
|
+
pa as isMultiQueryData,
|
|
915
|
+
Qs as isMultiQueryValid,
|
|
916
|
+
gt as isQueryConfig,
|
|
917
|
+
bt as isRetentionConfig,
|
|
918
|
+
Ha as isSankeyData,
|
|
919
|
+
Ga as isServerFlowQuery,
|
|
920
|
+
yt as isServerFunnelQuery,
|
|
921
|
+
Fs as isShareableSize,
|
|
922
|
+
xt as isSingleQuery,
|
|
923
|
+
os as isThumbnailCaptureAvailable,
|
|
924
|
+
Ct as isValidAnalysisConfig,
|
|
925
|
+
vt as isValidAnalysisWorkspace,
|
|
926
|
+
Cs as isValidChartType,
|
|
927
|
+
ha as mergeQueryResults,
|
|
928
|
+
fa as mergeResultsByKey,
|
|
929
|
+
ga as mergeResultsConcat,
|
|
930
|
+
kt as migrateConfig,
|
|
931
|
+
Nt as migrateLegacyPortlet,
|
|
932
|
+
Ps as parseShareUrl,
|
|
933
|
+
vs as preloadChart,
|
|
934
|
+
ks as preloadCharts,
|
|
935
|
+
Gt as registerIcons,
|
|
936
|
+
Xt as resetIcons,
|
|
937
|
+
Pa as resetTheme,
|
|
938
|
+
wt as selectAllActions,
|
|
939
|
+
pe as selectBlockActions,
|
|
940
|
+
le as selectBlocks,
|
|
941
|
+
Vs as selectBreakdowns,
|
|
942
|
+
_s as selectChartConfig,
|
|
943
|
+
me as selectChatActions,
|
|
944
|
+
ue as selectChatState,
|
|
945
|
+
js as selectCurrentState,
|
|
946
|
+
St as selectDebugData,
|
|
947
|
+
Dt as selectDebugDataActions,
|
|
948
|
+
Mt as selectEditModeActions,
|
|
949
|
+
At as selectEditModeState,
|
|
950
|
+
Ks as selectFilters,
|
|
951
|
+
Us as selectFunnelState,
|
|
952
|
+
Ue as selectInputValue,
|
|
953
|
+
je as selectIsStreaming,
|
|
954
|
+
Tt as selectLayoutActions,
|
|
955
|
+
It as selectLayoutState,
|
|
956
|
+
_e as selectMessages,
|
|
957
|
+
Os as selectMetrics,
|
|
958
|
+
Et as selectModalActions,
|
|
959
|
+
Bt as selectModalState,
|
|
960
|
+
qs as selectMultiQueryState,
|
|
961
|
+
Rt as selectPortletDebugData,
|
|
962
|
+
Ke as selectSessionId,
|
|
963
|
+
Lt as selectThumbnailDirty,
|
|
964
|
+
$s as selectUIState,
|
|
965
|
+
Yt as setIcon,
|
|
966
|
+
Va as setTheme,
|
|
967
|
+
_a as setThemeVariable,
|
|
968
|
+
Ia as transformServerFunnelResult,
|
|
969
|
+
ke as useAgentChat,
|
|
970
|
+
zs as useAnalysisBuilder,
|
|
971
|
+
Ws as useAnalysisBuilderStore,
|
|
972
|
+
re as useCubeApi,
|
|
973
|
+
rs as useCubeContext,
|
|
974
|
+
ns as useCubeFeatures,
|
|
975
|
+
hs as useCubeFieldLabel,
|
|
976
|
+
ba as useCubeLoadQuery,
|
|
977
|
+
ds as useCubeMeta,
|
|
978
|
+
is as useCubeMetaQuery,
|
|
979
|
+
ya as useCubeQuery,
|
|
980
|
+
Qt as useDashboard,
|
|
981
|
+
Ft as useDashboardStore,
|
|
982
|
+
Pt as useDashboardStoreApi,
|
|
983
|
+
Vt as useDashboardStoreOptional,
|
|
984
|
+
_t as useDrillInteraction,
|
|
985
|
+
Oa as useDryRunQueries,
|
|
986
|
+
qa as useDryRunQuery,
|
|
987
|
+
jt as useElementVisibility,
|
|
988
|
+
$a as useExplainAI,
|
|
989
|
+
za as useExplainQuery,
|
|
990
|
+
xa as useFlowQuery,
|
|
991
|
+
Ca as useFunnelQuery,
|
|
992
|
+
va as useMultiCubeLoadQuery,
|
|
993
|
+
Wa as useMultiDryRunQueries,
|
|
994
|
+
D as useNotebookStore,
|
|
995
|
+
ls as useScrollContainer,
|
|
996
|
+
Kt as useScrollDetection,
|
|
997
|
+
sa as useTheme,
|
|
998
|
+
Js as validateBindingKeyExists,
|
|
999
|
+
Hs as validateBindingKeyForSteps,
|
|
1000
|
+
Gs as validateFunnelConfig,
|
|
1001
|
+
ka as validateMergeKey,
|
|
1002
|
+
Xs as validateMergeKeys,
|
|
1003
|
+
Ys as validateMultiQueryConfig,
|
|
1004
|
+
Zs as validateStepQueries,
|
|
1005
|
+
ea as validateTimeDimensionAlignment,
|
|
1006
|
+
us as warnIfScreenshotLibMissing,
|
|
1007
|
+
ja as watchThemeChanges
|
|
937
1008
|
};
|
|
938
1009
|
//# sourceMappingURL=index.js.map
|