@fencyai/react 0.1.206 → 0.1.207
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/agent-task/AgentTaskProgressVerbose.d.ts.map +1 -1
- package/dist/agent-task/data-types/ExploreMemoriesComposeHtmlReport.d.ts +17 -0
- package/dist/agent-task/data-types/ExploreMemoriesComposeHtmlReport.d.ts.map +1 -0
- package/dist/agent-task/translations.d.ts +1 -0
- package/dist/agent-task/translations.d.ts.map +1 -1
- package/dist/index.js +413 -301
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import { StreamEventManager as ze, StreamCacheManager as Be, toStreamData as Pe, 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
|
|
4
|
-
import Ue, { createContext as fe, useState as w, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as
|
|
3
|
+
import { StreamEventManager as Gn } from "@fencyai/js";
|
|
4
|
+
import Ue, { createContext as fe, useState as w, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as je, useMemo as z, useLayoutEffect as Qe } from "react";
|
|
5
5
|
import { motion as v, useInView as Ke, AnimatePresence as Ve } from "motion/react";
|
|
6
6
|
import Xe from "react-markdown";
|
|
7
7
|
import { Prism as ke } from "react-syntax-highlighter";
|
|
@@ -9,60 +9,60 @@ import Ye from "remark-gfm";
|
|
|
9
9
|
import './assets/index.css';const Se = fe(
|
|
10
10
|
void 0
|
|
11
11
|
);
|
|
12
|
-
function
|
|
12
|
+
function Dn({
|
|
13
13
|
fency: e,
|
|
14
14
|
fetchCreateStreamClientToken: o,
|
|
15
15
|
children: t
|
|
16
16
|
}) {
|
|
17
17
|
const [n, i] = w(
|
|
18
18
|
null
|
|
19
|
-
), [a, l] = w(!0), [
|
|
19
|
+
), [a, l] = w(!0), [c, p] = w(null), [u, g] = w([]), h = A(null), x = A(null);
|
|
20
20
|
H(() => {
|
|
21
|
-
e.then((
|
|
22
|
-
i(
|
|
23
|
-
}).catch((
|
|
24
|
-
p(
|
|
21
|
+
e.then((d) => {
|
|
22
|
+
i(d), l(!1);
|
|
23
|
+
}).catch((d) => {
|
|
24
|
+
p(d), l(!1);
|
|
25
25
|
});
|
|
26
26
|
}, [e]), H(() => {
|
|
27
27
|
if (!n) return;
|
|
28
28
|
x.current || (x.current = new ze(n));
|
|
29
|
-
const
|
|
29
|
+
const d = new Be(
|
|
30
30
|
n,
|
|
31
31
|
o
|
|
32
32
|
);
|
|
33
|
-
h.current =
|
|
34
|
-
const f =
|
|
33
|
+
h.current = d, d.startPeriodicCleanup();
|
|
34
|
+
const f = d.onChange((S) => {
|
|
35
35
|
var M;
|
|
36
36
|
g(S), (M = x.current) == null || M.updateStreams(S);
|
|
37
37
|
});
|
|
38
38
|
return () => {
|
|
39
39
|
var S;
|
|
40
|
-
f(),
|
|
40
|
+
f(), d.destroy(), h.current = null, (S = x.current) == null || S.cleanup(), x.current = null;
|
|
41
41
|
};
|
|
42
42
|
}, [n, o]);
|
|
43
|
-
const
|
|
44
|
-
async (
|
|
43
|
+
const T = L(
|
|
44
|
+
async (d) => {
|
|
45
45
|
if (!h.current)
|
|
46
46
|
throw new Error("Fency instance not initialized");
|
|
47
|
-
return h.current.getOrCreateStream(
|
|
47
|
+
return h.current.getOrCreateStream(d);
|
|
48
48
|
},
|
|
49
49
|
[]
|
|
50
50
|
);
|
|
51
|
-
if (
|
|
51
|
+
if (c)
|
|
52
52
|
return /* @__PURE__ */ m("div", { children: [
|
|
53
53
|
"Fency error: ",
|
|
54
|
-
|
|
54
|
+
c.message
|
|
55
55
|
] });
|
|
56
56
|
if (!n)
|
|
57
57
|
return null;
|
|
58
58
|
const y = u.length > 0 ? u[u.length - 1] : null, s = {
|
|
59
59
|
fency: n,
|
|
60
60
|
loading: a,
|
|
61
|
-
error:
|
|
61
|
+
error: c,
|
|
62
62
|
activeStreams: u,
|
|
63
63
|
latestStream: y,
|
|
64
64
|
eventManager: x.current,
|
|
65
|
-
getOrCreateStream:
|
|
65
|
+
getOrCreateStream: T
|
|
66
66
|
};
|
|
67
67
|
return /* @__PURE__ */ r(Se.Provider, { value: s, children: t });
|
|
68
68
|
}
|
|
@@ -80,7 +80,7 @@ const Je = (e) => {
|
|
|
80
80
|
if (!o.eventManager) return;
|
|
81
81
|
const l = {
|
|
82
82
|
onMessage: (p, u) => {
|
|
83
|
-
var h, x,
|
|
83
|
+
var h, x, T;
|
|
84
84
|
const g = Pe(p);
|
|
85
85
|
if (g)
|
|
86
86
|
switch (g.type) {
|
|
@@ -91,7 +91,7 @@ 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
|
-
(
|
|
94
|
+
(T = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || T.call(e, g);
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -143,15 +143,15 @@ 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
|
|
147
|
-
const o = be(), [t, n] =
|
|
146
|
+
const Wn = (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(
|
|
148
148
|
(y) => {
|
|
149
149
|
if (y)
|
|
150
150
|
return async (s) => {
|
|
151
|
-
const { clientToken:
|
|
151
|
+
const { clientToken: d } = await y(s), f = await De({
|
|
152
152
|
pk: o.fency.publishableKey,
|
|
153
153
|
baseUrl: o.fency.baseUrl,
|
|
154
|
-
clientToken:
|
|
154
|
+
clientToken: d,
|
|
155
155
|
agentTaskFileId: s
|
|
156
156
|
});
|
|
157
157
|
if (f.type === "error")
|
|
@@ -163,14 +163,14 @@ const Ln = (e) => {
|
|
|
163
163
|
[o.fency.baseUrl, o.fency.publishableKey]
|
|
164
164
|
), p = L(
|
|
165
165
|
(y, s) => {
|
|
166
|
-
const
|
|
166
|
+
const d = t.tasks.filter(
|
|
167
167
|
(f) => {
|
|
168
168
|
var S;
|
|
169
169
|
return f.streamId === y && f.loading && ((S = f.confirmedData) == null ? void 0 : S.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
|
|
173
|
+
for (const f of d) {
|
|
174
174
|
i.current.delete(f);
|
|
175
175
|
const S = a.current.get(f);
|
|
176
176
|
S && (a.current.delete(f), S({ type: "error", error: s }));
|
|
@@ -179,7 +179,7 @@ const Ln = (e) => {
|
|
|
179
179
|
[t.tasks]
|
|
180
180
|
), u = L(
|
|
181
181
|
(y) => {
|
|
182
|
-
var
|
|
182
|
+
var d;
|
|
183
183
|
if (!i.current.has(y.agentTaskId)) return;
|
|
184
184
|
const s = y.data;
|
|
185
185
|
if (We(s)) {
|
|
@@ -217,7 +217,7 @@ const Ln = (e) => {
|
|
|
217
217
|
}
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
(
|
|
220
|
+
(d = e.onAgentTaskProgressItemUpdated) == null || d.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
|
|
221
221
|
},
|
|
222
222
|
[e]
|
|
223
223
|
), { createStream: g } = Je({
|
|
@@ -243,7 +243,7 @@ const Ln = (e) => {
|
|
|
243
243
|
}), h = L(
|
|
244
244
|
async (y, s) => {
|
|
245
245
|
var D;
|
|
246
|
-
const
|
|
246
|
+
const d = `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"
|
|
@@ -251,7 +251,7 @@ const Ln = (e) => {
|
|
|
251
251
|
const S = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
|
|
252
252
|
if (M.type === "success") {
|
|
253
253
|
const W = (/* @__PURE__ */ new Date()).toISOString(), B = {
|
|
254
|
-
taskKey:
|
|
254
|
+
taskKey: d,
|
|
255
255
|
streamId: M.stream.id,
|
|
256
256
|
triggeredAt: W,
|
|
257
257
|
confirmedData: null,
|
|
@@ -263,7 +263,7 @@ const Ln = (e) => {
|
|
|
263
263
|
};
|
|
264
264
|
n({ type: "TASK_PENDING", task: B }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
|
|
265
265
|
...B,
|
|
266
|
-
downloadFile:
|
|
266
|
+
downloadFile: c(
|
|
267
267
|
S
|
|
268
268
|
)
|
|
269
269
|
});
|
|
@@ -279,7 +279,7 @@ const Ln = (e) => {
|
|
|
279
279
|
i.current.add(
|
|
280
280
|
I.agentTask.id
|
|
281
281
|
);
|
|
282
|
-
const G =
|
|
282
|
+
const G = c(
|
|
283
283
|
S
|
|
284
284
|
);
|
|
285
285
|
return G && l.current.set(
|
|
@@ -287,7 +287,7 @@ const Ln = (e) => {
|
|
|
287
287
|
G
|
|
288
288
|
), n({
|
|
289
289
|
type: "TASK_CONFIRMED",
|
|
290
|
-
taskKey:
|
|
290
|
+
taskKey: d,
|
|
291
291
|
taskId: I.agentTask.id,
|
|
292
292
|
createdAt: I.agentTask.createdAt
|
|
293
293
|
}), await new Promise(
|
|
@@ -302,7 +302,7 @@ const Ln = (e) => {
|
|
|
302
302
|
if (I.type === "error")
|
|
303
303
|
return n({
|
|
304
304
|
type: "TASK_API_ERROR",
|
|
305
|
-
taskKey:
|
|
305
|
+
taskKey: d,
|
|
306
306
|
error: I.error
|
|
307
307
|
}), {
|
|
308
308
|
type: "error",
|
|
@@ -315,7 +315,7 @@ const Ln = (e) => {
|
|
|
315
315
|
};
|
|
316
316
|
return n({
|
|
317
317
|
type: "TASK_API_ERROR",
|
|
318
|
-
taskKey:
|
|
318
|
+
taskKey: d,
|
|
319
319
|
error: G
|
|
320
320
|
}), {
|
|
321
321
|
type: "error",
|
|
@@ -330,7 +330,7 @@ const Ln = (e) => {
|
|
|
330
330
|
};
|
|
331
331
|
return n({
|
|
332
332
|
type: "TASK_API_ERROR",
|
|
333
|
-
taskKey:
|
|
333
|
+
taskKey: d,
|
|
334
334
|
error: I
|
|
335
335
|
}), {
|
|
336
336
|
type: "error",
|
|
@@ -342,7 +342,7 @@ const Ln = (e) => {
|
|
|
342
342
|
},
|
|
343
343
|
[
|
|
344
344
|
o,
|
|
345
|
-
|
|
345
|
+
c,
|
|
346
346
|
g,
|
|
347
347
|
e.fetchCreateAgentTaskClientToken,
|
|
348
348
|
e.fetchAgentTaskFileDownloadClientToken
|
|
@@ -353,7 +353,7 @@ const Ln = (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]),
|
|
356
|
+
}), [t.tasks]), T = 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]);
|
|
@@ -362,7 +362,7 @@ const Ln = (e) => {
|
|
|
362
362
|
}, []), {
|
|
363
363
|
agentTasks: x,
|
|
364
364
|
createAgentTask: h,
|
|
365
|
-
latest:
|
|
365
|
+
latest: T
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
368
|
function er(e) {
|
|
@@ -380,10 +380,10 @@ function nr(e) {
|
|
|
380
380
|
const n = rr(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(),
|
|
383
|
+
const l = new Date(o.createdAt).getTime(), c = new Date(n.createdAt).getTime();
|
|
384
384
|
a = Math.max(
|
|
385
385
|
0,
|
|
386
|
-
Math.round((
|
|
386
|
+
Math.round((c - l) / 1e3)
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
return {
|
|
@@ -1098,7 +1098,7 @@ function ar({
|
|
|
1098
1098
|
);
|
|
1099
1099
|
return /* @__PURE__ */ r(ve.Provider, { value: t, children: o });
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function b() {
|
|
1102
1102
|
return xe(ve);
|
|
1103
1103
|
}
|
|
1104
1104
|
function we(e) {
|
|
@@ -1109,11 +1109,11 @@ const N = ({
|
|
|
1109
1109
|
onFileDownload: o,
|
|
1110
1110
|
onMemoryClick: t
|
|
1111
1111
|
}) => {
|
|
1112
|
-
const { theme: n } =
|
|
1112
|
+
const { theme: n } = b(), i = we(n), [a, l] = w(
|
|
1113
1113
|
null
|
|
1114
|
-
), [
|
|
1114
|
+
), [c, p] = w(
|
|
1115
1115
|
null
|
|
1116
|
-
), [u, g] = w(!1), [h, x] = w(!1),
|
|
1116
|
+
), [u, g] = w(!1), [h, x] = w(!1), T = L(
|
|
1117
1117
|
(f) => {
|
|
1118
1118
|
o && (l(null), g(!0), (async () => {
|
|
1119
1119
|
try {
|
|
@@ -1166,7 +1166,7 @@ const N = ({
|
|
|
1166
1166
|
type: "button",
|
|
1167
1167
|
className: "fency-file-download-button",
|
|
1168
1168
|
disabled: u,
|
|
1169
|
-
onClick: () =>
|
|
1169
|
+
onClick: () => T(W),
|
|
1170
1170
|
children: S
|
|
1171
1171
|
}
|
|
1172
1172
|
) }) : /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
|
|
@@ -1214,19 +1214,19 @@ const N = ({
|
|
|
1214
1214
|
}), [
|
|
1215
1215
|
u,
|
|
1216
1216
|
h,
|
|
1217
|
-
|
|
1217
|
+
T,
|
|
1218
1218
|
y,
|
|
1219
1219
|
o,
|
|
1220
1220
|
t,
|
|
1221
1221
|
i
|
|
1222
|
-
]),
|
|
1222
|
+
]), d = a ?? c;
|
|
1223
1223
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
1224
|
-
|
|
1224
|
+
d ? /* @__PURE__ */ r(
|
|
1225
1225
|
"p",
|
|
1226
1226
|
{
|
|
1227
1227
|
role: "alert",
|
|
1228
1228
|
style: { color: "#b91c1c", marginBottom: 8, fontSize: 14 },
|
|
1229
|
-
children:
|
|
1229
|
+
children: d
|
|
1230
1230
|
}
|
|
1231
1231
|
) : null,
|
|
1232
1232
|
/* @__PURE__ */ r(
|
|
@@ -1248,7 +1248,7 @@ const N = ({
|
|
|
1248
1248
|
)
|
|
1249
1249
|
] });
|
|
1250
1250
|
}, lr = ({ data: e }) => {
|
|
1251
|
-
const { theme: o } =
|
|
1251
|
+
const { theme: o } = b(), t = we(o), n = e.response.jsonResponse;
|
|
1252
1252
|
let i;
|
|
1253
1253
|
try {
|
|
1254
1254
|
i = JSON.stringify(JSON.parse(n), null, 2);
|
|
@@ -1353,6 +1353,7 @@ const N = ({
|
|
|
1353
1353
|
exploreExporting: "Loading {n} memory files...",
|
|
1354
1354
|
exploreExportingOne: "Loading memory data...",
|
|
1355
1355
|
exploreRunCode: "Analyzing: {title}",
|
|
1356
|
+
exploreComposeHtmlReport: "Composing report: {title}",
|
|
1356
1357
|
exploreSetupSandbox: "Setting up environment...",
|
|
1357
1358
|
exploreSetupSandboxPhrases: [
|
|
1358
1359
|
"Spelunking...",
|
|
@@ -1474,6 +1475,7 @@ const N = ({
|
|
|
1474
1475
|
exploreExporting: "Laster {n} minnefiler...",
|
|
1475
1476
|
exploreExportingOne: "Laster data...",
|
|
1476
1477
|
exploreRunCode: "Analyserer: {title}",
|
|
1478
|
+
exploreComposeHtmlReport: "Lager rapport: {title}",
|
|
1477
1479
|
exploreSetupSandbox: "Setter opp miljø...",
|
|
1478
1480
|
exploreSetupSandboxPhrases: [
|
|
1479
1481
|
"Spelunker...",
|
|
@@ -1521,7 +1523,7 @@ function k(e, o) {
|
|
|
1521
1523
|
e
|
|
1522
1524
|
);
|
|
1523
1525
|
}
|
|
1524
|
-
function
|
|
1526
|
+
function Q(e, o) {
|
|
1525
1527
|
const t = e.map((n) => `'${n}'`);
|
|
1526
1528
|
if (o != null && t.length >= 2) {
|
|
1527
1529
|
const n = t.pop();
|
|
@@ -1537,18 +1539,18 @@ function C({
|
|
|
1537
1539
|
repeatDelay: i = 0.5,
|
|
1538
1540
|
className: a,
|
|
1539
1541
|
startOnView: l = !1,
|
|
1540
|
-
once:
|
|
1542
|
+
once: c = !1,
|
|
1541
1543
|
inViewMargin: p,
|
|
1542
1544
|
spread: u = 2,
|
|
1543
1545
|
color: g,
|
|
1544
1546
|
shimmerColor: h,
|
|
1545
1547
|
direction: x = "fromBottom"
|
|
1546
1548
|
}) {
|
|
1547
|
-
const { colors:
|
|
1549
|
+
const { colors: T } = b(), y = g ?? T.shimmerBase, s = h ?? T.shimmerHighlight, d = A(null), f = Ke(d, { once: c, margin: p }), S = z(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
|
|
1548
1550
|
return /* @__PURE__ */ r(
|
|
1549
1551
|
v.span,
|
|
1550
1552
|
{
|
|
1551
|
-
ref:
|
|
1553
|
+
ref: d,
|
|
1552
1554
|
className: a,
|
|
1553
1555
|
style: {
|
|
1554
1556
|
position: "relative",
|
|
@@ -1591,10 +1593,10 @@ function C({
|
|
|
1591
1593
|
);
|
|
1592
1594
|
}
|
|
1593
1595
|
const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
|
|
1594
|
-
const { colors: a } =
|
|
1596
|
+
const { colors: a } = b(), [l, c] = w(!1), u = (e.memories ?? []).map((S) => S.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(
|
|
1595
1597
|
x,
|
|
1596
1598
|
y ? n.and : void 0
|
|
1597
|
-
)}` : "", f = g ? `${s}${
|
|
1599
|
+
)}` : "", f = g ? `${s}${d}` : `${n.searchingPrefix}${e.queryDescription}`;
|
|
1598
1600
|
return /* @__PURE__ */ m(
|
|
1599
1601
|
"div",
|
|
1600
1602
|
{
|
|
@@ -1615,7 +1617,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1615
1617
|
e.queryDescription,
|
|
1616
1618
|
"'"
|
|
1617
1619
|
] }),
|
|
1618
|
-
|
|
1620
|
+
d
|
|
1619
1621
|
] }) : `${n.searchingPrefix}${e.queryDescription}` }),
|
|
1620
1622
|
h && !l && /* @__PURE__ */ m(R, { children: [
|
|
1621
1623
|
" ",
|
|
@@ -1623,7 +1625,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1623
1625
|
"button",
|
|
1624
1626
|
{
|
|
1625
1627
|
type: "button",
|
|
1626
|
-
onClick: () =>
|
|
1628
|
+
onClick: () => c(!0),
|
|
1627
1629
|
style: {
|
|
1628
1630
|
background: "none",
|
|
1629
1631
|
border: "none",
|
|
@@ -1636,7 +1638,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1636
1638
|
fontFamily: "inherit"
|
|
1637
1639
|
},
|
|
1638
1640
|
children: k(n.moreMemories, {
|
|
1639
|
-
n:
|
|
1641
|
+
n: T
|
|
1640
1642
|
})
|
|
1641
1643
|
}
|
|
1642
1644
|
)
|
|
@@ -1647,7 +1649,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1647
1649
|
"button",
|
|
1648
1650
|
{
|
|
1649
1651
|
type: "button",
|
|
1650
|
-
onClick: () =>
|
|
1652
|
+
onClick: () => c(!1),
|
|
1651
1653
|
style: {
|
|
1652
1654
|
background: "none",
|
|
1653
1655
|
border: "none",
|
|
@@ -1686,7 +1688,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1686
1688
|
size: o = 24,
|
|
1687
1689
|
borderWidth: t = 7
|
|
1688
1690
|
}) => {
|
|
1689
|
-
const { colors: n } =
|
|
1691
|
+
const { colors: n } = b(), i = e ?? n.checkmarkColor, a = o * 0.5;
|
|
1690
1692
|
return /* @__PURE__ */ r(
|
|
1691
1693
|
"span",
|
|
1692
1694
|
{
|
|
@@ -1787,7 +1789,7 @@ function gr({
|
|
|
1787
1789
|
onSearchResultClick: o,
|
|
1788
1790
|
t
|
|
1789
1791
|
}) {
|
|
1790
|
-
const { colors: n } =
|
|
1792
|
+
const { colors: n } = b(), [i, a] = w(null), l = !!o;
|
|
1791
1793
|
return /* @__PURE__ */ r(
|
|
1792
1794
|
"div",
|
|
1793
1795
|
{
|
|
@@ -1799,24 +1801,24 @@ function gr({
|
|
|
1799
1801
|
paddingTop: 8,
|
|
1800
1802
|
borderTop: `1px solid ${n.borderDivider}`
|
|
1801
1803
|
},
|
|
1802
|
-
children: e.map((
|
|
1804
|
+
children: e.map((c, p) => {
|
|
1803
1805
|
const u = oe(
|
|
1804
|
-
|
|
1806
|
+
c.chunks
|
|
1805
1807
|
), g = [
|
|
1806
|
-
te(
|
|
1808
|
+
te(c),
|
|
1807
1809
|
k(t.scoreLabel, {
|
|
1808
|
-
n:
|
|
1810
|
+
n: c.matchingChunkScore.toFixed(2)
|
|
1809
1811
|
}),
|
|
1810
1812
|
u.length > 0 ? ne(u, t) : t.pagesNotAvailable
|
|
1811
1813
|
].filter(
|
|
1812
1814
|
(y) => y != null && y !== ""
|
|
1813
1815
|
), h = {
|
|
1814
|
-
memoryId:
|
|
1815
|
-
memoryTitle:
|
|
1816
|
-
memoryTypeId:
|
|
1817
|
-
memoryTypeName:
|
|
1816
|
+
memoryId: c.memoryId,
|
|
1817
|
+
memoryTitle: c.memoryTitle,
|
|
1818
|
+
memoryTypeId: c.memoryTypeId,
|
|
1819
|
+
memoryTypeName: c.memoryTypeName,
|
|
1818
1820
|
pageNumbers: u
|
|
1819
|
-
}, x = `${
|
|
1821
|
+
}, x = `${c.memoryId}-${p}`, T = i === x;
|
|
1820
1822
|
return /* @__PURE__ */ m(
|
|
1821
1823
|
"div",
|
|
1822
1824
|
{
|
|
@@ -1852,7 +1854,7 @@ function gr({
|
|
|
1852
1854
|
whiteSpace: "pre-wrap",
|
|
1853
1855
|
wordBreak: "break-word"
|
|
1854
1856
|
},
|
|
1855
|
-
children: re(
|
|
1857
|
+
children: re(c.chunks)
|
|
1856
1858
|
}
|
|
1857
1859
|
),
|
|
1858
1860
|
/* @__PURE__ */ r(
|
|
@@ -1874,8 +1876,8 @@ function gr({
|
|
|
1874
1876
|
"button",
|
|
1875
1877
|
{
|
|
1876
1878
|
type: "button",
|
|
1877
|
-
"aria-busy":
|
|
1878
|
-
disabled:
|
|
1879
|
+
"aria-busy": T,
|
|
1880
|
+
disabled: T,
|
|
1879
1881
|
onClick: async () => {
|
|
1880
1882
|
a(x);
|
|
1881
1883
|
try {
|
|
@@ -1896,14 +1898,14 @@ function gr({
|
|
|
1896
1898
|
background: n.bgChip,
|
|
1897
1899
|
border: `1px solid ${n.bgChipBorder}`,
|
|
1898
1900
|
borderRadius: 6,
|
|
1899
|
-
cursor:
|
|
1901
|
+
cursor: T ? "wait" : "pointer",
|
|
1900
1902
|
fontFamily: "inherit",
|
|
1901
1903
|
display: "inline-flex",
|
|
1902
1904
|
alignItems: "center",
|
|
1903
1905
|
gap: 8
|
|
1904
1906
|
},
|
|
1905
1907
|
children: [
|
|
1906
|
-
|
|
1908
|
+
T && /* @__PURE__ */ r(
|
|
1907
1909
|
"span",
|
|
1908
1910
|
{
|
|
1909
1911
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -1929,7 +1931,7 @@ function hr({
|
|
|
1929
1931
|
onToggle: n,
|
|
1930
1932
|
onSearchResultClick: i
|
|
1931
1933
|
}) {
|
|
1932
|
-
const { colors: a } =
|
|
1934
|
+
const { colors: a } = b(), l = e.items.map((p) => p.item), c = l.some((p) => p.chunks.length > 0);
|
|
1933
1935
|
return /* @__PURE__ */ m(
|
|
1934
1936
|
v.div,
|
|
1935
1937
|
{
|
|
@@ -2007,7 +2009,7 @@ function hr({
|
|
|
2007
2009
|
children: ur(l, o)
|
|
2008
2010
|
}
|
|
2009
2011
|
),
|
|
2010
|
-
|
|
2012
|
+
c && /* @__PURE__ */ r(
|
|
2011
2013
|
"button",
|
|
2012
2014
|
{
|
|
2013
2015
|
type: "button",
|
|
@@ -2028,7 +2030,7 @@ function hr({
|
|
|
2028
2030
|
]
|
|
2029
2031
|
}
|
|
2030
2032
|
),
|
|
2031
|
-
t &&
|
|
2033
|
+
t && c && /* @__PURE__ */ r(
|
|
2032
2034
|
gr,
|
|
2033
2035
|
{
|
|
2034
2036
|
items: l,
|
|
@@ -2052,17 +2054,17 @@ const ie = ({
|
|
|
2052
2054
|
t,
|
|
2053
2055
|
compactTop: n = !1
|
|
2054
2056
|
}) => {
|
|
2055
|
-
const { colors: i } =
|
|
2056
|
-
(s,
|
|
2057
|
+
const { colors: i } = b(), a = e.items, l = a.reduce(
|
|
2058
|
+
(s, d) => s + Ce(d),
|
|
2057
2059
|
0
|
|
2058
|
-
),
|
|
2059
|
-
u((
|
|
2060
|
-
...
|
|
2061
|
-
[s]: !
|
|
2060
|
+
), c = new Set(a.map((s) => s.memoryId)).size, [p, u] = w({}), g = L((s) => {
|
|
2061
|
+
u((d) => ({
|
|
2062
|
+
...d,
|
|
2063
|
+
[s]: !d[s]
|
|
2062
2064
|
}));
|
|
2063
|
-
}, []), h = z(() => mr(a), [a]), x =
|
|
2064
|
-
n:
|
|
2065
|
-
}),
|
|
2065
|
+
}, []), h = z(() => mr(a), [a]), x = c === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
|
|
2066
|
+
n: c
|
|
2067
|
+
}), T = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
|
|
2066
2068
|
return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
|
|
2067
2069
|
"div",
|
|
2068
2070
|
{
|
|
@@ -2094,7 +2096,7 @@ const ie = ({
|
|
|
2094
2096
|
marginTop: "4px",
|
|
2095
2097
|
fontStyle: "italic"
|
|
2096
2098
|
},
|
|
2097
|
-
children:
|
|
2099
|
+
children: T
|
|
2098
2100
|
}
|
|
2099
2101
|
)
|
|
2100
2102
|
] });
|
|
@@ -2149,7 +2151,7 @@ const xr = ({
|
|
|
2149
2151
|
)
|
|
2150
2152
|
] });
|
|
2151
2153
|
}, Y = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
2152
|
-
const { colors: i } =
|
|
2154
|
+
const { colors: i } = b(), [a, l] = w(!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(
|
|
2153
2155
|
g,
|
|
2154
2156
|
x ? n.and : void 0
|
|
2155
2157
|
)}` : n.findingMemories;
|
|
@@ -2163,8 +2165,8 @@ const xr = ({
|
|
|
2163
2165
|
initial: { opacity: 0, y: -10 },
|
|
2164
2166
|
animate: { opacity: 1, y: 0 },
|
|
2165
2167
|
transition: { duration: 0.3, delay: 0 },
|
|
2166
|
-
children: o && !t && !u ? /* @__PURE__ */ r(C, { text:
|
|
2167
|
-
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children:
|
|
2168
|
+
children: o && !t && !u ? /* @__PURE__ */ r(C, { text: T, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
2169
|
+
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: T }),
|
|
2168
2170
|
u && !a && /* @__PURE__ */ m(R, { children: [
|
|
2169
2171
|
" ",
|
|
2170
2172
|
/* @__PURE__ */ r(
|
|
@@ -2228,7 +2230,7 @@ const xr = ({
|
|
|
2228
2230
|
)
|
|
2229
2231
|
] });
|
|
2230
2232
|
}, J = 5, Sr = ({ data: e, t: o }) => {
|
|
2231
|
-
const { colors: t } =
|
|
2233
|
+
const { colors: t } = b(), [n, i] = w(!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(
|
|
2232
2234
|
u,
|
|
2233
2235
|
h ? o.and : void 0
|
|
2234
2236
|
)}` : o.memoriesFound;
|
|
@@ -2240,7 +2242,7 @@ const xr = ({
|
|
|
2240
2242
|
animate: { opacity: 1, y: 0 },
|
|
2241
2243
|
transition: { duration: 0.3, delay: 0 },
|
|
2242
2244
|
children: /* @__PURE__ */ m(R, { children: [
|
|
2243
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2245
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: T }),
|
|
2244
2246
|
p && !n && /* @__PURE__ */ m(R, { children: [
|
|
2245
2247
|
" ",
|
|
2246
2248
|
/* @__PURE__ */ r(
|
|
@@ -2291,7 +2293,7 @@ const xr = ({
|
|
|
2291
2293
|
}
|
|
2292
2294
|
) });
|
|
2293
2295
|
}, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
2294
|
-
const { colors: n } =
|
|
2296
|
+
const { colors: n } = b(), i = t.addingSources;
|
|
2295
2297
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2296
2298
|
/* @__PURE__ */ r(
|
|
2297
2299
|
v.div,
|
|
@@ -2335,7 +2337,7 @@ function br(e, o) {
|
|
|
2335
2337
|
return k(o.pageMultiple, { list: n, n: t });
|
|
2336
2338
|
}
|
|
2337
2339
|
const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
2338
|
-
const { colors: n } =
|
|
2340
|
+
const { colors: n } = b(), [i, a] = w(null);
|
|
2339
2341
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2340
2342
|
/* @__PURE__ */ r(
|
|
2341
2343
|
v.div,
|
|
@@ -2354,11 +2356,11 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2354
2356
|
children: t.sources
|
|
2355
2357
|
}
|
|
2356
2358
|
),
|
|
2357
|
-
/* @__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,
|
|
2359
|
+
/* @__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(
|
|
2358
2360
|
Tr,
|
|
2359
2361
|
{
|
|
2360
2362
|
source: l,
|
|
2361
|
-
index:
|
|
2363
|
+
index: c,
|
|
2362
2364
|
loadingMemoryId: i,
|
|
2363
2365
|
setLoadingMemoryId: a,
|
|
2364
2366
|
onSourceClick: o,
|
|
@@ -2375,7 +2377,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2375
2377
|
onSourceClick: i,
|
|
2376
2378
|
t: a
|
|
2377
2379
|
}) => {
|
|
2378
|
-
const { colors: l } =
|
|
2380
|
+
const { colors: l } = b(), [c, p] = w(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
|
|
2379
2381
|
return /* @__PURE__ */ m(
|
|
2380
2382
|
v.div,
|
|
2381
2383
|
{
|
|
@@ -2406,7 +2408,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2406
2408
|
padding: "8px 12px",
|
|
2407
2409
|
borderRadius: "6px",
|
|
2408
2410
|
border: `1px solid ${l.borderStrong}`,
|
|
2409
|
-
backgroundColor:
|
|
2411
|
+
backgroundColor: c ? l.sourcesBadgeBg : l.transparent,
|
|
2410
2412
|
cursor: u && !g ? "pointer" : g ? "wait" : "default",
|
|
2411
2413
|
transition: "background-color 0.15s ease",
|
|
2412
2414
|
userSelect: "none",
|
|
@@ -2445,10 +2447,10 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2445
2447
|
size: o = 32,
|
|
2446
2448
|
lineWidth: t = 2
|
|
2447
2449
|
}) => {
|
|
2448
|
-
const { colors: n } =
|
|
2450
|
+
const { colors: n } = b(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, c = (o - a) / 2, p = {
|
|
2449
2451
|
position: "absolute",
|
|
2450
2452
|
left: l,
|
|
2451
|
-
top:
|
|
2453
|
+
top: c,
|
|
2452
2454
|
width: t,
|
|
2453
2455
|
height: a,
|
|
2454
2456
|
backgroundColor: i
|
|
@@ -2497,7 +2499,7 @@ function wr({
|
|
|
2497
2499
|
completed: o,
|
|
2498
2500
|
t
|
|
2499
2501
|
}) {
|
|
2500
|
-
const { colors: n } =
|
|
2502
|
+
const { colors: n } = b(), [i, a] = w(!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;
|
|
2501
2503
|
return /* @__PURE__ */ m(
|
|
2502
2504
|
v.div,
|
|
2503
2505
|
{
|
|
@@ -2597,7 +2599,7 @@ function Er({
|
|
|
2597
2599
|
item: e,
|
|
2598
2600
|
t: o
|
|
2599
2601
|
}) {
|
|
2600
|
-
const { colors: t } =
|
|
2602
|
+
const { colors: t } = b(), [n, i] = w(!1), a = e.description ?? "", l = a.length > pe, c = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, pe)}...`;
|
|
2601
2603
|
return /* @__PURE__ */ m(
|
|
2602
2604
|
"div",
|
|
2603
2605
|
{
|
|
@@ -2645,7 +2647,7 @@ function Er({
|
|
|
2645
2647
|
]
|
|
2646
2648
|
}
|
|
2647
2649
|
),
|
|
2648
|
-
|
|
2650
|
+
c != null && /* @__PURE__ */ m(R, { children: [
|
|
2649
2651
|
/* @__PURE__ */ r(
|
|
2650
2652
|
"span",
|
|
2651
2653
|
{
|
|
@@ -2658,7 +2660,7 @@ function Er({
|
|
|
2658
2660
|
wordBreak: "break-word",
|
|
2659
2661
|
cursor: l ? "pointer" : "default"
|
|
2660
2662
|
},
|
|
2661
|
-
children:
|
|
2663
|
+
children: c
|
|
2662
2664
|
}
|
|
2663
2665
|
),
|
|
2664
2666
|
l && /* @__PURE__ */ r(
|
|
@@ -2692,7 +2694,7 @@ function Rr({
|
|
|
2692
2694
|
durationSeconds: t,
|
|
2693
2695
|
t: n
|
|
2694
2696
|
}) {
|
|
2695
|
-
const { colors: i } =
|
|
2697
|
+
const { colors: i } = b(), a = Ee(e, n);
|
|
2696
2698
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2697
2699
|
/* @__PURE__ */ r(
|
|
2698
2700
|
v.div,
|
|
@@ -2722,7 +2724,7 @@ function Ir({
|
|
|
2722
2724
|
data: e,
|
|
2723
2725
|
t: o
|
|
2724
2726
|
}) {
|
|
2725
|
-
const { colors: t } =
|
|
2727
|
+
const { colors: t } = b(), [n, i] = w(!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);
|
|
2726
2728
|
return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2727
2729
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2728
2730
|
/* @__PURE__ */ r(
|
|
@@ -2762,7 +2764,7 @@ function Ir({
|
|
|
2762
2764
|
color: t.textSecondary,
|
|
2763
2765
|
whiteSpace: "nowrap"
|
|
2764
2766
|
},
|
|
2765
|
-
children:
|
|
2767
|
+
children: c
|
|
2766
2768
|
}
|
|
2767
2769
|
),
|
|
2768
2770
|
/* @__PURE__ */ r(
|
|
@@ -2872,9 +2874,9 @@ function Dr({
|
|
|
2872
2874
|
t: o,
|
|
2873
2875
|
isLatest: t = !1
|
|
2874
2876
|
}) {
|
|
2875
|
-
const { colors: n } =
|
|
2877
|
+
const { colors: n } = b(), 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 === "");
|
|
2876
2878
|
return H(() => {
|
|
2877
|
-
const x =
|
|
2879
|
+
const x = c.current;
|
|
2878
2880
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
2879
2881
|
}, [i, a]), /* @__PURE__ */ m(
|
|
2880
2882
|
v.div,
|
|
@@ -2950,7 +2952,7 @@ function Dr({
|
|
|
2950
2952
|
children: /* @__PURE__ */ r(
|
|
2951
2953
|
"div",
|
|
2952
2954
|
{
|
|
2953
|
-
ref:
|
|
2955
|
+
ref: c,
|
|
2954
2956
|
style: {
|
|
2955
2957
|
minHeight: Br,
|
|
2956
2958
|
maxHeight: Pr,
|
|
@@ -2979,7 +2981,7 @@ function Wr({
|
|
|
2979
2981
|
item: e,
|
|
2980
2982
|
t: o
|
|
2981
2983
|
}) {
|
|
2982
|
-
const { colors: t } =
|
|
2984
|
+
const { colors: t } = b(), [n, i] = w(!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;
|
|
2983
2985
|
return /* @__PURE__ */ m(
|
|
2984
2986
|
v.div,
|
|
2985
2987
|
{
|
|
@@ -3056,19 +3058,19 @@ function Wr({
|
|
|
3056
3058
|
/* @__PURE__ */ r(
|
|
3057
3059
|
"span",
|
|
3058
3060
|
{
|
|
3059
|
-
onClick:
|
|
3061
|
+
onClick: c ? () => i((h) => !h) : void 0,
|
|
3060
3062
|
style: {
|
|
3061
3063
|
fontSize: 12,
|
|
3062
3064
|
color: l ? t.textError : t.textSecondary,
|
|
3063
3065
|
lineHeight: 1.4,
|
|
3064
3066
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
3065
3067
|
wordBreak: "break-word",
|
|
3066
|
-
cursor:
|
|
3068
|
+
cursor: c ? "pointer" : "default"
|
|
3067
3069
|
},
|
|
3068
3070
|
children: p
|
|
3069
3071
|
}
|
|
3070
3072
|
),
|
|
3071
|
-
|
|
3073
|
+
c && /* @__PURE__ */ r(
|
|
3072
3074
|
"span",
|
|
3073
3075
|
{
|
|
3074
3076
|
style: {
|
|
@@ -3121,7 +3123,7 @@ function $r({
|
|
|
3121
3123
|
durationSeconds: t,
|
|
3122
3124
|
t: n
|
|
3123
3125
|
}) {
|
|
3124
|
-
const { colors: i } =
|
|
3126
|
+
const { colors: i } = b(), 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 });
|
|
3125
3127
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3126
3128
|
/* @__PURE__ */ r(
|
|
3127
3129
|
v.div,
|
|
@@ -3152,12 +3154,12 @@ function Nr({
|
|
|
3152
3154
|
isLatest: o = !1,
|
|
3153
3155
|
t
|
|
3154
3156
|
}) {
|
|
3155
|
-
const { colors: n } =
|
|
3156
|
-
let s = 0,
|
|
3157
|
+
const { colors: n } = b(), [i, a] = w(!1), l = e.results ?? [], { successCount: c, errorCount: p } = z(() => {
|
|
3158
|
+
let s = 0, d = 0;
|
|
3157
3159
|
for (const f of l)
|
|
3158
|
-
f.error != null ?
|
|
3159
|
-
return { successCount: s, errorCount:
|
|
3160
|
-
}, [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 }),
|
|
3160
|
+
f.error != null ? d += 1 : s += 1;
|
|
3161
|
+
return { successCount: s, errorCount: d };
|
|
3162
|
+
}, [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}`;
|
|
3161
3163
|
return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
|
|
3162
3164
|
"div",
|
|
3163
3165
|
{
|
|
@@ -3269,7 +3271,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3269
3271
|
t: n
|
|
3270
3272
|
}
|
|
3271
3273
|
), ge = (e) => {
|
|
3272
|
-
const { colors: o } =
|
|
3274
|
+
const { colors: o } = b(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
|
|
3273
3275
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3274
3276
|
/* @__PURE__ */ r(
|
|
3275
3277
|
v.div,
|
|
@@ -3507,7 +3509,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3507
3509
|
}
|
|
3508
3510
|
)
|
|
3509
3511
|
] });
|
|
3510
|
-
},
|
|
3512
|
+
}, jr = ({ data: e, t: o }) => {
|
|
3511
3513
|
const t = k(o.generateReportCompleted, {
|
|
3512
3514
|
title: e.reportTitle
|
|
3513
3515
|
});
|
|
@@ -3526,7 +3528,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3526
3528
|
children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
|
|
3527
3529
|
}
|
|
3528
3530
|
) });
|
|
3529
|
-
}, K = 12, V = 1.45,
|
|
3531
|
+
}, K = 12, V = 1.45, Qr = Math.ceil(
|
|
3530
3532
|
K * V
|
|
3531
3533
|
), he = Math.ceil(
|
|
3532
3534
|
5 * K * V
|
|
@@ -3536,15 +3538,15 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3536
3538
|
collapsed: t = !1,
|
|
3537
3539
|
label: n
|
|
3538
3540
|
}) => {
|
|
3539
|
-
const { colors: i } =
|
|
3540
|
-
return
|
|
3541
|
+
const { colors: i } = b(), a = A(null);
|
|
3542
|
+
return Qe(() => {
|
|
3541
3543
|
const l = a.current;
|
|
3542
3544
|
if (l == null || !o || e.length === 0)
|
|
3543
3545
|
return;
|
|
3544
|
-
const
|
|
3546
|
+
const c = () => {
|
|
3545
3547
|
l.scrollTop = l.scrollHeight;
|
|
3546
3548
|
};
|
|
3547
|
-
|
|
3549
|
+
c(), requestAnimationFrame(c);
|
|
3548
3550
|
}, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
|
|
3549
3551
|
n != null && n.length > 0 && /* @__PURE__ */ r(
|
|
3550
3552
|
"span",
|
|
@@ -3574,7 +3576,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3574
3576
|
ref: a,
|
|
3575
3577
|
className: "memory-search-generating-reasoning-viewport",
|
|
3576
3578
|
style: {
|
|
3577
|
-
minHeight:
|
|
3579
|
+
minHeight: Qr,
|
|
3578
3580
|
...o ? {
|
|
3579
3581
|
maxHeight: he,
|
|
3580
3582
|
overflowY: "auto"
|
|
@@ -3600,7 +3602,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3600
3602
|
function Z(e) {
|
|
3601
3603
|
return e.text != null && e.text.length > 0;
|
|
3602
3604
|
}
|
|
3603
|
-
function
|
|
3605
|
+
function j(e) {
|
|
3604
3606
|
return e.technicalReasoning != null && e.technicalReasoning.length > 0;
|
|
3605
3607
|
}
|
|
3606
3608
|
function Kr(e, o) {
|
|
@@ -3615,7 +3617,7 @@ const Vr = ({
|
|
|
3615
3617
|
t: i,
|
|
3616
3618
|
onMemoryClick: a
|
|
3617
3619
|
}) => {
|
|
3618
|
-
const { colors: l } =
|
|
3620
|
+
const { colors: l } = b(), c = e.reasoningCompleted === !0 || n || Z(e), p = !c, u = !j(e) && !Z(e), [g, h] = w(!1), x = j(e) && e.reasoningCompleted !== !0, T = u && p, y = j(e) && !x, s = c ? Kr(o, t) : void 0;
|
|
3619
3621
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3620
3622
|
/* @__PURE__ */ m(
|
|
3621
3623
|
v.div,
|
|
@@ -3641,14 +3643,14 @@ const Vr = ({
|
|
|
3641
3643
|
flexShrink: 0,
|
|
3642
3644
|
width: 32
|
|
3643
3645
|
},
|
|
3644
|
-
children:
|
|
3646
|
+
children: c ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
|
|
3645
3647
|
}
|
|
3646
3648
|
),
|
|
3647
|
-
|
|
3649
|
+
T ? /* @__PURE__ */ r(C, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
|
|
3648
3650
|
]
|
|
3649
3651
|
}
|
|
3650
3652
|
),
|
|
3651
|
-
|
|
3653
|
+
j(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
|
|
3652
3654
|
/* @__PURE__ */ r(
|
|
3653
3655
|
Fe,
|
|
3654
3656
|
{
|
|
@@ -3662,7 +3664,7 @@ const Vr = ({
|
|
|
3662
3664
|
"button",
|
|
3663
3665
|
{
|
|
3664
3666
|
type: "button",
|
|
3665
|
-
onClick: () => h((
|
|
3667
|
+
onClick: () => h((d) => !d),
|
|
3666
3668
|
style: {
|
|
3667
3669
|
alignSelf: "flex-start",
|
|
3668
3670
|
border: "none",
|
|
@@ -3699,7 +3701,7 @@ const Vr = ({
|
|
|
3699
3701
|
)
|
|
3700
3702
|
] });
|
|
3701
3703
|
}, Xr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3702
|
-
const { colors: i } =
|
|
3704
|
+
const { colors: i } = b(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
|
|
3703
3705
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3704
3706
|
/* @__PURE__ */ r(
|
|
3705
3707
|
v.div,
|
|
@@ -3730,7 +3732,7 @@ const Vr = ({
|
|
|
3730
3732
|
)
|
|
3731
3733
|
] });
|
|
3732
3734
|
}, Yr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3733
|
-
const { colors: i } =
|
|
3735
|
+
const { colors: i } = b(), a = k(n.exploreFindMemoriesQuery, {
|
|
3734
3736
|
query: e.query
|
|
3735
3737
|
});
|
|
3736
3738
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
@@ -3765,7 +3767,7 @@ const Vr = ({
|
|
|
3765
3767
|
)
|
|
3766
3768
|
] });
|
|
3767
3769
|
}, ee = 5, Jr = ({ data: e, t: o }) => {
|
|
3768
|
-
const { colors: t } =
|
|
3770
|
+
const { colors: t } = b(), [n, i] = w(!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(
|
|
3769
3771
|
p,
|
|
3770
3772
|
g ? o.and : void 0
|
|
3771
3773
|
)}` : o.memoriesFound;
|
|
@@ -3778,7 +3780,7 @@ const Vr = ({
|
|
|
3778
3780
|
transition: { duration: 0.3, delay: 0 },
|
|
3779
3781
|
children: [
|
|
3780
3782
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
|
|
3781
|
-
|
|
3783
|
+
c && !n && /* @__PURE__ */ m(R, { children: [
|
|
3782
3784
|
" ",
|
|
3783
3785
|
/* @__PURE__ */ r(
|
|
3784
3786
|
"button",
|
|
@@ -3802,7 +3804,7 @@ const Vr = ({
|
|
|
3802
3804
|
}
|
|
3803
3805
|
)
|
|
3804
3806
|
] }),
|
|
3805
|
-
|
|
3807
|
+
c && n && /* @__PURE__ */ m(R, { children: [
|
|
3806
3808
|
" ",
|
|
3807
3809
|
/* @__PURE__ */ r(
|
|
3808
3810
|
"button",
|
|
@@ -3884,7 +3886,7 @@ function nn({
|
|
|
3884
3886
|
completed: o,
|
|
3885
3887
|
t
|
|
3886
3888
|
}) {
|
|
3887
|
-
const { colors: n } =
|
|
3889
|
+
const { colors: n } = b(), [i, a] = w(!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;
|
|
3888
3890
|
return /* @__PURE__ */ m(
|
|
3889
3891
|
v.div,
|
|
3890
3892
|
{
|
|
@@ -3969,7 +3971,7 @@ function nn({
|
|
|
3969
3971
|
);
|
|
3970
3972
|
}
|
|
3971
3973
|
const on = ({ data: e, completed: o, t }) => {
|
|
3972
|
-
const { colors: n } =
|
|
3974
|
+
const { colors: n } = b();
|
|
3973
3975
|
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
3974
3976
|
/* @__PURE__ */ r(
|
|
3975
3977
|
"div",
|
|
@@ -3999,7 +4001,7 @@ const on = ({ data: e, completed: o, t }) => {
|
|
|
3999
4001
|
durationSeconds: t,
|
|
4000
4002
|
t: n
|
|
4001
4003
|
}) => {
|
|
4002
|
-
const { colors: i } =
|
|
4004
|
+
const { colors: i } = b(), a = k(n.exploreRunCode, { title: e.title });
|
|
4003
4005
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4004
4006
|
/* @__PURE__ */ r(
|
|
4005
4007
|
v.div,
|
|
@@ -4029,7 +4031,106 @@ const on = ({ data: e, completed: o, t }) => {
|
|
|
4029
4031
|
}
|
|
4030
4032
|
)
|
|
4031
4033
|
] });
|
|
4032
|
-
}
|
|
4034
|
+
};
|
|
4035
|
+
function an({
|
|
4036
|
+
section: e,
|
|
4037
|
+
allCompleted: o
|
|
4038
|
+
}) {
|
|
4039
|
+
return e.completed || o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
4040
|
+
}
|
|
4041
|
+
function ln({
|
|
4042
|
+
section: e,
|
|
4043
|
+
allCompleted: o
|
|
4044
|
+
}) {
|
|
4045
|
+
const { colors: t } = b();
|
|
4046
|
+
return /* @__PURE__ */ m(
|
|
4047
|
+
v.div,
|
|
4048
|
+
{
|
|
4049
|
+
initial: { opacity: 0 },
|
|
4050
|
+
animate: { opacity: 1 },
|
|
4051
|
+
transition: { duration: 0.25 },
|
|
4052
|
+
style: {
|
|
4053
|
+
paddingTop: "12px",
|
|
4054
|
+
paddingBottom: "12px",
|
|
4055
|
+
borderBottom: `1px solid ${t.border}`,
|
|
4056
|
+
display: "flex",
|
|
4057
|
+
flexDirection: "row",
|
|
4058
|
+
alignItems: "center",
|
|
4059
|
+
gap: "10px",
|
|
4060
|
+
minWidth: 0
|
|
4061
|
+
},
|
|
4062
|
+
children: [
|
|
4063
|
+
/* @__PURE__ */ r(
|
|
4064
|
+
"div",
|
|
4065
|
+
{
|
|
4066
|
+
style: {
|
|
4067
|
+
display: "flex",
|
|
4068
|
+
alignItems: "center",
|
|
4069
|
+
justifyContent: "center",
|
|
4070
|
+
flexShrink: 0,
|
|
4071
|
+
width: 32
|
|
4072
|
+
},
|
|
4073
|
+
children: /* @__PURE__ */ r(an, { section: e, allCompleted: o })
|
|
4074
|
+
}
|
|
4075
|
+
),
|
|
4076
|
+
/* @__PURE__ */ r(
|
|
4077
|
+
"span",
|
|
4078
|
+
{
|
|
4079
|
+
style: {
|
|
4080
|
+
fontSize: 13,
|
|
4081
|
+
fontWeight: 500,
|
|
4082
|
+
color: t.textPrimary
|
|
4083
|
+
},
|
|
4084
|
+
children: e.title
|
|
4085
|
+
}
|
|
4086
|
+
)
|
|
4087
|
+
]
|
|
4088
|
+
}
|
|
4089
|
+
);
|
|
4090
|
+
}
|
|
4091
|
+
const sn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i }) => {
|
|
4092
|
+
const { colors: a } = b(), l = k(i.exploreComposeHtmlReport, {
|
|
4093
|
+
title: e.title
|
|
4094
|
+
}), c = e.sections ?? [], p = o || c.length > 0 && c.every((g) => g.completed), u = t && !n && !p;
|
|
4095
|
+
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
4096
|
+
/* @__PURE__ */ r(
|
|
4097
|
+
v.div,
|
|
4098
|
+
{
|
|
4099
|
+
style: {
|
|
4100
|
+
display: "flex",
|
|
4101
|
+
alignItems: "center",
|
|
4102
|
+
gap: "10px",
|
|
4103
|
+
color: a.textSecondary,
|
|
4104
|
+
marginBottom: c.length > 0 ? "4px" : void 0
|
|
4105
|
+
},
|
|
4106
|
+
initial: { opacity: 0, y: -10 },
|
|
4107
|
+
animate: { opacity: 1, y: 0 },
|
|
4108
|
+
transition: { duration: 0.3 },
|
|
4109
|
+
children: u ? /* @__PURE__ */ r(C, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: l })
|
|
4110
|
+
}
|
|
4111
|
+
),
|
|
4112
|
+
c.map((g) => /* @__PURE__ */ r(
|
|
4113
|
+
ln,
|
|
4114
|
+
{
|
|
4115
|
+
section: g,
|
|
4116
|
+
allCompleted: p
|
|
4117
|
+
},
|
|
4118
|
+
g.title
|
|
4119
|
+
)),
|
|
4120
|
+
n !== void 0 && /* @__PURE__ */ r(
|
|
4121
|
+
"div",
|
|
4122
|
+
{
|
|
4123
|
+
style: {
|
|
4124
|
+
fontSize: "12px",
|
|
4125
|
+
color: a.textMuted,
|
|
4126
|
+
marginTop: "4px",
|
|
4127
|
+
fontStyle: "italic"
|
|
4128
|
+
},
|
|
4129
|
+
children: k(i.tookSeconds, { n })
|
|
4130
|
+
}
|
|
4131
|
+
)
|
|
4132
|
+
] });
|
|
4133
|
+
}, cn = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
|
|
4033
4134
|
Me,
|
|
4034
4135
|
{
|
|
4035
4136
|
data: {
|
|
@@ -4041,20 +4142,20 @@ const on = ({ data: e, completed: o, t }) => {
|
|
|
4041
4142
|
t
|
|
4042
4143
|
}
|
|
4043
4144
|
);
|
|
4044
|
-
function
|
|
4145
|
+
function dn({ item: e }) {
|
|
4045
4146
|
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" });
|
|
4046
4147
|
}
|
|
4047
|
-
function
|
|
4148
|
+
function pn(e, o) {
|
|
4048
4149
|
return k(o.searchingInMemoriesOfType, {
|
|
4049
4150
|
name: e.memoryTypeName
|
|
4050
4151
|
});
|
|
4051
4152
|
}
|
|
4052
|
-
function
|
|
4153
|
+
function un({
|
|
4053
4154
|
item: e,
|
|
4054
4155
|
t: o,
|
|
4055
4156
|
showShimmerForPrimary: t
|
|
4056
4157
|
}) {
|
|
4057
|
-
const { colors: n } =
|
|
4158
|
+
const { colors: n } = b(), i = e.result != null, a = e.error != null, l = pn(e, o);
|
|
4058
4159
|
return /* @__PURE__ */ m(
|
|
4059
4160
|
v.div,
|
|
4060
4161
|
{
|
|
@@ -4082,7 +4183,7 @@ function cn({
|
|
|
4082
4183
|
flexShrink: 0,
|
|
4083
4184
|
width: 32
|
|
4084
4185
|
},
|
|
4085
|
-
children: /* @__PURE__ */ r(
|
|
4186
|
+
children: /* @__PURE__ */ r(dn, { item: e })
|
|
4086
4187
|
}
|
|
4087
4188
|
),
|
|
4088
4189
|
/* @__PURE__ */ m(
|
|
@@ -4121,20 +4222,20 @@ function cn({
|
|
|
4121
4222
|
}
|
|
4122
4223
|
);
|
|
4123
4224
|
}
|
|
4124
|
-
const
|
|
4125
|
-
const { colors: i } =
|
|
4225
|
+
const mn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4226
|
+
const { colors: i } = b(), a = z(() => {
|
|
4126
4227
|
let l = -1;
|
|
4127
|
-
return e.memoryTypes.forEach((
|
|
4128
|
-
|
|
4228
|
+
return e.memoryTypes.forEach((c, p) => {
|
|
4229
|
+
c.result == null && c.error == null && (l = p);
|
|
4129
4230
|
}), l;
|
|
4130
4231
|
}, [e.memoryTypes]);
|
|
4131
4232
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4132
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l,
|
|
4133
|
-
|
|
4233
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
|
|
4234
|
+
un,
|
|
4134
4235
|
{
|
|
4135
4236
|
item: l,
|
|
4136
4237
|
t: n,
|
|
4137
|
-
showShimmerForPrimary:
|
|
4238
|
+
showShimmerForPrimary: c === a && o
|
|
4138
4239
|
},
|
|
4139
4240
|
l.memoryTypeId
|
|
4140
4241
|
)),
|
|
@@ -4155,26 +4256,26 @@ const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4155
4256
|
function U(e) {
|
|
4156
4257
|
return e.queries != null && e.queries.length > 0;
|
|
4157
4258
|
}
|
|
4158
|
-
function
|
|
4259
|
+
function gn(e) {
|
|
4159
4260
|
const o = e.reasoning;
|
|
4160
4261
|
return (o == null || o === "") && !U(e);
|
|
4161
4262
|
}
|
|
4162
|
-
function
|
|
4263
|
+
function hn(e) {
|
|
4163
4264
|
if (U(e)) return 3;
|
|
4164
4265
|
const o = e.reasoning;
|
|
4165
4266
|
return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
|
|
4166
4267
|
}
|
|
4167
|
-
function
|
|
4268
|
+
function yn({ phase: e }) {
|
|
4168
4269
|
return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
4169
4270
|
}
|
|
4170
|
-
function
|
|
4271
|
+
function fn({
|
|
4171
4272
|
item: e,
|
|
4172
4273
|
t: o,
|
|
4173
4274
|
isActiveRow: t
|
|
4174
4275
|
}) {
|
|
4175
|
-
const { colors: n } =
|
|
4276
|
+
const { colors: n } = b(), i = gn(e), a = hn(e), l = e.reasoning, c = l != null && l.length > 0, [p, u] = w(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
|
|
4176
4277
|
name: e.memoryTypeName
|
|
4177
|
-
}),
|
|
4278
|
+
}), T = !i && a === 3;
|
|
4178
4279
|
return /* @__PURE__ */ m(
|
|
4179
4280
|
v.div,
|
|
4180
4281
|
{
|
|
@@ -4187,7 +4288,7 @@ function gn({
|
|
|
4187
4288
|
borderBottom: `1px solid ${n.border}`,
|
|
4188
4289
|
display: "flex",
|
|
4189
4290
|
flexDirection: "row",
|
|
4190
|
-
alignItems:
|
|
4291
|
+
alignItems: T ? "flex-start" : "center",
|
|
4191
4292
|
gap: "10px",
|
|
4192
4293
|
minWidth: 0
|
|
4193
4294
|
},
|
|
@@ -4201,9 +4302,9 @@ function gn({
|
|
|
4201
4302
|
justifyContent: "center",
|
|
4202
4303
|
flexShrink: 0,
|
|
4203
4304
|
width: 32,
|
|
4204
|
-
...
|
|
4305
|
+
...T ? { paddingTop: 2 } : {}
|
|
4205
4306
|
},
|
|
4206
|
-
children: /* @__PURE__ */ r(
|
|
4307
|
+
children: /* @__PURE__ */ r(yn, { phase: i ? 1 : a })
|
|
4207
4308
|
}
|
|
4208
4309
|
),
|
|
4209
4310
|
/* @__PURE__ */ m(
|
|
@@ -4218,7 +4319,7 @@ function gn({
|
|
|
4218
4319
|
},
|
|
4219
4320
|
children: [
|
|
4220
4321
|
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: g ? /* @__PURE__ */ r(C, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
|
|
4221
|
-
a === 1 &&
|
|
4322
|
+
a === 1 && c && !U(e) && /* @__PURE__ */ r(
|
|
4222
4323
|
Fe,
|
|
4223
4324
|
{
|
|
4224
4325
|
text: l,
|
|
@@ -4273,7 +4374,7 @@ function gn({
|
|
|
4273
4374
|
}
|
|
4274
4375
|
)
|
|
4275
4376
|
] }),
|
|
4276
|
-
|
|
4377
|
+
c && /* @__PURE__ */ m(R, { children: [
|
|
4277
4378
|
/* @__PURE__ */ r(
|
|
4278
4379
|
"button",
|
|
4279
4380
|
{
|
|
@@ -4317,20 +4418,20 @@ function gn({
|
|
|
4317
4418
|
}
|
|
4318
4419
|
);
|
|
4319
4420
|
}
|
|
4320
|
-
const
|
|
4321
|
-
const { colors: i } =
|
|
4421
|
+
const xn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4422
|
+
const { colors: i } = b(), a = z(() => {
|
|
4322
4423
|
let l = -1;
|
|
4323
|
-
return e.memoryTypes.forEach((
|
|
4324
|
-
U(
|
|
4424
|
+
return e.memoryTypes.forEach((c, p) => {
|
|
4425
|
+
U(c) || (l = p);
|
|
4325
4426
|
}), l;
|
|
4326
4427
|
}, [e.memoryTypes]);
|
|
4327
4428
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4328
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l,
|
|
4329
|
-
|
|
4429
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
|
|
4430
|
+
fn,
|
|
4330
4431
|
{
|
|
4331
4432
|
item: l,
|
|
4332
4433
|
t: n,
|
|
4333
|
-
isActiveRow:
|
|
4434
|
+
isActiveRow: c === a && o
|
|
4334
4435
|
},
|
|
4335
4436
|
l.memoryTypeId
|
|
4336
4437
|
)),
|
|
@@ -4348,14 +4449,14 @@ const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4348
4449
|
)
|
|
4349
4450
|
] });
|
|
4350
4451
|
};
|
|
4351
|
-
function
|
|
4452
|
+
function kn(e) {
|
|
4352
4453
|
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 });
|
|
4353
4454
|
}
|
|
4354
|
-
function
|
|
4455
|
+
function Sn({
|
|
4355
4456
|
item: e,
|
|
4356
4457
|
t: o
|
|
4357
4458
|
}) {
|
|
4358
|
-
const { colors: t } =
|
|
4459
|
+
const { colors: t } = b();
|
|
4359
4460
|
if (e.error != null)
|
|
4360
4461
|
return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
|
|
4361
4462
|
if (e.result == null)
|
|
@@ -4369,13 +4470,13 @@ function fn({
|
|
|
4369
4470
|
a
|
|
4370
4471
|
] });
|
|
4371
4472
|
}
|
|
4372
|
-
function
|
|
4473
|
+
function bn({
|
|
4373
4474
|
items: e,
|
|
4374
4475
|
queryRow: o,
|
|
4375
4476
|
onExploreQueryResultClick: t,
|
|
4376
4477
|
t: n
|
|
4377
4478
|
}) {
|
|
4378
|
-
const { colors: i } =
|
|
4479
|
+
const { colors: i } = b(), [a, l] = w(null);
|
|
4379
4480
|
if (e.length === 0)
|
|
4380
4481
|
return /* @__PURE__ */ r(
|
|
4381
4482
|
"div",
|
|
@@ -4388,7 +4489,7 @@ function xn({
|
|
|
4388
4489
|
children: n.memorySearchExploreNoResults
|
|
4389
4490
|
}
|
|
4390
4491
|
);
|
|
4391
|
-
const
|
|
4492
|
+
const c = !!t;
|
|
4392
4493
|
return /* @__PURE__ */ r(
|
|
4393
4494
|
"div",
|
|
4394
4495
|
{
|
|
@@ -4410,8 +4511,8 @@ function xn({
|
|
|
4410
4511
|
}),
|
|
4411
4512
|
h.length > 0 ? ne(h, n) : n.pagesNotAvailable
|
|
4412
4513
|
].filter(
|
|
4413
|
-
(
|
|
4414
|
-
),
|
|
4514
|
+
(d) => d != null && d !== ""
|
|
4515
|
+
), T = {
|
|
4415
4516
|
memoryId: p.memoryId,
|
|
4416
4517
|
memoryTitle: p.memoryTitle,
|
|
4417
4518
|
pageNumbers: h,
|
|
@@ -4485,7 +4586,7 @@ function xn({
|
|
|
4485
4586
|
]
|
|
4486
4587
|
}
|
|
4487
4588
|
),
|
|
4488
|
-
|
|
4589
|
+
c && /* @__PURE__ */ m(
|
|
4489
4590
|
"button",
|
|
4490
4591
|
{
|
|
4491
4592
|
type: "button",
|
|
@@ -4495,7 +4596,7 @@ function xn({
|
|
|
4495
4596
|
l(y);
|
|
4496
4597
|
try {
|
|
4497
4598
|
await t(
|
|
4498
|
-
|
|
4599
|
+
T
|
|
4499
4600
|
);
|
|
4500
4601
|
} finally {
|
|
4501
4602
|
l(null);
|
|
@@ -4537,7 +4638,7 @@ function xn({
|
|
|
4537
4638
|
}
|
|
4538
4639
|
);
|
|
4539
4640
|
}
|
|
4540
|
-
function
|
|
4641
|
+
function Tn(e) {
|
|
4541
4642
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
4542
4643
|
return e.forEach((n, i) => {
|
|
4543
4644
|
let a = t.get(n.memoryTypeId);
|
|
@@ -4548,7 +4649,7 @@ function kn(e) {
|
|
|
4548
4649
|
}, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
|
|
4549
4650
|
}), o.map((n) => t.get(n));
|
|
4550
4651
|
}
|
|
4551
|
-
function
|
|
4652
|
+
function vn({
|
|
4552
4653
|
group: e,
|
|
4553
4654
|
t: o,
|
|
4554
4655
|
isLatest: t,
|
|
@@ -4556,7 +4657,7 @@ function Sn({
|
|
|
4556
4657
|
toggleExpanded: i,
|
|
4557
4658
|
onExploreQueryResultClick: a
|
|
4558
4659
|
}) {
|
|
4559
|
-
const { colors: l } =
|
|
4660
|
+
const { colors: l } = b(), c = e.items.map((u) => u.item), p = c.some(
|
|
4560
4661
|
(u) => u.result == null && u.error == null
|
|
4561
4662
|
);
|
|
4562
4663
|
return /* @__PURE__ */ m(
|
|
@@ -4587,7 +4688,7 @@ function Sn({
|
|
|
4587
4688
|
width: 32,
|
|
4588
4689
|
...p ? {} : { paddingTop: 2 }
|
|
4589
4690
|
},
|
|
4590
|
-
children:
|
|
4691
|
+
children: kn(c)
|
|
4591
4692
|
}
|
|
4592
4693
|
),
|
|
4593
4694
|
/* @__PURE__ */ m(
|
|
@@ -4614,8 +4715,8 @@ function Sn({
|
|
|
4614
4715
|
}
|
|
4615
4716
|
),
|
|
4616
4717
|
e.items.map(({ item: u, flatIndex: g }) => {
|
|
4617
|
-
var
|
|
4618
|
-
const h = u.result != null, x = u.error != null,
|
|
4718
|
+
var d;
|
|
4719
|
+
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) ?? [];
|
|
4619
4720
|
return /* @__PURE__ */ m(
|
|
4620
4721
|
"div",
|
|
4621
4722
|
{
|
|
@@ -4649,7 +4750,7 @@ function Sn({
|
|
|
4649
4750
|
flex: "1 1 12rem",
|
|
4650
4751
|
minWidth: 0
|
|
4651
4752
|
},
|
|
4652
|
-
children:
|
|
4753
|
+
children: T ? /* @__PURE__ */ r(
|
|
4653
4754
|
C,
|
|
4654
4755
|
{
|
|
4655
4756
|
text: u.query,
|
|
@@ -4670,7 +4771,7 @@ function Sn({
|
|
|
4670
4771
|
flexShrink: 0
|
|
4671
4772
|
},
|
|
4672
4773
|
children: [
|
|
4673
|
-
/* @__PURE__ */ r(
|
|
4774
|
+
/* @__PURE__ */ r(Sn, { item: u, t: o }),
|
|
4674
4775
|
h && /* @__PURE__ */ r(
|
|
4675
4776
|
"button",
|
|
4676
4777
|
{
|
|
@@ -4696,7 +4797,7 @@ function Sn({
|
|
|
4696
4797
|
}
|
|
4697
4798
|
),
|
|
4698
4799
|
h && y && /* @__PURE__ */ r(
|
|
4699
|
-
|
|
4800
|
+
bn,
|
|
4700
4801
|
{
|
|
4701
4802
|
items: s,
|
|
4702
4803
|
queryRow: u,
|
|
@@ -4716,22 +4817,22 @@ function Sn({
|
|
|
4716
4817
|
}
|
|
4717
4818
|
);
|
|
4718
4819
|
}
|
|
4719
|
-
const
|
|
4820
|
+
const wn = ({
|
|
4720
4821
|
data: e,
|
|
4721
4822
|
isLatest: o = !1,
|
|
4722
4823
|
durationSeconds: t,
|
|
4723
4824
|
onExploreQueryResultClick: n,
|
|
4724
4825
|
t: i
|
|
4725
4826
|
}) => {
|
|
4726
|
-
const { colors: a } =
|
|
4827
|
+
const { colors: a } = b(), [l, c] = w(
|
|
4727
4828
|
{}
|
|
4728
4829
|
), p = L((g) => {
|
|
4729
|
-
|
|
4830
|
+
c((h) => ({
|
|
4730
4831
|
...h,
|
|
4731
4832
|
[g]: !h[g]
|
|
4732
4833
|
}));
|
|
4733
4834
|
}, []), u = z(
|
|
4734
|
-
() =>
|
|
4835
|
+
() => Tn(e.queries),
|
|
4735
4836
|
[e.queries]
|
|
4736
4837
|
);
|
|
4737
4838
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
@@ -4743,7 +4844,7 @@ const bn = ({
|
|
|
4743
4844
|
repeat: !0
|
|
4744
4845
|
}
|
|
4745
4846
|
) : u.map((g) => /* @__PURE__ */ r(
|
|
4746
|
-
|
|
4847
|
+
vn,
|
|
4747
4848
|
{
|
|
4748
4849
|
group: g,
|
|
4749
4850
|
t: i,
|
|
@@ -4767,8 +4868,8 @@ const bn = ({
|
|
|
4767
4868
|
}
|
|
4768
4869
|
)
|
|
4769
4870
|
] });
|
|
4770
|
-
},
|
|
4771
|
-
const { colors: n } =
|
|
4871
|
+
}, Cn = ({ data: e, onSearchResultClick: o, t }) => {
|
|
4872
|
+
const { colors: n } = b(), i = e.response.items, a = !!o, [l, c] = w(null);
|
|
4772
4873
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4773
4874
|
/* @__PURE__ */ r(
|
|
4774
4875
|
v.div,
|
|
@@ -4803,8 +4904,8 @@ const bn = ({
|
|
|
4803
4904
|
}),
|
|
4804
4905
|
h.length > 0 ? ne(h, t) : t.pagesNotAvailable
|
|
4805
4906
|
].filter(
|
|
4806
|
-
(
|
|
4807
|
-
),
|
|
4907
|
+
(d) => d != null && d !== ""
|
|
4908
|
+
), T = {
|
|
4808
4909
|
memoryId: p.memoryId,
|
|
4809
4910
|
memoryTitle: p.memoryTitle,
|
|
4810
4911
|
memoryTypeId: p.memoryTypeId,
|
|
@@ -4885,11 +4986,11 @@ const bn = ({
|
|
|
4885
4986
|
"aria-busy": s,
|
|
4886
4987
|
disabled: s,
|
|
4887
4988
|
onClick: async () => {
|
|
4888
|
-
|
|
4989
|
+
c(y);
|
|
4889
4990
|
try {
|
|
4890
|
-
await o(
|
|
4991
|
+
await o(T);
|
|
4891
4992
|
} finally {
|
|
4892
|
-
|
|
4993
|
+
c(null);
|
|
4893
4994
|
}
|
|
4894
4995
|
},
|
|
4895
4996
|
style: {
|
|
@@ -4929,7 +5030,7 @@ const bn = ({
|
|
|
4929
5030
|
)
|
|
4930
5031
|
] });
|
|
4931
5032
|
}, O = ({ message: e }) => {
|
|
4932
|
-
const { colors: o } =
|
|
5033
|
+
const { colors: o } = b();
|
|
4933
5034
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
4934
5035
|
v.div,
|
|
4935
5036
|
{
|
|
@@ -4955,7 +5056,7 @@ const bn = ({
|
|
|
4955
5056
|
}
|
|
4956
5057
|
) });
|
|
4957
5058
|
};
|
|
4958
|
-
class
|
|
5059
|
+
class Mn extends Ue.Component {
|
|
4959
5060
|
constructor(o) {
|
|
4960
5061
|
super(o), this.state = { hasError: !1 };
|
|
4961
5062
|
}
|
|
@@ -4974,7 +5075,7 @@ class vn extends Ue.Component {
|
|
|
4974
5075
|
return this.state.hasError ? null : this.props.children;
|
|
4975
5076
|
}
|
|
4976
5077
|
}
|
|
4977
|
-
const
|
|
5078
|
+
const En = ({
|
|
4978
5079
|
progressViewItems: e,
|
|
4979
5080
|
loading: o,
|
|
4980
5081
|
error: t,
|
|
@@ -4982,33 +5083,33 @@ const wn = ({
|
|
|
4982
5083
|
t: i,
|
|
4983
5084
|
onMemoryClick: a,
|
|
4984
5085
|
onSourceClick: l,
|
|
4985
|
-
onSearchResultClick:
|
|
5086
|
+
onSearchResultClick: c,
|
|
4986
5087
|
onExploreQueryResultClick: p,
|
|
4987
5088
|
downloadFile: u
|
|
4988
5089
|
}) => {
|
|
4989
|
-
const { theme: g, colors: h } =
|
|
5090
|
+
const { theme: g, colors: h } = b(), x = A(null);
|
|
4990
5091
|
H(() => {
|
|
4991
5092
|
x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
4992
5093
|
}, [e.length]);
|
|
4993
|
-
const
|
|
4994
|
-
const
|
|
4995
|
-
if (
|
|
5094
|
+
const T = (s) => {
|
|
5095
|
+
const d = s.item.data;
|
|
5096
|
+
if (d.taskType === "StreamingChatCompletion" && d.eventType === "Text")
|
|
4996
5097
|
return /* @__PURE__ */ r(
|
|
4997
5098
|
N,
|
|
4998
5099
|
{
|
|
4999
|
-
text:
|
|
5100
|
+
text: d.text,
|
|
5000
5101
|
onMemoryClick: a
|
|
5001
5102
|
}
|
|
5002
5103
|
);
|
|
5003
|
-
if (
|
|
5004
|
-
return /* @__PURE__ */ r(lr, { data:
|
|
5005
|
-
if (
|
|
5006
|
-
switch (
|
|
5104
|
+
if (d.taskType === "StructuredChatCompletion" && d.eventType === "Completed")
|
|
5105
|
+
return /* @__PURE__ */ r(lr, { data: d });
|
|
5106
|
+
if (d.taskType === "MemoryChat")
|
|
5107
|
+
switch (d.eventType) {
|
|
5007
5108
|
case "Text":
|
|
5008
5109
|
return /* @__PURE__ */ r(
|
|
5009
5110
|
N,
|
|
5010
5111
|
{
|
|
5011
|
-
text:
|
|
5112
|
+
text: d.text,
|
|
5012
5113
|
onFileDownload: u,
|
|
5013
5114
|
onMemoryClick: a
|
|
5014
5115
|
}
|
|
@@ -5017,7 +5118,7 @@ const wn = ({
|
|
|
5017
5118
|
return /* @__PURE__ */ r(
|
|
5018
5119
|
ge,
|
|
5019
5120
|
{
|
|
5020
|
-
data:
|
|
5121
|
+
data: d,
|
|
5021
5122
|
isLatest: s.isLatest,
|
|
5022
5123
|
durationSeconds: s.durationSeconds,
|
|
5023
5124
|
t: i
|
|
@@ -5027,7 +5128,7 @@ const wn = ({
|
|
|
5027
5128
|
return /* @__PURE__ */ r(
|
|
5028
5129
|
Gr,
|
|
5029
5130
|
{
|
|
5030
|
-
data:
|
|
5131
|
+
data: d,
|
|
5031
5132
|
isLatest: s.isLatest,
|
|
5032
5133
|
durationSeconds: s.durationSeconds,
|
|
5033
5134
|
t: i
|
|
@@ -5037,7 +5138,7 @@ const wn = ({
|
|
|
5037
5138
|
return /* @__PURE__ */ r(
|
|
5038
5139
|
Or,
|
|
5039
5140
|
{
|
|
5040
|
-
data:
|
|
5141
|
+
data: d,
|
|
5041
5142
|
isLatest: s.isLatest,
|
|
5042
5143
|
durationSeconds: s.durationSeconds,
|
|
5043
5144
|
t: i
|
|
@@ -5047,7 +5148,7 @@ const wn = ({
|
|
|
5047
5148
|
return /* @__PURE__ */ r(
|
|
5048
5149
|
_r,
|
|
5049
5150
|
{
|
|
5050
|
-
data:
|
|
5151
|
+
data: d,
|
|
5051
5152
|
isLatest: s.isLatest,
|
|
5052
5153
|
durationSeconds: s.durationSeconds,
|
|
5053
5154
|
t: i
|
|
@@ -5057,7 +5158,7 @@ const wn = ({
|
|
|
5057
5158
|
return /* @__PURE__ */ r(
|
|
5058
5159
|
qr,
|
|
5059
5160
|
{
|
|
5060
|
-
data:
|
|
5161
|
+
data: d,
|
|
5061
5162
|
isLatest: s.isLatest,
|
|
5062
5163
|
durationSeconds: s.durationSeconds,
|
|
5063
5164
|
t: i
|
|
@@ -5067,19 +5168,19 @@ const wn = ({
|
|
|
5067
5168
|
return /* @__PURE__ */ r(
|
|
5068
5169
|
Ur,
|
|
5069
5170
|
{
|
|
5070
|
-
data:
|
|
5171
|
+
data: d,
|
|
5071
5172
|
isLatest: s.isLatest,
|
|
5072
5173
|
durationSeconds: s.durationSeconds,
|
|
5073
5174
|
t: i
|
|
5074
5175
|
}
|
|
5075
5176
|
);
|
|
5076
5177
|
case "GenerateReportCompleted":
|
|
5077
|
-
return /* @__PURE__ */ r(
|
|
5178
|
+
return /* @__PURE__ */ r(jr, { data: d, t: i });
|
|
5078
5179
|
case "FindMemories":
|
|
5079
5180
|
return /* @__PURE__ */ r(
|
|
5080
5181
|
kr,
|
|
5081
5182
|
{
|
|
5082
|
-
data:
|
|
5183
|
+
data: d,
|
|
5083
5184
|
isLatest: s.isLatest,
|
|
5084
5185
|
durationSeconds: s.durationSeconds,
|
|
5085
5186
|
t: i
|
|
@@ -5089,7 +5190,7 @@ const wn = ({
|
|
|
5089
5190
|
return /* @__PURE__ */ r(
|
|
5090
5191
|
Sr,
|
|
5091
5192
|
{
|
|
5092
|
-
data:
|
|
5193
|
+
data: d,
|
|
5093
5194
|
t: i
|
|
5094
5195
|
}
|
|
5095
5196
|
);
|
|
@@ -5097,7 +5198,7 @@ const wn = ({
|
|
|
5097
5198
|
return /* @__PURE__ */ r(
|
|
5098
5199
|
q,
|
|
5099
5200
|
{
|
|
5100
|
-
data:
|
|
5201
|
+
data: d,
|
|
5101
5202
|
isLatest: s.isLatest,
|
|
5102
5203
|
durationSeconds: s.durationSeconds,
|
|
5103
5204
|
t: i
|
|
@@ -5107,18 +5208,18 @@ const wn = ({
|
|
|
5107
5208
|
return /* @__PURE__ */ r(
|
|
5108
5209
|
xr,
|
|
5109
5210
|
{
|
|
5110
|
-
data:
|
|
5211
|
+
data: d,
|
|
5111
5212
|
isLatest: s.isLatest,
|
|
5112
5213
|
durationSeconds: s.durationSeconds,
|
|
5113
5214
|
t: i,
|
|
5114
|
-
onSearchResultClick:
|
|
5215
|
+
onSearchResultClick: c
|
|
5115
5216
|
}
|
|
5116
5217
|
);
|
|
5117
5218
|
case "FindSources":
|
|
5118
5219
|
return /* @__PURE__ */ r(
|
|
5119
5220
|
ce,
|
|
5120
5221
|
{
|
|
5121
|
-
data:
|
|
5222
|
+
data: d,
|
|
5122
5223
|
isLatest: s.isLatest,
|
|
5123
5224
|
durationSeconds: s.durationSeconds,
|
|
5124
5225
|
t: i
|
|
@@ -5128,7 +5229,7 @@ const wn = ({
|
|
|
5128
5229
|
return /* @__PURE__ */ r(
|
|
5129
5230
|
Me,
|
|
5130
5231
|
{
|
|
5131
|
-
data:
|
|
5232
|
+
data: d,
|
|
5132
5233
|
onSourceClick: l,
|
|
5133
5234
|
t: i
|
|
5134
5235
|
}
|
|
@@ -5137,7 +5238,7 @@ const wn = ({
|
|
|
5137
5238
|
return /* @__PURE__ */ r(
|
|
5138
5239
|
Cr,
|
|
5139
5240
|
{
|
|
5140
|
-
data:
|
|
5241
|
+
data: d,
|
|
5141
5242
|
completed: s.completed,
|
|
5142
5243
|
isLatest: s.isLatest,
|
|
5143
5244
|
t: i
|
|
@@ -5147,8 +5248,8 @@ const wn = ({
|
|
|
5147
5248
|
return /* @__PURE__ */ r(
|
|
5148
5249
|
ie,
|
|
5149
5250
|
{
|
|
5150
|
-
data:
|
|
5151
|
-
onSearchResultClick:
|
|
5251
|
+
data: d,
|
|
5252
|
+
onSearchResultClick: c,
|
|
5152
5253
|
t: i
|
|
5153
5254
|
}
|
|
5154
5255
|
);
|
|
@@ -5156,7 +5257,7 @@ const wn = ({
|
|
|
5156
5257
|
return /* @__PURE__ */ r(
|
|
5157
5258
|
Fr,
|
|
5158
5259
|
{
|
|
5159
|
-
data:
|
|
5260
|
+
data: d,
|
|
5160
5261
|
isLatest: s.isLatest,
|
|
5161
5262
|
durationSeconds: s.durationSeconds,
|
|
5162
5263
|
t: i
|
|
@@ -5166,7 +5267,7 @@ const wn = ({
|
|
|
5166
5267
|
return /* @__PURE__ */ r(
|
|
5167
5268
|
Hr,
|
|
5168
5269
|
{
|
|
5169
|
-
data:
|
|
5270
|
+
data: d,
|
|
5170
5271
|
isLatest: s.isLatest,
|
|
5171
5272
|
durationSeconds: s.durationSeconds,
|
|
5172
5273
|
t: i
|
|
@@ -5176,13 +5277,13 @@ const wn = ({
|
|
|
5176
5277
|
return /* @__PURE__ */ r(
|
|
5177
5278
|
N,
|
|
5178
5279
|
{
|
|
5179
|
-
text:
|
|
5280
|
+
text: d.response.textResponse,
|
|
5180
5281
|
onFileDownload: u,
|
|
5181
5282
|
onMemoryClick: a
|
|
5182
5283
|
}
|
|
5183
5284
|
);
|
|
5184
5285
|
default: {
|
|
5185
|
-
const f =
|
|
5286
|
+
const f = d;
|
|
5186
5287
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5187
5288
|
"[fency] Unknown MemoryChat eventType (no UI):",
|
|
5188
5289
|
f.eventType,
|
|
@@ -5190,13 +5291,13 @@ const wn = ({
|
|
|
5190
5291
|
), null);
|
|
5191
5292
|
}
|
|
5192
5293
|
}
|
|
5193
|
-
if (
|
|
5194
|
-
switch (
|
|
5294
|
+
if (d.taskType === "MemorySearch")
|
|
5295
|
+
switch (d.eventType) {
|
|
5195
5296
|
case "GeneratingQueries":
|
|
5196
5297
|
return /* @__PURE__ */ r(
|
|
5197
|
-
|
|
5298
|
+
xn,
|
|
5198
5299
|
{
|
|
5199
|
-
data:
|
|
5300
|
+
data: d,
|
|
5200
5301
|
isLatest: s.isLatest,
|
|
5201
5302
|
durationSeconds: s.durationSeconds,
|
|
5202
5303
|
t: i
|
|
@@ -5204,9 +5305,9 @@ const wn = ({
|
|
|
5204
5305
|
);
|
|
5205
5306
|
case "ExploreQueries":
|
|
5206
5307
|
return /* @__PURE__ */ r(
|
|
5207
|
-
|
|
5308
|
+
wn,
|
|
5208
5309
|
{
|
|
5209
|
-
data:
|
|
5310
|
+
data: d,
|
|
5210
5311
|
isLatest: s.isLatest,
|
|
5211
5312
|
durationSeconds: s.durationSeconds,
|
|
5212
5313
|
onExploreQueryResultClick: p,
|
|
@@ -5215,9 +5316,9 @@ const wn = ({
|
|
|
5215
5316
|
);
|
|
5216
5317
|
case "SearchMemoryTypes":
|
|
5217
5318
|
return /* @__PURE__ */ r(
|
|
5218
|
-
|
|
5319
|
+
mn,
|
|
5219
5320
|
{
|
|
5220
|
-
data:
|
|
5321
|
+
data: d,
|
|
5221
5322
|
isLatest: s.isLatest,
|
|
5222
5323
|
durationSeconds: s.durationSeconds,
|
|
5223
5324
|
t: i
|
|
@@ -5225,15 +5326,15 @@ const wn = ({
|
|
|
5225
5326
|
);
|
|
5226
5327
|
case "Completed":
|
|
5227
5328
|
return /* @__PURE__ */ r(
|
|
5228
|
-
|
|
5329
|
+
Cn,
|
|
5229
5330
|
{
|
|
5230
|
-
data:
|
|
5231
|
-
onSearchResultClick:
|
|
5331
|
+
data: d,
|
|
5332
|
+
onSearchResultClick: c,
|
|
5232
5333
|
t: i
|
|
5233
5334
|
}
|
|
5234
5335
|
);
|
|
5235
5336
|
default: {
|
|
5236
|
-
const f =
|
|
5337
|
+
const f = d;
|
|
5237
5338
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5238
5339
|
"[fency] Unknown MemorySearch eventType (no UI):",
|
|
5239
5340
|
f.eventType,
|
|
@@ -5241,13 +5342,13 @@ const wn = ({
|
|
|
5241
5342
|
), null);
|
|
5242
5343
|
}
|
|
5243
5344
|
}
|
|
5244
|
-
if (
|
|
5245
|
-
switch (
|
|
5345
|
+
if (d.taskType === "ExploreMemories")
|
|
5346
|
+
switch (d.eventType) {
|
|
5246
5347
|
case "Text":
|
|
5247
5348
|
return /* @__PURE__ */ r(
|
|
5248
5349
|
N,
|
|
5249
5350
|
{
|
|
5250
|
-
text:
|
|
5351
|
+
text: d.text,
|
|
5251
5352
|
onFileDownload: u,
|
|
5252
5353
|
onMemoryClick: a
|
|
5253
5354
|
}
|
|
@@ -5266,7 +5367,7 @@ const wn = ({
|
|
|
5266
5367
|
return /* @__PURE__ */ r(
|
|
5267
5368
|
Vr,
|
|
5268
5369
|
{
|
|
5269
|
-
data:
|
|
5370
|
+
data: d,
|
|
5270
5371
|
createdAt: s.item.createdAt,
|
|
5271
5372
|
timestamp: s.item.timestamp,
|
|
5272
5373
|
completed: s.completed,
|
|
@@ -5280,7 +5381,7 @@ const wn = ({
|
|
|
5280
5381
|
return /* @__PURE__ */ r(
|
|
5281
5382
|
Xr,
|
|
5282
5383
|
{
|
|
5283
|
-
data:
|
|
5384
|
+
data: d,
|
|
5284
5385
|
isLatest: s.isLatest,
|
|
5285
5386
|
durationSeconds: s.durationSeconds,
|
|
5286
5387
|
t: i
|
|
@@ -5290,30 +5391,30 @@ const wn = ({
|
|
|
5290
5391
|
return /* @__PURE__ */ r(
|
|
5291
5392
|
Yr,
|
|
5292
5393
|
{
|
|
5293
|
-
data:
|
|
5394
|
+
data: d,
|
|
5294
5395
|
isLatest: s.isLatest,
|
|
5295
5396
|
durationSeconds: s.durationSeconds,
|
|
5296
5397
|
t: i
|
|
5297
5398
|
}
|
|
5298
5399
|
);
|
|
5299
5400
|
case "FindMemoriesResult":
|
|
5300
|
-
return /* @__PURE__ */ r(Jr, { data:
|
|
5401
|
+
return /* @__PURE__ */ r(Jr, { data: d, t: i });
|
|
5301
5402
|
case "SemanticSearch":
|
|
5302
5403
|
return /* @__PURE__ */ r(
|
|
5303
5404
|
en,
|
|
5304
5405
|
{
|
|
5305
|
-
data:
|
|
5406
|
+
data: d,
|
|
5306
5407
|
isLatest: s.isLatest,
|
|
5307
5408
|
durationSeconds: s.durationSeconds,
|
|
5308
5409
|
t: i,
|
|
5309
|
-
onSearchResultClick:
|
|
5410
|
+
onSearchResultClick: c
|
|
5310
5411
|
}
|
|
5311
5412
|
);
|
|
5312
5413
|
case "SemanticSearchForEach":
|
|
5313
5414
|
return /* @__PURE__ */ r(
|
|
5314
5415
|
on,
|
|
5315
5416
|
{
|
|
5316
|
-
data:
|
|
5417
|
+
data: d,
|
|
5317
5418
|
completed: s.completed,
|
|
5318
5419
|
isLatest: s.isLatest,
|
|
5319
5420
|
t: i
|
|
@@ -5323,7 +5424,18 @@ const wn = ({
|
|
|
5323
5424
|
return /* @__PURE__ */ r(
|
|
5324
5425
|
tn,
|
|
5325
5426
|
{
|
|
5326
|
-
data:
|
|
5427
|
+
data: d,
|
|
5428
|
+
isLatest: s.isLatest,
|
|
5429
|
+
durationSeconds: s.durationSeconds,
|
|
5430
|
+
t: i
|
|
5431
|
+
}
|
|
5432
|
+
);
|
|
5433
|
+
case "ComposeHtmlReport":
|
|
5434
|
+
return /* @__PURE__ */ r(
|
|
5435
|
+
sn,
|
|
5436
|
+
{
|
|
5437
|
+
data: d,
|
|
5438
|
+
completed: s.completed,
|
|
5327
5439
|
isLatest: s.isLatest,
|
|
5328
5440
|
durationSeconds: s.durationSeconds,
|
|
5329
5441
|
t: i
|
|
@@ -5341,9 +5453,9 @@ const wn = ({
|
|
|
5341
5453
|
);
|
|
5342
5454
|
case "SourcesResult":
|
|
5343
5455
|
return /* @__PURE__ */ r(
|
|
5344
|
-
|
|
5456
|
+
cn,
|
|
5345
5457
|
{
|
|
5346
|
-
data:
|
|
5458
|
+
data: d,
|
|
5347
5459
|
onSourceClick: l,
|
|
5348
5460
|
t: i
|
|
5349
5461
|
}
|
|
@@ -5352,13 +5464,13 @@ const wn = ({
|
|
|
5352
5464
|
return /* @__PURE__ */ r(
|
|
5353
5465
|
N,
|
|
5354
5466
|
{
|
|
5355
|
-
text:
|
|
5467
|
+
text: d.response.textResponse,
|
|
5356
5468
|
onFileDownload: u,
|
|
5357
5469
|
onMemoryClick: a
|
|
5358
5470
|
}
|
|
5359
5471
|
);
|
|
5360
5472
|
default: {
|
|
5361
|
-
const f =
|
|
5473
|
+
const f = d;
|
|
5362
5474
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5363
5475
|
"[fency] Unknown ExploreMemories eventType (no UI):",
|
|
5364
5476
|
f.eventType,
|
|
@@ -5366,13 +5478,13 @@ const wn = ({
|
|
|
5366
5478
|
), null);
|
|
5367
5479
|
}
|
|
5368
5480
|
}
|
|
5369
|
-
return
|
|
5481
|
+
return d.taskType === "StreamingChatCompletion" && d.eventType === "Completed" ? /* @__PURE__ */ r(
|
|
5370
5482
|
N,
|
|
5371
5483
|
{
|
|
5372
|
-
text:
|
|
5484
|
+
text: d.response.textResponse,
|
|
5373
5485
|
onMemoryClick: a
|
|
5374
5486
|
}
|
|
5375
|
-
) :
|
|
5487
|
+
) : d.eventType === "Error" && "message" in d ? /* @__PURE__ */ r(O, { message: d.message }) : null;
|
|
5376
5488
|
};
|
|
5377
5489
|
if (e.length === 0)
|
|
5378
5490
|
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(
|
|
@@ -5386,41 +5498,41 @@ const wn = ({
|
|
|
5386
5498
|
shimmerColor: h.shimmerHighlight
|
|
5387
5499
|
}
|
|
5388
5500
|
) }) : null;
|
|
5389
|
-
const y = e.filter((s,
|
|
5501
|
+
const y = e.filter((s, d) => {
|
|
5390
5502
|
const f = s.item.data;
|
|
5391
5503
|
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
|
|
5392
5504
|
return !1;
|
|
5393
5505
|
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
5394
|
-
return !e.slice(
|
|
5506
|
+
return !e.slice(d + 1).some(
|
|
5395
5507
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
|
|
5396
5508
|
);
|
|
5397
5509
|
if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
|
|
5398
|
-
return !e.slice(
|
|
5510
|
+
return !e.slice(d + 1).some(
|
|
5399
5511
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
|
|
5400
5512
|
);
|
|
5401
5513
|
if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
|
|
5402
|
-
return !e.slice(
|
|
5514
|
+
return !e.slice(d + 1).some(
|
|
5403
5515
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
|
|
5404
5516
|
);
|
|
5405
5517
|
if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
|
|
5406
|
-
return !e.slice(
|
|
5518
|
+
return !e.slice(d + 1).some(
|
|
5407
5519
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
|
|
5408
5520
|
);
|
|
5409
5521
|
if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
|
|
5410
|
-
return !e.slice(
|
|
5522
|
+
return !e.slice(d + 1).some(
|
|
5411
5523
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
|
|
5412
5524
|
);
|
|
5413
5525
|
if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
|
|
5414
|
-
return !e.slice(
|
|
5526
|
+
return !e.slice(d + 1).some(
|
|
5415
5527
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
|
|
5416
5528
|
);
|
|
5417
5529
|
if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
|
|
5418
|
-
return !e.slice(
|
|
5530
|
+
return !e.slice(d + 1).some(
|
|
5419
5531
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
|
|
5420
5532
|
);
|
|
5421
5533
|
if (f.taskType === "ExploreMemories" && (f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
|
|
5422
5534
|
const P = f.eventType;
|
|
5423
|
-
return !e.slice(
|
|
5535
|
+
return !e.slice(d + 1).some(
|
|
5424
5536
|
(se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === P
|
|
5425
5537
|
);
|
|
5426
5538
|
}
|
|
@@ -5433,7 +5545,7 @@ const wn = ({
|
|
|
5433
5545
|
ref: x,
|
|
5434
5546
|
"data-theme": g,
|
|
5435
5547
|
children: [
|
|
5436
|
-
/* @__PURE__ */ r(Ve, { children: y.map((s,
|
|
5548
|
+
/* @__PURE__ */ r(Ve, { children: y.map((s, d) => /* @__PURE__ */ r(
|
|
5437
5549
|
v.div,
|
|
5438
5550
|
{
|
|
5439
5551
|
id: `agent-task-progress-item-${s.item.progressItemId}`,
|
|
@@ -5441,14 +5553,14 @@ const wn = ({
|
|
|
5441
5553
|
animate: { opacity: 1, y: 0 },
|
|
5442
5554
|
transition: {
|
|
5443
5555
|
duration: 0.4,
|
|
5444
|
-
delay:
|
|
5556
|
+
delay: d * 0.1,
|
|
5445
5557
|
ease: "easeOut"
|
|
5446
5558
|
},
|
|
5447
5559
|
children: /* @__PURE__ */ r(
|
|
5448
|
-
|
|
5560
|
+
Mn,
|
|
5449
5561
|
{
|
|
5450
5562
|
progressItemId: s.item.progressItemId,
|
|
5451
|
-
children:
|
|
5563
|
+
children: T(s)
|
|
5452
5564
|
}
|
|
5453
5565
|
)
|
|
5454
5566
|
},
|
|
@@ -5458,12 +5570,12 @@ const wn = ({
|
|
|
5458
5570
|
]
|
|
5459
5571
|
}
|
|
5460
5572
|
);
|
|
5461
|
-
},
|
|
5462
|
-
const { colors: n } =
|
|
5573
|
+
}, Rn = ({ taskId: e, label: o, copiedLabel: t }) => {
|
|
5574
|
+
const { colors: n } = b(), [i, a] = w(!1);
|
|
5463
5575
|
H(() => {
|
|
5464
5576
|
if (!i) return;
|
|
5465
|
-
const
|
|
5466
|
-
return () => window.clearTimeout(
|
|
5577
|
+
const c = window.setTimeout(() => a(!1), 1500);
|
|
5578
|
+
return () => window.clearTimeout(c);
|
|
5467
5579
|
}, [i]);
|
|
5468
5580
|
const l = L(async () => {
|
|
5469
5581
|
try {
|
|
@@ -5492,7 +5604,7 @@ const wn = ({
|
|
|
5492
5604
|
children: i ? t : o
|
|
5493
5605
|
}
|
|
5494
5606
|
);
|
|
5495
|
-
},
|
|
5607
|
+
}, $n = ({
|
|
5496
5608
|
agentTask: e,
|
|
5497
5609
|
theme: o = "light",
|
|
5498
5610
|
language: t,
|
|
@@ -5502,7 +5614,7 @@ const wn = ({
|
|
|
5502
5614
|
onExploreQueryResultClick: l
|
|
5503
5615
|
}) => {
|
|
5504
5616
|
var h;
|
|
5505
|
-
const
|
|
5617
|
+
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;
|
|
5506
5618
|
return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
|
|
5507
5619
|
g ? /* @__PURE__ */ r(
|
|
5508
5620
|
"div",
|
|
@@ -5514,7 +5626,7 @@ const wn = ({
|
|
|
5514
5626
|
zIndex: 1
|
|
5515
5627
|
},
|
|
5516
5628
|
children: /* @__PURE__ */ r(
|
|
5517
|
-
|
|
5629
|
+
Rn,
|
|
5518
5630
|
{
|
|
5519
5631
|
taskId: g,
|
|
5520
5632
|
label: u.copyId,
|
|
@@ -5524,9 +5636,9 @@ const wn = ({
|
|
|
5524
5636
|
}
|
|
5525
5637
|
) : null,
|
|
5526
5638
|
/* @__PURE__ */ r(
|
|
5527
|
-
|
|
5639
|
+
En,
|
|
5528
5640
|
{
|
|
5529
|
-
progressViewItems:
|
|
5641
|
+
progressViewItems: c,
|
|
5530
5642
|
loading: e.loading,
|
|
5531
5643
|
error: e.error,
|
|
5532
5644
|
loadingText: e.loadingText,
|
|
@@ -5541,16 +5653,16 @@ const wn = ({
|
|
|
5541
5653
|
] }) });
|
|
5542
5654
|
};
|
|
5543
5655
|
export {
|
|
5544
|
-
|
|
5656
|
+
$n as AgentTaskProgress,
|
|
5545
5657
|
ar as AgentTaskThemeProvider,
|
|
5546
5658
|
F as Checkmark,
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5659
|
+
Dn as FencyProvider,
|
|
5660
|
+
Cn as MemorySearchCompletedResults,
|
|
5661
|
+
Gn as StreamEventManager,
|
|
5550
5662
|
_ as XMark,
|
|
5551
5663
|
ir as darkAgentTaskThemeColors,
|
|
5552
5664
|
we as getAgentTaskPrismStyle,
|
|
5553
5665
|
Te as lightAgentTaskThemeColors,
|
|
5554
|
-
|
|
5555
|
-
|
|
5666
|
+
b as useAgentTaskTheme,
|
|
5667
|
+
Wn as useAgentTasks
|
|
5556
5668
|
};
|