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