drizzle-cube 0.4.19 → 0.4.21

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