@fencyai/react 0.1.213 → 0.1.214

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.js CHANGED
@@ -1,87 +1,87 @@
1
1
  import { jsxs as m, jsx as r, Fragment as R } from "react/jsx-runtime";
2
- import { StreamEventManager as ze, StreamCacheManager as Pe, toStreamData as Be, taskReducer as Le, initialTaskStoreState as Ae, createAgentTaskFileDownloadLink as De, isTerminalAgentTaskEventData as We, agentTaskErrorFromEventData as $e, shouldAppendCompletedToProgress as Ne, getTerminalCreateAgentTaskResponse as He, createAgentTask as Ge, mapCreateAgentTaskParams as Oe, parseAgentTaskFileIdFromFencyFileHref as _e, parseAgentTaskMemoryFromFencyMemHref as qe } from "@fencyai/js";
3
- import { StreamEventManager as _n } from "@fencyai/js";
4
- import Ue, { createContext as fe, useState as C, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as je, useMemo as z, useLayoutEffect as Qe } from "react";
5
- import { motion as v, useInView as Ke, AnimatePresence as Ve } from "motion/react";
6
- import Xe from "react-markdown";
7
- import { Prism as ke } from "react-syntax-highlighter";
8
- import Ye from "remark-gfm";
9
- import './assets/index.css';const Se = fe(
2
+ import { StreamEventManager as Be, StreamCacheManager as Pe, toStreamData as Le, taskReducer as De, initialTaskStoreState as Ae, createAgentTaskFileDownloadLink as We, isTerminalAgentTaskEventData as He, agentTaskErrorFromEventData as $e, shouldAppendCompletedToProgress as Ne, getTerminalCreateAgentTaskResponse as Ge, createAgentTask as Oe, mapCreateAgentTaskParams as _e, parseAgentTaskFileIdFromFencyFileHref as qe, parseAgentTaskMemoryFromFencyMemHref as Ue } from "@fencyai/js";
3
+ import { StreamEventManager as jn } from "@fencyai/js";
4
+ import je, { createContext as ke, useState as C, useRef as D, useEffect as N, useCallback as L, useContext as Se, useReducer as Qe, useMemo as z, useLayoutEffect as Ke } from "react";
5
+ import { motion as v, useInView as Ve, AnimatePresence as Xe } from "motion/react";
6
+ import Ye from "react-markdown";
7
+ import { Prism as be } from "react-syntax-highlighter";
8
+ import Je from "remark-gfm";
9
+ import './assets/index.css';const Te = ke(
10
10
  void 0
11
11
  );
12
- function $n({
12
+ function Gn({
13
13
  fency: e,
14
14
  fetchCreateStreamClientToken: o,
15
15
  children: t
16
16
  }) {
17
17
  const [n, i] = C(
18
18
  null
19
- ), [a, l] = C(!0), [c, p] = C(null), [u, g] = C([]), h = A(null), x = A(null);
20
- H(() => {
21
- e.then((d) => {
22
- i(d), l(!1);
23
- }).catch((d) => {
24
- p(d), l(!1);
19
+ ), [a, l] = C(!0), [d, c] = C(null), [p, g] = C([]), h = D(null), x = D(null);
20
+ N(() => {
21
+ e.then((u) => {
22
+ i(u), l(!1);
23
+ }).catch((u) => {
24
+ c(u), l(!1);
25
25
  });
26
- }, [e]), H(() => {
26
+ }, [e]), N(() => {
27
27
  if (!n) return;
28
- x.current || (x.current = new ze(n));
29
- const d = new Pe(
28
+ x.current || (x.current = new Be(n));
29
+ const u = new Pe(
30
30
  n,
31
31
  o
32
32
  );
33
- h.current = d, d.startPeriodicCleanup();
34
- const f = d.onChange((b) => {
33
+ h.current = u, u.startPeriodicCleanup();
34
+ const f = u.onChange((T) => {
35
35
  var M;
36
- g(b), (M = x.current) == null || M.updateStreams(b);
36
+ g(T), (M = x.current) == null || M.updateStreams(T);
37
37
  });
38
38
  return () => {
39
- var b;
40
- f(), d.destroy(), h.current = null, (b = x.current) == null || b.cleanup(), x.current = null;
39
+ var T;
40
+ f(), u.destroy(), h.current = null, (T = x.current) == null || T.cleanup(), x.current = null;
41
41
  };
42
42
  }, [n, o]);
43
- const T = L(
44
- async (d) => {
43
+ const S = L(
44
+ async (u) => {
45
45
  if (!h.current)
46
46
  throw new Error("Fency instance not initialized");
47
- return h.current.getOrCreateStream(d);
47
+ return h.current.getOrCreateStream(u);
48
48
  },
49
49
  []
50
50
  );
51
- if (c)
51
+ if (d)
52
52
  return /* @__PURE__ */ m("div", { children: [
53
53
  "Fency error: ",
54
- c.message
54
+ d.message
55
55
  ] });
56
56
  if (!n)
57
57
  return null;
58
- const y = u.length > 0 ? u[u.length - 1] : null, s = {
58
+ const y = p.length > 0 ? p[p.length - 1] : null, s = {
59
59
  fency: n,
60
60
  loading: a,
61
- error: c,
62
- activeStreams: u,
61
+ error: d,
62
+ activeStreams: p,
63
63
  latestStream: y,
64
64
  eventManager: x.current,
65
- getOrCreateStream: T
65
+ getOrCreateStream: S
66
66
  };
67
- return /* @__PURE__ */ r(Se.Provider, { value: s, children: t });
67
+ return /* @__PURE__ */ r(Te.Provider, { value: s, children: t });
68
68
  }
69
- function be() {
70
- const e = xe(Se);
69
+ function ve() {
70
+ const e = Se(Te);
71
71
  if (e === void 0)
72
72
  throw new Error("useFencyContext must be used within a FencyProvider");
73
73
  return e;
74
74
  }
75
- const Je = (e) => {
76
- const o = be(), [t, n] = C(null), i = A(
75
+ const Ze = (e) => {
76
+ const o = ve(), [t, n] = C(null), i = D(
77
77
  `subscriber-${Math.random().toString(36).substr(2, 9)}`
78
78
  );
79
- return H(() => {
79
+ return N(() => {
80
80
  if (!o.eventManager) return;
81
81
  const l = {
82
- onMessage: (p, u) => {
83
- var h, x, T;
84
- const g = Be(p);
82
+ onMessage: (c, p) => {
83
+ var h, x, S;
84
+ const g = Le(c);
85
85
  if (g)
86
86
  switch (g.type) {
87
87
  case "STREAM_TIMEOUT":
@@ -91,17 +91,17 @@ const Je = (e) => {
91
91
  (x = e == null ? void 0 : e.onStreamNotFound) == null || x.call(e, g);
92
92
  break;
93
93
  case "AGENT_TASK_PROGRESS_ITEM_UPDATED":
94
- (T = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || T.call(e, g);
94
+ (S = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || S.call(e, g);
95
95
  break;
96
96
  }
97
97
  },
98
- onError: (p, u) => {
98
+ onError: (c, p) => {
99
99
  var g;
100
100
  (g = e == null ? void 0 : e.onStreamError) == null || g.call(e, {
101
- streamId: p,
101
+ streamId: c,
102
102
  error: {
103
103
  code: "UnknownError",
104
- message: u ?? "Unknown error in useStream"
104
+ message: p ?? "Unknown error in useStream"
105
105
  }
106
106
  });
107
107
  }
@@ -131,7 +131,7 @@ const Je = (e) => {
131
131
  stream: t
132
132
  };
133
133
  };
134
- function Ze(e) {
134
+ function er(e) {
135
135
  var o, t;
136
136
  if (e && typeof e == "object") {
137
137
  const n = (t = (o = e.body) == null ? void 0 : o.error) == null ? void 0 : t.message;
@@ -143,58 +143,58 @@ function Ze(e) {
143
143
  }
144
144
  return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown error during agent task creation";
145
145
  }
146
- const Nn = (e) => {
147
- const o = be(), [t, n] = je(Le, Ae), i = A(/* @__PURE__ */ new Set()), a = A(/* @__PURE__ */ new Map()), l = A(/* @__PURE__ */ new Map()), c = L(
146
+ const On = (e) => {
147
+ const o = ve(), [t, n] = Qe(De, Ae), i = D(/* @__PURE__ */ new Set()), a = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), d = L(
148
148
  (y) => {
149
149
  if (y)
150
150
  return async (s) => {
151
- const { clientToken: d } = await y(s), f = await De({
151
+ const { clientToken: u } = await y(s), f = await We({
152
152
  pk: o.fency.publishableKey,
153
153
  baseUrl: o.fency.baseUrl,
154
- clientToken: d,
154
+ clientToken: u,
155
155
  agentTaskFileId: s
156
156
  });
157
157
  if (f.type === "error")
158
158
  throw new Error(f.error.message);
159
- const b = document.createElement("a");
160
- b.href = f.downloadLink, b.download = "", b.click();
159
+ const T = document.createElement("a");
160
+ T.href = f.downloadLink, T.download = "", T.click();
161
161
  };
162
162
  },
163
163
  [o.fency.baseUrl, o.fency.publishableKey]
164
- ), p = L(
164
+ ), c = L(
165
165
  (y, s) => {
166
- const d = t.tasks.filter(
166
+ const u = t.tasks.filter(
167
167
  (f) => {
168
- var b;
169
- return f.streamId === y && f.loading && ((b = f.confirmedData) == null ? void 0 : b.taskId);
168
+ var T;
169
+ return f.streamId === y && f.loading && ((T = f.confirmedData) == null ? void 0 : T.taskId);
170
170
  }
171
171
  ).map((f) => f.confirmedData.taskId);
172
172
  n({ type: "STREAM_FAILURE", streamId: y, error: s });
173
- for (const f of d) {
173
+ for (const f of u) {
174
174
  i.current.delete(f);
175
- const b = a.current.get(f);
176
- b && (a.current.delete(f), b({ type: "error", error: s }));
175
+ const T = a.current.get(f);
176
+ T && (a.current.delete(f), T({ type: "error", error: s }));
177
177
  }
178
178
  },
179
179
  [t.tasks]
180
- ), u = L(
180
+ ), p = L(
181
181
  (y) => {
182
- var d;
182
+ var u;
183
183
  if (!i.current.has(y.agentTaskId)) return;
184
184
  const s = y.data;
185
- if (We(s)) {
185
+ if (He(s)) {
186
186
  if (s.eventType === "Error") {
187
- const b = $e(s);
188
- if (!b) return;
187
+ const T = $e(s);
188
+ if (!T) return;
189
189
  n({
190
190
  type: "TASK_ERROR",
191
191
  agentTaskId: y.agentTaskId,
192
- error: b
192
+ error: T
193
193
  });
194
194
  const M = a.current.get(
195
195
  y.agentTaskId
196
196
  );
197
- M && (a.current.delete(y.agentTaskId), M({ type: "error", error: b }));
197
+ M && (a.current.delete(y.agentTaskId), M({ type: "error", error: T }));
198
198
  return;
199
199
  }
200
200
  n({
@@ -208,50 +208,50 @@ const Nn = (e) => {
208
208
  );
209
209
  if (f) {
210
210
  a.current.delete(y.agentTaskId);
211
- const b = He(
211
+ const T = Ge(
212
212
  y.streamId,
213
213
  y.agentTaskId,
214
214
  s
215
215
  );
216
- b && f(b);
216
+ T && f(T);
217
217
  }
218
218
  return;
219
219
  }
220
- (d = e.onAgentTaskProgressItemUpdated) == null || d.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
220
+ (u = e.onAgentTaskProgressItemUpdated) == null || u.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
221
221
  },
222
222
  [e]
223
- ), { createStream: g } = Je({
224
- onAgentTaskProgressItemUpdated: u,
223
+ ), { createStream: g } = Ze({
224
+ onAgentTaskProgressItemUpdated: p,
225
225
  onStreamError: (y) => {
226
226
  var s;
227
- (s = e == null ? void 0 : e.onStreamError) == null || s.call(e, y), p(y.streamId, y.error);
227
+ (s = e == null ? void 0 : e.onStreamError) == null || s.call(e, y), c(y.streamId, y.error);
228
228
  },
229
229
  onStreamNotFound: (y) => {
230
230
  var s;
231
- (s = e == null ? void 0 : e.onStreamNotFound) == null || s.call(e, y), p(y.streamId, {
231
+ (s = e == null ? void 0 : e.onStreamNotFound) == null || s.call(e, y), c(y.streamId, {
232
232
  code: "StreamNotFound",
233
233
  message: "Stream not found"
234
234
  });
235
235
  },
236
236
  onStreamTimeout: (y) => {
237
237
  var s;
238
- (s = e == null ? void 0 : e.onStreamTimeout) == null || s.call(e, y), p(y.streamId, {
238
+ (s = e == null ? void 0 : e.onStreamTimeout) == null || s.call(e, y), c(y.streamId, {
239
239
  code: "StreamTimeout",
240
240
  message: "Stream timed out"
241
241
  });
242
242
  }
243
243
  }), h = L(
244
244
  async (y, s) => {
245
- var D;
246
- const d = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
245
+ var A;
246
+ const u = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
247
247
  if (f === void 0)
248
248
  throw new Error(
249
249
  "fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
250
250
  );
251
- const b = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
251
+ const T = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
252
252
  if (M.type === "success") {
253
- const W = (/* @__PURE__ */ new Date()).toISOString(), P = {
254
- taskKey: d,
253
+ const W = (/* @__PURE__ */ new Date()).toISOString(), B = {
254
+ taskKey: u,
255
255
  streamId: M.stream.id,
256
256
  triggeredAt: W,
257
257
  confirmedData: null,
@@ -261,40 +261,40 @@ const Nn = (e) => {
261
261
  loading: !0,
262
262
  loadingText: s == null ? void 0 : s.loadingText
263
263
  };
264
- n({ type: "TASK_PENDING", task: P }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
265
- ...P,
266
- downloadFile: c(
267
- b
264
+ n({ type: "TASK_PENDING", task: B }), (A = s == null ? void 0 : s.onTaskRegistered) == null || A.call(s, {
265
+ ...B,
266
+ downloadFile: d(
267
+ T
268
268
  )
269
269
  });
270
270
  try {
271
- const { clientToken: $ } = await f(), I = await Ge({
271
+ const { clientToken: H } = await f(), I = await Oe({
272
272
  pk: o.fency.publishableKey,
273
273
  baseUrl: o.fency.baseUrl,
274
- clientToken: $,
274
+ clientToken: H,
275
275
  streamToken: M.stream.token,
276
- request: Oe(y)
276
+ request: _e(y)
277
277
  });
278
278
  if (I.type === "success" && I.agentTask) {
279
279
  i.current.add(
280
280
  I.agentTask.id
281
281
  );
282
- const G = c(
283
- b
282
+ const G = d(
283
+ T
284
284
  );
285
285
  return G && l.current.set(
286
286
  I.agentTask.id,
287
287
  G
288
288
  ), n({
289
289
  type: "TASK_CONFIRMED",
290
- taskKey: d,
290
+ taskKey: u,
291
291
  taskId: I.agentTask.id,
292
292
  createdAt: I.agentTask.createdAt
293
293
  }), await new Promise(
294
- (B) => {
294
+ (P) => {
295
295
  a.current.set(
296
296
  I.agentTask.id,
297
- B
297
+ P
298
298
  );
299
299
  }
300
300
  );
@@ -302,7 +302,7 @@ const Nn = (e) => {
302
302
  if (I.type === "error")
303
303
  return n({
304
304
  type: "TASK_API_ERROR",
305
- taskKey: d,
305
+ taskKey: u,
306
306
  error: I.error
307
307
  }), {
308
308
  type: "error",
@@ -315,7 +315,7 @@ const Nn = (e) => {
315
315
  };
316
316
  return n({
317
317
  type: "TASK_API_ERROR",
318
- taskKey: d,
318
+ taskKey: u,
319
319
  error: G
320
320
  }), {
321
321
  type: "error",
@@ -323,14 +323,14 @@ const Nn = (e) => {
323
323
  };
324
324
  }
325
325
  }
326
- } catch ($) {
326
+ } catch (H) {
327
327
  const I = {
328
328
  code: "UnknownError",
329
- message: Ze($)
329
+ message: er(H)
330
330
  };
331
331
  return n({
332
332
  type: "TASK_API_ERROR",
333
- taskKey: d,
333
+ taskKey: u,
334
334
  error: I
335
335
  }), {
336
336
  type: "error",
@@ -342,7 +342,7 @@ const Nn = (e) => {
342
342
  },
343
343
  [
344
344
  o,
345
- c,
345
+ d,
346
346
  g,
347
347
  e.fetchCreateAgentTaskClientToken,
348
348
  e.fetchAgentTaskFileDownloadClientToken
@@ -353,37 +353,37 @@ const Nn = (e) => {
353
353
  ...y,
354
354
  downloadFile: (s = y.confirmedData) != null && s.taskId ? l.current.get(y.confirmedData.taskId) : void 0
355
355
  };
356
- }), [t.tasks]), T = z(() => {
356
+ }), [t.tasks]), S = z(() => {
357
357
  if (x.length !== 0)
358
358
  return [...x].sort((y, s) => new Date(s.triggeredAt).getTime() - new Date(y.triggeredAt).getTime())[0];
359
359
  }, [x]);
360
- return H(() => () => {
360
+ return N(() => () => {
361
361
  i.current.clear(), a.current.clear(), l.current.clear();
362
362
  }, []), {
363
363
  agentTasks: x,
364
364
  createAgentTask: h,
365
- latest: T
365
+ latest: S
366
366
  };
367
367
  };
368
- function er(e) {
368
+ function rr(e) {
369
369
  return e.taskType === "ExploreMemories" && e.eventType === "SetupSandbox";
370
370
  }
371
- function rr(e, o) {
371
+ function nr(e, o) {
372
372
  for (let t = o + 1; t < e.length; t++) {
373
373
  const n = e[t];
374
- if (!er(n.data))
374
+ if (!rr(n.data))
375
375
  return n;
376
376
  }
377
377
  }
378
- function nr(e) {
378
+ function or(e) {
379
379
  return e.progressItems.map((o, t) => {
380
- const n = rr(e.progressItems, t), i = n != null;
380
+ const n = nr(e.progressItems, t), i = n != null;
381
381
  let a;
382
382
  if (n != null && n.createdAt) {
383
- const l = new Date(o.createdAt).getTime(), c = new Date(n.createdAt).getTime();
383
+ const l = new Date(o.createdAt).getTime(), d = new Date(n.createdAt).getTime();
384
384
  a = Math.max(
385
385
  0,
386
- Math.round((c - l) / 1e3)
386
+ Math.round((d - l) / 1e3)
387
387
  );
388
388
  }
389
389
  return {
@@ -394,7 +394,7 @@ function nr(e) {
394
394
  };
395
395
  });
396
396
  }
397
- const or = {
397
+ const tr = {
398
398
  'code[class*="language-"]': {
399
399
  color: "#f8f8f2",
400
400
  background: "none",
@@ -545,7 +545,7 @@ const or = {
545
545
  italic: {
546
546
  fontStyle: "italic"
547
547
  }
548
- }, tr = {
548
+ }, ir = {
549
549
  'code[class*="language-"]': {
550
550
  background: "hsl(230, 1%, 98%)",
551
551
  color: "hsl(230, 8%, 24%)",
@@ -1033,7 +1033,7 @@ const or = {
1033
1033
  ".prism-previewer-easing.prism-previewer-easing line": {
1034
1034
  stroke: "hsl(230, 8%, 24%)"
1035
1035
  }
1036
- }, Te = {
1036
+ }, Ce = {
1037
1037
  textPrimary: "#1f2937",
1038
1038
  textSecondary: "#666",
1039
1039
  textMuted: "#94a3b8",
@@ -1057,7 +1057,7 @@ const or = {
1057
1057
  sourcesBadgeBg: "#f5f5f5",
1058
1058
  transparent: "transparent",
1059
1059
  reasoningLine: "#444"
1060
- }, ir = {
1060
+ }, ar = {
1061
1061
  textPrimary: "#f0f6fc",
1062
1062
  textSecondary: "#9198a1",
1063
1063
  textMuted: "#8b949e",
@@ -1081,46 +1081,46 @@ const or = {
1081
1081
  sourcesBadgeBg: "#21262d",
1082
1082
  transparent: "transparent",
1083
1083
  reasoningLine: "#a1a8b0"
1084
- }, ve = fe({
1084
+ }, we = ke({
1085
1085
  theme: "light",
1086
- colors: Te
1086
+ colors: Ce
1087
1087
  });
1088
- function ar({
1088
+ function lr({
1089
1089
  theme: e,
1090
1090
  children: o
1091
1091
  }) {
1092
1092
  const t = z(
1093
1093
  () => ({
1094
1094
  theme: e,
1095
- colors: e === "dark" ? ir : Te
1095
+ colors: e === "dark" ? ar : Ce
1096
1096
  }),
1097
1097
  [e]
1098
1098
  );
1099
- return /* @__PURE__ */ r(ve.Provider, { value: t, children: o });
1099
+ return /* @__PURE__ */ r(we.Provider, { value: t, children: o });
1100
1100
  }
1101
- function S() {
1102
- return xe(ve);
1101
+ function b() {
1102
+ return Se(we);
1103
1103
  }
1104
- function Ce(e) {
1105
- return e === "dark" ? or : tr;
1104
+ function Me(e) {
1105
+ return e === "dark" ? tr : ir;
1106
1106
  }
1107
- const N = ({
1107
+ const $ = ({
1108
1108
  text: e,
1109
1109
  onFileDownload: o,
1110
1110
  onMemoryClick: t
1111
1111
  }) => {
1112
- const { theme: n } = S(), i = Ce(n), [a, l] = C(
1112
+ const { theme: n } = b(), i = Me(n), [a, l] = C(
1113
1113
  null
1114
- ), [c, p] = C(
1114
+ ), [d, c] = C(
1115
1115
  null
1116
- ), [u, g] = C(!1), [h, x] = C(!1), T = L(
1116
+ ), [p, g] = C(!1), [h, x] = C(!1), S = L(
1117
1117
  (f) => {
1118
1118
  o && (l(null), g(!0), (async () => {
1119
1119
  try {
1120
1120
  await o(f);
1121
- } catch (b) {
1121
+ } catch (T) {
1122
1122
  l(
1123
- b instanceof Error ? b.message : "Download failed"
1123
+ T instanceof Error ? T.message : "Download failed"
1124
1124
  );
1125
1125
  } finally {
1126
1126
  g(!1);
@@ -1130,12 +1130,12 @@ const N = ({
1130
1130
  [o]
1131
1131
  ), y = L(
1132
1132
  (f) => {
1133
- t && (p(null), x(!0), (async () => {
1133
+ t && (c(null), x(!0), (async () => {
1134
1134
  try {
1135
1135
  await t(f);
1136
- } catch (b) {
1137
- p(
1138
- b instanceof Error ? b.message : "Memory link action failed"
1136
+ } catch (T) {
1137
+ c(
1138
+ T instanceof Error ? T.message : "Memory link action failed"
1139
1139
  );
1140
1140
  } finally {
1141
1141
  x(!1);
@@ -1145,36 +1145,36 @@ const N = ({
1145
1145
  [t]
1146
1146
  ), s = z(() => ({
1147
1147
  code(f) {
1148
- const { children: b, className: M, node: D, ref: W, ...P } = f, $ = /language-(\w+)/.exec(M || "");
1149
- return $ ? /* @__PURE__ */ r(
1150
- ke,
1148
+ const { children: T, className: M, node: A, ref: W, ...B } = f, H = /language-(\w+)/.exec(M || "");
1149
+ return H ? /* @__PURE__ */ r(
1150
+ be,
1151
1151
  {
1152
- ...P,
1152
+ ...B,
1153
1153
  PreTag: "div",
1154
- children: String(b).replace(/\n$/, ""),
1155
- language: $[1],
1154
+ children: String(T).replace(/\n$/, ""),
1155
+ language: H[1],
1156
1156
  style: i
1157
1157
  }
1158
- ) : /* @__PURE__ */ r("code", { ...P, className: M, children: String(b) });
1158
+ ) : /* @__PURE__ */ r("code", { ...B, className: M, children: String(T) });
1159
1159
  },
1160
1160
  a(f) {
1161
- const { children: b, href: M, ...D } = f, W = M ? _e(M) : null;
1161
+ const { children: T, href: M, ...A } = f, W = M ? qe(M) : null;
1162
1162
  if (W != null)
1163
1163
  return o ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1164
1164
  "button",
1165
1165
  {
1166
1166
  type: "button",
1167
1167
  className: "fency-file-download-button",
1168
- disabled: u,
1169
- onClick: () => T(W),
1170
- children: b
1168
+ disabled: p,
1169
+ onClick: () => S(W),
1170
+ children: T
1171
1171
  }
1172
1172
  ) }) : /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1173
1173
  "button",
1174
1174
  {
1175
1175
  type: "button",
1176
1176
  className: "fency-file-download-button",
1177
- disabled: u,
1177
+ disabled: p,
1178
1178
  onClick: () => {
1179
1179
  console.error(
1180
1180
  "[fency] File download link clicked but no onFileDownload handler is configured. Pass fetchAgentTaskFileDownloadClientToken to useAgentTasks."
@@ -1182,11 +1182,11 @@ const N = ({
1182
1182
  "File download is not configured. Please provide fetchAgentTaskFileDownloadClientToken."
1183
1183
  );
1184
1184
  },
1185
- children: b
1185
+ children: T
1186
1186
  }
1187
1187
  ) });
1188
- const P = M ? qe(M) : null;
1189
- return P != null ? t ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1188
+ const B = M ? Ue(M) : null;
1189
+ return B != null ? t ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1190
1190
  "button",
1191
1191
  {
1192
1192
  type: "button",
@@ -1194,39 +1194,39 @@ const N = ({
1194
1194
  disabled: h,
1195
1195
  onClick: () => y({
1196
1196
  source: {
1197
- memoryId: P.memoryId,
1198
- memoryTypeId: P.memoryTypeId ?? ""
1197
+ memoryId: B.memoryId,
1198
+ memoryTypeId: B.memoryTypeId ?? ""
1199
1199
  }
1200
1200
  }),
1201
- children: b
1201
+ children: T
1202
1202
  }
1203
- ) }) : /* @__PURE__ */ r("span", { children: b }) : /* @__PURE__ */ r(
1203
+ ) }) : /* @__PURE__ */ r("span", { children: T }) : /* @__PURE__ */ r(
1204
1204
  "a",
1205
1205
  {
1206
1206
  href: M,
1207
1207
  target: "_blank",
1208
1208
  rel: "noopener noreferrer",
1209
- ...D,
1210
- children: b
1209
+ ...A,
1210
+ children: T
1211
1211
  }
1212
1212
  );
1213
1213
  }
1214
1214
  }), [
1215
- u,
1215
+ p,
1216
1216
  h,
1217
- T,
1217
+ S,
1218
1218
  y,
1219
1219
  o,
1220
1220
  t,
1221
1221
  i
1222
- ]), d = a ?? c;
1222
+ ]), u = a ?? d;
1223
1223
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
1224
- d ? /* @__PURE__ */ r(
1224
+ u ? /* @__PURE__ */ r(
1225
1225
  "p",
1226
1226
  {
1227
1227
  role: "alert",
1228
1228
  style: { color: "#b91c1c", marginBottom: 8, fontSize: 14 },
1229
- children: d
1229
+ children: u
1230
1230
  }
1231
1231
  ) : null,
1232
1232
  /* @__PURE__ */ r(
@@ -1237,9 +1237,9 @@ const N = ({
1237
1237
  animate: { opacity: 1, y: 0 },
1238
1238
  transition: { duration: 0.3, delay: 0 },
1239
1239
  children: /* @__PURE__ */ r(
1240
- Xe,
1240
+ Ye,
1241
1241
  {
1242
- remarkPlugins: [Ye],
1242
+ remarkPlugins: [Je],
1243
1243
  components: s,
1244
1244
  children: e
1245
1245
  }
@@ -1247,8 +1247,8 @@ const N = ({
1247
1247
  }
1248
1248
  )
1249
1249
  ] });
1250
- }, lr = ({ data: e }) => {
1251
- const { theme: o } = S(), t = Ce(o), n = e.response.jsonResponse;
1250
+ }, sr = ({ data: e }) => {
1251
+ const { theme: o } = b(), t = Me(o), n = e.response.jsonResponse;
1252
1252
  let i;
1253
1253
  try {
1254
1254
  i = JSON.stringify(JSON.parse(n), null, 2);
@@ -1263,10 +1263,10 @@ const N = ({
1263
1263
  initial: { opacity: 0, y: -10 },
1264
1264
  animate: { opacity: 1, y: 0 },
1265
1265
  transition: { duration: 0.3, delay: 0 },
1266
- children: /* @__PURE__ */ r(ke, { language: "json", style: t, PreTag: "div", children: i })
1266
+ children: /* @__PURE__ */ r(be, { language: "json", style: t, PreTag: "div", children: i })
1267
1267
  }
1268
1268
  ) });
1269
- }, sr = {
1269
+ }, cr = {
1270
1270
  en: {
1271
1271
  error: "Error",
1272
1272
  streaming: "Streaming...",
@@ -1353,6 +1353,8 @@ const N = ({
1353
1353
  exploreExporting: "Loading {n} memory files...",
1354
1354
  exploreExportingOne: "Loading memory data...",
1355
1355
  exploreRunCode: "Analyzing: {title}",
1356
+ exploreViewCode: "View code",
1357
+ exploreHideCode: "Hide code",
1356
1358
  exploreComposeHtmlReport: "Composing report: {title}",
1357
1359
  exploreSetupSandbox: "Setting up environment...",
1358
1360
  exploreSetupSandboxPhrases: [
@@ -1498,6 +1500,8 @@ const N = ({
1498
1500
  exploreExporting: "Laster {n} minnefiler...",
1499
1501
  exploreExportingOne: "Laster data...",
1500
1502
  exploreRunCode: "Analyserer: {title}",
1503
+ exploreViewCode: "Vis kode",
1504
+ exploreHideCode: "Skjul kode",
1501
1505
  exploreComposeHtmlReport: "Lager rapport: {title}",
1502
1506
  exploreSetupSandbox: "Setter opp miljø...",
1503
1507
  exploreSetupSandboxPhrases: [
@@ -1560,8 +1564,8 @@ const N = ({
1560
1564
  copiedId: "Kopiert"
1561
1565
  }
1562
1566
  };
1563
- function cr(e) {
1564
- return sr[e];
1567
+ function dr(e) {
1568
+ return cr[e];
1565
1569
  }
1566
1570
  function k(e, o) {
1567
1571
  return Object.entries(o).reduce(
@@ -1569,7 +1573,7 @@ function k(e, o) {
1569
1573
  e
1570
1574
  );
1571
1575
  }
1572
- function Q(e, o) {
1576
+ function V(e, o) {
1573
1577
  const t = e.map((n) => `'${n}'`);
1574
1578
  if (o != null && t.length >= 2) {
1575
1579
  const n = t.pop();
@@ -1585,18 +1589,18 @@ function w({
1585
1589
  repeatDelay: i = 0.5,
1586
1590
  className: a,
1587
1591
  startOnView: l = !1,
1588
- once: c = !1,
1589
- inViewMargin: p,
1590
- spread: u = 2,
1592
+ once: d = !1,
1593
+ inViewMargin: c,
1594
+ spread: p = 2,
1591
1595
  color: g,
1592
1596
  shimmerColor: h,
1593
1597
  direction: x = "fromBottom"
1594
1598
  }) {
1595
- const { colors: T } = S(), y = g ?? T.shimmerBase, s = h ?? T.shimmerHighlight, d = A(null), f = Ke(d, { once: c, margin: p }), b = z(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
1599
+ const { colors: S } = b(), y = g ?? S.shimmerBase, s = h ?? S.shimmerHighlight, u = D(null), f = Ve(u, { once: d, margin: c }), T = z(() => e.length * p, [e, p]), M = !l || f, A = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
1596
1600
  return /* @__PURE__ */ r(
1597
1601
  v.span,
1598
1602
  {
1599
- ref: d,
1603
+ ref: u,
1600
1604
  className: a,
1601
1605
  style: {
1602
1606
  position: "relative",
@@ -1607,14 +1611,14 @@ function w({
1607
1611
  color: "transparent",
1608
1612
  WebkitTextFillColor: "transparent",
1609
1613
  backgroundRepeat: "no-repeat, padding-box",
1610
- "--spread": `${b}px`,
1614
+ "--spread": `${T}px`,
1611
1615
  "--base-color": y,
1612
1616
  "--shimmer-color": s,
1613
1617
  "--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
1614
1618
  backgroundImage: "var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))"
1615
1619
  },
1616
1620
  initial: {
1617
- backgroundPosition: D,
1621
+ backgroundPosition: A,
1618
1622
  opacity: 0
1619
1623
  },
1620
1624
  animate: M ? {
@@ -1638,11 +1642,11 @@ function w({
1638
1642
  }
1639
1643
  );
1640
1644
  }
1641
- const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
1642
- const { colors: a } = S(), [l, c] = C(!1), u = (e.memories ?? []).map((b) => b.memoryTitle), g = u.length > 0, h = g && u.length > X, x = h && !l ? u.slice(0, X) : u, T = u.length - X, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, d = g ? `${n.searchingIn}${Q(
1645
+ const Z = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
1646
+ const { colors: a } = b(), [l, d] = C(!1), p = (e.memories ?? []).map((T) => T.memoryTitle), g = p.length > 0, h = g && p.length > Z, x = h && !l ? p.slice(0, Z) : p, S = p.length - Z, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, u = g ? `${n.searchingIn}${V(
1643
1647
  x,
1644
1648
  y ? n.and : void 0
1645
- )}` : "", f = g ? `${s}${d}` : `${n.searchingPrefix}${e.queryDescription}`;
1649
+ )}` : "", f = g ? `${s}${u}` : `${n.searchingPrefix}${e.queryDescription}`;
1646
1650
  return /* @__PURE__ */ m(
1647
1651
  "div",
1648
1652
  {
@@ -1663,7 +1667,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1663
1667
  e.queryDescription,
1664
1668
  "'"
1665
1669
  ] }),
1666
- d
1670
+ u
1667
1671
  ] }) : `${n.searchingPrefix}${e.queryDescription}` }),
1668
1672
  h && !l && /* @__PURE__ */ m(R, { children: [
1669
1673
  " ",
@@ -1671,7 +1675,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1671
1675
  "button",
1672
1676
  {
1673
1677
  type: "button",
1674
- onClick: () => c(!0),
1678
+ onClick: () => d(!0),
1675
1679
  style: {
1676
1680
  background: "none",
1677
1681
  border: "none",
@@ -1684,7 +1688,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1684
1688
  fontFamily: "inherit"
1685
1689
  },
1686
1690
  children: k(n.moreMemories, {
1687
- n: T
1691
+ n: S
1688
1692
  })
1689
1693
  }
1690
1694
  )
@@ -1695,7 +1699,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1695
1699
  "button",
1696
1700
  {
1697
1701
  type: "button",
1698
- onClick: () => c(!1),
1702
+ onClick: () => d(!1),
1699
1703
  style: {
1700
1704
  background: "none",
1701
1705
  border: "none",
@@ -1734,7 +1738,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1734
1738
  size: o = 24,
1735
1739
  borderWidth: t = 7
1736
1740
  }) => {
1737
- const { colors: n } = S(), i = e ?? n.checkmarkColor, a = o * 0.5;
1741
+ const { colors: n } = b(), i = e ?? n.checkmarkColor, a = o * 0.5;
1738
1742
  return /* @__PURE__ */ r(
1739
1743
  "span",
1740
1744
  {
@@ -1749,16 +1753,16 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1749
1753
  }
1750
1754
  );
1751
1755
  };
1752
- function dr(e, o) {
1756
+ function pr(e, o) {
1753
1757
  const t = Math.min(e.length, o.length);
1754
1758
  for (let n = t; n >= 0; n--)
1755
1759
  if (e.slice(-n) === o.slice(0, n)) return n;
1756
1760
  return 0;
1757
1761
  }
1758
- const pr = `
1762
+ const ur = `
1759
1763
 
1760
1764
  `;
1761
- function re(e) {
1765
+ function te(e) {
1762
1766
  var t, n;
1763
1767
  if (e.length === 0) return "";
1764
1768
  let o = ((t = e[0]) == null ? void 0 : t.content) ?? "";
@@ -1769,12 +1773,12 @@ function re(e) {
1769
1773
  o = a;
1770
1774
  continue;
1771
1775
  }
1772
- const l = dr(o, a);
1773
- l === 0 ? o += pr + a : o += a.slice(l);
1776
+ const l = pr(o, a);
1777
+ l === 0 ? o += ur + a : o += a.slice(l);
1774
1778
  }
1775
1779
  return o;
1776
1780
  }
1777
- function ne(e, o) {
1781
+ function ie(e, o) {
1778
1782
  if (e.length === 0) return "";
1779
1783
  if (e.length === 1)
1780
1784
  return k(o.memorySearchPagesSingle, {
@@ -1791,30 +1795,30 @@ function ne(e, o) {
1791
1795
  n: t
1792
1796
  });
1793
1797
  }
1794
- function oe(e) {
1798
+ function ae(e) {
1795
1799
  const o = /* @__PURE__ */ new Set();
1796
1800
  for (const t of e)
1797
1801
  for (const n of t.pageNumbers) o.add(n);
1798
1802
  return [...o].sort((t, n) => t - n);
1799
1803
  }
1800
- function te(e) {
1804
+ function le(e) {
1801
1805
  const o = e.memoryTypeName.trim();
1802
1806
  if (o !== "") return o;
1803
1807
  if (e.memoryTypeId !== "") return e.memoryTypeId;
1804
1808
  }
1805
- function we(e) {
1809
+ function Ee(e) {
1806
1810
  return e.chunks.filter((o) => o.relation === "MATCH").length;
1807
1811
  }
1808
- function ur(e, o) {
1812
+ function mr(e, o) {
1809
1813
  let t = 0, n = 0;
1810
1814
  for (const l of e)
1811
- t += we(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
1815
+ t += Ee(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
1812
1816
  const i = t === 1 ? o.chunkFound : k(o.chunksFound, { n: t }), a = k(o.scoreLabel, {
1813
1817
  n: n.toFixed(2)
1814
1818
  });
1815
1819
  return `${i} - ${a}`;
1816
1820
  }
1817
- function mr(e) {
1821
+ function gr(e) {
1818
1822
  const o = [], t = /* @__PURE__ */ new Map();
1819
1823
  return e.forEach((n, i) => {
1820
1824
  let a = t.get(n.memoryId);
@@ -1830,12 +1834,12 @@ function mr(e) {
1830
1834
  a.items.push({ item: n, flatIndex: i });
1831
1835
  }), o.map((n) => t.get(n));
1832
1836
  }
1833
- function gr({
1837
+ function hr({
1834
1838
  items: e,
1835
1839
  onSearchResultClick: o,
1836
1840
  t
1837
1841
  }) {
1838
- const { colors: n } = S(), [i, a] = C(null), l = !!o;
1842
+ const { colors: n } = b(), [i, a] = C(null), l = !!o;
1839
1843
  return /* @__PURE__ */ r(
1840
1844
  "div",
1841
1845
  {
@@ -1847,24 +1851,24 @@ function gr({
1847
1851
  paddingTop: 8,
1848
1852
  borderTop: `1px solid ${n.borderDivider}`
1849
1853
  },
1850
- children: e.map((c, p) => {
1851
- const u = oe(
1852
- c.chunks
1854
+ children: e.map((d, c) => {
1855
+ const p = ae(
1856
+ d.chunks
1853
1857
  ), g = [
1854
- te(c),
1858
+ le(d),
1855
1859
  k(t.scoreLabel, {
1856
- n: c.matchingChunkScore.toFixed(2)
1860
+ n: d.matchingChunkScore.toFixed(2)
1857
1861
  }),
1858
- u.length > 0 ? ne(u, t) : t.pagesNotAvailable
1862
+ p.length > 0 ? ie(p, t) : t.pagesNotAvailable
1859
1863
  ].filter(
1860
1864
  (y) => y != null && y !== ""
1861
1865
  ), h = {
1862
- memoryId: c.memoryId,
1863
- memoryTitle: c.memoryTitle,
1864
- memoryTypeId: c.memoryTypeId,
1865
- memoryTypeName: c.memoryTypeName,
1866
- pageNumbers: u
1867
- }, x = `${c.memoryId}-${p}`, T = i === x;
1866
+ memoryId: d.memoryId,
1867
+ memoryTitle: d.memoryTitle,
1868
+ memoryTypeId: d.memoryTypeId,
1869
+ memoryTypeName: d.memoryTypeName,
1870
+ pageNumbers: p
1871
+ }, x = `${d.memoryId}-${c}`, S = i === x;
1868
1872
  return /* @__PURE__ */ m(
1869
1873
  "div",
1870
1874
  {
@@ -1873,9 +1877,9 @@ function gr({
1873
1877
  flexDirection: "row",
1874
1878
  alignItems: "flex-start",
1875
1879
  gap: "12px",
1876
- paddingTop: p > 0 ? 12 : 0,
1877
- paddingBottom: p < e.length - 1 ? 12 : 0,
1878
- borderBottom: p < e.length - 1 ? `1px solid ${n.border}` : void 0,
1880
+ paddingTop: c > 0 ? 12 : 0,
1881
+ paddingBottom: c < e.length - 1 ? 12 : 0,
1882
+ borderBottom: c < e.length - 1 ? `1px solid ${n.border}` : void 0,
1879
1883
  minWidth: 0
1880
1884
  },
1881
1885
  children: [
@@ -1900,7 +1904,7 @@ function gr({
1900
1904
  whiteSpace: "pre-wrap",
1901
1905
  wordBreak: "break-word"
1902
1906
  },
1903
- children: re(c.chunks)
1907
+ children: te(d.chunks)
1904
1908
  }
1905
1909
  ),
1906
1910
  /* @__PURE__ */ r(
@@ -1922,8 +1926,8 @@ function gr({
1922
1926
  "button",
1923
1927
  {
1924
1928
  type: "button",
1925
- "aria-busy": T,
1926
- disabled: T,
1929
+ "aria-busy": S,
1930
+ disabled: S,
1927
1931
  onClick: async () => {
1928
1932
  a(x);
1929
1933
  try {
@@ -1944,14 +1948,14 @@ function gr({
1944
1948
  background: n.bgChip,
1945
1949
  border: `1px solid ${n.bgChipBorder}`,
1946
1950
  borderRadius: 6,
1947
- cursor: T ? "wait" : "pointer",
1951
+ cursor: S ? "wait" : "pointer",
1948
1952
  fontFamily: "inherit",
1949
1953
  display: "inline-flex",
1950
1954
  alignItems: "center",
1951
1955
  gap: 8
1952
1956
  },
1953
1957
  children: [
1954
- T && /* @__PURE__ */ r(
1958
+ S && /* @__PURE__ */ r(
1955
1959
  "span",
1956
1960
  {
1957
1961
  className: "explore-memory-loader explore-memory-loader--callback",
@@ -1970,14 +1974,14 @@ function gr({
1970
1974
  }
1971
1975
  );
1972
1976
  }
1973
- function hr({
1977
+ function yr({
1974
1978
  group: e,
1975
1979
  t: o,
1976
1980
  expanded: t,
1977
1981
  onToggle: n,
1978
1982
  onSearchResultClick: i
1979
1983
  }) {
1980
- const { colors: a } = S(), l = e.items.map((p) => p.item), c = l.some((p) => p.chunks.length > 0);
1984
+ const { colors: a } = b(), l = e.items.map((c) => c.item), d = l.some((c) => c.chunks.length > 0);
1981
1985
  return /* @__PURE__ */ m(
1982
1986
  v.div,
1983
1987
  {
@@ -2052,10 +2056,10 @@ function hr({
2052
2056
  color: a.textSecondary,
2053
2057
  whiteSpace: "nowrap"
2054
2058
  },
2055
- children: ur(l, o)
2059
+ children: mr(l, o)
2056
2060
  }
2057
2061
  ),
2058
- c && /* @__PURE__ */ r(
2062
+ d && /* @__PURE__ */ r(
2059
2063
  "button",
2060
2064
  {
2061
2065
  type: "button",
@@ -2076,8 +2080,8 @@ function hr({
2076
2080
  ]
2077
2081
  }
2078
2082
  ),
2079
- t && c && /* @__PURE__ */ r(
2080
- gr,
2083
+ t && d && /* @__PURE__ */ r(
2084
+ hr,
2081
2085
  {
2082
2086
  items: l,
2083
2087
  onSearchResultClick: i,
@@ -2091,26 +2095,26 @@ function hr({
2091
2095
  }
2092
2096
  );
2093
2097
  }
2094
- function yr(e, o) {
2098
+ function fr(e, o) {
2095
2099
  return e === 1 ? o.chunkFound : k(o.chunksFound, { n: e });
2096
2100
  }
2097
- const ie = ({
2101
+ const se = ({
2098
2102
  data: e,
2099
2103
  onSearchResultClick: o,
2100
2104
  t,
2101
2105
  compactTop: n = !1
2102
2106
  }) => {
2103
- const { colors: i } = S(), a = e.items, l = a.reduce(
2104
- (s, d) => s + we(d),
2107
+ const { colors: i } = b(), a = e.items, l = a.reduce(
2108
+ (s, u) => s + Ee(u),
2105
2109
  0
2106
- ), c = new Set(a.map((s) => s.memoryId)).size, [p, u] = C({}), g = L((s) => {
2107
- u((d) => ({
2108
- ...d,
2109
- [s]: !d[s]
2110
+ ), d = new Set(a.map((s) => s.memoryId)).size, [c, p] = C({}), g = L((s) => {
2111
+ p((u) => ({
2112
+ ...u,
2113
+ [s]: !u[s]
2110
2114
  }));
2111
- }, []), h = z(() => mr(a), [a]), x = c === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
2112
- n: c
2113
- }), T = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
2115
+ }, []), h = z(() => gr(a), [a]), x = d === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
2116
+ n: d
2117
+ }), S = `${fr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
2114
2118
  return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
2115
2119
  "div",
2116
2120
  {
@@ -2123,11 +2127,11 @@ const ie = ({
2123
2127
  }
2124
2128
  ) }) : /* @__PURE__ */ m("div", { style: y, children: [
2125
2129
  h.map((s) => /* @__PURE__ */ r(
2126
- hr,
2130
+ yr,
2127
2131
  {
2128
2132
  group: s,
2129
2133
  t,
2130
- expanded: p[s.memoryId] === !0,
2134
+ expanded: c[s.memoryId] === !0,
2131
2135
  onToggle: () => g(s.memoryId),
2132
2136
  onSearchResultClick: o
2133
2137
  },
@@ -2142,12 +2146,12 @@ const ie = ({
2142
2146
  marginTop: "4px",
2143
2147
  fontStyle: "italic"
2144
2148
  },
2145
- children: T
2149
+ children: S
2146
2150
  }
2147
2151
  )
2148
2152
  ] });
2149
2153
  };
2150
- function fr(e) {
2154
+ function xr(e) {
2151
2155
  return {
2152
2156
  taskType: "MemoryChat",
2153
2157
  eventType: "Search",
@@ -2155,14 +2159,14 @@ function fr(e) {
2155
2159
  ...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
2156
2160
  };
2157
2161
  }
2158
- const xr = ({
2162
+ const kr = ({
2159
2163
  data: e,
2160
2164
  isLatest: o = !1,
2161
2165
  durationSeconds: t,
2162
2166
  t: n,
2163
2167
  onSearchResultClick: i
2164
2168
  }) => {
2165
- const a = fr(e);
2169
+ const a = xr(e);
2166
2170
  return e.items === void 0 ? /* @__PURE__ */ r(
2167
2171
  q,
2168
2172
  {
@@ -2183,7 +2187,7 @@ const xr = ({
2183
2187
  }
2184
2188
  ),
2185
2189
  /* @__PURE__ */ r(
2186
- ie,
2190
+ se,
2187
2191
  {
2188
2192
  data: {
2189
2193
  taskType: "MemoryChat",
@@ -2196,8 +2200,8 @@ const xr = ({
2196
2200
  }
2197
2201
  )
2198
2202
  ] });
2199
- }, Y = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
2200
- const { colors: i } = S(), [a, l] = C(!1), c = e.titles, p = c.length > 0, u = p && c.length > Y, g = u && !a ? c.slice(0, Y) : c, h = c.length - Y, x = !u || a, T = p ? `${n.findingMemoriesIn}${Q(
2203
+ }, ee = 5, Sr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
2204
+ const { colors: i } = b(), [a, l] = C(!1), d = e.titles, c = d.length > 0, p = c && d.length > ee, g = p && !a ? d.slice(0, ee) : d, h = d.length - ee, x = !p || a, S = c ? `${n.findingMemoriesIn}${V(
2201
2205
  g,
2202
2206
  x ? n.and : void 0
2203
2207
  )}` : n.findingMemories;
@@ -2211,9 +2215,9 @@ const xr = ({
2211
2215
  initial: { opacity: 0, y: -10 },
2212
2216
  animate: { opacity: 1, y: 0 },
2213
2217
  transition: { duration: 0.3, delay: 0 },
2214
- children: o && !t && !u ? /* @__PURE__ */ r(w, { text: T, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
2215
- /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: T }),
2216
- u && !a && /* @__PURE__ */ m(R, { children: [
2218
+ children: o && !t && !p ? /* @__PURE__ */ r(w, { text: S, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
2219
+ /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: S }),
2220
+ p && !a && /* @__PURE__ */ m(R, { children: [
2217
2221
  " ",
2218
2222
  /* @__PURE__ */ r(
2219
2223
  "button",
@@ -2237,7 +2241,7 @@ const xr = ({
2237
2241
  }
2238
2242
  )
2239
2243
  ] }),
2240
- u && a && /* @__PURE__ */ m(R, { children: [
2244
+ p && a && /* @__PURE__ */ m(R, { children: [
2241
2245
  " ",
2242
2246
  /* @__PURE__ */ r(
2243
2247
  "button",
@@ -2275,9 +2279,9 @@ const xr = ({
2275
2279
  }
2276
2280
  )
2277
2281
  ] });
2278
- }, J = 5, Sr = ({ data: e, t: o }) => {
2279
- const { colors: t } = S(), [n, i] = C(!1), l = e.memories.map((y) => y.memoryTitle), c = l.length > 0, p = c && l.length > J, u = p && !n ? l.slice(0, J) : l, g = l.length - J, h = !p || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, T = c ? `${x}${Q(
2280
- u,
2282
+ }, re = 5, br = ({ data: e, t: o }) => {
2283
+ const { colors: t } = b(), [n, i] = C(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, c = d && l.length > re, p = c && !n ? l.slice(0, re) : l, g = l.length - re, h = !c || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, S = d ? `${x}${V(
2284
+ p,
2281
2285
  h ? o.and : void 0
2282
2286
  )}` : o.memoriesFound;
2283
2287
  return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
@@ -2288,8 +2292,8 @@ const xr = ({
2288
2292
  animate: { opacity: 1, y: 0 },
2289
2293
  transition: { duration: 0.3, delay: 0 },
2290
2294
  children: /* @__PURE__ */ m(R, { children: [
2291
- /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: T }),
2292
- p && !n && /* @__PURE__ */ m(R, { children: [
2295
+ /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: S }),
2296
+ c && !n && /* @__PURE__ */ m(R, { children: [
2293
2297
  " ",
2294
2298
  /* @__PURE__ */ r(
2295
2299
  "button",
@@ -2313,7 +2317,7 @@ const xr = ({
2313
2317
  }
2314
2318
  )
2315
2319
  ] }),
2316
- p && n && /* @__PURE__ */ m(R, { children: [
2320
+ c && n && /* @__PURE__ */ m(R, { children: [
2317
2321
  " ",
2318
2322
  /* @__PURE__ */ r(
2319
2323
  "button",
@@ -2338,8 +2342,8 @@ const xr = ({
2338
2342
  ] })
2339
2343
  }
2340
2344
  ) });
2341
- }, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
2342
- const { colors: n } = S(), i = t.addingSources;
2345
+ }, ue = ({ isLatest: e = !1, durationSeconds: o, t }) => {
2346
+ const { colors: n } = b(), i = t.addingSources;
2343
2347
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2344
2348
  /* @__PURE__ */ r(
2345
2349
  v.div,
@@ -2370,7 +2374,7 @@ const xr = ({
2370
2374
  )
2371
2375
  ] });
2372
2376
  };
2373
- function br(e, o) {
2377
+ function Tr(e, o) {
2374
2378
  if (e.length === 0) return "";
2375
2379
  if (e.length === 1)
2376
2380
  return k(o.pageSingle, { n: e[0] });
@@ -2382,8 +2386,8 @@ function br(e, o) {
2382
2386
  const t = e[e.length - 1], n = e.slice(0, -1).join(", ");
2383
2387
  return k(o.pageMultiple, { list: n, n: t });
2384
2388
  }
2385
- const Me = ({ data: e, onSourceClick: o, t }) => {
2386
- const { colors: n } = S(), [i, a] = C(null);
2389
+ const Re = ({ data: e, onSourceClick: o, t }) => {
2390
+ const { colors: n } = b(), [i, a] = C(null);
2387
2391
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2388
2392
  /* @__PURE__ */ r(
2389
2393
  v.div,
@@ -2402,11 +2406,11 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2402
2406
  children: t.sources
2403
2407
  }
2404
2408
  ),
2405
- /* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((l, c) => /* @__PURE__ */ r(
2406
- Tr,
2409
+ /* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((l, d) => /* @__PURE__ */ r(
2410
+ vr,
2407
2411
  {
2408
2412
  source: l,
2409
- index: c,
2413
+ index: d,
2410
2414
  loadingMemoryId: i,
2411
2415
  setLoadingMemoryId: a,
2412
2416
  onSourceClick: o,
@@ -2415,7 +2419,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2415
2419
  l.memoryId
2416
2420
  )) })
2417
2421
  ] });
2418
- }, Tr = ({
2422
+ }, vr = ({
2419
2423
  source: e,
2420
2424
  index: o,
2421
2425
  loadingMemoryId: t,
@@ -2423,7 +2427,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2423
2427
  onSourceClick: i,
2424
2428
  t: a
2425
2429
  }) => {
2426
- const { colors: l } = S(), [c, p] = C(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
2430
+ const { colors: l } = b(), [d, c] = C(!1), p = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = Tr(h, a);
2427
2431
  return /* @__PURE__ */ m(
2428
2432
  v.div,
2429
2433
  {
@@ -2431,7 +2435,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2431
2435
  initial: { opacity: 0, scale: 0.9 },
2432
2436
  animate: { opacity: 1, scale: 1 },
2433
2437
  transition: { duration: 0.25, delay: o * 0.05 },
2434
- onClick: u && !g ? async () => {
2438
+ onClick: p && !g ? async () => {
2435
2439
  n(e.memoryId);
2436
2440
  try {
2437
2441
  await i({
@@ -2445,8 +2449,8 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2445
2449
  n(null);
2446
2450
  }
2447
2451
  } : void 0,
2448
- onMouseEnter: u && !g ? () => p(!0) : void 0,
2449
- onMouseLeave: u && !g ? () => p(!1) : void 0,
2452
+ onMouseEnter: p && !g ? () => c(!0) : void 0,
2453
+ onMouseLeave: p && !g ? () => c(!1) : void 0,
2450
2454
  style: {
2451
2455
  display: "inline-flex",
2452
2456
  flexDirection: "column",
@@ -2454,8 +2458,8 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2454
2458
  padding: "8px 12px",
2455
2459
  borderRadius: "6px",
2456
2460
  border: `1px solid ${l.borderStrong}`,
2457
- backgroundColor: c ? l.sourcesBadgeBg : l.transparent,
2458
- cursor: u && !g ? "pointer" : g ? "wait" : "default",
2461
+ backgroundColor: d ? l.sourcesBadgeBg : l.transparent,
2462
+ cursor: p && !g ? "pointer" : g ? "wait" : "default",
2459
2463
  transition: "background-color 0.15s ease",
2460
2464
  userSelect: "none",
2461
2465
  pointerEvents: g ? "none" : void 0
@@ -2493,10 +2497,10 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2493
2497
  size: o = 32,
2494
2498
  lineWidth: t = 2
2495
2499
  }) => {
2496
- const { colors: n } = S(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, c = (o - a) / 2, p = {
2500
+ const { colors: n } = b(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, d = (o - a) / 2, c = {
2497
2501
  position: "absolute",
2498
2502
  left: l,
2499
- top: c,
2503
+ top: d,
2500
2504
  width: t,
2501
2505
  height: a,
2502
2506
  backgroundColor: i
@@ -2515,7 +2519,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2515
2519
  "span",
2516
2520
  {
2517
2521
  style: {
2518
- ...p,
2522
+ ...c,
2519
2523
  transform: "rotate(45deg)"
2520
2524
  }
2521
2525
  }
@@ -2524,7 +2528,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2524
2528
  "span",
2525
2529
  {
2526
2530
  style: {
2527
- ...p,
2531
+ ...c,
2528
2532
  transform: "rotate(-45deg)"
2529
2533
  }
2530
2534
  }
@@ -2533,26 +2537,26 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2533
2537
  }
2534
2538
  );
2535
2539
  };
2536
- function vr({
2540
+ function Cr({
2537
2541
  memory: e,
2538
2542
  completed: o
2539
2543
  }) {
2540
2544
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
2541
2545
  }
2542
- const de = 80;
2543
- function Cr({
2546
+ const me = 80;
2547
+ function wr({
2544
2548
  memory: e,
2545
2549
  completed: o,
2546
2550
  t
2547
2551
  }) {
2548
- const { colors: n } = S(), [i, a] = C(!1), l = e.result ?? e.error, c = l != null && l.length > de, p = l != null ? i || !c ? l : `${l.slice(0, de)}...` : void 0, u = c, g = e.error != null;
2552
+ const { colors: n } = b(), [i, a] = C(!1), l = e.result ?? e.error, d = l != null && l.length > me, c = l != null ? i || !d ? l : `${l.slice(0, me)}...` : void 0, p = d, g = e.error != null;
2549
2553
  return /* @__PURE__ */ m(
2550
2554
  v.div,
2551
2555
  {
2552
2556
  initial: { opacity: 0 },
2553
2557
  animate: { opacity: 1 },
2554
2558
  transition: { duration: 0.25 },
2555
- onClick: u ? () => a((h) => !h) : void 0,
2559
+ onClick: p ? () => a((h) => !h) : void 0,
2556
2560
  style: {
2557
2561
  paddingTop: "12px",
2558
2562
  paddingBottom: "12px",
@@ -2562,7 +2566,7 @@ function Cr({
2562
2566
  alignItems: "center",
2563
2567
  gap: "10px",
2564
2568
  minWidth: 0,
2565
- cursor: u ? "pointer" : "default"
2569
+ cursor: p ? "pointer" : "default"
2566
2570
  },
2567
2571
  children: [
2568
2572
  /* @__PURE__ */ r(
@@ -2575,7 +2579,7 @@ function Cr({
2575
2579
  flexShrink: 0,
2576
2580
  width: 32
2577
2581
  },
2578
- children: /* @__PURE__ */ r(vr, { memory: e, completed: o })
2582
+ children: /* @__PURE__ */ r(Cr, { memory: e, completed: o })
2579
2583
  }
2580
2584
  ),
2581
2585
  /* @__PURE__ */ m(
@@ -2595,7 +2599,7 @@ function Cr({
2595
2599
  children: e.memoryTitle
2596
2600
  }
2597
2601
  ),
2598
- p != null && /* @__PURE__ */ r(
2602
+ c != null && /* @__PURE__ */ r(
2599
2603
  "span",
2600
2604
  {
2601
2605
  style: {
@@ -2604,10 +2608,10 @@ function Cr({
2604
2608
  lineHeight: 1.4,
2605
2609
  whiteSpace: i ? "pre-wrap" : void 0
2606
2610
  },
2607
- children: p
2611
+ children: c
2608
2612
  }
2609
2613
  ),
2610
- u && /* @__PURE__ */ r(
2614
+ p && /* @__PURE__ */ r(
2611
2615
  "span",
2612
2616
  {
2613
2617
  style: {
@@ -2625,27 +2629,27 @@ function Cr({
2625
2629
  }
2626
2630
  );
2627
2631
  }
2628
- const wr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
2629
- Cr,
2632
+ const Mr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
2633
+ wr,
2630
2634
  {
2631
2635
  memory: n,
2632
2636
  completed: o,
2633
2637
  t
2634
2638
  },
2635
2639
  n.memoryId
2636
- )) }), pe = 80;
2637
- function Mr(e) {
2640
+ )) }), ge = 80;
2641
+ function Er(e) {
2638
2642
  try {
2639
2643
  return new URL(e).hostname;
2640
2644
  } catch {
2641
2645
  return e;
2642
2646
  }
2643
2647
  }
2644
- function Er({
2648
+ function Rr({
2645
2649
  item: e,
2646
2650
  t: o
2647
2651
  }) {
2648
- const { colors: t } = S(), [n, i] = C(!1), a = e.description ?? "", l = a.length > pe, c = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, pe)}...`;
2652
+ const { colors: t } = b(), [n, i] = C(!1), a = e.description ?? "", l = a.length > ge, d = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, ge)}...`;
2649
2653
  return /* @__PURE__ */ m(
2650
2654
  "div",
2651
2655
  {
@@ -2669,11 +2673,11 @@ function Er({
2669
2673
  textDecoration: "none",
2670
2674
  wordBreak: "break-word"
2671
2675
  },
2672
- onMouseEnter: (p) => {
2673
- p.currentTarget.style.color = t.link;
2676
+ onMouseEnter: (c) => {
2677
+ c.currentTarget.style.color = t.link;
2674
2678
  },
2675
- onMouseLeave: (p) => {
2676
- p.currentTarget.style.color = t.textPrimary;
2679
+ onMouseLeave: (c) => {
2680
+ c.currentTarget.style.color = t.textPrimary;
2677
2681
  },
2678
2682
  children: e.title
2679
2683
  }
@@ -2689,15 +2693,15 @@ function Er({
2689
2693
  children: [
2690
2694
  e.rank,
2691
2695
  ". ",
2692
- Mr(e.link)
2696
+ Er(e.link)
2693
2697
  ]
2694
2698
  }
2695
2699
  ),
2696
- c != null && /* @__PURE__ */ m(R, { children: [
2700
+ d != null && /* @__PURE__ */ m(R, { children: [
2697
2701
  /* @__PURE__ */ r(
2698
2702
  "span",
2699
2703
  {
2700
- onClick: l ? () => i((p) => !p) : void 0,
2704
+ onClick: l ? () => i((c) => !c) : void 0,
2701
2705
  style: {
2702
2706
  fontSize: 13,
2703
2707
  color: t.textSecondary,
@@ -2706,7 +2710,7 @@ function Er({
2706
2710
  wordBreak: "break-word",
2707
2711
  cursor: l ? "pointer" : "default"
2708
2712
  },
2709
- children: c
2713
+ children: d
2710
2714
  }
2711
2715
  ),
2712
2716
  l && /* @__PURE__ */ r(
@@ -2725,7 +2729,7 @@ function Er({
2725
2729
  }
2726
2730
  );
2727
2731
  }
2728
- function Ee(e, o) {
2732
+ function Ie(e, o) {
2729
2733
  const t = e.input.countryCode, n = e.input.query;
2730
2734
  return t != null && t !== "" ? k(o.googleSearchingForWithCountry, {
2731
2735
  query: n,
@@ -2734,13 +2738,13 @@ function Ee(e, o) {
2734
2738
  query: n
2735
2739
  });
2736
2740
  }
2737
- function Rr({
2741
+ function Ir({
2738
2742
  data: e,
2739
2743
  isLatest: o,
2740
2744
  durationSeconds: t,
2741
2745
  t: n
2742
2746
  }) {
2743
- const { colors: i } = S(), a = Ee(e, n);
2747
+ const { colors: i } = b(), a = Ie(e, n);
2744
2748
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2745
2749
  /* @__PURE__ */ r(
2746
2750
  v.div,
@@ -2766,13 +2770,13 @@ function Rr({
2766
2770
  )
2767
2771
  ] });
2768
2772
  }
2769
- function Ir({
2773
+ function Fr({
2770
2774
  data: e,
2771
2775
  t: o
2772
2776
  }) {
2773
- const { colors: t } = S(), [n, i] = C(!1), a = z(() => [...e.results ?? []].sort((g, h) => g.rank - h.rank), [e.results]), l = a.length, c = l === 1 ? o.googleResultFound : k(o.googleResultsFound, { n: l }), p = Ee(e, o);
2777
+ const { colors: t } = b(), [n, i] = C(!1), a = z(() => [...e.results ?? []].sort((g, h) => g.rank - h.rank), [e.results]), l = a.length, d = l === 1 ? o.googleResultFound : k(o.googleResultsFound, { n: l }), c = Ie(e, o);
2774
2778
  return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2775
- /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
2779
+ /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: c }),
2776
2780
  /* @__PURE__ */ r(
2777
2781
  "div",
2778
2782
  {
@@ -2785,7 +2789,7 @@ function Ir({
2785
2789
  }
2786
2790
  )
2787
2791
  ] }) : /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2788
- /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
2792
+ /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: c }),
2789
2793
  /* @__PURE__ */ m(
2790
2794
  v.div,
2791
2795
  {
@@ -2810,14 +2814,14 @@ function Ir({
2810
2814
  color: t.textSecondary,
2811
2815
  whiteSpace: "nowrap"
2812
2816
  },
2813
- children: c
2817
+ children: d
2814
2818
  }
2815
2819
  ),
2816
2820
  /* @__PURE__ */ r(
2817
2821
  "button",
2818
2822
  {
2819
2823
  type: "button",
2820
- onClick: () => i((u) => !u),
2824
+ onClick: () => i((p) => !p),
2821
2825
  style: {
2822
2826
  border: "none",
2823
2827
  background: "none",
@@ -2845,7 +2849,7 @@ function Ir({
2845
2849
  paddingTop: 8,
2846
2850
  borderTop: `1px solid ${t.borderDivider}`
2847
2851
  },
2848
- children: a.map((u, g) => /* @__PURE__ */ r(
2852
+ children: a.map((p, g) => /* @__PURE__ */ r(
2849
2853
  "div",
2850
2854
  {
2851
2855
  style: {
@@ -2854,29 +2858,29 @@ function Ir({
2854
2858
  borderBottom: g < a.length - 1 ? `1px solid ${t.border}` : void 0,
2855
2859
  minWidth: 0
2856
2860
  },
2857
- children: /* @__PURE__ */ r(Er, { item: u, t: o })
2861
+ children: /* @__PURE__ */ r(Rr, { item: p, t: o })
2858
2862
  },
2859
- `${u.link}-${u.rank}-${g}`
2863
+ `${p.link}-${p.rank}-${g}`
2860
2864
  ))
2861
2865
  }
2862
2866
  )
2863
2867
  ] });
2864
2868
  }
2865
- const Fr = ({
2869
+ const zr = ({
2866
2870
  data: e,
2867
2871
  isLatest: o = !1,
2868
2872
  durationSeconds: t,
2869
2873
  t: n
2870
2874
  }) => e.results === void 0 ? /* @__PURE__ */ r(
2871
- Rr,
2875
+ Ir,
2872
2876
  {
2873
2877
  data: e,
2874
2878
  isLatest: o,
2875
2879
  durationSeconds: t,
2876
2880
  t: n
2877
2881
  }
2878
- ) : /* @__PURE__ */ r(Ir, { data: e, t: n });
2879
- function Re(e, o) {
2882
+ ) : /* @__PURE__ */ r(Fr, { data: e, t: n });
2883
+ function Fe(e, o) {
2880
2884
  if (e.error != null)
2881
2885
  return null;
2882
2886
  switch (e.status) {
@@ -2892,16 +2896,16 @@ function Re(e, o) {
2892
2896
  return null;
2893
2897
  }
2894
2898
  }
2895
- function zr(e) {
2899
+ function Br(e) {
2896
2900
  var o;
2897
2901
  return e.error != null ? !0 : e.status != null ? !1 : (((o = e.summary) == null ? void 0 : o.length) ?? 0) > 0;
2898
2902
  }
2899
- const ue = 80, ae = 12, le = 1.4, Pr = Math.ceil(
2900
- ae * le
2901
- ), Br = Math.ceil(
2902
- 5 * ae * le
2903
+ const he = 80, ce = 12, de = 1.4, Pr = Math.ceil(
2904
+ ce * de
2905
+ ), Lr = Math.ceil(
2906
+ 5 * ce * de
2903
2907
  );
2904
- function Ie(e, o = 48) {
2908
+ function ze(e, o = 48) {
2905
2909
  try {
2906
2910
  const t = new URL(e), n = t.pathname.length > o ? `${t.pathname.slice(0, o)}…` : t.pathname, i = n === "/" ? "" : n;
2907
2911
  return `${t.hostname}${i}${t.search ? "…" : ""}`;
@@ -2909,20 +2913,20 @@ function Ie(e, o = 48) {
2909
2913
  return e.length > 64 ? `${e.slice(0, 64)}…` : e;
2910
2914
  }
2911
2915
  }
2912
- function Lr({ item: e }) {
2916
+ function Dr({ item: e }) {
2913
2917
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
2914
2918
  }
2915
2919
  function Ar({ item: e }) {
2916
2920
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
2917
2921
  }
2918
- function Dr({
2922
+ function Wr({
2919
2923
  item: e,
2920
2924
  t: o,
2921
2925
  isLatest: t = !1
2922
2926
  }) {
2923
- const { colors: n } = S(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, c = A(null), p = e.summary != null && e.summary !== "", u = Re(e, o), g = l || p || !a && u != null, h = e.error == null && (e.summary == null || e.summary === "");
2924
- return H(() => {
2925
- const x = c.current;
2927
+ const { colors: n } = b(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, d = D(null), c = e.summary != null && e.summary !== "", p = Fe(e, o), g = l || c || !a && p != null, h = e.error == null && (e.summary == null || e.summary === "");
2928
+ return N(() => {
2929
+ const x = d.current;
2926
2930
  x != null && a && (x.scrollTop = x.scrollHeight);
2927
2931
  }, [i, a]), /* @__PURE__ */ m(
2928
2932
  v.div,
@@ -2982,10 +2986,10 @@ function Dr({
2982
2986
  onMouseLeave: (x) => {
2983
2987
  x.currentTarget.style.textDecoration = "none";
2984
2988
  },
2985
- children: Ie(e.url)
2989
+ children: ze(e.url)
2986
2990
  }
2987
2991
  ),
2988
- !a && u != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(w, { text: u, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: u }) }),
2992
+ !a && p != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(w, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: p }) }),
2989
2993
  a && /* @__PURE__ */ r(
2990
2994
  "div",
2991
2995
  {
@@ -2998,15 +3002,15 @@ function Dr({
2998
3002
  children: /* @__PURE__ */ r(
2999
3003
  "div",
3000
3004
  {
3001
- ref: c,
3005
+ ref: d,
3002
3006
  style: {
3003
3007
  minHeight: Pr,
3004
- maxHeight: Br,
3008
+ maxHeight: Lr,
3005
3009
  height: "auto",
3006
3010
  overflowY: "auto",
3007
3011
  overflowX: "hidden",
3008
- fontSize: ae,
3009
- lineHeight: le,
3012
+ fontSize: ce,
3013
+ lineHeight: de,
3010
3014
  whiteSpace: "pre-wrap",
3011
3015
  wordBreak: "break-word",
3012
3016
  color: l ? n.textError : n.textTertiary
@@ -3023,11 +3027,11 @@ function Dr({
3023
3027
  }
3024
3028
  );
3025
3029
  }
3026
- function Wr({
3030
+ function Hr({
3027
3031
  item: e,
3028
3032
  t: o
3029
3033
  }) {
3030
- const { colors: t } = S(), [n, i] = C(!1), a = e.error ?? e.summary ?? "", l = e.error != null, c = a.length > ue, p = a.length === 0 ? void 0 : n || !c ? a : `${a.slice(0, ue)}...`, u = Re(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
3034
+ const { colors: t } = b(), [n, i] = C(!1), a = e.error ?? e.summary ?? "", l = e.error != null, d = a.length > he, c = a.length === 0 ? void 0 : n || !d ? a : `${a.slice(0, he)}...`, p = Fe(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
3031
3035
  return /* @__PURE__ */ m(
3032
3036
  v.div,
3033
3037
  {
@@ -3053,7 +3057,7 @@ function Wr({
3053
3057
  width: 32,
3054
3058
  ...g ? {} : { paddingTop: 2 }
3055
3059
  },
3056
- children: /* @__PURE__ */ r(Lr, { item: e })
3060
+ children: /* @__PURE__ */ r(Dr, { item: e })
3057
3061
  }
3058
3062
  ),
3059
3063
  /* @__PURE__ */ m(
@@ -3086,10 +3090,10 @@ function Wr({
3086
3090
  onMouseLeave: (h) => {
3087
3091
  h.currentTarget.style.textDecoration = "none";
3088
3092
  },
3089
- children: Ie(e.url)
3093
+ children: ze(e.url)
3090
3094
  }
3091
3095
  ),
3092
- p == null && u != null && /* @__PURE__ */ r(
3096
+ c == null && p != null && /* @__PURE__ */ r(
3093
3097
  "span",
3094
3098
  {
3095
3099
  style: {
@@ -3097,26 +3101,26 @@ function Wr({
3097
3101
  color: t.textTertiary,
3098
3102
  lineHeight: 1.4
3099
3103
  },
3100
- children: u
3104
+ children: p
3101
3105
  }
3102
3106
  ),
3103
- p != null && /* @__PURE__ */ m(R, { children: [
3107
+ c != null && /* @__PURE__ */ m(R, { children: [
3104
3108
  /* @__PURE__ */ r(
3105
3109
  "span",
3106
3110
  {
3107
- onClick: c ? () => i((h) => !h) : void 0,
3111
+ onClick: d ? () => i((h) => !h) : void 0,
3108
3112
  style: {
3109
3113
  fontSize: 12,
3110
3114
  color: l ? t.textError : t.textSecondary,
3111
3115
  lineHeight: 1.4,
3112
3116
  whiteSpace: n ? "pre-wrap" : void 0,
3113
3117
  wordBreak: "break-word",
3114
- cursor: c ? "pointer" : "default"
3118
+ cursor: d ? "pointer" : "default"
3115
3119
  },
3116
- children: p
3120
+ children: c
3117
3121
  }
3118
3122
  ),
3119
- c && /* @__PURE__ */ r(
3123
+ d && /* @__PURE__ */ r(
3120
3124
  "span",
3121
3125
  {
3122
3126
  style: {
@@ -3135,7 +3139,7 @@ function Wr({
3135
3139
  }
3136
3140
  );
3137
3141
  }
3138
- function me(e, o, t) {
3142
+ function ye(e, o, t) {
3139
3143
  return /* @__PURE__ */ r(
3140
3144
  "div",
3141
3145
  {
@@ -3169,7 +3173,7 @@ function $r({
3169
3173
  durationSeconds: t,
3170
3174
  t: n
3171
3175
  }) {
3172
- const { colors: i } = S(), a = e.input.urls, l = e.input.query, c = a.length, p = c === 1 ? k(n.scrapingPage, { query: l }) : k(n.scrapingPages, { n: c, query: l });
3176
+ const { colors: i } = b(), a = e.input.urls, l = e.input.query, d = a.length, c = d === 1 ? k(n.scrapingPage, { query: l }) : k(n.scrapingPages, { n: d, query: l });
3173
3177
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3174
3178
  /* @__PURE__ */ r(
3175
3179
  v.div,
@@ -3178,7 +3182,7 @@ function $r({
3178
3182
  initial: { opacity: 0, y: -10 },
3179
3183
  animate: { opacity: 1, y: 0 },
3180
3184
  transition: { duration: 0.3, delay: 0 },
3181
- children: o && !t ? /* @__PURE__ */ r(w, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: p })
3185
+ children: o && !t ? /* @__PURE__ */ r(w, { text: c, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: c })
3182
3186
  }
3183
3187
  ),
3184
3188
  t !== void 0 && /* @__PURE__ */ r(
@@ -3200,13 +3204,13 @@ function Nr({
3200
3204
  isLatest: o = !1,
3201
3205
  t
3202
3206
  }) {
3203
- const { colors: n } = S(), [i, a] = C(!1), l = e.results ?? [], { successCount: c, errorCount: p } = z(() => {
3204
- let s = 0, d = 0;
3207
+ const { colors: n } = b(), [i, a] = C(!1), l = e.results ?? [], { successCount: d, errorCount: c } = z(() => {
3208
+ let s = 0, u = 0;
3205
3209
  for (const f of l)
3206
- f.error != null ? d += 1 : s += 1;
3207
- return { successCount: s, errorCount: d };
3208
- }, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => zr(s)), x = o && !h ? u === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: u, query: g }) : u === 1 ? t.scrapedPage : k(t.scrapedPages, { n: u }), T = k(t.scrapeOkCount, { n: c }), y = p > 0 ? `${x} - ${T}, ${k(t.scrapeFailedCount, { n: p })}` : `${x} - ${T}`;
3209
- return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
3210
+ f.error != null ? u += 1 : s += 1;
3211
+ return { successCount: s, errorCount: u };
3212
+ }, [l]), p = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => Br(s)), x = o && !h ? p === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: p, query: g }) : p === 1 ? t.scrapedPage : k(t.scrapedPages, { n: p }), S = k(t.scrapeOkCount, { n: d }), y = c > 0 ? `${x} - ${S}, ${k(t.scrapeFailedCount, { n: c })}` : `${x} - ${S}`;
3213
+ return p === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
3210
3214
  "div",
3211
3215
  {
3212
3216
  style: {
@@ -3243,8 +3247,8 @@ function Nr({
3243
3247
  )
3244
3248
  }
3245
3249
  ),
3246
- me(l, n, (s) => /* @__PURE__ */ r(
3247
- Dr,
3250
+ ye(l, n, (s) => /* @__PURE__ */ r(
3251
+ Wr,
3248
3252
  {
3249
3253
  item: s,
3250
3254
  t,
@@ -3298,10 +3302,10 @@ function Nr({
3298
3302
  ]
3299
3303
  }
3300
3304
  ),
3301
- i && me(l, n, (s) => /* @__PURE__ */ r(Wr, { item: s, t }))
3305
+ i && ye(l, n, (s) => /* @__PURE__ */ r(Hr, { item: s, t }))
3302
3306
  ] });
3303
3307
  }
3304
- const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.results === void 0 ? /* @__PURE__ */ r(
3308
+ const Gr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.results === void 0 ? /* @__PURE__ */ r(
3305
3309
  $r,
3306
3310
  {
3307
3311
  data: e,
@@ -3316,8 +3320,8 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3316
3320
  isLatest: o,
3317
3321
  t: n
3318
3322
  }
3319
- ), ge = (e) => {
3320
- const { colors: o } = S(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
3323
+ ), Or = (e) => {
3324
+ const { colors: o } = b(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
3321
3325
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3322
3326
  /* @__PURE__ */ r(
3323
3327
  v.div,
@@ -3347,7 +3351,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3347
3351
  }
3348
3352
  )
3349
3353
  ] });
3350
- }, Gr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3354
+ }, _r = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3351
3355
  const i = `${n.generateReportSetup} '${e.userRequest}'`;
3352
3356
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3353
3357
  /* @__PURE__ */ r(
@@ -3387,7 +3391,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3387
3391
  }
3388
3392
  )
3389
3393
  ] });
3390
- }, Or = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3394
+ }, qr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3391
3395
  const i = e.fileCount === 1 ? n.generateReportExportingOne : k(n.generateReportExporting, {
3392
3396
  n: e.fileCount
3393
3397
  });
@@ -3429,7 +3433,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3429
3433
  }
3430
3434
  )
3431
3435
  ] });
3432
- }, _r = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3436
+ }, Ur = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3433
3437
  const i = k(n.generateReportRunCode, {
3434
3438
  title: e.title
3435
3439
  });
@@ -3471,7 +3475,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3471
3475
  }
3472
3476
  )
3473
3477
  ] });
3474
- }, qr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3478
+ }, jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3475
3479
  const i = k(n.generateReportRunCommand, {
3476
3480
  title: e.title
3477
3481
  });
@@ -3513,7 +3517,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3513
3517
  }
3514
3518
  )
3515
3519
  ] });
3516
- }, Ur = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3520
+ }, Qr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3517
3521
  const i = k(n.generateReportAssembling, {
3518
3522
  title: e.reportTitle
3519
3523
  });
@@ -3555,7 +3559,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3555
3559
  }
3556
3560
  )
3557
3561
  ] });
3558
- }, jr = ({ data: e, t: o }) => {
3562
+ }, Kr = ({ data: e, t: o }) => {
3559
3563
  const t = k(o.generateReportCompleted, {
3560
3564
  title: e.reportTitle
3561
3565
  });
@@ -3574,23 +3578,24 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3574
3578
  children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
3575
3579
  }
3576
3580
  ) });
3577
- }, K = 12, V = 1.45, Qr = Math.ceil(
3578
- K * V
3579
- ), he = Math.ceil(
3580
- 5 * K * V
3581
- ), Fe = ({
3581
+ }, X = 12, Y = 1.45, Vr = Math.ceil(
3582
+ X * Y
3583
+ ), fe = Math.ceil(
3584
+ 5 * X * Y
3585
+ ), J = ({
3582
3586
  text: e,
3583
3587
  streaming: o = !1,
3584
3588
  collapsed: t = !1,
3585
- label: n
3589
+ label: n,
3590
+ monospace: i = !1
3586
3591
  }) => {
3587
- const { colors: i } = S(), a = A(null);
3588
- return Qe(() => {
3589
- const l = a.current;
3590
- if (l == null || !o || e.length === 0)
3592
+ const { colors: a } = b(), l = D(null);
3593
+ return Ke(() => {
3594
+ const d = l.current;
3595
+ if (d == null || !o || e.length === 0)
3591
3596
  return;
3592
3597
  const c = () => {
3593
- l.scrollTop = l.scrollHeight;
3598
+ d.scrollTop = d.scrollHeight;
3594
3599
  };
3595
3600
  c(), requestAnimationFrame(c);
3596
3601
  }, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
@@ -3600,7 +3605,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3600
3605
  style: {
3601
3606
  display: "block",
3602
3607
  fontSize: 11,
3603
- color: i.textMuted,
3608
+ color: a.textMuted,
3604
3609
  marginBottom: 4,
3605
3610
  fontWeight: 500
3606
3611
  },
@@ -3611,7 +3616,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3611
3616
  "div",
3612
3617
  {
3613
3618
  style: {
3614
- backgroundColor: i.reasoningBg,
3619
+ backgroundColor: a.reasoningBg,
3615
3620
  borderRadius: 6,
3616
3621
  padding: "8px 10px",
3617
3622
  boxSizing: "border-box"
@@ -3619,24 +3624,27 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3619
3624
  children: /* @__PURE__ */ r(
3620
3625
  "div",
3621
3626
  {
3622
- ref: a,
3627
+ ref: l,
3623
3628
  className: "memory-search-generating-reasoning-viewport",
3624
3629
  style: {
3625
- minHeight: Qr,
3630
+ minHeight: Vr,
3626
3631
  ...o ? {
3627
- maxHeight: he,
3632
+ maxHeight: fe,
3628
3633
  overflowY: "auto"
3629
3634
  } : t ? {
3630
- maxHeight: he,
3635
+ maxHeight: fe,
3631
3636
  overflowY: "hidden"
3632
3637
  } : {},
3633
3638
  height: "auto",
3634
3639
  overflowX: "hidden",
3635
- fontSize: K,
3636
- lineHeight: V,
3640
+ fontSize: X,
3641
+ lineHeight: Y,
3637
3642
  whiteSpace: "pre-wrap",
3638
3643
  wordBreak: "break-word",
3639
- color: i.textTertiary
3644
+ color: a.textTertiary,
3645
+ ...i ? {
3646
+ fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"
3647
+ } : {}
3640
3648
  },
3641
3649
  children: e
3642
3650
  }
@@ -3645,17 +3653,17 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3645
3653
  )
3646
3654
  ] });
3647
3655
  };
3648
- function Z(e) {
3656
+ function ne(e) {
3649
3657
  return e.text != null && e.text.length > 0;
3650
3658
  }
3651
3659
  function j(e) {
3652
3660
  return e.technicalReasoning != null && e.technicalReasoning.length > 0;
3653
3661
  }
3654
- function Kr(e, o) {
3662
+ function Xr(e, o) {
3655
3663
  const t = new Date(e).getTime(), n = new Date(o).getTime();
3656
3664
  return Math.max(0, Math.round((n - t) / 1e3));
3657
3665
  }
3658
- const Vr = ({
3666
+ const Yr = ({
3659
3667
  data: e,
3660
3668
  createdAt: o,
3661
3669
  timestamp: t,
@@ -3663,7 +3671,7 @@ const Vr = ({
3663
3671
  t: i,
3664
3672
  onMemoryClick: a
3665
3673
  }) => {
3666
- const { colors: l } = S(), c = e.reasoningCompleted === !0 || n || Z(e), p = !c, u = !j(e) && !Z(e), [g, h] = C(!1), x = j(e) && e.reasoningCompleted !== !0, T = u && p, y = j(e) && !x, s = c ? Kr(o, t) : void 0;
3674
+ const { colors: l } = b(), d = e.reasoningCompleted === !0 || n || ne(e), c = !d, p = !j(e) && !ne(e), [g, h] = C(!1), x = j(e) && e.reasoningCompleted !== !0, S = p && c, y = j(e) && !x, s = d ? Xr(o, t) : void 0;
3667
3675
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3668
3676
  /* @__PURE__ */ m(
3669
3677
  v.div,
@@ -3689,16 +3697,16 @@ const Vr = ({
3689
3697
  flexShrink: 0,
3690
3698
  width: 32
3691
3699
  },
3692
- children: c ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
3700
+ children: d ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
3693
3701
  }
3694
3702
  ),
3695
- T ? /* @__PURE__ */ r(w, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
3703
+ S ? /* @__PURE__ */ r(w, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
3696
3704
  ]
3697
3705
  }
3698
3706
  ),
3699
3707
  j(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
3700
3708
  /* @__PURE__ */ r(
3701
- Fe,
3709
+ J,
3702
3710
  {
3703
3711
  text: e.technicalReasoning,
3704
3712
  streaming: x,
@@ -3710,7 +3718,7 @@ const Vr = ({
3710
3718
  "button",
3711
3719
  {
3712
3720
  type: "button",
3713
- onClick: () => h((d) => !d),
3721
+ onClick: () => h((u) => !u),
3714
3722
  style: {
3715
3723
  alignSelf: "flex-start",
3716
3724
  border: "none",
@@ -3726,8 +3734,8 @@ const Vr = ({
3726
3734
  }
3727
3735
  )
3728
3736
  ] }),
3729
- Z(e) && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(
3730
- N,
3737
+ ne(e) && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(
3738
+ $,
3731
3739
  {
3732
3740
  text: e.text,
3733
3741
  onMemoryClick: a
@@ -3747,14 +3755,14 @@ const Vr = ({
3747
3755
  )
3748
3756
  ] });
3749
3757
  };
3750
- function Xr(e) {
3758
+ function Jr(e) {
3751
3759
  const [o] = C(
3752
3760
  () => e[Math.floor(Math.random() * e.length)] ?? e[0] ?? ""
3753
3761
  );
3754
3762
  return o;
3755
3763
  }
3756
- const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3757
- const { colors: n } = S(), i = e && o === void 0, a = Xr(t.exploreClassifyingPhrases) || t.exploreClassifying;
3764
+ const Zr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3765
+ const { colors: n } = b(), i = e && o === void 0, a = Jr(t.exploreClassifyingPhrases) || t.exploreClassifying;
3758
3766
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3759
3767
  /* @__PURE__ */ r(
3760
3768
  v.div,
@@ -3784,8 +3792,8 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3784
3792
  }
3785
3793
  )
3786
3794
  ] });
3787
- }, Jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3788
- const { colors: i } = S(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
3795
+ }, en = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3796
+ const { colors: i } = b(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
3789
3797
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3790
3798
  /* @__PURE__ */ r(
3791
3799
  v.div,
@@ -3815,8 +3823,8 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3815
3823
  }
3816
3824
  )
3817
3825
  ] });
3818
- }, Zr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3819
- const { colors: i } = S(), a = k(n.exploreFindMemoriesQuery, {
3826
+ }, rn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3827
+ const { colors: i } = b(), a = k(n.exploreFindMemoriesQuery, {
3820
3828
  query: e.query
3821
3829
  });
3822
3830
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
@@ -3850,9 +3858,9 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3850
3858
  }
3851
3859
  )
3852
3860
  ] });
3853
- }, ee = 5, en = ({ data: e, t: o }) => {
3854
- const { colors: t } = S(), [n, i] = C(!1), a = e.memories.map((T) => T.memoryTitle), l = a.length > 0, c = l && a.length > ee, p = c && !n ? a.slice(0, ee) : a, u = a.length - ee, g = !c || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${Q(
3855
- p,
3861
+ }, oe = 5, nn = ({ data: e, t: o }) => {
3862
+ const { colors: t } = b(), [n, i] = C(!1), a = e.memories.map((S) => S.memoryTitle), l = a.length > 0, d = l && a.length > oe, c = d && !n ? a.slice(0, oe) : a, p = a.length - oe, g = !d || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${V(
3863
+ c,
3856
3864
  g ? o.and : void 0
3857
3865
  )}` : o.memoriesFound;
3858
3866
  return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ m(
@@ -3864,7 +3872,7 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3864
3872
  transition: { duration: 0.3, delay: 0 },
3865
3873
  children: [
3866
3874
  /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
3867
- c && !n && /* @__PURE__ */ m(R, { children: [
3875
+ d && !n && /* @__PURE__ */ m(R, { children: [
3868
3876
  " ",
3869
3877
  /* @__PURE__ */ r(
3870
3878
  "button",
@@ -3883,12 +3891,12 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3883
3891
  fontFamily: "inherit"
3884
3892
  },
3885
3893
  children: k(o.moreMemories, {
3886
- n: u
3894
+ n: p
3887
3895
  })
3888
3896
  }
3889
3897
  )
3890
3898
  ] }),
3891
- c && n && /* @__PURE__ */ m(R, { children: [
3899
+ d && n && /* @__PURE__ */ m(R, { children: [
3892
3900
  " ",
3893
3901
  /* @__PURE__ */ r(
3894
3902
  "button",
@@ -3914,7 +3922,7 @@ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3914
3922
  }
3915
3923
  ) });
3916
3924
  };
3917
- function rn(e) {
3925
+ function on(e) {
3918
3926
  return {
3919
3927
  taskType: "MemoryChat",
3920
3928
  eventType: "Search",
@@ -3922,8 +3930,8 @@ function rn(e) {
3922
3930
  ...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
3923
3931
  };
3924
3932
  }
3925
- const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
3926
- const a = rn(e);
3933
+ const tn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
3934
+ const a = on(e);
3927
3935
  return e.items === void 0 ? /* @__PURE__ */ r(
3928
3936
  q,
3929
3937
  {
@@ -3944,7 +3952,7 @@ const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
3944
3952
  }
3945
3953
  ),
3946
3954
  /* @__PURE__ */ r(
3947
- ie,
3955
+ se,
3948
3956
  {
3949
3957
  data: {
3950
3958
  taskType: "MemoryChat",
@@ -3958,26 +3966,26 @@ const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
3958
3966
  )
3959
3967
  ] });
3960
3968
  };
3961
- function on({
3969
+ function an({
3962
3970
  memory: e,
3963
3971
  completed: o
3964
3972
  }) {
3965
3973
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
3966
3974
  }
3967
- const ye = 80;
3968
- function tn({
3975
+ const xe = 80;
3976
+ function ln({
3969
3977
  memory: e,
3970
3978
  completed: o,
3971
3979
  t
3972
3980
  }) {
3973
- const { colors: n } = S(), [i, a] = C(!1), l = e.summary ?? e.error, c = l != null && l.length > ye, p = l != null ? i || !c ? l : `${l.slice(0, ye)}...` : void 0, u = c, g = e.error != null;
3981
+ const { colors: n } = b(), [i, a] = C(!1), l = e.summary ?? e.error, d = l != null && l.length > xe, c = l != null ? i || !d ? l : `${l.slice(0, xe)}...` : void 0, p = d, g = e.error != null;
3974
3982
  return /* @__PURE__ */ m(
3975
3983
  v.div,
3976
3984
  {
3977
3985
  initial: { opacity: 0 },
3978
3986
  animate: { opacity: 1 },
3979
3987
  transition: { duration: 0.25 },
3980
- onClick: u ? () => a((h) => !h) : void 0,
3988
+ onClick: p ? () => a((h) => !h) : void 0,
3981
3989
  style: {
3982
3990
  paddingTop: "12px",
3983
3991
  paddingBottom: "12px",
@@ -3987,7 +3995,7 @@ function tn({
3987
3995
  alignItems: "center",
3988
3996
  gap: "10px",
3989
3997
  minWidth: 0,
3990
- cursor: u ? "pointer" : "default"
3998
+ cursor: p ? "pointer" : "default"
3991
3999
  },
3992
4000
  children: [
3993
4001
  /* @__PURE__ */ r(
@@ -4000,7 +4008,7 @@ function tn({
4000
4008
  flexShrink: 0,
4001
4009
  width: 32
4002
4010
  },
4003
- children: /* @__PURE__ */ r(on, { memory: e, completed: o })
4011
+ children: /* @__PURE__ */ r(an, { memory: e, completed: o })
4004
4012
  }
4005
4013
  ),
4006
4014
  /* @__PURE__ */ m(
@@ -4024,7 +4032,7 @@ function tn({
4024
4032
  children: e.memoryTitle
4025
4033
  }
4026
4034
  ),
4027
- p != null && /* @__PURE__ */ r(
4035
+ c != null && /* @__PURE__ */ r(
4028
4036
  "span",
4029
4037
  {
4030
4038
  style: {
@@ -4033,10 +4041,10 @@ function tn({
4033
4041
  lineHeight: 1.4,
4034
4042
  whiteSpace: i ? "pre-wrap" : void 0
4035
4043
  },
4036
- children: p
4044
+ children: c
4037
4045
  }
4038
4046
  ),
4039
- u && /* @__PURE__ */ r(
4047
+ p && /* @__PURE__ */ r(
4040
4048
  "span",
4041
4049
  {
4042
4050
  style: {
@@ -4054,8 +4062,8 @@ function tn({
4054
4062
  }
4055
4063
  );
4056
4064
  }
4057
- const an = ({ data: e, completed: o, t }) => {
4058
- const { colors: n } = S();
4065
+ const sn = ({ data: e, completed: o, t }) => {
4066
+ const { colors: n } = b();
4059
4067
  return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
4060
4068
  /* @__PURE__ */ r(
4061
4069
  "div",
@@ -4070,7 +4078,7 @@ const an = ({ data: e, completed: o, t }) => {
4070
4078
  }
4071
4079
  ),
4072
4080
  e.memories.map((i) => /* @__PURE__ */ r(
4073
- tn,
4081
+ ln,
4074
4082
  {
4075
4083
  memory: i,
4076
4084
  completed: o,
@@ -4079,13 +4087,18 @@ const an = ({ data: e, completed: o, t }) => {
4079
4087
  i.memoryId
4080
4088
  ))
4081
4089
  ] });
4082
- }, ln = ({
4090
+ };
4091
+ function Q(e) {
4092
+ return e.code != null && e.code.length > 0;
4093
+ }
4094
+ const cn = ({
4083
4095
  data: e,
4084
4096
  isLatest: o = !1,
4085
4097
  durationSeconds: t,
4086
- t: n
4098
+ completed: n = !1,
4099
+ t: i
4087
4100
  }) => {
4088
- const { colors: i } = S(), a = k(n.exploreRunCode, { title: e.title });
4101
+ const { colors: a } = b(), l = k(i.exploreRunCode, { title: e.title }), c = !(e.codeCompleted === !0 || n || t !== void 0), p = Q(e) && e.codeCompleted !== !0 && c && o, g = c && o && !t, [h, x] = C(!1), S = Q(e) && !p;
4089
4102
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
4090
4103
  /* @__PURE__ */ r(
4091
4104
  v.div,
@@ -4094,39 +4107,142 @@ const an = ({ data: e, completed: o, t }) => {
4094
4107
  display: "flex",
4095
4108
  alignItems: "center",
4096
4109
  gap: "10px",
4097
- color: i.textSecondary
4110
+ color: a.textSecondary,
4111
+ marginBottom: Q(e) ? "8px" : 0
4098
4112
  },
4099
4113
  initial: { opacity: 0, y: -10 },
4100
4114
  animate: { opacity: 1, y: 0 },
4101
4115
  transition: { duration: 0.3, delay: 0 },
4102
- children: o && !t ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
4116
+ children: g ? /* @__PURE__ */ r(w, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: l })
4103
4117
  }
4104
4118
  ),
4119
+ Q(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
4120
+ /* @__PURE__ */ r(
4121
+ J,
4122
+ {
4123
+ text: e.code,
4124
+ streaming: p,
4125
+ collapsed: !p && !h,
4126
+ monospace: !0
4127
+ }
4128
+ ),
4129
+ S && /* @__PURE__ */ r(
4130
+ "button",
4131
+ {
4132
+ type: "button",
4133
+ onClick: () => x((y) => !y),
4134
+ style: {
4135
+ alignSelf: "flex-start",
4136
+ border: "none",
4137
+ background: "none",
4138
+ padding: 0,
4139
+ marginTop: 8,
4140
+ cursor: "pointer",
4141
+ fontSize: 12,
4142
+ color: a.textSecondary,
4143
+ textDecoration: "underline"
4144
+ },
4145
+ children: h ? i.exploreHideCode : i.exploreViewCode
4146
+ }
4147
+ )
4148
+ ] }),
4105
4149
  t !== void 0 && /* @__PURE__ */ r(
4106
4150
  "div",
4107
4151
  {
4108
4152
  style: {
4109
4153
  fontSize: "12px",
4110
- color: i.textMuted,
4154
+ color: a.textMuted,
4111
4155
  marginTop: "4px",
4112
4156
  fontStyle: "italic"
4113
4157
  },
4114
- children: k(n.tookSeconds, { n: t })
4158
+ children: k(i.tookSeconds, { n: t })
4159
+ }
4160
+ )
4161
+ ] });
4162
+ };
4163
+ function K(e) {
4164
+ return e.reasoning != null && e.reasoning.length > 0;
4165
+ }
4166
+ const dn = ({
4167
+ data: e,
4168
+ isLatest: o = !1,
4169
+ durationSeconds: t,
4170
+ completed: n = !1,
4171
+ t: i
4172
+ }) => {
4173
+ const { colors: a } = b(), d = !(e.reasoningCompleted === !0 || n || t !== void 0), c = K(e) && e.reasoningCompleted !== !0 && d, p = d && o, [g, h] = C(!1), x = K(e) && !c, S = i.memoryChatThinking;
4174
+ return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
4175
+ /* @__PURE__ */ r(
4176
+ v.div,
4177
+ {
4178
+ style: {
4179
+ display: "flex",
4180
+ alignItems: "center",
4181
+ gap: "10px",
4182
+ color: a.textSecondary,
4183
+ marginBottom: K(e) ? "8px" : 0
4184
+ },
4185
+ initial: { opacity: 0, y: -10 },
4186
+ animate: { opacity: 1, y: 0 },
4187
+ transition: { duration: 0.3, delay: 0 },
4188
+ children: p ? /* @__PURE__ */ r(w, { text: S, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: S })
4189
+ }
4190
+ ),
4191
+ K(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
4192
+ /* @__PURE__ */ r(
4193
+ J,
4194
+ {
4195
+ text: e.reasoning,
4196
+ streaming: c,
4197
+ collapsed: !c && !g,
4198
+ label: i.memorySearchQueryReasoningLabel
4199
+ }
4200
+ ),
4201
+ x && /* @__PURE__ */ r(
4202
+ "button",
4203
+ {
4204
+ type: "button",
4205
+ onClick: () => h((y) => !y),
4206
+ style: {
4207
+ alignSelf: "flex-start",
4208
+ border: "none",
4209
+ background: "none",
4210
+ padding: 0,
4211
+ marginTop: 8,
4212
+ cursor: "pointer",
4213
+ fontSize: 12,
4214
+ color: a.textSecondary,
4215
+ textDecoration: "underline"
4216
+ },
4217
+ children: g ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
4218
+ }
4219
+ )
4220
+ ] }),
4221
+ t !== void 0 && /* @__PURE__ */ r(
4222
+ "div",
4223
+ {
4224
+ style: {
4225
+ fontSize: "12px",
4226
+ color: a.textMuted,
4227
+ marginTop: "4px",
4228
+ fontStyle: "italic"
4229
+ },
4230
+ children: k(i.tookSeconds, { n: t })
4115
4231
  }
4116
4232
  )
4117
4233
  ] });
4118
4234
  };
4119
- function sn({
4235
+ function pn({
4120
4236
  section: e,
4121
4237
  allCompleted: o
4122
4238
  }) {
4123
4239
  return e.completed || o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4124
4240
  }
4125
- function cn({
4241
+ function un({
4126
4242
  section: e,
4127
4243
  allCompleted: o
4128
4244
  }) {
4129
- const { colors: t } = S();
4245
+ const { colors: t } = b();
4130
4246
  return /* @__PURE__ */ m(
4131
4247
  v.div,
4132
4248
  {
@@ -4154,7 +4270,7 @@ function cn({
4154
4270
  flexShrink: 0,
4155
4271
  width: 32
4156
4272
  },
4157
- children: /* @__PURE__ */ r(sn, { section: e, allCompleted: o })
4273
+ children: /* @__PURE__ */ r(pn, { section: e, allCompleted: o })
4158
4274
  }
4159
4275
  ),
4160
4276
  /* @__PURE__ */ r(
@@ -4172,10 +4288,10 @@ function cn({
4172
4288
  }
4173
4289
  );
4174
4290
  }
4175
- const dn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i }) => {
4176
- const { colors: a } = S(), l = k(i.exploreComposeHtmlReport, {
4291
+ const mn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i }) => {
4292
+ const { colors: a } = b(), l = k(i.exploreComposeHtmlReport, {
4177
4293
  title: e.title
4178
- }), c = e.sections ?? [], p = o || c.length > 0 && c.every((g) => g.completed), u = t && !n && !p;
4294
+ }), d = e.sections ?? [], c = o || d.length > 0 && d.every((g) => g.completed), p = t && !n && !c;
4179
4295
  return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
4180
4296
  /* @__PURE__ */ r(
4181
4297
  v.div,
@@ -4185,19 +4301,19 @@ const dn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i
4185
4301
  alignItems: "center",
4186
4302
  gap: "10px",
4187
4303
  color: a.textSecondary,
4188
- marginBottom: c.length > 0 ? "4px" : void 0
4304
+ marginBottom: d.length > 0 ? "4px" : void 0
4189
4305
  },
4190
4306
  initial: { opacity: 0, y: -10 },
4191
4307
  animate: { opacity: 1, y: 0 },
4192
4308
  transition: { duration: 0.3 },
4193
- children: u ? /* @__PURE__ */ r(w, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: l })
4309
+ children: p ? /* @__PURE__ */ r(w, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: l })
4194
4310
  }
4195
4311
  ),
4196
- c.map((g) => /* @__PURE__ */ r(
4197
- cn,
4312
+ d.map((g) => /* @__PURE__ */ r(
4313
+ un,
4198
4314
  {
4199
4315
  section: g,
4200
- allCompleted: p
4316
+ allCompleted: c
4201
4317
  },
4202
4318
  g.title
4203
4319
  )),
@@ -4214,8 +4330,8 @@ const dn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i
4214
4330
  }
4215
4331
  )
4216
4332
  ] });
4217
- }, pn = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
4218
- Me,
4333
+ }, gn = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
4334
+ Re,
4219
4335
  {
4220
4336
  data: {
4221
4337
  taskType: "MemoryChat",
@@ -4226,20 +4342,20 @@ const dn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i
4226
4342
  t
4227
4343
  }
4228
4344
  );
4229
- function un({ item: e }) {
4345
+ function hn({ item: e }) {
4230
4346
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4231
4347
  }
4232
- function mn(e, o) {
4348
+ function yn(e, o) {
4233
4349
  return k(o.searchingInMemoriesOfType, {
4234
4350
  name: e.memoryTypeName
4235
4351
  });
4236
4352
  }
4237
- function gn({
4353
+ function fn({
4238
4354
  item: e,
4239
4355
  t: o,
4240
4356
  showShimmerForPrimary: t
4241
4357
  }) {
4242
- const { colors: n } = S(), i = e.result != null, a = e.error != null, l = mn(e, o);
4358
+ const { colors: n } = b(), i = e.result != null, a = e.error != null, l = yn(e, o);
4243
4359
  return /* @__PURE__ */ m(
4244
4360
  v.div,
4245
4361
  {
@@ -4267,7 +4383,7 @@ function gn({
4267
4383
  flexShrink: 0,
4268
4384
  width: 32
4269
4385
  },
4270
- children: /* @__PURE__ */ r(un, { item: e })
4386
+ children: /* @__PURE__ */ r(hn, { item: e })
4271
4387
  }
4272
4388
  ),
4273
4389
  /* @__PURE__ */ m(
@@ -4306,20 +4422,20 @@ function gn({
4306
4422
  }
4307
4423
  );
4308
4424
  }
4309
- const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4310
- const { colors: i } = S(), a = z(() => {
4425
+ const xn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4426
+ const { colors: i } = b(), a = z(() => {
4311
4427
  let l = -1;
4312
- return e.memoryTypes.forEach((c, p) => {
4313
- c.result == null && c.error == null && (l = p);
4428
+ return e.memoryTypes.forEach((d, c) => {
4429
+ d.result == null && d.error == null && (l = c);
4314
4430
  }), l;
4315
4431
  }, [e.memoryTypes]);
4316
4432
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
4317
- o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
4318
- gn,
4433
+ o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
4434
+ fn,
4319
4435
  {
4320
4436
  item: l,
4321
4437
  t: n,
4322
- showShimmerForPrimary: c === a && o
4438
+ showShimmerForPrimary: d === a && o
4323
4439
  },
4324
4440
  l.memoryTypeId
4325
4441
  )),
@@ -4340,26 +4456,26 @@ const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4340
4456
  function U(e) {
4341
4457
  return e.queries != null && e.queries.length > 0;
4342
4458
  }
4343
- function yn(e) {
4459
+ function kn(e) {
4344
4460
  const o = e.reasoning;
4345
4461
  return (o == null || o === "") && !U(e);
4346
4462
  }
4347
- function fn(e) {
4463
+ function Sn(e) {
4348
4464
  if (U(e)) return 3;
4349
4465
  const o = e.reasoning;
4350
4466
  return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
4351
4467
  }
4352
- function xn({ phase: e }) {
4468
+ function bn({ phase: e }) {
4353
4469
  return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4354
4470
  }
4355
- function kn({
4471
+ function Tn({
4356
4472
  item: e,
4357
4473
  t: o,
4358
4474
  isActiveRow: t
4359
4475
  }) {
4360
- const { colors: n } = S(), i = yn(e), a = fn(e), l = e.reasoning, c = l != null && l.length > 0, [p, u] = C(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
4476
+ const { colors: n } = b(), i = kn(e), a = Sn(e), l = e.reasoning, d = l != null && l.length > 0, [c, p] = C(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
4361
4477
  name: e.memoryTypeName
4362
- }), T = !i && a === 3;
4478
+ }), S = !i && a === 3;
4363
4479
  return /* @__PURE__ */ m(
4364
4480
  v.div,
4365
4481
  {
@@ -4372,7 +4488,7 @@ function kn({
4372
4488
  borderBottom: `1px solid ${n.border}`,
4373
4489
  display: "flex",
4374
4490
  flexDirection: "row",
4375
- alignItems: T ? "flex-start" : "center",
4491
+ alignItems: S ? "flex-start" : "center",
4376
4492
  gap: "10px",
4377
4493
  minWidth: 0
4378
4494
  },
@@ -4386,9 +4502,9 @@ function kn({
4386
4502
  justifyContent: "center",
4387
4503
  flexShrink: 0,
4388
4504
  width: 32,
4389
- ...T ? { paddingTop: 2 } : {}
4505
+ ...S ? { paddingTop: 2 } : {}
4390
4506
  },
4391
- children: /* @__PURE__ */ r(xn, { phase: i ? 1 : a })
4507
+ children: /* @__PURE__ */ r(bn, { phase: i ? 1 : a })
4392
4508
  }
4393
4509
  ),
4394
4510
  /* @__PURE__ */ m(
@@ -4403,8 +4519,8 @@ function kn({
4403
4519
  },
4404
4520
  children: [
4405
4521
  /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: g ? /* @__PURE__ */ r(w, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
4406
- a === 1 && c && !U(e) && /* @__PURE__ */ r(
4407
- Fe,
4522
+ a === 1 && d && !U(e) && /* @__PURE__ */ r(
4523
+ J,
4408
4524
  {
4409
4525
  text: l,
4410
4526
  streaming: !0,
@@ -4458,12 +4574,12 @@ function kn({
4458
4574
  }
4459
4575
  )
4460
4576
  ] }),
4461
- c && /* @__PURE__ */ m(R, { children: [
4577
+ d && /* @__PURE__ */ m(R, { children: [
4462
4578
  /* @__PURE__ */ r(
4463
4579
  "button",
4464
4580
  {
4465
4581
  type: "button",
4466
- onClick: () => u((y) => !y),
4582
+ onClick: () => p((y) => !y),
4467
4583
  style: {
4468
4584
  alignSelf: "flex-start",
4469
4585
  border: "none",
@@ -4474,15 +4590,15 @@ function kn({
4474
4590
  color: n.textSecondary,
4475
4591
  textDecoration: "underline"
4476
4592
  },
4477
- children: p ? o.memorySearchHideReasoning : o.memorySearchViewReasoning
4593
+ children: c ? o.memorySearchHideReasoning : o.memorySearchViewReasoning
4478
4594
  }
4479
4595
  ),
4480
- p && /* @__PURE__ */ r(
4596
+ c && /* @__PURE__ */ r(
4481
4597
  "div",
4482
4598
  {
4483
4599
  style: {
4484
- fontSize: K,
4485
- lineHeight: V,
4600
+ fontSize: X,
4601
+ lineHeight: Y,
4486
4602
  whiteSpace: "pre-wrap",
4487
4603
  wordBreak: "break-word",
4488
4604
  color: n.textTertiary,
@@ -4502,20 +4618,20 @@ function kn({
4502
4618
  }
4503
4619
  );
4504
4620
  }
4505
- const Sn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4506
- const { colors: i } = S(), a = z(() => {
4621
+ const vn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4622
+ const { colors: i } = b(), a = z(() => {
4507
4623
  let l = -1;
4508
- return e.memoryTypes.forEach((c, p) => {
4509
- U(c) || (l = p);
4624
+ return e.memoryTypes.forEach((d, c) => {
4625
+ U(d) || (l = c);
4510
4626
  }), l;
4511
4627
  }, [e.memoryTypes]);
4512
4628
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
4513
- o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
4514
- kn,
4629
+ o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
4630
+ Tn,
4515
4631
  {
4516
4632
  item: l,
4517
4633
  t: n,
4518
- isActiveRow: c === a && o
4634
+ isActiveRow: d === a && o
4519
4635
  },
4520
4636
  l.memoryTypeId
4521
4637
  )),
@@ -4533,14 +4649,14 @@ const Sn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4533
4649
  )
4534
4650
  ] });
4535
4651
  };
4536
- function bn(e) {
4652
+ function Cn(e) {
4537
4653
  return e.some((n) => n.result == null && n.error == null) ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : e.some((n) => n.error != null) ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
4538
4654
  }
4539
- function Tn({
4655
+ function wn({
4540
4656
  item: e,
4541
4657
  t: o
4542
4658
  }) {
4543
- const { colors: t } = S();
4659
+ const { colors: t } = b();
4544
4660
  if (e.error != null)
4545
4661
  return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
4546
4662
  if (e.result == null)
@@ -4554,13 +4670,13 @@ function Tn({
4554
4670
  a
4555
4671
  ] });
4556
4672
  }
4557
- function vn({
4673
+ function Mn({
4558
4674
  items: e,
4559
4675
  queryRow: o,
4560
4676
  onExploreQueryResultClick: t,
4561
4677
  t: n
4562
4678
  }) {
4563
- const { colors: i } = S(), [a, l] = C(null);
4679
+ const { colors: i } = b(), [a, l] = C(null);
4564
4680
  if (e.length === 0)
4565
4681
  return /* @__PURE__ */ r(
4566
4682
  "div",
@@ -4573,7 +4689,7 @@ function vn({
4573
4689
  children: n.memorySearchExploreNoResults
4574
4690
  }
4575
4691
  );
4576
- const c = !!t;
4692
+ const d = !!t;
4577
4693
  return /* @__PURE__ */ r(
4578
4694
  "div",
4579
4695
  {
@@ -4585,25 +4701,25 @@ function vn({
4585
4701
  paddingTop: 8,
4586
4702
  borderTop: `1px solid ${i.borderDivider}`
4587
4703
  },
4588
- children: e.map((p, u) => {
4589
- const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
4590
- p.chunks
4704
+ children: e.map((c, p) => {
4705
+ const g = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, h = ae(
4706
+ c.chunks
4591
4707
  ), x = [
4592
- te(p),
4708
+ le(c),
4593
4709
  k(n.scoreLabel, {
4594
- n: p.matchingChunkScore.toFixed(2)
4710
+ n: c.matchingChunkScore.toFixed(2)
4595
4711
  }),
4596
- h.length > 0 ? ne(h, n) : n.pagesNotAvailable
4712
+ h.length > 0 ? ie(h, n) : n.pagesNotAvailable
4597
4713
  ].filter(
4598
- (d) => d != null && d !== ""
4599
- ), T = {
4600
- memoryId: p.memoryId,
4601
- memoryTitle: p.memoryTitle,
4714
+ (u) => u != null && u !== ""
4715
+ ), S = {
4716
+ memoryId: c.memoryId,
4717
+ memoryTitle: c.memoryTitle,
4602
4718
  pageNumbers: h,
4603
4719
  memoryTypeId: o.memoryTypeId,
4604
4720
  memoryTypeName: o.memoryTypeName,
4605
4721
  query: o.query
4606
- }, y = `${o.query}::${p.memoryId}::${u}`, s = a === y;
4722
+ }, y = `${o.query}::${c.memoryId}::${p}`, s = a === y;
4607
4723
  return /* @__PURE__ */ m(
4608
4724
  "div",
4609
4725
  {
@@ -4612,9 +4728,9 @@ function vn({
4612
4728
  flexDirection: "row",
4613
4729
  alignItems: "flex-start",
4614
4730
  gap: "12px",
4615
- paddingTop: u > 0 ? 12 : 0,
4616
- paddingBottom: u < e.length - 1 ? 12 : 0,
4617
- borderBottom: u < e.length - 1 ? `1px solid ${i.border}` : void 0,
4731
+ paddingTop: p > 0 ? 12 : 0,
4732
+ paddingBottom: p < e.length - 1 ? 12 : 0,
4733
+ borderBottom: p < e.length - 1 ? `1px solid ${i.border}` : void 0,
4618
4734
  minWidth: 0
4619
4735
  },
4620
4736
  children: [
@@ -4650,8 +4766,8 @@ function vn({
4650
4766
  whiteSpace: "pre-wrap",
4651
4767
  wordBreak: "break-word"
4652
4768
  },
4653
- children: re(
4654
- p.chunks
4769
+ children: te(
4770
+ c.chunks
4655
4771
  )
4656
4772
  }
4657
4773
  ),
@@ -4670,7 +4786,7 @@ function vn({
4670
4786
  ]
4671
4787
  }
4672
4788
  ),
4673
- c && /* @__PURE__ */ m(
4789
+ d && /* @__PURE__ */ m(
4674
4790
  "button",
4675
4791
  {
4676
4792
  type: "button",
@@ -4680,7 +4796,7 @@ function vn({
4680
4796
  l(y);
4681
4797
  try {
4682
4798
  await t(
4683
- T
4799
+ S
4684
4800
  );
4685
4801
  } finally {
4686
4802
  l(null);
@@ -4716,13 +4832,13 @@ function vn({
4716
4832
  )
4717
4833
  ]
4718
4834
  },
4719
- `${p.memoryId}-${u}`
4835
+ `${c.memoryId}-${p}`
4720
4836
  );
4721
4837
  })
4722
4838
  }
4723
4839
  );
4724
4840
  }
4725
- function Cn(e) {
4841
+ function En(e) {
4726
4842
  const o = [], t = /* @__PURE__ */ new Map();
4727
4843
  return e.forEach((n, i) => {
4728
4844
  let a = t.get(n.memoryTypeId);
@@ -4733,7 +4849,7 @@ function Cn(e) {
4733
4849
  }, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
4734
4850
  }), o.map((n) => t.get(n));
4735
4851
  }
4736
- function wn({
4852
+ function Rn({
4737
4853
  group: e,
4738
4854
  t: o,
4739
4855
  isLatest: t,
@@ -4741,8 +4857,8 @@ function wn({
4741
4857
  toggleExpanded: i,
4742
4858
  onExploreQueryResultClick: a
4743
4859
  }) {
4744
- const { colors: l } = S(), c = e.items.map((u) => u.item), p = c.some(
4745
- (u) => u.result == null && u.error == null
4860
+ const { colors: l } = b(), d = e.items.map((p) => p.item), c = d.some(
4861
+ (p) => p.result == null && p.error == null
4746
4862
  );
4747
4863
  return /* @__PURE__ */ m(
4748
4864
  v.div,
@@ -4756,7 +4872,7 @@ function wn({
4756
4872
  borderBottom: `1px solid ${l.border}`,
4757
4873
  display: "flex",
4758
4874
  flexDirection: "row",
4759
- alignItems: p ? "center" : "flex-start",
4875
+ alignItems: c ? "center" : "flex-start",
4760
4876
  gap: "10px",
4761
4877
  minWidth: 0
4762
4878
  },
@@ -4770,9 +4886,9 @@ function wn({
4770
4886
  justifyContent: "center",
4771
4887
  flexShrink: 0,
4772
4888
  width: 32,
4773
- ...p ? {} : { paddingTop: 2 }
4889
+ ...c ? {} : { paddingTop: 2 }
4774
4890
  },
4775
- children: bn(c)
4891
+ children: Cn(d)
4776
4892
  }
4777
4893
  ),
4778
4894
  /* @__PURE__ */ m(
@@ -4798,9 +4914,9 @@ function wn({
4798
4914
  })
4799
4915
  }
4800
4916
  ),
4801
- e.items.map(({ item: u, flatIndex: g }) => {
4802
- var d;
4803
- const h = u.result != null, x = u.error != null, T = t && !h && !x, y = n[g] === !0, s = ((d = u.result) == null ? void 0 : d.items) ?? [];
4917
+ e.items.map(({ item: p, flatIndex: g }) => {
4918
+ var u;
4919
+ const h = p.result != null, x = p.error != null, S = t && !h && !x, y = n[g] === !0, s = ((u = p.result) == null ? void 0 : u.items) ?? [];
4804
4920
  return /* @__PURE__ */ m(
4805
4921
  "div",
4806
4922
  {
@@ -4834,14 +4950,14 @@ function wn({
4834
4950
  flex: "1 1 12rem",
4835
4951
  minWidth: 0
4836
4952
  },
4837
- children: T ? /* @__PURE__ */ r(
4953
+ children: S ? /* @__PURE__ */ r(
4838
4954
  w,
4839
4955
  {
4840
- text: u.query,
4956
+ text: p.query,
4841
4957
  duration: 2.5,
4842
4958
  repeat: !0
4843
4959
  }
4844
- ) : u.query
4960
+ ) : p.query
4845
4961
  }
4846
4962
  ),
4847
4963
  /* @__PURE__ */ m(
@@ -4855,7 +4971,7 @@ function wn({
4855
4971
  flexShrink: 0
4856
4972
  },
4857
4973
  children: [
4858
- /* @__PURE__ */ r(Tn, { item: u, t: o }),
4974
+ /* @__PURE__ */ r(wn, { item: p, t: o }),
4859
4975
  h && /* @__PURE__ */ r(
4860
4976
  "button",
4861
4977
  {
@@ -4881,17 +4997,17 @@ function wn({
4881
4997
  }
4882
4998
  ),
4883
4999
  h && y && /* @__PURE__ */ r(
4884
- vn,
5000
+ Mn,
4885
5001
  {
4886
5002
  items: s,
4887
- queryRow: u,
5003
+ queryRow: p,
4888
5004
  onExploreQueryResultClick: a,
4889
5005
  t: o
4890
5006
  }
4891
5007
  )
4892
5008
  ]
4893
5009
  },
4894
- `${e.memoryTypeId}-${g}-${u.query}`
5010
+ `${e.memoryTypeId}-${g}-${p.query}`
4895
5011
  );
4896
5012
  })
4897
5013
  ]
@@ -4901,22 +5017,22 @@ function wn({
4901
5017
  }
4902
5018
  );
4903
5019
  }
4904
- const Mn = ({
5020
+ const In = ({
4905
5021
  data: e,
4906
5022
  isLatest: o = !1,
4907
5023
  durationSeconds: t,
4908
5024
  onExploreQueryResultClick: n,
4909
5025
  t: i
4910
5026
  }) => {
4911
- const { colors: a } = S(), [l, c] = C(
5027
+ const { colors: a } = b(), [l, d] = C(
4912
5028
  {}
4913
- ), p = L((g) => {
4914
- c((h) => ({
5029
+ ), c = L((g) => {
5030
+ d((h) => ({
4915
5031
  ...h,
4916
5032
  [g]: !h[g]
4917
5033
  }));
4918
- }, []), u = z(
4919
- () => Cn(e.queries),
5034
+ }, []), p = z(
5035
+ () => En(e.queries),
4920
5036
  [e.queries]
4921
5037
  );
4922
5038
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
@@ -4927,14 +5043,14 @@ const Mn = ({
4927
5043
  duration: 2.5,
4928
5044
  repeat: !0
4929
5045
  }
4930
- ) : u.map((g) => /* @__PURE__ */ r(
4931
- wn,
5046
+ ) : p.map((g) => /* @__PURE__ */ r(
5047
+ Rn,
4932
5048
  {
4933
5049
  group: g,
4934
5050
  t: i,
4935
5051
  isLatest: o,
4936
5052
  expandedRows: l,
4937
- toggleExpanded: p,
5053
+ toggleExpanded: c,
4938
5054
  onExploreQueryResultClick: n
4939
5055
  },
4940
5056
  g.memoryTypeId
@@ -4952,8 +5068,8 @@ const Mn = ({
4952
5068
  }
4953
5069
  )
4954
5070
  ] });
4955
- }, En = ({ data: e, onSearchResultClick: o, t }) => {
4956
- const { colors: n } = S(), i = e.response.items, a = !!o, [l, c] = C(null);
5071
+ }, Fn = ({ data: e, onSearchResultClick: o, t }) => {
5072
+ const { colors: n } = b(), i = e.response.items, a = !!o, [l, d] = C(null);
4957
5073
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
4958
5074
  /* @__PURE__ */ r(
4959
5075
  v.div,
@@ -4978,30 +5094,30 @@ const Mn = ({
4978
5094
  flexDirection: "column",
4979
5095
  gap: 0
4980
5096
  },
4981
- children: i.map((p, u) => {
4982
- const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
4983
- p.chunks
5097
+ children: i.map((c, p) => {
5098
+ const g = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, h = ae(
5099
+ c.chunks
4984
5100
  ), x = [
4985
- te(p),
5101
+ le(c),
4986
5102
  k(t.scoreLabel, {
4987
- n: p.matchingChunkScore.toFixed(2)
5103
+ n: c.matchingChunkScore.toFixed(2)
4988
5104
  }),
4989
- h.length > 0 ? ne(h, t) : t.pagesNotAvailable
5105
+ h.length > 0 ? ie(h, t) : t.pagesNotAvailable
4990
5106
  ].filter(
4991
- (d) => d != null && d !== ""
4992
- ), T = {
4993
- memoryId: p.memoryId,
4994
- memoryTitle: p.memoryTitle,
4995
- memoryTypeId: p.memoryTypeId,
4996
- memoryTypeName: p.memoryTypeName,
5107
+ (u) => u != null && u !== ""
5108
+ ), S = {
5109
+ memoryId: c.memoryId,
5110
+ memoryTitle: c.memoryTitle,
5111
+ memoryTypeId: c.memoryTypeId,
5112
+ memoryTypeName: c.memoryTypeName,
4997
5113
  pageNumbers: h
4998
- }, y = `${p.memoryId}-${u}`, s = l === y;
5114
+ }, y = `${c.memoryId}-${p}`, s = l === y;
4999
5115
  return /* @__PURE__ */ m(
5000
5116
  v.div,
5001
5117
  {
5002
5118
  initial: { opacity: 0 },
5003
5119
  animate: { opacity: 1 },
5004
- transition: { duration: 0.2, delay: u * 0.04 },
5120
+ transition: { duration: 0.2, delay: p * 0.04 },
5005
5121
  style: {
5006
5122
  display: "flex",
5007
5123
  flexDirection: "row",
@@ -5009,7 +5125,7 @@ const Mn = ({
5009
5125
  gap: "12px",
5010
5126
  paddingTop: "12px",
5011
5127
  paddingBottom: "12px",
5012
- borderBottom: u < i.length - 1 ? `1px solid ${n.border}` : void 0,
5128
+ borderBottom: p < i.length - 1 ? `1px solid ${n.border}` : void 0,
5013
5129
  minWidth: 0
5014
5130
  },
5015
5131
  children: [
@@ -5045,7 +5161,7 @@ const Mn = ({
5045
5161
  whiteSpace: "pre-wrap",
5046
5162
  wordBreak: "break-word"
5047
5163
  },
5048
- children: re(p.chunks)
5164
+ children: te(c.chunks)
5049
5165
  }
5050
5166
  ),
5051
5167
  /* @__PURE__ */ r(
@@ -5070,11 +5186,11 @@ const Mn = ({
5070
5186
  "aria-busy": s,
5071
5187
  disabled: s,
5072
5188
  onClick: async () => {
5073
- c(y);
5189
+ d(y);
5074
5190
  try {
5075
- await o(T);
5191
+ await o(S);
5076
5192
  } finally {
5077
- c(null);
5193
+ d(null);
5078
5194
  }
5079
5195
  },
5080
5196
  style: {
@@ -5107,14 +5223,14 @@ const Mn = ({
5107
5223
  )
5108
5224
  ]
5109
5225
  },
5110
- `${p.memoryId}-${u}`
5226
+ `${c.memoryId}-${p}`
5111
5227
  );
5112
5228
  })
5113
5229
  }
5114
5230
  )
5115
5231
  ] });
5116
5232
  }, O = ({ message: e }) => {
5117
- const { colors: o } = S();
5233
+ const { colors: o } = b();
5118
5234
  return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
5119
5235
  v.div,
5120
5236
  {
@@ -5140,7 +5256,7 @@ const Mn = ({
5140
5256
  }
5141
5257
  ) });
5142
5258
  };
5143
- class Rn extends Ue.Component {
5259
+ class zn extends je.Component {
5144
5260
  constructor(o) {
5145
5261
  super(o), this.state = { hasError: !1 };
5146
5262
  }
@@ -5159,7 +5275,7 @@ class Rn extends Ue.Component {
5159
5275
  return this.state.hasError ? null : this.props.children;
5160
5276
  }
5161
5277
  }
5162
- const In = ({
5278
+ const Bn = ({
5163
5279
  progressViewItems: e,
5164
5280
  loading: o,
5165
5281
  error: t,
@@ -5167,42 +5283,42 @@ const In = ({
5167
5283
  t: i,
5168
5284
  onMemoryClick: a,
5169
5285
  onSourceClick: l,
5170
- onSearchResultClick: c,
5171
- onExploreQueryResultClick: p,
5172
- downloadFile: u
5286
+ onSearchResultClick: d,
5287
+ onExploreQueryResultClick: c,
5288
+ downloadFile: p
5173
5289
  }) => {
5174
- const { theme: g, colors: h } = S(), x = A(null);
5175
- H(() => {
5290
+ const { theme: g, colors: h } = b(), x = D(null);
5291
+ N(() => {
5176
5292
  x.current && (x.current.scrollTop = x.current.scrollHeight);
5177
5293
  }, [e.length]);
5178
- const T = (s) => {
5179
- const d = s.item.data;
5180
- if (d.taskType === "StreamingChatCompletion" && d.eventType === "Text")
5294
+ const S = (s) => {
5295
+ const u = s.item.data;
5296
+ if (u.taskType === "StreamingChatCompletion" && u.eventType === "Text")
5181
5297
  return /* @__PURE__ */ r(
5182
- N,
5298
+ $,
5183
5299
  {
5184
- text: d.text,
5300
+ text: u.text,
5185
5301
  onMemoryClick: a
5186
5302
  }
5187
5303
  );
5188
- if (d.taskType === "StructuredChatCompletion" && d.eventType === "Completed")
5189
- return /* @__PURE__ */ r(lr, { data: d });
5190
- if (d.taskType === "MemoryChat")
5191
- switch (d.eventType) {
5304
+ if (u.taskType === "StructuredChatCompletion" && u.eventType === "Completed")
5305
+ return /* @__PURE__ */ r(sr, { data: u });
5306
+ if (u.taskType === "MemoryChat")
5307
+ switch (u.eventType) {
5192
5308
  case "Text":
5193
5309
  return /* @__PURE__ */ r(
5194
- N,
5310
+ $,
5195
5311
  {
5196
- text: d.text,
5197
- onFileDownload: u,
5312
+ text: u.text,
5313
+ onFileDownload: p,
5198
5314
  onMemoryClick: a
5199
5315
  }
5200
5316
  );
5201
5317
  case "Thinking":
5202
5318
  return /* @__PURE__ */ r(
5203
- ge,
5319
+ Or,
5204
5320
  {
5205
- data: d,
5321
+ data: u,
5206
5322
  isLatest: s.isLatest,
5207
5323
  durationSeconds: s.durationSeconds,
5208
5324
  t: i
@@ -5210,9 +5326,9 @@ const In = ({
5210
5326
  );
5211
5327
  case "GenerateReportSetup":
5212
5328
  return /* @__PURE__ */ r(
5213
- Gr,
5329
+ _r,
5214
5330
  {
5215
- data: d,
5331
+ data: u,
5216
5332
  isLatest: s.isLatest,
5217
5333
  durationSeconds: s.durationSeconds,
5218
5334
  t: i
@@ -5220,9 +5336,9 @@ const In = ({
5220
5336
  );
5221
5337
  case "GenerateReportExporting":
5222
5338
  return /* @__PURE__ */ r(
5223
- Or,
5339
+ qr,
5224
5340
  {
5225
- data: d,
5341
+ data: u,
5226
5342
  isLatest: s.isLatest,
5227
5343
  durationSeconds: s.durationSeconds,
5228
5344
  t: i
@@ -5230,9 +5346,9 @@ const In = ({
5230
5346
  );
5231
5347
  case "GenerateReportRunCode":
5232
5348
  return /* @__PURE__ */ r(
5233
- _r,
5349
+ Ur,
5234
5350
  {
5235
- data: d,
5351
+ data: u,
5236
5352
  isLatest: s.isLatest,
5237
5353
  durationSeconds: s.durationSeconds,
5238
5354
  t: i
@@ -5240,9 +5356,9 @@ const In = ({
5240
5356
  );
5241
5357
  case "GenerateReportRunCommand":
5242
5358
  return /* @__PURE__ */ r(
5243
- qr,
5359
+ jr,
5244
5360
  {
5245
- data: d,
5361
+ data: u,
5246
5362
  isLatest: s.isLatest,
5247
5363
  durationSeconds: s.durationSeconds,
5248
5364
  t: i
@@ -5250,21 +5366,21 @@ const In = ({
5250
5366
  );
5251
5367
  case "GenerateReportAssembling":
5252
5368
  return /* @__PURE__ */ r(
5253
- Ur,
5369
+ Qr,
5254
5370
  {
5255
- data: d,
5371
+ data: u,
5256
5372
  isLatest: s.isLatest,
5257
5373
  durationSeconds: s.durationSeconds,
5258
5374
  t: i
5259
5375
  }
5260
5376
  );
5261
5377
  case "GenerateReportCompleted":
5262
- return /* @__PURE__ */ r(jr, { data: d, t: i });
5378
+ return /* @__PURE__ */ r(Kr, { data: u, t: i });
5263
5379
  case "FindMemories":
5264
5380
  return /* @__PURE__ */ r(
5265
- kr,
5381
+ Sr,
5266
5382
  {
5267
- data: d,
5383
+ data: u,
5268
5384
  isLatest: s.isLatest,
5269
5385
  durationSeconds: s.durationSeconds,
5270
5386
  t: i
@@ -5272,9 +5388,9 @@ const In = ({
5272
5388
  );
5273
5389
  case "FindMemoriesResult":
5274
5390
  return /* @__PURE__ */ r(
5275
- Sr,
5391
+ br,
5276
5392
  {
5277
- data: d,
5393
+ data: u,
5278
5394
  t: i
5279
5395
  }
5280
5396
  );
@@ -5282,7 +5398,7 @@ const In = ({
5282
5398
  return /* @__PURE__ */ r(
5283
5399
  q,
5284
5400
  {
5285
- data: d,
5401
+ data: u,
5286
5402
  isLatest: s.isLatest,
5287
5403
  durationSeconds: s.durationSeconds,
5288
5404
  t: i
@@ -5290,20 +5406,20 @@ const In = ({
5290
5406
  );
5291
5407
  case "SearchMemoryChunks":
5292
5408
  return /* @__PURE__ */ r(
5293
- xr,
5409
+ kr,
5294
5410
  {
5295
- data: d,
5411
+ data: u,
5296
5412
  isLatest: s.isLatest,
5297
5413
  durationSeconds: s.durationSeconds,
5298
5414
  t: i,
5299
- onSearchResultClick: c
5415
+ onSearchResultClick: d
5300
5416
  }
5301
5417
  );
5302
5418
  case "FindSources":
5303
5419
  return /* @__PURE__ */ r(
5304
- ce,
5420
+ ue,
5305
5421
  {
5306
- data: d,
5422
+ data: u,
5307
5423
  isLatest: s.isLatest,
5308
5424
  durationSeconds: s.durationSeconds,
5309
5425
  t: i
@@ -5311,18 +5427,18 @@ const In = ({
5311
5427
  );
5312
5428
  case "SourcesResult":
5313
5429
  return /* @__PURE__ */ r(
5314
- Me,
5430
+ Re,
5315
5431
  {
5316
- data: d,
5432
+ data: u,
5317
5433
  onSourceClick: l,
5318
5434
  t: i
5319
5435
  }
5320
5436
  );
5321
5437
  case "ExploreMemories":
5322
5438
  return /* @__PURE__ */ r(
5323
- wr,
5439
+ Mr,
5324
5440
  {
5325
- data: d,
5441
+ data: u,
5326
5442
  completed: s.completed,
5327
5443
  isLatest: s.isLatest,
5328
5444
  t: i
@@ -5330,18 +5446,18 @@ const In = ({
5330
5446
  );
5331
5447
  case "ChunkResults":
5332
5448
  return /* @__PURE__ */ r(
5333
- ie,
5449
+ se,
5334
5450
  {
5335
- data: d,
5336
- onSearchResultClick: c,
5451
+ data: u,
5452
+ onSearchResultClick: d,
5337
5453
  t: i
5338
5454
  }
5339
5455
  );
5340
5456
  case "GoogleSearch":
5341
5457
  return /* @__PURE__ */ r(
5342
- Fr,
5458
+ zr,
5343
5459
  {
5344
- data: d,
5460
+ data: u,
5345
5461
  isLatest: s.isLatest,
5346
5462
  durationSeconds: s.durationSeconds,
5347
5463
  t: i
@@ -5349,9 +5465,9 @@ const In = ({
5349
5465
  );
5350
5466
  case "ScrapeWebsites":
5351
5467
  return /* @__PURE__ */ r(
5352
- Hr,
5468
+ Gr,
5353
5469
  {
5354
- data: d,
5470
+ data: u,
5355
5471
  isLatest: s.isLatest,
5356
5472
  durationSeconds: s.durationSeconds,
5357
5473
  t: i
@@ -5359,15 +5475,15 @@ const In = ({
5359
5475
  );
5360
5476
  case "Completed":
5361
5477
  return /* @__PURE__ */ r(
5362
- N,
5478
+ $,
5363
5479
  {
5364
- text: d.response.textResponse,
5365
- onFileDownload: u,
5480
+ text: u.response.textResponse,
5481
+ onFileDownload: p,
5366
5482
  onMemoryClick: a
5367
5483
  }
5368
5484
  );
5369
5485
  default: {
5370
- const f = d;
5486
+ const f = u;
5371
5487
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5372
5488
  "[fency] Unknown MemoryChat eventType (no UI):",
5373
5489
  f.eventType,
@@ -5375,13 +5491,13 @@ const In = ({
5375
5491
  ), null);
5376
5492
  }
5377
5493
  }
5378
- if (d.taskType === "MemorySearch")
5379
- switch (d.eventType) {
5494
+ if (u.taskType === "MemorySearch")
5495
+ switch (u.eventType) {
5380
5496
  case "GeneratingQueries":
5381
5497
  return /* @__PURE__ */ r(
5382
- Sn,
5498
+ vn,
5383
5499
  {
5384
- data: d,
5500
+ data: u,
5385
5501
  isLatest: s.isLatest,
5386
5502
  durationSeconds: s.durationSeconds,
5387
5503
  t: i
@@ -5389,20 +5505,20 @@ const In = ({
5389
5505
  );
5390
5506
  case "ExploreQueries":
5391
5507
  return /* @__PURE__ */ r(
5392
- Mn,
5508
+ In,
5393
5509
  {
5394
- data: d,
5510
+ data: u,
5395
5511
  isLatest: s.isLatest,
5396
5512
  durationSeconds: s.durationSeconds,
5397
- onExploreQueryResultClick: p,
5513
+ onExploreQueryResultClick: c,
5398
5514
  t: i
5399
5515
  }
5400
5516
  );
5401
5517
  case "SearchMemoryTypes":
5402
5518
  return /* @__PURE__ */ r(
5403
- hn,
5519
+ xn,
5404
5520
  {
5405
- data: d,
5521
+ data: u,
5406
5522
  isLatest: s.isLatest,
5407
5523
  durationSeconds: s.durationSeconds,
5408
5524
  t: i
@@ -5410,15 +5526,15 @@ const In = ({
5410
5526
  );
5411
5527
  case "Completed":
5412
5528
  return /* @__PURE__ */ r(
5413
- En,
5529
+ Fn,
5414
5530
  {
5415
- data: d,
5416
- onSearchResultClick: c,
5531
+ data: u,
5532
+ onSearchResultClick: d,
5417
5533
  t: i
5418
5534
  }
5419
5535
  );
5420
5536
  default: {
5421
- const f = d;
5537
+ const f = u;
5422
5538
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5423
5539
  "[fency] Unknown MemorySearch eventType (no UI):",
5424
5540
  f.eventType,
@@ -5426,22 +5542,22 @@ const In = ({
5426
5542
  ), null);
5427
5543
  }
5428
5544
  }
5429
- if (d.taskType === "ExploreMemories")
5430
- switch (d.eventType) {
5545
+ if (u.taskType === "ExploreMemories")
5546
+ switch (u.eventType) {
5431
5547
  case "Text":
5432
5548
  return /* @__PURE__ */ r(
5433
- N,
5549
+ $,
5434
5550
  {
5435
- text: d.text,
5436
- onFileDownload: u,
5551
+ text: u.text,
5552
+ onFileDownload: p,
5437
5553
  onMemoryClick: a
5438
5554
  }
5439
5555
  );
5440
5556
  case "Classifying":
5441
5557
  return /* @__PURE__ */ r(
5442
- Yr,
5558
+ Zr,
5443
5559
  {
5444
- data: d,
5560
+ data: u,
5445
5561
  isLatest: s.isLatest,
5446
5562
  durationSeconds: s.durationSeconds,
5447
5563
  t: i
@@ -5449,19 +5565,20 @@ const In = ({
5449
5565
  );
5450
5566
  case "Thinking":
5451
5567
  return /* @__PURE__ */ r(
5452
- ge,
5568
+ dn,
5453
5569
  {
5454
- data: { taskType: "MemoryChat", eventType: "Thinking" },
5570
+ data: u,
5455
5571
  isLatest: s.isLatest,
5456
5572
  durationSeconds: s.durationSeconds,
5573
+ completed: s.completed,
5457
5574
  t: i
5458
5575
  }
5459
5576
  );
5460
5577
  case "Planning":
5461
5578
  return /* @__PURE__ */ r(
5462
- Vr,
5579
+ Yr,
5463
5580
  {
5464
- data: d,
5581
+ data: u,
5465
5582
  createdAt: s.item.createdAt,
5466
5583
  timestamp: s.item.timestamp,
5467
5584
  completed: s.completed,
@@ -5473,9 +5590,9 @@ const In = ({
5473
5590
  return null;
5474
5591
  case "ExportingMemories":
5475
5592
  return /* @__PURE__ */ r(
5476
- Jr,
5593
+ en,
5477
5594
  {
5478
- data: d,
5595
+ data: u,
5479
5596
  isLatest: s.isLatest,
5480
5597
  durationSeconds: s.durationSeconds,
5481
5598
  t: i
@@ -5483,32 +5600,32 @@ const In = ({
5483
5600
  );
5484
5601
  case "FindMemories":
5485
5602
  return /* @__PURE__ */ r(
5486
- Zr,
5603
+ rn,
5487
5604
  {
5488
- data: d,
5605
+ data: u,
5489
5606
  isLatest: s.isLatest,
5490
5607
  durationSeconds: s.durationSeconds,
5491
5608
  t: i
5492
5609
  }
5493
5610
  );
5494
5611
  case "FindMemoriesResult":
5495
- return /* @__PURE__ */ r(en, { data: d, t: i });
5612
+ return /* @__PURE__ */ r(nn, { data: u, t: i });
5496
5613
  case "SemanticSearch":
5497
5614
  return /* @__PURE__ */ r(
5498
- nn,
5615
+ tn,
5499
5616
  {
5500
- data: d,
5617
+ data: u,
5501
5618
  isLatest: s.isLatest,
5502
5619
  durationSeconds: s.durationSeconds,
5503
5620
  t: i,
5504
- onSearchResultClick: c
5621
+ onSearchResultClick: d
5505
5622
  }
5506
5623
  );
5507
5624
  case "SemanticSearchForEach":
5508
5625
  return /* @__PURE__ */ r(
5509
- an,
5626
+ sn,
5510
5627
  {
5511
- data: d,
5628
+ data: u,
5512
5629
  completed: s.completed,
5513
5630
  isLatest: s.isLatest,
5514
5631
  t: i
@@ -5516,19 +5633,20 @@ const In = ({
5516
5633
  );
5517
5634
  case "RunCode":
5518
5635
  return /* @__PURE__ */ r(
5519
- ln,
5636
+ cn,
5520
5637
  {
5521
- data: d,
5638
+ data: u,
5522
5639
  isLatest: s.isLatest,
5523
5640
  durationSeconds: s.durationSeconds,
5641
+ completed: s.completed,
5524
5642
  t: i
5525
5643
  }
5526
5644
  );
5527
5645
  case "ComposeHtmlReport":
5528
5646
  return /* @__PURE__ */ r(
5529
- dn,
5647
+ mn,
5530
5648
  {
5531
- data: d,
5649
+ data: u,
5532
5650
  completed: s.completed,
5533
5651
  isLatest: s.isLatest,
5534
5652
  durationSeconds: s.durationSeconds,
@@ -5537,7 +5655,7 @@ const In = ({
5537
5655
  );
5538
5656
  case "FindSources":
5539
5657
  return /* @__PURE__ */ r(
5540
- ce,
5658
+ ue,
5541
5659
  {
5542
5660
  data: { taskType: "MemoryChat", eventType: "FindSources" },
5543
5661
  isLatest: s.isLatest,
@@ -5547,24 +5665,24 @@ const In = ({
5547
5665
  );
5548
5666
  case "SourcesResult":
5549
5667
  return /* @__PURE__ */ r(
5550
- pn,
5668
+ gn,
5551
5669
  {
5552
- data: d,
5670
+ data: u,
5553
5671
  onSourceClick: l,
5554
5672
  t: i
5555
5673
  }
5556
5674
  );
5557
5675
  case "Completed":
5558
5676
  return /* @__PURE__ */ r(
5559
- N,
5677
+ $,
5560
5678
  {
5561
- text: d.response.textResponse,
5562
- onFileDownload: u,
5679
+ text: u.response.textResponse,
5680
+ onFileDownload: p,
5563
5681
  onMemoryClick: a
5564
5682
  }
5565
5683
  );
5566
5684
  default: {
5567
- const f = d;
5685
+ const f = u;
5568
5686
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5569
5687
  "[fency] Unknown ExploreMemories eventType (no UI):",
5570
5688
  f.eventType,
@@ -5572,13 +5690,13 @@ const In = ({
5572
5690
  ), null);
5573
5691
  }
5574
5692
  }
5575
- return d.taskType === "StreamingChatCompletion" && d.eventType === "Completed" ? /* @__PURE__ */ r(
5576
- N,
5693
+ return u.taskType === "StreamingChatCompletion" && u.eventType === "Completed" ? /* @__PURE__ */ r(
5694
+ $,
5577
5695
  {
5578
- text: d.response.textResponse,
5696
+ text: u.response.textResponse,
5579
5697
  onMemoryClick: a
5580
5698
  }
5581
- ) : d.eventType === "Error" && "message" in d ? /* @__PURE__ */ r(O, { message: d.message }) : null;
5699
+ ) : u.eventType === "Error" && "message" in u ? /* @__PURE__ */ r(O, { message: u.message }) : null;
5582
5700
  };
5583
5701
  if (e.length === 0)
5584
5702
  return t ? /* @__PURE__ */ r("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ r(O, { message: t.message }) }) : o ? /* @__PURE__ */ r("div", { style: { width: "fit-content", paddingBlock: "16px" }, children: /* @__PURE__ */ r(
@@ -5592,42 +5710,42 @@ const In = ({
5592
5710
  shimmerColor: h.shimmerHighlight
5593
5711
  }
5594
5712
  ) }) : null;
5595
- const y = e.filter((s, d) => {
5713
+ const y = e.filter((s, u) => {
5596
5714
  const f = s.item.data;
5597
5715
  if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
5598
5716
  return !1;
5599
5717
  if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
5600
- return !e.slice(d + 1).some(
5718
+ return !e.slice(u + 1).some(
5601
5719
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
5602
5720
  );
5603
5721
  if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
5604
- return !e.slice(d + 1).some(
5722
+ return !e.slice(u + 1).some(
5605
5723
  (E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
5606
5724
  );
5607
5725
  if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
5608
- return !e.slice(d + 1).some(
5726
+ return !e.slice(u + 1).some(
5609
5727
  (E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
5610
5728
  );
5611
5729
  if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
5612
- return !e.slice(d + 1).some(
5730
+ return !e.slice(u + 1).some(
5613
5731
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
5614
5732
  );
5615
5733
  if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
5616
- return !e.slice(d + 1).some(
5734
+ return !e.slice(u + 1).some(
5617
5735
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
5618
5736
  );
5619
5737
  if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
5620
- return !e.slice(d + 1).some(
5738
+ return !e.slice(u + 1).some(
5621
5739
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
5622
5740
  );
5623
5741
  if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
5624
- return !e.slice(d + 1).some(
5742
+ return !e.slice(u + 1).some(
5625
5743
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
5626
5744
  );
5627
5745
  if (f.taskType === "ExploreMemories" && (f.eventType === "Classifying" || f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
5628
- const B = f.eventType;
5629
- return !e.slice(d + 1).some(
5630
- (se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === B
5746
+ const P = f.eventType;
5747
+ return !e.slice(u + 1).some(
5748
+ (pe) => pe.item.data.taskType === "ExploreMemories" && pe.item.data.eventType === P
5631
5749
  );
5632
5750
  }
5633
5751
  return !0;
@@ -5639,7 +5757,7 @@ const In = ({
5639
5757
  ref: x,
5640
5758
  "data-theme": g,
5641
5759
  children: [
5642
- /* @__PURE__ */ r(Ve, { children: y.map((s, d) => /* @__PURE__ */ r(
5760
+ /* @__PURE__ */ r(Xe, { children: y.map((s, u) => /* @__PURE__ */ r(
5643
5761
  v.div,
5644
5762
  {
5645
5763
  id: `agent-task-progress-item-${s.item.progressItemId}`,
@@ -5647,14 +5765,14 @@ const In = ({
5647
5765
  animate: { opacity: 1, y: 0 },
5648
5766
  transition: {
5649
5767
  duration: 0.4,
5650
- delay: d * 0.1,
5768
+ delay: u * 0.1,
5651
5769
  ease: "easeOut"
5652
5770
  },
5653
5771
  children: /* @__PURE__ */ r(
5654
- Rn,
5772
+ zn,
5655
5773
  {
5656
5774
  progressItemId: s.item.progressItemId,
5657
- children: T(s)
5775
+ children: S(s)
5658
5776
  }
5659
5777
  )
5660
5778
  },
@@ -5664,12 +5782,12 @@ const In = ({
5664
5782
  ]
5665
5783
  }
5666
5784
  );
5667
- }, Fn = ({ taskId: e, label: o, copiedLabel: t }) => {
5668
- const { colors: n } = S(), [i, a] = C(!1);
5669
- H(() => {
5785
+ }, Pn = ({ taskId: e, label: o, copiedLabel: t }) => {
5786
+ const { colors: n } = b(), [i, a] = C(!1);
5787
+ N(() => {
5670
5788
  if (!i) return;
5671
- const c = window.setTimeout(() => a(!1), 1500);
5672
- return () => window.clearTimeout(c);
5789
+ const d = window.setTimeout(() => a(!1), 1500);
5790
+ return () => window.clearTimeout(d);
5673
5791
  }, [i]);
5674
5792
  const l = L(async () => {
5675
5793
  try {
@@ -5698,7 +5816,7 @@ const In = ({
5698
5816
  children: i ? t : o
5699
5817
  }
5700
5818
  );
5701
- }, Hn = ({
5819
+ }, _n = ({
5702
5820
  agentTask: e,
5703
5821
  theme: o = "light",
5704
5822
  language: t,
@@ -5708,8 +5826,8 @@ const In = ({
5708
5826
  onExploreQueryResultClick: l
5709
5827
  }) => {
5710
5828
  var h;
5711
- const c = nr(e), p = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", u = cr(p), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
5712
- return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
5829
+ const d = or(e), c = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", p = dr(c), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
5830
+ return /* @__PURE__ */ r(lr, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
5713
5831
  g ? /* @__PURE__ */ r(
5714
5832
  "div",
5715
5833
  {
@@ -5720,23 +5838,23 @@ const In = ({
5720
5838
  zIndex: 1
5721
5839
  },
5722
5840
  children: /* @__PURE__ */ r(
5723
- Fn,
5841
+ Pn,
5724
5842
  {
5725
5843
  taskId: g,
5726
- label: u.copyId,
5727
- copiedLabel: u.copiedId
5844
+ label: p.copyId,
5845
+ copiedLabel: p.copiedId
5728
5846
  }
5729
5847
  )
5730
5848
  }
5731
5849
  ) : null,
5732
5850
  /* @__PURE__ */ r(
5733
- In,
5851
+ Bn,
5734
5852
  {
5735
- progressViewItems: c,
5853
+ progressViewItems: d,
5736
5854
  loading: e.loading,
5737
5855
  error: e.error,
5738
5856
  loadingText: e.loadingText,
5739
- t: u,
5857
+ t: p,
5740
5858
  onMemoryClick: n,
5741
5859
  onSourceClick: i,
5742
5860
  onSearchResultClick: a,
@@ -5747,16 +5865,16 @@ const In = ({
5747
5865
  ] }) });
5748
5866
  };
5749
5867
  export {
5750
- Hn as AgentTaskProgress,
5751
- ar as AgentTaskThemeProvider,
5868
+ _n as AgentTaskProgress,
5869
+ lr as AgentTaskThemeProvider,
5752
5870
  F as Checkmark,
5753
- $n as FencyProvider,
5754
- En as MemorySearchCompletedResults,
5755
- _n as StreamEventManager,
5871
+ Gn as FencyProvider,
5872
+ Fn as MemorySearchCompletedResults,
5873
+ jn as StreamEventManager,
5756
5874
  _ as XMark,
5757
- ir as darkAgentTaskThemeColors,
5758
- Ce as getAgentTaskPrismStyle,
5759
- Te as lightAgentTaskThemeColors,
5760
- S as useAgentTaskTheme,
5761
- Nn as useAgentTasks
5875
+ ar as darkAgentTaskThemeColors,
5876
+ Me as getAgentTaskPrismStyle,
5877
+ Ce as lightAgentTaskThemeColors,
5878
+ b as useAgentTaskTheme,
5879
+ On as useAgentTasks
5762
5880
  };