teodor-new-chat-ui 4.3.412 → 4.3.414

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -11,48 +11,32 @@ import * as co from "react-dom";
11
11
  import ki from "react-dom";
12
12
  import { ChevronRight as ju, Check as Ts, Circle as Pg, Square as Mg, Send as Og, X as Yn, ExternalLink as Ha, Download as Dg, Image as Lg, FileText as Ul, Loader as Ei, Clock as ha, CheckCircle as $g, Search as _u, ChevronUp as Ri, ChevronDown as Cs, Paperclip as Ua, Bot as ma, Wrench as Fg, User as Bg, ChevronLeft as zg, Copy as Wl, Edit as Vl, RotateCcw as Kl, Loader2 as Kn, Edit3 as Ii, Plus as Hg, FileSpreadsheet as Ug, Calendar as Wg, MoreHorizontal as Vg, Share2 as Kg, Trash2 as qg, MessageSquare as Gg } from "lucide-react";
13
13
  function Yg(e, t) {
14
- var d;
15
- let n = [], r = null, o = {}, s = {}, a = null, i = null, l = null;
14
+ let n = [], r = null, o = null;
16
15
  if (!(e && "type" in e && e.type === "default_message") && e) {
17
- const p = e, m = p.checkpointId ?? null;
18
- o = p.additionalKwargs ?? {}, s = p.responseMetadata ?? {};
19
- const f = m ? t.checkpointMetaById.get(m) ?? null : null;
20
- a = typeof o.step == "number" ? o.step : typeof s.step == "number" ? s.step : (f == null ? void 0 : f.step) ?? null;
21
- const v = typeof o.source == "string" ? o.source : typeof s.source == "string" ? s.source : (f == null ? void 0 : f.source) ?? null;
22
- i = v ? String(v) : null;
23
- const g = a !== null && i ? `${a}:${i}` : null;
24
- if (g && t.checkpointIndexByKey.has(g) ? n = t.checkpointIndexByKey.get(g) ?? [] : m && f && (n = [f]), r = m ?? ((d = n[0]) == null ? void 0 : d.id) ?? null, l = m ? t.attemptMetaById.get(m) ?? null : null, !l && p.role === "user" && p.id && t.userMessageIdToAttempts.has(p.id)) {
25
- const x = t.userMessageIdToAttempts.get(p.id);
26
- if (x && x.length > 0) {
27
- const b = x[0].checkpointId;
28
- l = t.attemptMetaById.get(b) ?? null;
29
- }
30
- }
31
- if (!l && n.length > 0) {
32
- const x = t.attemptMetaById.get(n[0].id);
33
- x && (l = x);
16
+ const i = e.checkpointId ?? null;
17
+ if (i) {
18
+ const l = t.checkpointMetaByCheckpointId.get(i) ?? null;
19
+ l && (n = [l], r = i, o = l);
34
20
  }
35
- if (l && l.attemptCount > 1) {
36
- const x = l.baseUserMessageId;
37
- if (x) {
38
- const b = [];
39
- for (const [w, y] of t.attemptMetaById.entries())
40
- if (y.baseUserMessageId === x) {
41
- const C = t.checkpointMetaById.get(w);
42
- C && b.push(C);
21
+ if (o && (o.attemptCount ?? 1) > 1) {
22
+ const l = o.baseUserMessageId ?? null;
23
+ if (l) {
24
+ const c = [];
25
+ for (const [d, p] of t.checkpointMetaByCheckpointId.entries())
26
+ if (p.baseUserMessageId === l) {
27
+ const m = t.checkpointMetaByCheckpointId.get(d);
28
+ m && c.push(m);
43
29
  }
44
- b.length > 0 && (b.sort((w, y) => {
45
- const C = w.createdAt ? Date.parse(w.createdAt) : 0;
46
- return (y.createdAt ? Date.parse(y.createdAt) : 0) - C;
47
- }), n = b);
30
+ c.length > 0 && (c.sort((d, p) => {
31
+ const m = d.createdAt ? Date.parse(d.createdAt) : 0;
32
+ return (p.createdAt ? Date.parse(p.createdAt) : 0) - m;
33
+ }), n = c);
48
34
  }
49
35
  }
50
36
  }
51
37
  return {
52
38
  checkpointCandidates: n,
53
- defaultCheckpointId: r,
54
- resolvedStep: a,
55
- resolvedSource: i
39
+ defaultCheckpointId: r
56
40
  };
57
41
  }
58
42
  function Xg(e, t) {
@@ -137,70 +121,51 @@ function SI(e) {
137
121
  return t;
138
122
  }
139
123
  function Qg(e) {
140
- const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = [], o = /* @__PURE__ */ new Map();
141
- for (let p = 0; p < e.length; p++) {
142
- const m = e[p], f = m.checkpointId, v = f ?? `cp-${p}`, g = m.metadata ?? {}, x = typeof g.step == "number" ? g.step : null, b = typeof g.source == "string" ? g.source : null, w = {
143
- id: v,
144
- step: x,
145
- source: b,
146
- createdAt: m.createdAt ?? null,
147
- namespace: m.checkpointNs ?? null,
148
- parentId: m.parentId ?? null
149
- };
150
- if (f && (t.set(f, w), x !== null && b)) {
151
- const T = `${x}:${b}`, k = n.get(T);
152
- k ? k.push(w) : n.set(T, [w]);
153
- }
154
- let y = null, C = null;
155
- const S = Array.isArray(m.messages) ? m.messages : [];
156
- for (const T of S)
157
- T.role === "user" && (C || (C = T), T.id && (y = T.id));
158
- if (f && C) {
159
- const T = Pu(C);
160
- T && o.set(f, T);
161
- }
162
- r.push({
163
- id: v,
164
- messageId: y,
165
- step: x,
166
- source: b,
167
- createdAt: m.createdAt ?? null,
168
- next: m.next && m.next.length > 0 ? String(m.next[0]) : null,
169
- parentConfig: m.parentConfig ?? null
170
- });
171
- }
172
- const { attemptMetaById: s, userMessageIdToAttempts: a } = Jg(e), i = /* @__PURE__ */ new Map();
173
- for (const [p, m] of t.entries()) {
174
- const f = s.get(p);
175
- f ? i.set(p, {
176
- ...m,
177
- attemptIndex: f.attemptIndex,
178
- attemptCount: f.attemptCount,
179
- isLatestAttempt: f.isLatestAttempt,
180
- baseUserMessageId: f.baseUserMessageId ?? null
181
- }) : i.set(p, {
182
- ...m,
183
- attemptIndex: 0,
184
- attemptCount: 1,
185
- isLatestAttempt: !0,
186
- baseUserMessageId: null
124
+ const t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Map(), { attemptMetaById: o, userMessageIdToAttempts: s } = Jg(e);
125
+ for (let c = 0; c < e.length; c++) {
126
+ const d = e[c], p = d.checkpointId, m = p ?? `cp-${c}`, f = d.metadata ?? {}, v = typeof f.step == "number" ? f.step : null, g = typeof f.source == "string" ? f.source : null;
127
+ let x = null, b = null;
128
+ const w = Array.isArray(d.messages) ? d.messages : [];
129
+ for (const k of w)
130
+ k.role === "user" && (b || (b = k), k.id && (x = k.id));
131
+ const y = d.next && d.next.length > 0 ? String(d.next[0]) : null, C = d.parentConfig ?? null, S = {
132
+ id: m,
133
+ step: v,
134
+ source: g,
135
+ createdAt: d.createdAt ?? null,
136
+ namespace: d.checkpointNs ?? null,
137
+ parentId: d.parentId ?? null,
138
+ messageId: x,
139
+ next: y,
140
+ parentConfig: C
141
+ }, T = p ? o.get(p) : null;
142
+ if (S.attemptIndex = (T == null ? void 0 : T.attemptIndex) ?? 0, S.attemptCount = (T == null ? void 0 : T.attemptCount) ?? 1, S.isLatestAttempt = (T == null ? void 0 : T.isLatestAttempt) ?? !0, S.baseUserMessageId = (T == null ? void 0 : T.baseUserMessageId) ?? null, p && t.set(p, S), p && b) {
143
+ const k = Pu(b);
144
+ k && r.set(p, k);
145
+ }
146
+ n.push({
147
+ id: m,
148
+ messageId: x,
149
+ step: v,
150
+ source: g,
151
+ createdAt: d.createdAt ?? null,
152
+ next: y,
153
+ parentConfig: C
187
154
  });
188
155
  }
189
156
  return {
190
157
  checkpoints: e,
191
- checkpointMetaById: t,
192
- checkpointIndexByKey: n,
193
- attemptMetaById: i,
194
- userMessageIdToAttempts: a,
195
- timeline: r,
196
- messagePreviews: o,
158
+ checkpointMetaByCheckpointId: t,
159
+ userMessageIdToAttempts: s,
160
+ timeline: n,
161
+ messagePreviews: r,
197
162
  getLatest: () => {
198
- const p = r[0];
199
- if (p)
200
- return t.get(p.id);
163
+ const c = n[0];
164
+ if (c)
165
+ return t.get(c.id);
201
166
  },
202
- getCheckpoint: (p) => t.get(p),
203
- getAttempts: (p) => a.get(p) ?? []
167
+ getCheckpoint: (c) => t.get(c),
168
+ getAttempts: (c) => s.get(c) ?? []
204
169
  };
205
170
  }
206
171
  function ex(e) {
@@ -13861,33 +13826,7 @@ function Ro({
13861
13826
  }
13862
13827
  );
13863
13828
  }
13864
- function KC(e, t) {
13865
- return Ue(() => {
13866
- if (t)
13867
- return {
13868
- contentParts: [],
13869
- textContent: "",
13870
- toolMeta: {},
13871
- imageParts: [],
13872
- fileParts: [],
13873
- interruptParts: [],
13874
- toolRaw: "",
13875
- isToolStreaming: !1
13876
- };
13877
- const n = e, r = Array.isArray(n.content) ? n.content : [], o = n.additionalKwargs ?? {};
13878
- return {
13879
- contentParts: r,
13880
- textContent: Qv(r),
13881
- toolMeta: Oi(n),
13882
- imageParts: r.filter((s) => s.type === "image_url"),
13883
- fileParts: r.filter((s) => s.type === "file"),
13884
- interruptParts: r.filter((s) => s.type === "interrupt"),
13885
- toolRaw: ew(r),
13886
- isToolStreaming: !!o.toolStreaming
13887
- };
13888
- }, [e, t]);
13889
- }
13890
- function qC({ preview: e, idx: t }) {
13829
+ function KC({ preview: e, idx: t }) {
13891
13830
  return /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
13892
13831
  e.label && /* @__PURE__ */ u.jsxs("p", { className: "text-[0.65rem] uppercase tracking-wide text-muted-foreground", children: [
13893
13832
  "Artifact: ",
@@ -13914,7 +13853,7 @@ function qC({ preview: e, idx: t }) {
13914
13853
  ) })
13915
13854
  ] });
13916
13855
  }
13917
- function GC({ artifact: e }) {
13856
+ function qC({ artifact: e }) {
13918
13857
  const [t, n] = ge("bg-yellow-500/20 text-yellow-700 dark:text-yellow-300"), [r, o] = ge(/* @__PURE__ */ u.jsx(ha, { className: "w-4 h-4" })), [s, a] = ge("Processing");
13919
13858
  return at(() => {
13920
13859
  switch (e.status || "processing") {
@@ -13982,10 +13921,10 @@ function GC({ artifact: e }) {
13982
13921
  ] })
13983
13922
  ] });
13984
13923
  }
13985
- function YC({ artifact: e, idx: t = 0 }) {
13924
+ function GC({ artifact: e, idx: t = 0 }) {
13986
13925
  const n = Ue(() => e ? (Array.isArray(e.plots) ? e.plots : []).map((o) => sw(o)).filter((o) => o !== null) : [], [e]);
13987
13926
  return (e == null ? void 0 : e.type) === "research_task_info" ? /* @__PURE__ */ u.jsx(
13988
- GC,
13927
+ qC,
13989
13928
  {
13990
13929
  artifact: {
13991
13930
  type: "research_task_info",
@@ -13996,7 +13935,7 @@ function YC({ artifact: e, idx: t = 0 }) {
13996
13935
  createdAt: e.createdAt
13997
13936
  }
13998
13937
  }
13999
- ) : n.length > 0 ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: n.map((r, o) => /* @__PURE__ */ u.jsx(qC, { preview: r, idx: o }, `${t}-plot-${o}`)) }) : e && typeof e == "object" ? /* @__PURE__ */ u.jsx("div", { className: "rounded-lg border border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/20 p-4", children: /* @__PURE__ */ u.jsxs("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
13938
+ ) : n.length > 0 ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: n.map((r, o) => /* @__PURE__ */ u.jsx(KC, { preview: r, idx: o }, `${t}-plot-${o}`)) }) : e && typeof e == "object" ? /* @__PURE__ */ u.jsx("div", { className: "rounded-lg border border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/20 p-4", children: /* @__PURE__ */ u.jsxs("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
14000
13939
  "Unknown artifact type: ",
14001
13940
  /* @__PURE__ */ u.jsx("code", { className: "font-mono", children: e.type || "unknown" })
14002
13941
  ] }) }) : null;
@@ -14054,7 +13993,7 @@ const uh = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
14054
13993
  }
14055
13994
  ));
14056
13995
  uh.displayName = "CardFooter";
14057
- function XC({
13996
+ function YC({
14058
13997
  interruptPart: e,
14059
13998
  onApprove: t,
14060
13999
  onReject: n,
@@ -14112,11 +14051,11 @@ function XC({
14112
14051
  }
14113
14052
  );
14114
14053
  }
14115
- const JC = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
14054
+ const XC = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
14116
14055
  function dh({ data: e }) {
14117
- return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: JC, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: kr(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: kr(e) });
14056
+ return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: XC, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: kr(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: kr(e) });
14118
14057
  }
14119
- function ZC({ message: e, isStreaming: t = !1 }) {
14058
+ function JC({ message: e, isStreaming: t = !1 }) {
14120
14059
  const n = e.name ?? "tool", r = Ue(() => {
14121
14060
  const i = e.additionalKwargs ?? {};
14122
14061
  return Array.isArray(i.toolProgress) ? [...i.toolProgress] : [];
@@ -14157,7 +14096,7 @@ function ZC({ message: e, isStreaming: t = !1 }) {
14157
14096
  }) })
14158
14097
  ] }) : null;
14159
14098
  }
14160
- function QC({ message: e, viewMode: t, isStreaming: n = !1 }) {
14099
+ function ZC({ message: e, viewMode: t, isStreaming: n = !1 }) {
14161
14100
  const o = Oi(e).name || "tool", s = (l) => {
14162
14101
  if (l == null) return null;
14163
14102
  const c = typeof l == "string" ? Mi(l) ?? l : l;
@@ -14194,11 +14133,11 @@ function QC({ message: e, viewMode: t, isStreaming: n = !1 }) {
14194
14133
  return a(d);
14195
14134
  };
14196
14135
  return /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14197
- /* @__PURE__ */ u.jsx(ZC, { message: e, isStreaming: n }),
14136
+ /* @__PURE__ */ u.jsx(JC, { message: e, isStreaming: n }),
14198
14137
  t === "expanded" && i()
14199
14138
  ] });
14200
14139
  }
14201
- function ek({ className: e }) {
14140
+ function QC({ className: e }) {
14202
14141
  const [t, n] = ge(0);
14203
14142
  return at(() => {
14204
14143
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
@@ -14215,7 +14154,7 @@ function ek({ className: e }) {
14215
14154
  }
14216
14155
  );
14217
14156
  }
14218
- function tk({
14157
+ function ek({
14219
14158
  text: e,
14220
14159
  expanded: t,
14221
14160
  onExpandedChange: n,
@@ -14258,7 +14197,7 @@ function tk({
14258
14197
  )
14259
14198
  ] });
14260
14199
  }
14261
- function nk({
14200
+ function tk({
14262
14201
  message: e,
14263
14202
  isToolMessage: t,
14264
14203
  showToolMessages: n,
@@ -14294,7 +14233,7 @@ function nk({
14294
14233
  if (E.type === "text") {
14295
14234
  const R = E.text ?? "", H = R.trim(), M = Mi(H);
14296
14235
  return M && w !== "tool" ? /* @__PURE__ */ u.jsx(dh, { data: M }, U) : w === "user" && y && H.length > C ? /* @__PURE__ */ u.jsx(
14297
- tk,
14236
+ ek,
14298
14237
  {
14299
14238
  text: H,
14300
14239
  expanded: S,
@@ -14342,7 +14281,7 @@ function nk({
14342
14281
  (R == null ? void 0 : R.id) ?? (R == null ? void 0 : R.interrupt_id)
14343
14282
  ), M = !!(A && H && H === A), N = M ? P ?? (R == null ? void 0 : R.value) : R == null ? void 0 : R.value, K = H ? { ...R, id: H, interrupt_id: H } : R;
14344
14283
  return /* @__PURE__ */ u.jsx(
14345
- XC,
14284
+ YC,
14346
14285
  {
14347
14286
  interruptPart: K,
14348
14287
  onApprove: g,
@@ -14375,7 +14314,7 @@ function nk({
14375
14314
  return null;
14376
14315
  if (t)
14377
14316
  return !n && r ? null : n ? /* @__PURE__ */ u.jsx(
14378
- QC,
14317
+ ZC,
14379
14318
  {
14380
14319
  message: e,
14381
14320
  viewMode: o,
@@ -14387,12 +14326,12 @@ function nk({
14387
14326
  const E = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: a.map((U, R) => /* @__PURE__ */ u.jsx(V, { part: U, i: R }, R)) });
14388
14327
  return p ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
14389
14328
  E,
14390
- /* @__PURE__ */ u.jsx(ek, { className: L })
14329
+ /* @__PURE__ */ u.jsx(QC, { className: L })
14391
14330
  ] }) : E;
14392
14331
  }
14393
14332
  return null;
14394
14333
  }
14395
- function rk(e) {
14334
+ function nk(e) {
14396
14335
  const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = Il(), [o, s] = ge({}), [a, i] = ge(null), [l, c] = ge(!1), d = we(() => {
14397
14336
  c(!1), i(null);
14398
14337
  }, []), p = we((f) => {
@@ -14464,6 +14403,32 @@ function rk(e) {
14464
14403
  closeFileViewer: d
14465
14404
  };
14466
14405
  }
14406
+ function rk(e, t) {
14407
+ return Ue(() => {
14408
+ if (t)
14409
+ return {
14410
+ contentParts: [],
14411
+ textContent: "",
14412
+ toolMeta: {},
14413
+ imageParts: [],
14414
+ fileParts: [],
14415
+ interruptParts: [],
14416
+ toolRaw: "",
14417
+ isToolStreaming: !1
14418
+ };
14419
+ const n = e, r = Array.isArray(n.content) ? n.content : [], o = n.additionalKwargs ?? {};
14420
+ return {
14421
+ contentParts: r,
14422
+ textContent: Qv(r),
14423
+ toolMeta: Oi(n),
14424
+ imageParts: r.filter((s) => s.type === "image_url"),
14425
+ fileParts: r.filter((s) => s.type === "file"),
14426
+ interruptParts: r.filter((s) => s.type === "interrupt"),
14427
+ toolRaw: ew(r),
14428
+ isToolStreaming: !!o.toolStreaming
14429
+ };
14430
+ }, [e, t]);
14431
+ }
14467
14432
  const jl = Eg(function({
14468
14433
  message: t,
14469
14434
  messageIndex: n,
@@ -14498,7 +14463,7 @@ const jl = Eg(function({
14498
14463
  fileViewerOpen: W,
14499
14464
  currentFileInfo: D,
14500
14465
  closeFileViewer: Y
14501
- } = rk({ allowFileOpen: q, currentThreadId: H }), Z = Ue(() => {
14466
+ } = nk({ allowFileOpen: q, currentThreadId: H }), Z = Ue(() => {
14502
14467
  switch (K) {
14503
14468
  case "user":
14504
14469
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -14511,7 +14476,7 @@ const jl = Eg(function({
14511
14476
  default:
14512
14477
  return "text-[hsl(var(--chat-bubble-ai-text))]";
14513
14478
  }
14514
- }, [K]), ae = KC(t, j), {
14479
+ }, [K]), ae = rk(t, j), {
14515
14480
  contentParts: $,
14516
14481
  imageParts: te,
14517
14482
  fileParts: ve,
@@ -14821,7 +14786,7 @@ const jl = Eg(function({
14821
14786
  ),
14822
14787
  /* @__PURE__ */ u.jsxs("div", { className: "relative", children: [
14823
14788
  /* @__PURE__ */ u.jsx(
14824
- nk,
14789
+ tk,
14825
14790
  {
14826
14791
  message: t,
14827
14792
  isToolMessage: X,
@@ -14852,7 +14817,7 @@ const jl = Eg(function({
14852
14817
  iconForeground: Z
14853
14818
  }
14854
14819
  ),
14855
- m && ze && /* @__PURE__ */ u.jsx("div", { className: "mt-3", children: /* @__PURE__ */ u.jsx(YC, { artifact: ze, idx: 0 }) })
14820
+ m && ze && /* @__PURE__ */ u.jsx("div", { className: "mt-3", children: /* @__PURE__ */ u.jsx(GC, { artifact: ze, idx: 0 }) })
14856
14821
  ] }),
14857
14822
  X && F === "expanded" && (ke.toolCallId || ke.name) && /* @__PURE__ */ u.jsxs("div", { className: ne("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", N && "text-xs"), children: [
14858
14823
  ke.name && /* @__PURE__ */ u.jsxs("div", { children: [
@@ -14963,9 +14928,7 @@ const fh = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, ph = O.memo(
14963
14928
  t,
14964
14929
  w ?? {
14965
14930
  checkpoints: [],
14966
- checkpointMetaById: /* @__PURE__ */ new Map(),
14967
- checkpointIndexByKey: /* @__PURE__ */ new Map(),
14968
- attemptMetaById: /* @__PURE__ */ new Map(),
14931
+ checkpointMetaByCheckpointId: /* @__PURE__ */ new Map(),
14969
14932
  userMessageIdToAttempts: /* @__PURE__ */ new Map(),
14970
14933
  timeline: [],
14971
14934
  messagePreviews: /* @__PURE__ */ new Map(),
@@ -19378,7 +19341,7 @@ export {
19378
19341
  UI as Api,
19379
19342
  HI as ApiClient,
19380
19343
  Hv as ApiProvider,
19381
- YC as ArtifactRenderer,
19344
+ GC as ArtifactRenderer,
19382
19345
  uC as Badge,
19383
19346
  pt as Button,
19384
19347
  sh as Card,
@@ -19409,15 +19372,15 @@ export {
19409
19372
  IC as FileViewerModal,
19410
19373
  $v as HISTORY_TIMEOUT_MS,
19411
19374
  Wh as Input,
19412
- XC as InterruptPartRenderer,
19375
+ YC as InterruptPartRenderer,
19413
19376
  Zk as Label,
19414
19377
  Ro as MarkdownContent,
19415
- nk as MessageBody,
19378
+ tk as MessageBody,
19416
19379
  jl as MessageComponent,
19417
19380
  hh as MessageList,
19418
19381
  ph as MessageRow,
19419
- qC as PlotArtifact,
19420
- GC as ResearchTaskArtifact,
19382
+ KC as PlotArtifact,
19383
+ qC as ResearchTaskArtifact,
19421
19384
  vd as SETTINGS_STORAGE_KEY,
19422
19385
  Hh as ScrollArea,
19423
19386
  r1 as Select,
@@ -19435,22 +19398,22 @@ export {
19435
19398
  t1 as SimpleChat,
19436
19399
  dh as SimpleJsonView,
19437
19400
  m1 as Sonner,
19438
- ZC as StreamProgress,
19401
+ JC as StreamProgress,
19439
19402
  UE as Switch,
19440
19403
  Qf as Textarea,
19441
- ek as ThinkingIndicator,
19404
+ QC as ThinkingIndicator,
19442
19405
  Vk as ThreadListItem,
19443
19406
  Eu as ThreadManager,
19444
19407
  bw as ThreadStateProvider,
19445
19408
  Xv as ThreadsProvider,
19446
19409
  TI as TimelineColumn,
19447
19410
  h1 as Toaster,
19448
- QC as ToolComponent,
19411
+ ZC as ToolComponent,
19449
19412
  d1 as Tooltip,
19450
19413
  mR as TooltipContent,
19451
19414
  u1 as TooltipProvider,
19452
19415
  f1 as TooltipTrigger,
19453
- tk as UserTextContent,
19416
+ ek as UserTextContent,
19454
19417
  GI as applySettings,
19455
19418
  Jg as buildAttemptMaps,
19456
19419
  Qg as buildCheckpointIndex,
@@ -19488,9 +19451,10 @@ export {
19488
19451
  zt as unwrap,
19489
19452
  As as useApi,
19490
19453
  ex as useCheckpointIndex,
19491
- rk as useFilePreview,
19454
+ nk as useFilePreview,
19492
19455
  KI as useHasChatSession,
19493
19456
  Xg as useMessageMetadata,
19457
+ rk as useParsedMessageContent,
19494
19458
  Tw as useStream,
19495
19459
  Tw as useStreamingHook,
19496
19460
  vw as useThreadHistoryState,