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.
@@ -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 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 = () => ({
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 ne(e, t) {
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((r) => r.id !== s)
36
+ blocks: c.blocks.filter((a) => a.id !== s)
37
37
  })),
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 };
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((r) => ({
47
- blocks: r.blocks.map(
48
- (o) => o.id === s && o.type === "portlet" ? { ...o, ...c } : o
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 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
+ 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 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 };
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 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 });
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: r };
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(O())
98
+ reset: () => e($())
95
99
  };
96
100
  }
97
101
  function de() {
98
- const e = O();
102
+ const e = $();
99
103
  return se()(
100
- ae(
101
- ce((t, s) => ({
104
+ re(
105
+ ae((t, s) => ({
102
106
  ...e,
103
- ...ne(t, s)
107
+ ...oe(t, s)
104
108
  })),
105
109
  { name: "NotebookStore" }
106
110
  )
107
111
  );
108
112
  }
109
- const q = Z(null);
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__ */ a(q.Provider, { value: s.current, children: e });
123
+ return /* @__PURE__ */ r(z.Provider, { value: s.current, children: e });
120
124
  }
121
- function D(e) {
122
- const t = ee(q);
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, _e = (e) => e.messages, je = (e) => e.isStreaming, Ke = (e) => e.sessionId, Ue = (e) => e.inputValue, ue = (e) => ({
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
- }), V = { width: "16px", height: "16px", color: "currentColor" }, he = P("chevronUp"), fe = P("chevronDown"), ge = P("edit"), be = P("delete"), ye = L.memo(function({
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: r,
149
- onEdit: o,
150
- isFirst: n,
151
- isLast: u
153
+ onMoveDown: a,
154
+ onEdit: n,
155
+ isFirst: o,
156
+ isLast: l
152
157
  }) {
153
- const [d, g] = F(null), h = p((x) => {
154
- g(x);
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__ */ a("h3", { className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate", children: t.title || "Untitled" }),
160
- d && /* @__PURE__ */ a(
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: d.chartConfig,
164
- displayConfig: d.displayConfig,
165
- queryObject: d.queryObject,
166
- data: d.data,
167
- chartType: d.chartType,
168
- cacheInfo: d.cacheInfo ?? void 0
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
- !n && /* @__PURE__ */ a(
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__ */ a(he, { style: V })
184
+ children: /* @__PURE__ */ r(he, { style: j })
180
185
  }
181
186
  ),
182
- !u && /* @__PURE__ */ a(
187
+ !l && /* @__PURE__ */ r(
183
188
  "button",
184
189
  {
185
- onClick: () => r(t.id),
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__ */ a(fe, { style: V })
193
+ children: /* @__PURE__ */ r(fe, { style: j })
189
194
  }
190
195
  ),
191
- /* @__PURE__ */ a(
196
+ /* @__PURE__ */ r(
192
197
  "button",
193
198
  {
194
- onClick: () => o(t),
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__ */ a(ge, { style: V })
202
+ children: /* @__PURE__ */ r(ge, { style: j })
198
203
  }
199
204
  ),
200
- /* @__PURE__ */ a(
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__ */ a(be, { style: V })
211
+ children: /* @__PURE__ */ r(be, { style: j })
207
212
  }
208
213
  )
209
214
  ] })
210
215
  ] }),
211
- /* @__PURE__ */ a("div", { className: "dc:flex-1 dc:min-h-0", children: /* @__PURE__ */ a(
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: h
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
- }, Ce = L.memo(function({
250
+ }, ve = R.memo(function({
246
251
  block: t,
247
252
  onRemove: s,
248
253
  onMoveUp: c,
249
- onMoveDown: r,
250
- isFirst: o,
251
- isLast: n
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
- !o && /* @__PURE__ */ a(
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
- !n && /* @__PURE__ */ a(
269
+ !o && /* @__PURE__ */ r(
265
270
  "button",
266
271
  {
267
- onClick: () => r(t.id),
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__ */ a(
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__ */ 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 }) })
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
- }), 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);
288
- Q(() => {
289
- t.length > d.current && o.current?.scrollIntoView({ behavior: "smooth" }), d.current = 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 = 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
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
- 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: [
307
- /* @__PURE__ */ a("h3", { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2", children: "Your notebook is empty" }),
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." })
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((i, w) => {
311
- const k = w === 0, v = w === t.length - 1;
312
- return i.type === "portlet" ? /* @__PURE__ */ a(
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: i,
320
+ block: d,
316
321
  onRemove: g,
317
- onMoveUp: h,
318
- onMoveDown: x,
322
+ onMoveUp: b,
323
+ onMoveDown: v,
319
324
  onEdit: m,
320
- isFirst: k,
321
- isLast: v
325
+ isFirst: x,
326
+ isLast: k
322
327
  },
323
- i.id
324
- ) : i.type === "markdown" ? /* @__PURE__ */ a(
325
- Ce,
328
+ d.id
329
+ ) : d.type === "markdown" ? /* @__PURE__ */ r(
330
+ ve,
326
331
  {
327
- block: i,
332
+ block: d,
328
333
  onRemove: g,
329
- onMoveUp: h,
330
- onMoveDown: x,
331
- isFirst: k,
332
- isLast: v
334
+ onMoveUp: b,
335
+ onMoveDown: v,
336
+ isFirst: x,
337
+ isLast: k
333
338
  },
334
- i.id
339
+ d.id
335
340
  ) : null;
336
341
  }),
337
- /* @__PURE__ */ a("div", { ref: o }),
338
- /* @__PURE__ */ a(
342
+ /* @__PURE__ */ r("div", { ref: n }),
343
+ /* @__PURE__ */ r(
339
344
  X,
340
345
  {
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,
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: r,
368
- onTextDelta: o,
369
- onToolStart: n,
370
- onToolResult: u,
371
- onTurnComplete: d,
391
+ onAddMarkdown: a,
392
+ onTextDelta: n,
393
+ onToolStart: o,
394
+ onToolResult: l,
395
+ onTurnComplete: i,
372
396
  onDone: g,
373
- onError: h
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) {
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
- o(f.data);
402
+ n(h.data);
379
403
  break;
380
404
  case "tool_use_start":
381
- n(f.data.id, f.data.name, f.data.input);
405
+ o(h.data.id, h.data.name, h.data.input);
382
406
  break;
383
407
  case "tool_use_result":
384
- u(f.data.id, f.data.name, f.data.result);
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
- ...f.data,
412
+ ...h.data,
389
413
  type: "portlet"
390
414
  });
391
415
  break;
392
416
  case "add_markdown":
393
- r({
394
- ...f.data,
417
+ a({
418
+ ...h.data,
395
419
  type: "markdown"
396
420
  });
397
421
  break;
398
422
  case "turn_complete":
399
- d?.();
423
+ i?.();
400
424
  break;
401
425
  case "done":
402
- g(f.data.sessionId);
426
+ g(h.data.sessionId);
403
427
  break;
404
428
  case "error":
405
- h(f.data.message);
429
+ b(h.data.message);
406
430
  break;
407
431
  }
408
432
  }
409
433
  m.current && m.current.abort();
410
- const A = new AbortController();
411
- m.current = A, i(!0);
434
+ const p = new AbortController();
435
+ m.current = p, d(!0);
412
436
  try {
413
- const f = x.apiUrl || "/cubejs-api/v1", M = t || `${f}/agent/chat`, I = {
437
+ const h = v.apiUrl || "/cubejs-api/v1", T = t || `${h}/agent/chat`, M = {
414
438
  "Content-Type": "application/json",
415
- ...x.headers
439
+ ...v.headers
416
440
  };
417
- s && (I["X-Agent-Api-Key"] = s);
418
- const E = await fetch(M, {
441
+ s && (M["X-Agent-Api-Key"] = s);
442
+ const w = await fetch(T, {
419
443
  method: "POST",
420
- headers: I,
421
- credentials: x.credentials ?? "include",
444
+ headers: M,
445
+ credentials: v.credentials ?? "include",
422
446
  body: JSON.stringify({
423
- message: v,
424
- ...C ? { sessionId: C } : {}
447
+ message: k,
448
+ ...D ? { sessionId: D } : {}
425
449
  }),
426
- signal: A.signal
450
+ signal: p.signal
427
451
  });
428
- if (!E.ok) {
429
- const l = await E.json().catch(() => ({}));
430
- throw new Error(l.error || `Agent request failed: ${E.status}`);
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 (!E.body)
456
+ if (!w.body)
433
457
  throw new Error("No response body received");
434
- const _ = E.body.getReader(), j = new TextDecoder();
435
- let B = "";
458
+ const Q = w.body.getReader(), q = new TextDecoder();
459
+ let E = "";
436
460
  for (; ; ) {
437
- const { done: l, value: R } = await _.read();
438
- if (l) break;
439
- B += j.decode(R, { stream: !0 });
440
- const T = B.split(`
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
- B = T.pop() || "";
444
- for (const $ of T) {
445
- const z = $.trim().split(`
467
+ E = L.pop() || "";
468
+ for (const F of L) {
469
+ const U = F.trim().split(`
446
470
  `);
447
- for (const U of z)
448
- if (U.startsWith("data: "))
471
+ for (const O of U)
472
+ if (O.startsWith("data: "))
449
473
  try {
450
- const W = JSON.parse(U.slice(6));
451
- S(W);
474
+ const W = JSON.parse(O.slice(6));
475
+ I(W);
452
476
  } catch {
453
477
  }
454
478
  }
455
479
  }
456
- if (B.trim()) {
457
- const l = B.trim().split(`
480
+ if (E.trim()) {
481
+ const B = E.trim().split(`
458
482
  `);
459
- for (const R of l)
460
- if (R.startsWith("data: "))
483
+ for (const u of B)
484
+ if (u.startsWith("data: "))
461
485
  try {
462
- const T = JSON.parse(R.slice(6));
463
- S(T);
486
+ const L = JSON.parse(u.slice(6));
487
+ I(L);
464
488
  } catch {
465
489
  }
466
490
  }
467
- } catch (f) {
468
- f.name !== "AbortError" && h(f instanceof Error ? f.message : "Stream failed");
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
- i(!1), m.current = null;
497
+ d(!1), m.current = null;
471
498
  }
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));
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: w,
477
- isStreaming: b,
478
- abort: k
503
+ sendMessage: C,
504
+ isStreaming: A,
505
+ abort: x
479
506
  };
480
507
  }
481
- function Ne(e) {
508
+ function we(e) {
482
509
  const t = [];
483
510
  let s = e, c = 0;
484
511
  for (; 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;
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 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;
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__ */ a("span", { children: s }, c));
526
+ t.push(/* @__PURE__ */ r("span", { children: s }, c));
500
527
  break;
501
528
  }
502
529
  return t;
503
530
  }
504
- const we = {
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 Se({ toolCall: e }) {
512
- const [t, s] = F(!1), c = we[e.name] || e.name, r = e.status === "running";
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
- 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" ? "✗" : "✓" }),
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
- r ? "..." : ""
550
+ a ? "..." : ""
524
551
  ] }),
525
- !r && /* @__PURE__ */ a("span", { className: "dc:text-[10px] dc:opacity-60", children: t ? "▲" : "▼" })
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__ */ 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) })
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 = 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(
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__ */ 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)) })
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
- }), Me = L.memo(function({
575
+ }), Te = R.memo(function({
545
576
  value: t,
546
577
  onChange: s,
547
578
  onSend: c,
548
- onStop: r,
549
- onContinue: o,
550
- isStreaming: n = !1,
551
- showContinue: u = !1,
552
- disabled: d = !1,
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 h = N(null);
556
- Q(() => {
557
- const m = h.current;
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 x = p(
591
+ const v = f(
561
592
  (m) => {
562
- m.key === "Enter" && !m.shiftKey && (m.preventDefault(), !d && t.trim() && c());
593
+ m.key === "Enter" && !m.shiftKey && (m.preventDefault(), !i && t.trim() && c());
563
594
  },
564
- [d, t, c]
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__ */ a(
598
+ /* @__PURE__ */ r(
568
599
  "textarea",
569
600
  {
570
- ref: h,
601
+ ref: b,
571
602
  value: t,
572
603
  onChange: (m) => s(m.target.value),
573
- onKeyDown: x,
604
+ onKeyDown: v,
574
605
  placeholder: g,
575
- disabled: d,
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
- n ? /* @__PURE__ */ a(
611
+ o ? /* @__PURE__ */ r(
581
612
  "button",
582
613
  {
583
- onClick: r,
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
- u && !t.trim() && /* @__PURE__ */ a(
619
+ l && !t.trim() && /* @__PURE__ */ r(
589
620
  "button",
590
621
  {
591
622
  onClick: () => {
592
- o?.(), h.current?.focus();
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__ */ a(
629
+ /* @__PURE__ */ r(
599
630
  "button",
600
631
  {
601
632
  onClick: c,
602
- disabled: d || !t.trim(),
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
- }), Ae = L.memo(function({
640
+ }), Me = R.memo(function({
610
641
  agentEndpoint: t,
611
642
  agentApiKey: s,
612
643
  onClear: c
613
644
  }) {
614
- const r = N(null), o = N(!1), { messages: n, isStreaming: u, inputValue: d } = D(K(ue)), {
645
+ const a = N(null), n = N(!1), { messages: o, isStreaming: l, inputValue: i } = S(K(ue)), {
615
646
  addMessage: g,
616
- appendToLastAssistantMessage: h,
617
- addToolCallToLastAssistant: x,
618
- updateLastToolCall: m,
619
- setIsStreaming: b,
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({
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]), A = N(n.length);
631
- Q(() => {
632
- n.length > A.current && r.current?.scrollIntoView({ behavior: "smooth" }), A.current = n.length;
633
- }, [n]);
634
- const { sendMessage: f, abort: M } = ke({
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: 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;
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: p((l) => {
656
- o.current = !1, w(l), b(!1);
657
- }, [w, b]),
658
- onError: p((l) => {
659
- S(), h(`
660
-
661
- Error: ${l}`), b(!1);
662
- }, [S, h, b])
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: l,
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
- }), 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]);
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__ */ a("h3", { className: "dc:text-sm dc:font-semibold text-dc-text", children: "AI Assistant" }),
688
- n.length > 0 && /* @__PURE__ */ a(
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: u,
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
- n.length === 0 ? /* @__PURE__ */ a(Te, {}) : n.map((l) => /* @__PURE__ */ a(De, { message: l }, l.id)),
701
- /* @__PURE__ */ a("div", { ref: r })
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__ */ a(
704
- Me,
733
+ /* @__PURE__ */ r(
734
+ Te,
705
735
  {
706
- value: d,
707
- onChange: i,
708
- onSend: E,
709
- onStop: _,
710
- onContinue: j,
711
- isStreaming: u,
712
- showContinue: !u && n.length > 0
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 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: [
719
- /* @__PURE__ */ a("div", { className: "dc:text-lg dc:font-semibold text-dc-text dc:mb-2", children: "Data Analysis Assistant" }),
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." }),
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__ */ a("p", { children: '"Show me employee productivity trends"' }),
723
- /* @__PURE__ */ a("p", { children: '"What are the top departments by headcount?"' }),
724
- /* @__PURE__ */ a("p", { children: '"Compare revenue across product categories"' })
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 Ie({
758
+ function Ee({
729
759
  agentEndpoint: e,
730
760
  agentApiKey: t,
731
761
  onSave: s,
732
762
  onDirtyStateChange: c,
733
- className: r
763
+ className: a
734
764
  }) {
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 });
736
- Q(() => {
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);
743
- Q(() => {
744
- if ((g > 0 || h > 0) && (w.current = !0), !(!i.current || !w.current))
745
- return b.current && clearTimeout(b.current), b.current = setTimeout(() => {
746
- const C = x();
747
- i.current?.(C);
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
- b.current && clearTimeout(b.current);
784
+ d.current && clearTimeout(d.current);
750
785
  };
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);
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", S), document.addEventListener("mouseup", A);
805
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", T);
764
806
  }, []);
765
807
  return /* @__PURE__ */ y(
766
808
  "div",
767
809
  {
768
- ref: u,
769
- className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${r || ""}`,
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__ */ a(
813
+ /* @__PURE__ */ r(
772
814
  "div",
773
815
  {
774
816
  className: "dc:h-full dc:overflow-hidden",
775
- style: { width: `${o}%` },
776
- children: /* @__PURE__ */ a(ve, {})
817
+ style: { width: `${n}%` },
818
+ children: /* @__PURE__ */ r(Ce, {})
777
819
  }
778
820
  ),
779
- /* @__PURE__ */ a(
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: v
825
+ onMouseDown: I
784
826
  }
785
827
  ),
786
- /* @__PURE__ */ a(
828
+ /* @__PURE__ */ r(
787
829
  "div",
788
830
  {
789
831
  className: "dc:h-full dc:overflow-hidden",
790
- style: { width: `${100 - o}%` },
791
- children: /* @__PURE__ */ a(
792
- Ae,
832
+ style: { width: `${100 - n}%` },
833
+ children: /* @__PURE__ */ r(
834
+ Me,
793
835
  {
794
836
  agentEndpoint: e,
795
837
  agentApiKey: t,
796
- onClear: k
838
+ onClear: D
797
839
  }
798
840
  )
799
841
  }
@@ -802,208 +844,208 @@ function Ie({
802
844
  }
803
845
  );
804
846
  }
805
- const Oe = L.memo(function({
847
+ const Oe = R.memo(function({
806
848
  config: t,
807
849
  ...s
808
850
  }) {
809
- return /* @__PURE__ */ a(ie, { initialConfig: t, children: /* @__PURE__ */ a(Ie, { ...s }) });
851
+ return /* @__PURE__ */ r(ie, { initialConfig: t, children: /* @__PURE__ */ r(Ee, { ...s }) });
810
852
  });
811
- function qe() {
812
- return /* @__PURE__ */ a("div", { children: "Analytics Page - Coming in Phase 4" });
853
+ function $e() {
854
+ return /* @__PURE__ */ r("div", { children: "Analytics Page - Coming in Phase 4" });
813
855
  }
814
- const Ee = P("segment");
815
- function $e({
856
+ const Be = V("segment");
857
+ function ze({
816
858
  className: e = ""
817
859
  }) {
818
- return /* @__PURE__ */ a(
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__ */ a(
824
- Ee,
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__ */ a("span", { className: "dc:text-xs text-dc-text-muted", children: "No preview" })
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
- Je as AnalysisBuilder,
837
- He as AnalyticsDashboard,
838
- qe as AnalyticsPage,
878
+ He as AnalysisBuilder,
879
+ Ge as AnalyticsDashboard,
880
+ $e as AnalyticsPage,
839
881
  H as AnalyticsPortlet,
840
- Ge as ChartErrorBoundary,
841
- Xe as ConfirmModal,
842
- es as CubeClient,
843
- ts as CubeProvider,
882
+ Xe as ChartErrorBoundary,
883
+ Ye as ConfirmModal,
884
+ ts as CubeClient,
885
+ ss as CubeProvider,
844
886
  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,
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
- ss as ScrollContainerProvider,
860
- Ba as THEME_PRESETS,
861
- Ra as applyTheme,
862
- wa as buildFunnelConfigFromQueries,
863
- Sa as buildServerFunnelQuery,
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
- 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,
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
- 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,
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
- 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,
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
- gt as isQueryConfig,
917
- bt as isRetentionConfig,
918
- Ha as isSankeyData,
919
- Ga as isServerFlowQuery,
920
- yt as isServerFunnelQuery,
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
- xt as isSingleQuery,
923
- os as isThumbnailCaptureAvailable,
964
+ vt as isSingleQuery,
965
+ ns as isThumbnailCaptureAvailable,
924
966
  Ct as isValidAnalysisConfig,
925
- vt as isValidAnalysisWorkspace,
967
+ kt as isValidAnalysisWorkspace,
926
968
  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,
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
- _s as selectChartConfig,
984
+ js as selectChartConfig,
943
985
  me as selectChatActions,
944
986
  ue as selectChatState,
945
- js as selectCurrentState,
946
- St as selectDebugData,
987
+ qs as selectCurrentState,
988
+ At as selectDebugData,
947
989
  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,
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
- Et as selectModalActions,
959
- Bt as selectModalState,
960
- qs as selectMultiQueryState,
1000
+ Bt as selectModalActions,
1001
+ Lt as selectModalState,
1002
+ $s as selectMultiQueryState,
961
1003
  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,
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
- Pt as useDashboardStoreApi,
1024
+ _t as useDashboardStoreApi,
983
1025
  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
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