@fencyai/react 0.1.205 → 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/data-types/ExploreMemoriesPlanning.d.ts +2 -0
- package/dist/agent-task/data-types/ExploreMemoriesPlanning.d.ts.map +1 -1
- package/dist/agent-task/translations.d.ts +1 -2
- package/dist/agent-task/translations.d.ts.map +1 -1
- package/dist/index.js +498 -397
- 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
|
-
import { StreamEventManager as
|
|
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
|
|
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 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
|
-
x.current || (x.current = new
|
|
29
|
-
const
|
|
28
|
+
x.current || (x.current = new ze(n));
|
|
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,8 +80,8 @@ const Je = (e) => {
|
|
|
80
80
|
if (!o.eventManager) return;
|
|
81
81
|
const l = {
|
|
82
82
|
onMessage: (p, u) => {
|
|
83
|
-
var h, x,
|
|
84
|
-
const g =
|
|
83
|
+
var h, x, T;
|
|
84
|
+
const g = Pe(p);
|
|
85
85
|
if (g)
|
|
86
86
|
switch (g.type) {
|
|
87
87
|
case "STREAM_TIMEOUT":
|
|
@@ -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 An = (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 An = (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 An = (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,15 +243,15 @@ const An = (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"
|
|
250
250
|
);
|
|
251
251
|
const S = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
|
|
252
252
|
if (M.type === "success") {
|
|
253
|
-
const W = (/* @__PURE__ */ new Date()).toISOString(),
|
|
254
|
-
taskKey:
|
|
253
|
+
const W = (/* @__PURE__ */ new Date()).toISOString(), B = {
|
|
254
|
+
taskKey: d,
|
|
255
255
|
streamId: M.stream.id,
|
|
256
256
|
triggeredAt: W,
|
|
257
257
|
confirmedData: null,
|
|
@@ -261,9 +261,9 @@ const An = (e) => {
|
|
|
261
261
|
loading: !0,
|
|
262
262
|
loadingText: s == null ? void 0 : s.loadingText
|
|
263
263
|
};
|
|
264
|
-
n({ type: "TASK_PENDING", task:
|
|
265
|
-
...
|
|
266
|
-
downloadFile:
|
|
264
|
+
n({ type: "TASK_PENDING", task: B }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
|
|
265
|
+
...B,
|
|
266
|
+
downloadFile: c(
|
|
267
267
|
S
|
|
268
268
|
)
|
|
269
269
|
});
|
|
@@ -279,7 +279,7 @@ const An = (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,14 +287,14 @@ const An = (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(
|
|
294
|
-
(
|
|
294
|
+
(P) => {
|
|
295
295
|
a.current.set(
|
|
296
296
|
I.agentTask.id,
|
|
297
|
-
|
|
297
|
+
P
|
|
298
298
|
);
|
|
299
299
|
}
|
|
300
300
|
);
|
|
@@ -302,7 +302,7 @@ const An = (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 An = (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 An = (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,18 +342,18 @@ const An = (e) => {
|
|
|
342
342
|
},
|
|
343
343
|
[
|
|
344
344
|
o,
|
|
345
|
-
|
|
345
|
+
c,
|
|
346
346
|
g,
|
|
347
347
|
e.fetchCreateAgentTaskClientToken,
|
|
348
348
|
e.fetchAgentTaskFileDownloadClientToken
|
|
349
349
|
]
|
|
350
|
-
), x =
|
|
350
|
+
), x = z(() => t.tasks.map((y) => {
|
|
351
351
|
var s;
|
|
352
352
|
return {
|
|
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 An = (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 {
|
|
@@ -1089,7 +1089,7 @@ function ar({
|
|
|
1089
1089
|
theme: e,
|
|
1090
1090
|
children: o
|
|
1091
1091
|
}) {
|
|
1092
|
-
const t =
|
|
1092
|
+
const t = z(
|
|
1093
1093
|
() => ({
|
|
1094
1094
|
theme: e,
|
|
1095
1095
|
colors: e === "dark" ? ir : Te
|
|
@@ -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 {
|
|
@@ -1143,19 +1143,19 @@ const N = ({
|
|
|
1143
1143
|
})());
|
|
1144
1144
|
},
|
|
1145
1145
|
[t]
|
|
1146
|
-
), s =
|
|
1146
|
+
), s = z(() => ({
|
|
1147
1147
|
code(f) {
|
|
1148
|
-
const { children: S, className: M, node: D, ref: W, ...
|
|
1148
|
+
const { children: S, className: M, node: D, ref: W, ...B } = f, $ = /language-(\w+)/.exec(M || "");
|
|
1149
1149
|
return $ ? /* @__PURE__ */ r(
|
|
1150
1150
|
ke,
|
|
1151
1151
|
{
|
|
1152
|
-
...
|
|
1152
|
+
...B,
|
|
1153
1153
|
PreTag: "div",
|
|
1154
1154
|
children: String(S).replace(/\n$/, ""),
|
|
1155
1155
|
language: $[1],
|
|
1156
1156
|
style: i
|
|
1157
1157
|
}
|
|
1158
|
-
) : /* @__PURE__ */ r("code", { ...
|
|
1158
|
+
) : /* @__PURE__ */ r("code", { ...B, className: M, children: String(S) });
|
|
1159
1159
|
},
|
|
1160
1160
|
a(f) {
|
|
1161
1161
|
const { children: S, href: M, ...D } = f, W = M ? _e(M) : null;
|
|
@@ -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(
|
|
@@ -1185,8 +1185,8 @@ const N = ({
|
|
|
1185
1185
|
children: S
|
|
1186
1186
|
}
|
|
1187
1187
|
) });
|
|
1188
|
-
const
|
|
1189
|
-
return
|
|
1188
|
+
const B = M ? qe(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,8 +1194,8 @@ const N = ({
|
|
|
1194
1194
|
disabled: h,
|
|
1195
1195
|
onClick: () => y({
|
|
1196
1196
|
source: {
|
|
1197
|
-
memoryId:
|
|
1198
|
-
memoryTypeId:
|
|
1197
|
+
memoryId: B.memoryId,
|
|
1198
|
+
memoryTypeId: B.memoryTypeId ?? ""
|
|
1199
1199
|
}
|
|
1200
1200
|
}),
|
|
1201
1201
|
children: S
|
|
@@ -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...",
|
|
@@ -1382,7 +1383,6 @@ const N = ({
|
|
|
1382
1383
|
"Kwisatz-haderaching..."
|
|
1383
1384
|
],
|
|
1384
1385
|
explorePlanning: "Planning approach...",
|
|
1385
|
-
explorePlanningUserPlanPending: "Preparing your plan...",
|
|
1386
1386
|
exploreFindMemoriesQuery: "Finding memories: '{query}'",
|
|
1387
1387
|
exploreFindMemoriesPrefix: "Finding memories: ",
|
|
1388
1388
|
exploreSemanticSearchForEach: "Reading memories for '{query}'",
|
|
@@ -1475,6 +1475,7 @@ const N = ({
|
|
|
1475
1475
|
exploreExporting: "Laster {n} minnefiler...",
|
|
1476
1476
|
exploreExportingOne: "Laster data...",
|
|
1477
1477
|
exploreRunCode: "Analyserer: {title}",
|
|
1478
|
+
exploreComposeHtmlReport: "Lager rapport: {title}",
|
|
1478
1479
|
exploreSetupSandbox: "Setter opp miljø...",
|
|
1479
1480
|
exploreSetupSandboxPhrases: [
|
|
1480
1481
|
"Spelunker...",
|
|
@@ -1506,7 +1507,6 @@ const N = ({
|
|
|
1506
1507
|
"Kwisatz-haderacher..."
|
|
1507
1508
|
],
|
|
1508
1509
|
explorePlanning: "Planlegger tilnærming...",
|
|
1509
|
-
explorePlanningUserPlanPending: "Forbereder planen...",
|
|
1510
1510
|
exploreFindMemoriesQuery: "Finner minner: '{query}'",
|
|
1511
1511
|
exploreFindMemoriesPrefix: "Finner minner: ",
|
|
1512
1512
|
exploreSemanticSearchForEach: "Leser minner for '{query}'",
|
|
@@ -1523,7 +1523,7 @@ function k(e, o) {
|
|
|
1523
1523
|
e
|
|
1524
1524
|
);
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Q(e, o) {
|
|
1527
1527
|
const t = e.map((n) => `'${n}'`);
|
|
1528
1528
|
if (o != null && t.length >= 2) {
|
|
1529
1529
|
const n = t.pop();
|
|
@@ -1539,18 +1539,18 @@ function C({
|
|
|
1539
1539
|
repeatDelay: i = 0.5,
|
|
1540
1540
|
className: a,
|
|
1541
1541
|
startOnView: l = !1,
|
|
1542
|
-
once:
|
|
1542
|
+
once: c = !1,
|
|
1543
1543
|
inViewMargin: p,
|
|
1544
1544
|
spread: u = 2,
|
|
1545
1545
|
color: g,
|
|
1546
1546
|
shimmerColor: h,
|
|
1547
1547
|
direction: x = "fromBottom"
|
|
1548
1548
|
}) {
|
|
1549
|
-
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";
|
|
1550
1550
|
return /* @__PURE__ */ r(
|
|
1551
1551
|
v.span,
|
|
1552
1552
|
{
|
|
1553
|
-
ref:
|
|
1553
|
+
ref: d,
|
|
1554
1554
|
className: a,
|
|
1555
1555
|
style: {
|
|
1556
1556
|
position: "relative",
|
|
@@ -1592,11 +1592,11 @@ function C({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
);
|
|
1594
1594
|
}
|
|
1595
|
-
const
|
|
1596
|
-
const { colors: a } =
|
|
1595
|
+
const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
|
|
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(
|
|
1597
1597
|
x,
|
|
1598
1598
|
y ? n.and : void 0
|
|
1599
|
-
)}` : "", f = g ? `${s}${
|
|
1599
|
+
)}` : "", f = g ? `${s}${d}` : `${n.searchingPrefix}${e.queryDescription}`;
|
|
1600
1600
|
return /* @__PURE__ */ m(
|
|
1601
1601
|
"div",
|
|
1602
1602
|
{
|
|
@@ -1617,7 +1617,7 @@ const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1617
1617
|
e.queryDescription,
|
|
1618
1618
|
"'"
|
|
1619
1619
|
] }),
|
|
1620
|
-
|
|
1620
|
+
d
|
|
1621
1621
|
] }) : `${n.searchingPrefix}${e.queryDescription}` }),
|
|
1622
1622
|
h && !l && /* @__PURE__ */ m(R, { children: [
|
|
1623
1623
|
" ",
|
|
@@ -1625,7 +1625,7 @@ const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1625
1625
|
"button",
|
|
1626
1626
|
{
|
|
1627
1627
|
type: "button",
|
|
1628
|
-
onClick: () =>
|
|
1628
|
+
onClick: () => c(!0),
|
|
1629
1629
|
style: {
|
|
1630
1630
|
background: "none",
|
|
1631
1631
|
border: "none",
|
|
@@ -1638,7 +1638,7 @@ const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1638
1638
|
fontFamily: "inherit"
|
|
1639
1639
|
},
|
|
1640
1640
|
children: k(n.moreMemories, {
|
|
1641
|
-
n:
|
|
1641
|
+
n: T
|
|
1642
1642
|
})
|
|
1643
1643
|
}
|
|
1644
1644
|
)
|
|
@@ -1649,7 +1649,7 @@ const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1649
1649
|
"button",
|
|
1650
1650
|
{
|
|
1651
1651
|
type: "button",
|
|
1652
|
-
onClick: () =>
|
|
1652
|
+
onClick: () => c(!1),
|
|
1653
1653
|
style: {
|
|
1654
1654
|
background: "none",
|
|
1655
1655
|
border: "none",
|
|
@@ -1688,7 +1688,7 @@ const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1688
1688
|
size: o = 24,
|
|
1689
1689
|
borderWidth: t = 7
|
|
1690
1690
|
}) => {
|
|
1691
|
-
const { colors: n } =
|
|
1691
|
+
const { colors: n } = b(), i = e ?? n.checkmarkColor, a = o * 0.5;
|
|
1692
1692
|
return /* @__PURE__ */ r(
|
|
1693
1693
|
"span",
|
|
1694
1694
|
{
|
|
@@ -1789,7 +1789,7 @@ function gr({
|
|
|
1789
1789
|
onSearchResultClick: o,
|
|
1790
1790
|
t
|
|
1791
1791
|
}) {
|
|
1792
|
-
const { colors: n } =
|
|
1792
|
+
const { colors: n } = b(), [i, a] = w(null), l = !!o;
|
|
1793
1793
|
return /* @__PURE__ */ r(
|
|
1794
1794
|
"div",
|
|
1795
1795
|
{
|
|
@@ -1801,24 +1801,24 @@ function gr({
|
|
|
1801
1801
|
paddingTop: 8,
|
|
1802
1802
|
borderTop: `1px solid ${n.borderDivider}`
|
|
1803
1803
|
},
|
|
1804
|
-
children: e.map((
|
|
1804
|
+
children: e.map((c, p) => {
|
|
1805
1805
|
const u = oe(
|
|
1806
|
-
|
|
1806
|
+
c.chunks
|
|
1807
1807
|
), g = [
|
|
1808
|
-
te(
|
|
1808
|
+
te(c),
|
|
1809
1809
|
k(t.scoreLabel, {
|
|
1810
|
-
n:
|
|
1810
|
+
n: c.matchingChunkScore.toFixed(2)
|
|
1811
1811
|
}),
|
|
1812
1812
|
u.length > 0 ? ne(u, t) : t.pagesNotAvailable
|
|
1813
1813
|
].filter(
|
|
1814
1814
|
(y) => y != null && y !== ""
|
|
1815
1815
|
), h = {
|
|
1816
|
-
memoryId:
|
|
1817
|
-
memoryTitle:
|
|
1818
|
-
memoryTypeId:
|
|
1819
|
-
memoryTypeName:
|
|
1816
|
+
memoryId: c.memoryId,
|
|
1817
|
+
memoryTitle: c.memoryTitle,
|
|
1818
|
+
memoryTypeId: c.memoryTypeId,
|
|
1819
|
+
memoryTypeName: c.memoryTypeName,
|
|
1820
1820
|
pageNumbers: u
|
|
1821
|
-
}, x = `${
|
|
1821
|
+
}, x = `${c.memoryId}-${p}`, T = i === x;
|
|
1822
1822
|
return /* @__PURE__ */ m(
|
|
1823
1823
|
"div",
|
|
1824
1824
|
{
|
|
@@ -1854,7 +1854,7 @@ function gr({
|
|
|
1854
1854
|
whiteSpace: "pre-wrap",
|
|
1855
1855
|
wordBreak: "break-word"
|
|
1856
1856
|
},
|
|
1857
|
-
children: re(
|
|
1857
|
+
children: re(c.chunks)
|
|
1858
1858
|
}
|
|
1859
1859
|
),
|
|
1860
1860
|
/* @__PURE__ */ r(
|
|
@@ -1876,8 +1876,8 @@ function gr({
|
|
|
1876
1876
|
"button",
|
|
1877
1877
|
{
|
|
1878
1878
|
type: "button",
|
|
1879
|
-
"aria-busy":
|
|
1880
|
-
disabled:
|
|
1879
|
+
"aria-busy": T,
|
|
1880
|
+
disabled: T,
|
|
1881
1881
|
onClick: async () => {
|
|
1882
1882
|
a(x);
|
|
1883
1883
|
try {
|
|
@@ -1898,14 +1898,14 @@ function gr({
|
|
|
1898
1898
|
background: n.bgChip,
|
|
1899
1899
|
border: `1px solid ${n.bgChipBorder}`,
|
|
1900
1900
|
borderRadius: 6,
|
|
1901
|
-
cursor:
|
|
1901
|
+
cursor: T ? "wait" : "pointer",
|
|
1902
1902
|
fontFamily: "inherit",
|
|
1903
1903
|
display: "inline-flex",
|
|
1904
1904
|
alignItems: "center",
|
|
1905
1905
|
gap: 8
|
|
1906
1906
|
},
|
|
1907
1907
|
children: [
|
|
1908
|
-
|
|
1908
|
+
T && /* @__PURE__ */ r(
|
|
1909
1909
|
"span",
|
|
1910
1910
|
{
|
|
1911
1911
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -1931,7 +1931,7 @@ function hr({
|
|
|
1931
1931
|
onToggle: n,
|
|
1932
1932
|
onSearchResultClick: i
|
|
1933
1933
|
}) {
|
|
1934
|
-
const { colors: a } =
|
|
1934
|
+
const { colors: a } = b(), l = e.items.map((p) => p.item), c = l.some((p) => p.chunks.length > 0);
|
|
1935
1935
|
return /* @__PURE__ */ m(
|
|
1936
1936
|
v.div,
|
|
1937
1937
|
{
|
|
@@ -2009,7 +2009,7 @@ function hr({
|
|
|
2009
2009
|
children: ur(l, o)
|
|
2010
2010
|
}
|
|
2011
2011
|
),
|
|
2012
|
-
|
|
2012
|
+
c && /* @__PURE__ */ r(
|
|
2013
2013
|
"button",
|
|
2014
2014
|
{
|
|
2015
2015
|
type: "button",
|
|
@@ -2030,7 +2030,7 @@ function hr({
|
|
|
2030
2030
|
]
|
|
2031
2031
|
}
|
|
2032
2032
|
),
|
|
2033
|
-
t &&
|
|
2033
|
+
t && c && /* @__PURE__ */ r(
|
|
2034
2034
|
gr,
|
|
2035
2035
|
{
|
|
2036
2036
|
items: l,
|
|
@@ -2054,17 +2054,17 @@ const ie = ({
|
|
|
2054
2054
|
t,
|
|
2055
2055
|
compactTop: n = !1
|
|
2056
2056
|
}) => {
|
|
2057
|
-
const { colors: i } =
|
|
2058
|
-
(s,
|
|
2057
|
+
const { colors: i } = b(), a = e.items, l = a.reduce(
|
|
2058
|
+
(s, d) => s + Ce(d),
|
|
2059
2059
|
0
|
|
2060
|
-
),
|
|
2061
|
-
u((
|
|
2062
|
-
...
|
|
2063
|
-
[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]
|
|
2064
2064
|
}));
|
|
2065
|
-
}, []), h =
|
|
2066
|
-
n:
|
|
2067
|
-
}),
|
|
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" };
|
|
2068
2068
|
return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
|
|
2069
2069
|
"div",
|
|
2070
2070
|
{
|
|
@@ -2096,7 +2096,7 @@ const ie = ({
|
|
|
2096
2096
|
marginTop: "4px",
|
|
2097
2097
|
fontStyle: "italic"
|
|
2098
2098
|
},
|
|
2099
|
-
children:
|
|
2099
|
+
children: T
|
|
2100
2100
|
}
|
|
2101
2101
|
)
|
|
2102
2102
|
] });
|
|
@@ -2118,7 +2118,7 @@ const xr = ({
|
|
|
2118
2118
|
}) => {
|
|
2119
2119
|
const a = fr(e);
|
|
2120
2120
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
2121
|
-
|
|
2121
|
+
q,
|
|
2122
2122
|
{
|
|
2123
2123
|
data: a,
|
|
2124
2124
|
isLatest: o,
|
|
@@ -2127,7 +2127,7 @@ const xr = ({
|
|
|
2127
2127
|
}
|
|
2128
2128
|
) : /* @__PURE__ */ m(R, { children: [
|
|
2129
2129
|
/* @__PURE__ */ r(
|
|
2130
|
-
|
|
2130
|
+
q,
|
|
2131
2131
|
{
|
|
2132
2132
|
data: a,
|
|
2133
2133
|
isLatest: !1,
|
|
@@ -2150,8 +2150,8 @@ const xr = ({
|
|
|
2150
2150
|
}
|
|
2151
2151
|
)
|
|
2152
2152
|
] });
|
|
2153
|
-
},
|
|
2154
|
-
const { colors: i } =
|
|
2153
|
+
}, Y = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
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(
|
|
2155
2155
|
g,
|
|
2156
2156
|
x ? n.and : void 0
|
|
2157
2157
|
)}` : n.findingMemories;
|
|
@@ -2165,8 +2165,8 @@ const xr = ({
|
|
|
2165
2165
|
initial: { opacity: 0, y: -10 },
|
|
2166
2166
|
animate: { opacity: 1, y: 0 },
|
|
2167
2167
|
transition: { duration: 0.3, delay: 0 },
|
|
2168
|
-
children: o && !t && !u ? /* @__PURE__ */ r(C, { text:
|
|
2169
|
-
/* @__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 }),
|
|
2170
2170
|
u && !a && /* @__PURE__ */ m(R, { children: [
|
|
2171
2171
|
" ",
|
|
2172
2172
|
/* @__PURE__ */ r(
|
|
@@ -2229,8 +2229,8 @@ const xr = ({
|
|
|
2229
2229
|
}
|
|
2230
2230
|
)
|
|
2231
2231
|
] });
|
|
2232
|
-
},
|
|
2233
|
-
const { colors: t } =
|
|
2232
|
+
}, J = 5, Sr = ({ data: e, t: o }) => {
|
|
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(
|
|
2234
2234
|
u,
|
|
2235
2235
|
h ? o.and : void 0
|
|
2236
2236
|
)}` : o.memoriesFound;
|
|
@@ -2242,7 +2242,7 @@ const xr = ({
|
|
|
2242
2242
|
animate: { opacity: 1, y: 0 },
|
|
2243
2243
|
transition: { duration: 0.3, delay: 0 },
|
|
2244
2244
|
children: /* @__PURE__ */ m(R, { children: [
|
|
2245
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2245
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: T }),
|
|
2246
2246
|
p && !n && /* @__PURE__ */ m(R, { children: [
|
|
2247
2247
|
" ",
|
|
2248
2248
|
/* @__PURE__ */ r(
|
|
@@ -2293,7 +2293,7 @@ const xr = ({
|
|
|
2293
2293
|
}
|
|
2294
2294
|
) });
|
|
2295
2295
|
}, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
2296
|
-
const { colors: n } =
|
|
2296
|
+
const { colors: n } = b(), i = t.addingSources;
|
|
2297
2297
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2298
2298
|
/* @__PURE__ */ r(
|
|
2299
2299
|
v.div,
|
|
@@ -2337,7 +2337,7 @@ function br(e, o) {
|
|
|
2337
2337
|
return k(o.pageMultiple, { list: n, n: t });
|
|
2338
2338
|
}
|
|
2339
2339
|
const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
2340
|
-
const { colors: n } =
|
|
2340
|
+
const { colors: n } = b(), [i, a] = w(null);
|
|
2341
2341
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2342
2342
|
/* @__PURE__ */ r(
|
|
2343
2343
|
v.div,
|
|
@@ -2356,11 +2356,11 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2356
2356
|
children: t.sources
|
|
2357
2357
|
}
|
|
2358
2358
|
),
|
|
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,
|
|
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(
|
|
2360
2360
|
Tr,
|
|
2361
2361
|
{
|
|
2362
2362
|
source: l,
|
|
2363
|
-
index:
|
|
2363
|
+
index: c,
|
|
2364
2364
|
loadingMemoryId: i,
|
|
2365
2365
|
setLoadingMemoryId: a,
|
|
2366
2366
|
onSourceClick: o,
|
|
@@ -2377,7 +2377,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2377
2377
|
onSourceClick: i,
|
|
2378
2378
|
t: a
|
|
2379
2379
|
}) => {
|
|
2380
|
-
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);
|
|
2381
2381
|
return /* @__PURE__ */ m(
|
|
2382
2382
|
v.div,
|
|
2383
2383
|
{
|
|
@@ -2408,7 +2408,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2408
2408
|
padding: "8px 12px",
|
|
2409
2409
|
borderRadius: "6px",
|
|
2410
2410
|
border: `1px solid ${l.borderStrong}`,
|
|
2411
|
-
backgroundColor:
|
|
2411
|
+
backgroundColor: c ? l.sourcesBadgeBg : l.transparent,
|
|
2412
2412
|
cursor: u && !g ? "pointer" : g ? "wait" : "default",
|
|
2413
2413
|
transition: "background-color 0.15s ease",
|
|
2414
2414
|
userSelect: "none",
|
|
@@ -2442,15 +2442,15 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2442
2442
|
]
|
|
2443
2443
|
}
|
|
2444
2444
|
);
|
|
2445
|
-
},
|
|
2445
|
+
}, _ = ({
|
|
2446
2446
|
color: e,
|
|
2447
2447
|
size: o = 32,
|
|
2448
2448
|
lineWidth: t = 2
|
|
2449
2449
|
}) => {
|
|
2450
|
-
const { colors: n } =
|
|
2450
|
+
const { colors: n } = b(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, c = (o - a) / 2, p = {
|
|
2451
2451
|
position: "absolute",
|
|
2452
2452
|
left: l,
|
|
2453
|
-
top:
|
|
2453
|
+
top: c,
|
|
2454
2454
|
width: t,
|
|
2455
2455
|
height: a,
|
|
2456
2456
|
backgroundColor: i
|
|
@@ -2491,7 +2491,7 @@ function vr({
|
|
|
2491
2491
|
memory: e,
|
|
2492
2492
|
completed: o
|
|
2493
2493
|
}) {
|
|
2494
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2494
|
+
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" });
|
|
2495
2495
|
}
|
|
2496
2496
|
const de = 80;
|
|
2497
2497
|
function wr({
|
|
@@ -2499,7 +2499,7 @@ function wr({
|
|
|
2499
2499
|
completed: o,
|
|
2500
2500
|
t
|
|
2501
2501
|
}) {
|
|
2502
|
-
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;
|
|
2503
2503
|
return /* @__PURE__ */ m(
|
|
2504
2504
|
v.div,
|
|
2505
2505
|
{
|
|
@@ -2599,7 +2599,7 @@ function Er({
|
|
|
2599
2599
|
item: e,
|
|
2600
2600
|
t: o
|
|
2601
2601
|
}) {
|
|
2602
|
-
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)}...`;
|
|
2603
2603
|
return /* @__PURE__ */ m(
|
|
2604
2604
|
"div",
|
|
2605
2605
|
{
|
|
@@ -2647,7 +2647,7 @@ function Er({
|
|
|
2647
2647
|
]
|
|
2648
2648
|
}
|
|
2649
2649
|
),
|
|
2650
|
-
|
|
2650
|
+
c != null && /* @__PURE__ */ m(R, { children: [
|
|
2651
2651
|
/* @__PURE__ */ r(
|
|
2652
2652
|
"span",
|
|
2653
2653
|
{
|
|
@@ -2660,7 +2660,7 @@ function Er({
|
|
|
2660
2660
|
wordBreak: "break-word",
|
|
2661
2661
|
cursor: l ? "pointer" : "default"
|
|
2662
2662
|
},
|
|
2663
|
-
children:
|
|
2663
|
+
children: c
|
|
2664
2664
|
}
|
|
2665
2665
|
),
|
|
2666
2666
|
l && /* @__PURE__ */ r(
|
|
@@ -2694,7 +2694,7 @@ function Rr({
|
|
|
2694
2694
|
durationSeconds: t,
|
|
2695
2695
|
t: n
|
|
2696
2696
|
}) {
|
|
2697
|
-
const { colors: i } =
|
|
2697
|
+
const { colors: i } = b(), a = Ee(e, n);
|
|
2698
2698
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2699
2699
|
/* @__PURE__ */ r(
|
|
2700
2700
|
v.div,
|
|
@@ -2724,7 +2724,7 @@ function Ir({
|
|
|
2724
2724
|
data: e,
|
|
2725
2725
|
t: o
|
|
2726
2726
|
}) {
|
|
2727
|
-
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);
|
|
2728
2728
|
return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2729
2729
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2730
2730
|
/* @__PURE__ */ r(
|
|
@@ -2764,7 +2764,7 @@ function Ir({
|
|
|
2764
2764
|
color: t.textSecondary,
|
|
2765
2765
|
whiteSpace: "nowrap"
|
|
2766
2766
|
},
|
|
2767
|
-
children:
|
|
2767
|
+
children: c
|
|
2768
2768
|
}
|
|
2769
2769
|
),
|
|
2770
2770
|
/* @__PURE__ */ r(
|
|
@@ -2846,13 +2846,13 @@ function Re(e, o) {
|
|
|
2846
2846
|
return null;
|
|
2847
2847
|
}
|
|
2848
2848
|
}
|
|
2849
|
-
function
|
|
2849
|
+
function zr(e) {
|
|
2850
2850
|
var o;
|
|
2851
2851
|
return e.error != null ? !0 : e.status != null ? !1 : (((o = e.summary) == null ? void 0 : o.length) ?? 0) > 0;
|
|
2852
2852
|
}
|
|
2853
|
-
const ue = 80, ae = 12, le = 1.4,
|
|
2853
|
+
const ue = 80, ae = 12, le = 1.4, Br = Math.ceil(
|
|
2854
2854
|
ae * le
|
|
2855
|
-
),
|
|
2855
|
+
), Pr = Math.ceil(
|
|
2856
2856
|
5 * ae * le
|
|
2857
2857
|
);
|
|
2858
2858
|
function Ie(e, o = 48) {
|
|
@@ -2864,19 +2864,19 @@ function Ie(e, o = 48) {
|
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
2866
|
function Lr({ item: e }) {
|
|
2867
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2867
|
+
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 });
|
|
2868
2868
|
}
|
|
2869
2869
|
function Ar({ item: e }) {
|
|
2870
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2870
|
+
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" });
|
|
2871
2871
|
}
|
|
2872
2872
|
function Dr({
|
|
2873
2873
|
item: e,
|
|
2874
2874
|
t: o,
|
|
2875
2875
|
isLatest: t = !1
|
|
2876
2876
|
}) {
|
|
2877
|
-
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 === "");
|
|
2878
2878
|
return H(() => {
|
|
2879
|
-
const x =
|
|
2879
|
+
const x = c.current;
|
|
2880
2880
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
2881
2881
|
}, [i, a]), /* @__PURE__ */ m(
|
|
2882
2882
|
v.div,
|
|
@@ -2952,10 +2952,10 @@ function Dr({
|
|
|
2952
2952
|
children: /* @__PURE__ */ r(
|
|
2953
2953
|
"div",
|
|
2954
2954
|
{
|
|
2955
|
-
ref:
|
|
2955
|
+
ref: c,
|
|
2956
2956
|
style: {
|
|
2957
|
-
minHeight:
|
|
2958
|
-
maxHeight:
|
|
2957
|
+
minHeight: Br,
|
|
2958
|
+
maxHeight: Pr,
|
|
2959
2959
|
height: "auto",
|
|
2960
2960
|
overflowY: "auto",
|
|
2961
2961
|
overflowX: "hidden",
|
|
@@ -2981,7 +2981,7 @@ function Wr({
|
|
|
2981
2981
|
item: e,
|
|
2982
2982
|
t: o
|
|
2983
2983
|
}) {
|
|
2984
|
-
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;
|
|
2985
2985
|
return /* @__PURE__ */ m(
|
|
2986
2986
|
v.div,
|
|
2987
2987
|
{
|
|
@@ -3058,19 +3058,19 @@ function Wr({
|
|
|
3058
3058
|
/* @__PURE__ */ r(
|
|
3059
3059
|
"span",
|
|
3060
3060
|
{
|
|
3061
|
-
onClick:
|
|
3061
|
+
onClick: c ? () => i((h) => !h) : void 0,
|
|
3062
3062
|
style: {
|
|
3063
3063
|
fontSize: 12,
|
|
3064
3064
|
color: l ? t.textError : t.textSecondary,
|
|
3065
3065
|
lineHeight: 1.4,
|
|
3066
3066
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
3067
3067
|
wordBreak: "break-word",
|
|
3068
|
-
cursor:
|
|
3068
|
+
cursor: c ? "pointer" : "default"
|
|
3069
3069
|
},
|
|
3070
3070
|
children: p
|
|
3071
3071
|
}
|
|
3072
3072
|
),
|
|
3073
|
-
|
|
3073
|
+
c && /* @__PURE__ */ r(
|
|
3074
3074
|
"span",
|
|
3075
3075
|
{
|
|
3076
3076
|
style: {
|
|
@@ -3123,7 +3123,7 @@ function $r({
|
|
|
3123
3123
|
durationSeconds: t,
|
|
3124
3124
|
t: n
|
|
3125
3125
|
}) {
|
|
3126
|
-
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 });
|
|
3127
3127
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3128
3128
|
/* @__PURE__ */ r(
|
|
3129
3129
|
v.div,
|
|
@@ -3154,12 +3154,12 @@ function Nr({
|
|
|
3154
3154
|
isLatest: o = !1,
|
|
3155
3155
|
t
|
|
3156
3156
|
}) {
|
|
3157
|
-
const { colors: n } =
|
|
3158
|
-
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;
|
|
3159
3159
|
for (const f of l)
|
|
3160
|
-
f.error != null ?
|
|
3161
|
-
return { successCount: s, errorCount:
|
|
3162
|
-
}, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) =>
|
|
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}`;
|
|
3163
3163
|
return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
|
|
3164
3164
|
"div",
|
|
3165
3165
|
{
|
|
@@ -3271,7 +3271,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3271
3271
|
t: n
|
|
3272
3272
|
}
|
|
3273
3273
|
), ge = (e) => {
|
|
3274
|
-
const { colors: o } =
|
|
3274
|
+
const { colors: o } = b(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
|
|
3275
3275
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3276
3276
|
/* @__PURE__ */ r(
|
|
3277
3277
|
v.div,
|
|
@@ -3509,7 +3509,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3509
3509
|
}
|
|
3510
3510
|
)
|
|
3511
3511
|
] });
|
|
3512
|
-
},
|
|
3512
|
+
}, jr = ({ data: e, t: o }) => {
|
|
3513
3513
|
const t = k(o.generateReportCompleted, {
|
|
3514
3514
|
title: e.reportTitle
|
|
3515
3515
|
});
|
|
@@ -3528,25 +3528,25 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3528
3528
|
children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
|
|
3529
3529
|
}
|
|
3530
3530
|
) });
|
|
3531
|
-
},
|
|
3532
|
-
|
|
3531
|
+
}, K = 12, V = 1.45, Qr = Math.ceil(
|
|
3532
|
+
K * V
|
|
3533
3533
|
), he = Math.ceil(
|
|
3534
|
-
5 *
|
|
3534
|
+
5 * K * V
|
|
3535
3535
|
), Fe = ({
|
|
3536
3536
|
text: e,
|
|
3537
3537
|
streaming: o = !1,
|
|
3538
3538
|
collapsed: t = !1,
|
|
3539
3539
|
label: n
|
|
3540
3540
|
}) => {
|
|
3541
|
-
const { colors: i } =
|
|
3542
|
-
return
|
|
3541
|
+
const { colors: i } = b(), a = A(null);
|
|
3542
|
+
return Qe(() => {
|
|
3543
3543
|
const l = a.current;
|
|
3544
3544
|
if (l == null || !o || e.length === 0)
|
|
3545
3545
|
return;
|
|
3546
|
-
const
|
|
3546
|
+
const c = () => {
|
|
3547
3547
|
l.scrollTop = l.scrollHeight;
|
|
3548
3548
|
};
|
|
3549
|
-
|
|
3549
|
+
c(), requestAnimationFrame(c);
|
|
3550
3550
|
}, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
|
|
3551
3551
|
n != null && n.length > 0 && /* @__PURE__ */ r(
|
|
3552
3552
|
"span",
|
|
@@ -3576,7 +3576,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3576
3576
|
ref: a,
|
|
3577
3577
|
className: "memory-search-generating-reasoning-viewport",
|
|
3578
3578
|
style: {
|
|
3579
|
-
minHeight:
|
|
3579
|
+
minHeight: Qr,
|
|
3580
3580
|
...o ? {
|
|
3581
3581
|
maxHeight: he,
|
|
3582
3582
|
overflowY: "auto"
|
|
@@ -3586,8 +3586,8 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3586
3586
|
} : {},
|
|
3587
3587
|
height: "auto",
|
|
3588
3588
|
overflowX: "hidden",
|
|
3589
|
-
fontSize:
|
|
3590
|
-
lineHeight:
|
|
3589
|
+
fontSize: K,
|
|
3590
|
+
lineHeight: V,
|
|
3591
3591
|
whiteSpace: "pre-wrap",
|
|
3592
3592
|
wordBreak: "break-word",
|
|
3593
3593
|
color: i.textTertiary
|
|
@@ -3599,27 +3599,25 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3599
3599
|
)
|
|
3600
3600
|
] });
|
|
3601
3601
|
};
|
|
3602
|
-
function
|
|
3602
|
+
function Z(e) {
|
|
3603
3603
|
return e.text != null && e.text.length > 0;
|
|
3604
3604
|
}
|
|
3605
|
-
function
|
|
3605
|
+
function j(e) {
|
|
3606
3606
|
return e.technicalReasoning != null && e.technicalReasoning.length > 0;
|
|
3607
3607
|
}
|
|
3608
3608
|
function Kr(e, o) {
|
|
3609
3609
|
const t = new Date(e).getTime(), n = new Date(o).getTime();
|
|
3610
3610
|
return Math.max(0, Math.round((n - t) / 1e3));
|
|
3611
3611
|
}
|
|
3612
|
-
|
|
3613
|
-
return _(e) ? 3 : e.reasoningCompleted === !0 ? 2 : (U(e), 1);
|
|
3614
|
-
}
|
|
3615
|
-
const Xr = ({
|
|
3612
|
+
const Vr = ({
|
|
3616
3613
|
data: e,
|
|
3617
3614
|
createdAt: o,
|
|
3618
3615
|
timestamp: t,
|
|
3619
|
-
|
|
3620
|
-
|
|
3616
|
+
completed: n = !1,
|
|
3617
|
+
t: i,
|
|
3618
|
+
onMemoryClick: a
|
|
3621
3619
|
}) => {
|
|
3622
|
-
const { colors:
|
|
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;
|
|
3623
3621
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3624
3622
|
/* @__PURE__ */ m(
|
|
3625
3623
|
v.div,
|
|
@@ -3628,7 +3626,7 @@ const Xr = ({
|
|
|
3628
3626
|
display: "flex",
|
|
3629
3627
|
alignItems: "center",
|
|
3630
3628
|
gap: "10px",
|
|
3631
|
-
color:
|
|
3629
|
+
color: l.textSecondary,
|
|
3632
3630
|
marginBottom: "8px"
|
|
3633
3631
|
},
|
|
3634
3632
|
initial: { opacity: 0, y: -10 },
|
|
@@ -3645,28 +3643,28 @@ const Xr = ({
|
|
|
3645
3643
|
flexShrink: 0,
|
|
3646
3644
|
width: 32
|
|
3647
3645
|
},
|
|
3648
|
-
children:
|
|
3646
|
+
children: c ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
|
|
3649
3647
|
}
|
|
3650
3648
|
),
|
|
3651
|
-
|
|
3649
|
+
T ? /* @__PURE__ */ r(C, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
|
|
3652
3650
|
]
|
|
3653
3651
|
}
|
|
3654
3652
|
),
|
|
3655
|
-
|
|
3653
|
+
j(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
|
|
3656
3654
|
/* @__PURE__ */ r(
|
|
3657
3655
|
Fe,
|
|
3658
3656
|
{
|
|
3659
3657
|
text: e.technicalReasoning,
|
|
3660
|
-
streaming:
|
|
3661
|
-
collapsed: !
|
|
3662
|
-
label:
|
|
3658
|
+
streaming: x,
|
|
3659
|
+
collapsed: !x && !g,
|
|
3660
|
+
label: i.memorySearchQueryReasoningLabel
|
|
3663
3661
|
}
|
|
3664
3662
|
),
|
|
3665
3663
|
y && /* @__PURE__ */ r(
|
|
3666
3664
|
"button",
|
|
3667
3665
|
{
|
|
3668
3666
|
type: "button",
|
|
3669
|
-
onClick: () =>
|
|
3667
|
+
onClick: () => h((d) => !d),
|
|
3670
3668
|
style: {
|
|
3671
3669
|
alignSelf: "flex-start",
|
|
3672
3670
|
border: "none",
|
|
@@ -3675,26 +3673,18 @@ const Xr = ({
|
|
|
3675
3673
|
marginTop: 8,
|
|
3676
3674
|
cursor: "pointer",
|
|
3677
3675
|
fontSize: 12,
|
|
3678
|
-
color:
|
|
3676
|
+
color: l.textSecondary,
|
|
3679
3677
|
textDecoration: "underline"
|
|
3680
3678
|
},
|
|
3681
|
-
children:
|
|
3679
|
+
children: g ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
|
|
3682
3680
|
}
|
|
3683
3681
|
)
|
|
3684
3682
|
] }),
|
|
3685
|
-
|
|
3686
|
-
C,
|
|
3687
|
-
{
|
|
3688
|
-
text: n.explorePlanningUserPlanPending,
|
|
3689
|
-
duration: 2.5,
|
|
3690
|
-
repeat: !0
|
|
3691
|
-
}
|
|
3692
|
-
) }),
|
|
3693
|
-
_(e) && /* @__PURE__ */ r("div", { style: { marginTop: p === 3 && !d ? 0 : 8 }, children: /* @__PURE__ */ r(
|
|
3683
|
+
Z(e) && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(
|
|
3694
3684
|
N,
|
|
3695
3685
|
{
|
|
3696
3686
|
text: e.text,
|
|
3697
|
-
onMemoryClick:
|
|
3687
|
+
onMemoryClick: a
|
|
3698
3688
|
}
|
|
3699
3689
|
) }),
|
|
3700
3690
|
s !== void 0 && /* @__PURE__ */ r(
|
|
@@ -3702,16 +3692,16 @@ const Xr = ({
|
|
|
3702
3692
|
{
|
|
3703
3693
|
style: {
|
|
3704
3694
|
fontSize: "12px",
|
|
3705
|
-
color:
|
|
3695
|
+
color: l.textMuted,
|
|
3706
3696
|
marginTop: "4px",
|
|
3707
3697
|
fontStyle: "italic"
|
|
3708
3698
|
},
|
|
3709
|
-
children: k(
|
|
3699
|
+
children: k(i.tookSeconds, { n: s })
|
|
3710
3700
|
}
|
|
3711
3701
|
)
|
|
3712
3702
|
] });
|
|
3713
|
-
},
|
|
3714
|
-
const { colors: i } =
|
|
3703
|
+
}, Xr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3704
|
+
const { colors: i } = b(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
|
|
3715
3705
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3716
3706
|
/* @__PURE__ */ r(
|
|
3717
3707
|
v.div,
|
|
@@ -3741,8 +3731,8 @@ const Xr = ({
|
|
|
3741
3731
|
}
|
|
3742
3732
|
)
|
|
3743
3733
|
] });
|
|
3744
|
-
},
|
|
3745
|
-
const { colors: i } =
|
|
3734
|
+
}, Yr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3735
|
+
const { colors: i } = b(), a = k(n.exploreFindMemoriesQuery, {
|
|
3746
3736
|
query: e.query
|
|
3747
3737
|
});
|
|
3748
3738
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
@@ -3776,8 +3766,8 @@ const Xr = ({
|
|
|
3776
3766
|
}
|
|
3777
3767
|
)
|
|
3778
3768
|
] });
|
|
3779
|
-
}, ee = 5,
|
|
3780
|
-
const { colors: t } =
|
|
3769
|
+
}, ee = 5, Jr = ({ data: e, t: o }) => {
|
|
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(
|
|
3781
3771
|
p,
|
|
3782
3772
|
g ? o.and : void 0
|
|
3783
3773
|
)}` : o.memoriesFound;
|
|
@@ -3790,7 +3780,7 @@ const Xr = ({
|
|
|
3790
3780
|
transition: { duration: 0.3, delay: 0 },
|
|
3791
3781
|
children: [
|
|
3792
3782
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
|
|
3793
|
-
|
|
3783
|
+
c && !n && /* @__PURE__ */ m(R, { children: [
|
|
3794
3784
|
" ",
|
|
3795
3785
|
/* @__PURE__ */ r(
|
|
3796
3786
|
"button",
|
|
@@ -3814,7 +3804,7 @@ const Xr = ({
|
|
|
3814
3804
|
}
|
|
3815
3805
|
)
|
|
3816
3806
|
] }),
|
|
3817
|
-
|
|
3807
|
+
c && n && /* @__PURE__ */ m(R, { children: [
|
|
3818
3808
|
" ",
|
|
3819
3809
|
/* @__PURE__ */ r(
|
|
3820
3810
|
"button",
|
|
@@ -3840,7 +3830,7 @@ const Xr = ({
|
|
|
3840
3830
|
}
|
|
3841
3831
|
) });
|
|
3842
3832
|
};
|
|
3843
|
-
function
|
|
3833
|
+
function Zr(e) {
|
|
3844
3834
|
return {
|
|
3845
3835
|
taskType: "MemoryChat",
|
|
3846
3836
|
eventType: "Search",
|
|
@@ -3848,10 +3838,10 @@ function en(e) {
|
|
|
3848
3838
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
3849
3839
|
};
|
|
3850
3840
|
}
|
|
3851
|
-
const
|
|
3852
|
-
const a =
|
|
3841
|
+
const en = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
|
|
3842
|
+
const a = Zr(e);
|
|
3853
3843
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
3854
|
-
|
|
3844
|
+
q,
|
|
3855
3845
|
{
|
|
3856
3846
|
data: a,
|
|
3857
3847
|
isLatest: o,
|
|
@@ -3860,7 +3850,7 @@ const rn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3860
3850
|
}
|
|
3861
3851
|
) : /* @__PURE__ */ m(R, { children: [
|
|
3862
3852
|
/* @__PURE__ */ r(
|
|
3863
|
-
|
|
3853
|
+
q,
|
|
3864
3854
|
{
|
|
3865
3855
|
data: a,
|
|
3866
3856
|
isLatest: !1,
|
|
@@ -3884,19 +3874,19 @@ const rn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3884
3874
|
)
|
|
3885
3875
|
] });
|
|
3886
3876
|
};
|
|
3887
|
-
function
|
|
3877
|
+
function rn({
|
|
3888
3878
|
memory: e,
|
|
3889
3879
|
completed: o
|
|
3890
3880
|
}) {
|
|
3891
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
3881
|
+
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" });
|
|
3892
3882
|
}
|
|
3893
3883
|
const ye = 80;
|
|
3894
|
-
function
|
|
3884
|
+
function nn({
|
|
3895
3885
|
memory: e,
|
|
3896
3886
|
completed: o,
|
|
3897
3887
|
t
|
|
3898
3888
|
}) {
|
|
3899
|
-
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;
|
|
3900
3890
|
return /* @__PURE__ */ m(
|
|
3901
3891
|
v.div,
|
|
3902
3892
|
{
|
|
@@ -3926,7 +3916,7 @@ function on({
|
|
|
3926
3916
|
flexShrink: 0,
|
|
3927
3917
|
width: 32
|
|
3928
3918
|
},
|
|
3929
|
-
children: /* @__PURE__ */ r(
|
|
3919
|
+
children: /* @__PURE__ */ r(rn, { memory: e, completed: o })
|
|
3930
3920
|
}
|
|
3931
3921
|
),
|
|
3932
3922
|
/* @__PURE__ */ m(
|
|
@@ -3980,8 +3970,8 @@ function on({
|
|
|
3980
3970
|
}
|
|
3981
3971
|
);
|
|
3982
3972
|
}
|
|
3983
|
-
const
|
|
3984
|
-
const { colors: n } =
|
|
3973
|
+
const on = ({ data: e, completed: o, t }) => {
|
|
3974
|
+
const { colors: n } = b();
|
|
3985
3975
|
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
3986
3976
|
/* @__PURE__ */ r(
|
|
3987
3977
|
"div",
|
|
@@ -3996,7 +3986,7 @@ const tn = ({ data: e, completed: o, t }) => {
|
|
|
3996
3986
|
}
|
|
3997
3987
|
),
|
|
3998
3988
|
e.memories.map((i) => /* @__PURE__ */ r(
|
|
3999
|
-
|
|
3989
|
+
nn,
|
|
4000
3990
|
{
|
|
4001
3991
|
memory: i,
|
|
4002
3992
|
completed: o,
|
|
@@ -4005,13 +3995,13 @@ const tn = ({ data: e, completed: o, t }) => {
|
|
|
4005
3995
|
i.memoryId
|
|
4006
3996
|
))
|
|
4007
3997
|
] });
|
|
4008
|
-
},
|
|
3998
|
+
}, tn = ({
|
|
4009
3999
|
data: e,
|
|
4010
4000
|
isLatest: o = !1,
|
|
4011
4001
|
durationSeconds: t,
|
|
4012
4002
|
t: n
|
|
4013
4003
|
}) => {
|
|
4014
|
-
const { colors: i } =
|
|
4004
|
+
const { colors: i } = b(), a = k(n.exploreRunCode, { title: e.title });
|
|
4015
4005
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4016
4006
|
/* @__PURE__ */ r(
|
|
4017
4007
|
v.div,
|
|
@@ -4041,7 +4031,106 @@ const tn = ({ data: e, completed: o, t }) => {
|
|
|
4041
4031
|
}
|
|
4042
4032
|
)
|
|
4043
4033
|
] });
|
|
4044
|
-
}
|
|
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(
|
|
4045
4134
|
Me,
|
|
4046
4135
|
{
|
|
4047
4136
|
data: {
|
|
@@ -4053,20 +4142,20 @@ const tn = ({ data: e, completed: o, t }) => {
|
|
|
4053
4142
|
t
|
|
4054
4143
|
}
|
|
4055
4144
|
);
|
|
4056
|
-
function
|
|
4057
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
4145
|
+
function dn({ item: e }) {
|
|
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" });
|
|
4058
4147
|
}
|
|
4059
|
-
function
|
|
4148
|
+
function pn(e, o) {
|
|
4060
4149
|
return k(o.searchingInMemoriesOfType, {
|
|
4061
4150
|
name: e.memoryTypeName
|
|
4062
4151
|
});
|
|
4063
4152
|
}
|
|
4064
|
-
function
|
|
4153
|
+
function un({
|
|
4065
4154
|
item: e,
|
|
4066
4155
|
t: o,
|
|
4067
4156
|
showShimmerForPrimary: t
|
|
4068
4157
|
}) {
|
|
4069
|
-
const { colors: n } =
|
|
4158
|
+
const { colors: n } = b(), i = e.result != null, a = e.error != null, l = pn(e, o);
|
|
4070
4159
|
return /* @__PURE__ */ m(
|
|
4071
4160
|
v.div,
|
|
4072
4161
|
{
|
|
@@ -4094,7 +4183,7 @@ function dn({
|
|
|
4094
4183
|
flexShrink: 0,
|
|
4095
4184
|
width: 32
|
|
4096
4185
|
},
|
|
4097
|
-
children: /* @__PURE__ */ r(
|
|
4186
|
+
children: /* @__PURE__ */ r(dn, { item: e })
|
|
4098
4187
|
}
|
|
4099
4188
|
),
|
|
4100
4189
|
/* @__PURE__ */ m(
|
|
@@ -4133,20 +4222,20 @@ function dn({
|
|
|
4133
4222
|
}
|
|
4134
4223
|
);
|
|
4135
4224
|
}
|
|
4136
|
-
const
|
|
4137
|
-
const { colors: i } =
|
|
4225
|
+
const mn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4226
|
+
const { colors: i } = b(), a = z(() => {
|
|
4138
4227
|
let l = -1;
|
|
4139
|
-
return e.memoryTypes.forEach((
|
|
4140
|
-
|
|
4228
|
+
return e.memoryTypes.forEach((c, p) => {
|
|
4229
|
+
c.result == null && c.error == null && (l = p);
|
|
4141
4230
|
}), l;
|
|
4142
4231
|
}, [e.memoryTypes]);
|
|
4143
4232
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4144
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l,
|
|
4145
|
-
|
|
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,
|
|
4146
4235
|
{
|
|
4147
4236
|
item: l,
|
|
4148
4237
|
t: n,
|
|
4149
|
-
showShimmerForPrimary:
|
|
4238
|
+
showShimmerForPrimary: c === a && o
|
|
4150
4239
|
},
|
|
4151
4240
|
l.memoryTypeId
|
|
4152
4241
|
)),
|
|
@@ -4164,29 +4253,29 @@ const pn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4164
4253
|
)
|
|
4165
4254
|
] });
|
|
4166
4255
|
};
|
|
4167
|
-
function
|
|
4256
|
+
function U(e) {
|
|
4168
4257
|
return e.queries != null && e.queries.length > 0;
|
|
4169
4258
|
}
|
|
4170
|
-
function
|
|
4259
|
+
function gn(e) {
|
|
4171
4260
|
const o = e.reasoning;
|
|
4172
|
-
return (o == null || o === "") && !
|
|
4261
|
+
return (o == null || o === "") && !U(e);
|
|
4173
4262
|
}
|
|
4174
|
-
function
|
|
4175
|
-
if (
|
|
4263
|
+
function hn(e) {
|
|
4264
|
+
if (U(e)) return 3;
|
|
4176
4265
|
const o = e.reasoning;
|
|
4177
4266
|
return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
|
|
4178
4267
|
}
|
|
4179
|
-
function
|
|
4268
|
+
function yn({ phase: e }) {
|
|
4180
4269
|
return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
4181
4270
|
}
|
|
4182
|
-
function
|
|
4271
|
+
function fn({
|
|
4183
4272
|
item: e,
|
|
4184
4273
|
t: o,
|
|
4185
4274
|
isActiveRow: t
|
|
4186
4275
|
}) {
|
|
4187
|
-
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, {
|
|
4188
4277
|
name: e.memoryTypeName
|
|
4189
|
-
}),
|
|
4278
|
+
}), T = !i && a === 3;
|
|
4190
4279
|
return /* @__PURE__ */ m(
|
|
4191
4280
|
v.div,
|
|
4192
4281
|
{
|
|
@@ -4199,7 +4288,7 @@ function hn({
|
|
|
4199
4288
|
borderBottom: `1px solid ${n.border}`,
|
|
4200
4289
|
display: "flex",
|
|
4201
4290
|
flexDirection: "row",
|
|
4202
|
-
alignItems:
|
|
4291
|
+
alignItems: T ? "flex-start" : "center",
|
|
4203
4292
|
gap: "10px",
|
|
4204
4293
|
minWidth: 0
|
|
4205
4294
|
},
|
|
@@ -4213,9 +4302,9 @@ function hn({
|
|
|
4213
4302
|
justifyContent: "center",
|
|
4214
4303
|
flexShrink: 0,
|
|
4215
4304
|
width: 32,
|
|
4216
|
-
...
|
|
4305
|
+
...T ? { paddingTop: 2 } : {}
|
|
4217
4306
|
},
|
|
4218
|
-
children: /* @__PURE__ */ r(
|
|
4307
|
+
children: /* @__PURE__ */ r(yn, { phase: i ? 1 : a })
|
|
4219
4308
|
}
|
|
4220
4309
|
),
|
|
4221
4310
|
/* @__PURE__ */ m(
|
|
@@ -4230,7 +4319,7 @@ function hn({
|
|
|
4230
4319
|
},
|
|
4231
4320
|
children: [
|
|
4232
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 }),
|
|
4233
|
-
a === 1 &&
|
|
4322
|
+
a === 1 && c && !U(e) && /* @__PURE__ */ r(
|
|
4234
4323
|
Fe,
|
|
4235
4324
|
{
|
|
4236
4325
|
text: l,
|
|
@@ -4285,7 +4374,7 @@ function hn({
|
|
|
4285
4374
|
}
|
|
4286
4375
|
)
|
|
4287
4376
|
] }),
|
|
4288
|
-
|
|
4377
|
+
c && /* @__PURE__ */ m(R, { children: [
|
|
4289
4378
|
/* @__PURE__ */ r(
|
|
4290
4379
|
"button",
|
|
4291
4380
|
{
|
|
@@ -4308,8 +4397,8 @@ function hn({
|
|
|
4308
4397
|
"div",
|
|
4309
4398
|
{
|
|
4310
4399
|
style: {
|
|
4311
|
-
fontSize:
|
|
4312
|
-
lineHeight:
|
|
4400
|
+
fontSize: K,
|
|
4401
|
+
lineHeight: V,
|
|
4313
4402
|
whiteSpace: "pre-wrap",
|
|
4314
4403
|
wordBreak: "break-word",
|
|
4315
4404
|
color: n.textTertiary,
|
|
@@ -4329,20 +4418,20 @@ function hn({
|
|
|
4329
4418
|
}
|
|
4330
4419
|
);
|
|
4331
4420
|
}
|
|
4332
|
-
const
|
|
4333
|
-
const { colors: i } =
|
|
4421
|
+
const xn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4422
|
+
const { colors: i } = b(), a = z(() => {
|
|
4334
4423
|
let l = -1;
|
|
4335
|
-
return e.memoryTypes.forEach((
|
|
4336
|
-
|
|
4424
|
+
return e.memoryTypes.forEach((c, p) => {
|
|
4425
|
+
U(c) || (l = p);
|
|
4337
4426
|
}), l;
|
|
4338
4427
|
}, [e.memoryTypes]);
|
|
4339
4428
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4340
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l,
|
|
4341
|
-
|
|
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,
|
|
4342
4431
|
{
|
|
4343
4432
|
item: l,
|
|
4344
4433
|
t: n,
|
|
4345
|
-
isActiveRow:
|
|
4434
|
+
isActiveRow: c === a && o
|
|
4346
4435
|
},
|
|
4347
4436
|
l.memoryTypeId
|
|
4348
4437
|
)),
|
|
@@ -4360,14 +4449,14 @@ const yn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4360
4449
|
)
|
|
4361
4450
|
] });
|
|
4362
4451
|
};
|
|
4363
|
-
function
|
|
4364
|
-
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(
|
|
4452
|
+
function kn(e) {
|
|
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 });
|
|
4365
4454
|
}
|
|
4366
|
-
function
|
|
4455
|
+
function Sn({
|
|
4367
4456
|
item: e,
|
|
4368
4457
|
t: o
|
|
4369
4458
|
}) {
|
|
4370
|
-
const { colors: t } =
|
|
4459
|
+
const { colors: t } = b();
|
|
4371
4460
|
if (e.error != null)
|
|
4372
4461
|
return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
|
|
4373
4462
|
if (e.result == null)
|
|
@@ -4381,13 +4470,13 @@ function xn({
|
|
|
4381
4470
|
a
|
|
4382
4471
|
] });
|
|
4383
4472
|
}
|
|
4384
|
-
function
|
|
4473
|
+
function bn({
|
|
4385
4474
|
items: e,
|
|
4386
4475
|
queryRow: o,
|
|
4387
4476
|
onExploreQueryResultClick: t,
|
|
4388
4477
|
t: n
|
|
4389
4478
|
}) {
|
|
4390
|
-
const { colors: i } =
|
|
4479
|
+
const { colors: i } = b(), [a, l] = w(null);
|
|
4391
4480
|
if (e.length === 0)
|
|
4392
4481
|
return /* @__PURE__ */ r(
|
|
4393
4482
|
"div",
|
|
@@ -4400,7 +4489,7 @@ function kn({
|
|
|
4400
4489
|
children: n.memorySearchExploreNoResults
|
|
4401
4490
|
}
|
|
4402
4491
|
);
|
|
4403
|
-
const
|
|
4492
|
+
const c = !!t;
|
|
4404
4493
|
return /* @__PURE__ */ r(
|
|
4405
4494
|
"div",
|
|
4406
4495
|
{
|
|
@@ -4422,8 +4511,8 @@ function kn({
|
|
|
4422
4511
|
}),
|
|
4423
4512
|
h.length > 0 ? ne(h, n) : n.pagesNotAvailable
|
|
4424
4513
|
].filter(
|
|
4425
|
-
(
|
|
4426
|
-
),
|
|
4514
|
+
(d) => d != null && d !== ""
|
|
4515
|
+
), T = {
|
|
4427
4516
|
memoryId: p.memoryId,
|
|
4428
4517
|
memoryTitle: p.memoryTitle,
|
|
4429
4518
|
pageNumbers: h,
|
|
@@ -4497,7 +4586,7 @@ function kn({
|
|
|
4497
4586
|
]
|
|
4498
4587
|
}
|
|
4499
4588
|
),
|
|
4500
|
-
|
|
4589
|
+
c && /* @__PURE__ */ m(
|
|
4501
4590
|
"button",
|
|
4502
4591
|
{
|
|
4503
4592
|
type: "button",
|
|
@@ -4507,7 +4596,7 @@ function kn({
|
|
|
4507
4596
|
l(y);
|
|
4508
4597
|
try {
|
|
4509
4598
|
await t(
|
|
4510
|
-
|
|
4599
|
+
T
|
|
4511
4600
|
);
|
|
4512
4601
|
} finally {
|
|
4513
4602
|
l(null);
|
|
@@ -4549,7 +4638,7 @@ function kn({
|
|
|
4549
4638
|
}
|
|
4550
4639
|
);
|
|
4551
4640
|
}
|
|
4552
|
-
function
|
|
4641
|
+
function Tn(e) {
|
|
4553
4642
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
4554
4643
|
return e.forEach((n, i) => {
|
|
4555
4644
|
let a = t.get(n.memoryTypeId);
|
|
@@ -4560,7 +4649,7 @@ function Sn(e) {
|
|
|
4560
4649
|
}, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
|
|
4561
4650
|
}), o.map((n) => t.get(n));
|
|
4562
4651
|
}
|
|
4563
|
-
function
|
|
4652
|
+
function vn({
|
|
4564
4653
|
group: e,
|
|
4565
4654
|
t: o,
|
|
4566
4655
|
isLatest: t,
|
|
@@ -4568,7 +4657,7 @@ function bn({
|
|
|
4568
4657
|
toggleExpanded: i,
|
|
4569
4658
|
onExploreQueryResultClick: a
|
|
4570
4659
|
}) {
|
|
4571
|
-
const { colors: l } =
|
|
4660
|
+
const { colors: l } = b(), c = e.items.map((u) => u.item), p = c.some(
|
|
4572
4661
|
(u) => u.result == null && u.error == null
|
|
4573
4662
|
);
|
|
4574
4663
|
return /* @__PURE__ */ m(
|
|
@@ -4599,7 +4688,7 @@ function bn({
|
|
|
4599
4688
|
width: 32,
|
|
4600
4689
|
...p ? {} : { paddingTop: 2 }
|
|
4601
4690
|
},
|
|
4602
|
-
children:
|
|
4691
|
+
children: kn(c)
|
|
4603
4692
|
}
|
|
4604
4693
|
),
|
|
4605
4694
|
/* @__PURE__ */ m(
|
|
@@ -4626,8 +4715,8 @@ function bn({
|
|
|
4626
4715
|
}
|
|
4627
4716
|
),
|
|
4628
4717
|
e.items.map(({ item: u, flatIndex: g }) => {
|
|
4629
|
-
var
|
|
4630
|
-
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) ?? [];
|
|
4631
4720
|
return /* @__PURE__ */ m(
|
|
4632
4721
|
"div",
|
|
4633
4722
|
{
|
|
@@ -4661,7 +4750,7 @@ function bn({
|
|
|
4661
4750
|
flex: "1 1 12rem",
|
|
4662
4751
|
minWidth: 0
|
|
4663
4752
|
},
|
|
4664
|
-
children:
|
|
4753
|
+
children: T ? /* @__PURE__ */ r(
|
|
4665
4754
|
C,
|
|
4666
4755
|
{
|
|
4667
4756
|
text: u.query,
|
|
@@ -4682,7 +4771,7 @@ function bn({
|
|
|
4682
4771
|
flexShrink: 0
|
|
4683
4772
|
},
|
|
4684
4773
|
children: [
|
|
4685
|
-
/* @__PURE__ */ r(
|
|
4774
|
+
/* @__PURE__ */ r(Sn, { item: u, t: o }),
|
|
4686
4775
|
h && /* @__PURE__ */ r(
|
|
4687
4776
|
"button",
|
|
4688
4777
|
{
|
|
@@ -4708,7 +4797,7 @@ function bn({
|
|
|
4708
4797
|
}
|
|
4709
4798
|
),
|
|
4710
4799
|
h && y && /* @__PURE__ */ r(
|
|
4711
|
-
|
|
4800
|
+
bn,
|
|
4712
4801
|
{
|
|
4713
4802
|
items: s,
|
|
4714
4803
|
queryRow: u,
|
|
@@ -4728,22 +4817,22 @@ function bn({
|
|
|
4728
4817
|
}
|
|
4729
4818
|
);
|
|
4730
4819
|
}
|
|
4731
|
-
const
|
|
4820
|
+
const wn = ({
|
|
4732
4821
|
data: e,
|
|
4733
4822
|
isLatest: o = !1,
|
|
4734
4823
|
durationSeconds: t,
|
|
4735
4824
|
onExploreQueryResultClick: n,
|
|
4736
4825
|
t: i
|
|
4737
4826
|
}) => {
|
|
4738
|
-
const { colors: a } =
|
|
4827
|
+
const { colors: a } = b(), [l, c] = w(
|
|
4739
4828
|
{}
|
|
4740
4829
|
), p = L((g) => {
|
|
4741
|
-
|
|
4830
|
+
c((h) => ({
|
|
4742
4831
|
...h,
|
|
4743
4832
|
[g]: !h[g]
|
|
4744
4833
|
}));
|
|
4745
|
-
}, []), u =
|
|
4746
|
-
() =>
|
|
4834
|
+
}, []), u = z(
|
|
4835
|
+
() => Tn(e.queries),
|
|
4747
4836
|
[e.queries]
|
|
4748
4837
|
);
|
|
4749
4838
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
@@ -4755,7 +4844,7 @@ const Tn = ({
|
|
|
4755
4844
|
repeat: !0
|
|
4756
4845
|
}
|
|
4757
4846
|
) : u.map((g) => /* @__PURE__ */ r(
|
|
4758
|
-
|
|
4847
|
+
vn,
|
|
4759
4848
|
{
|
|
4760
4849
|
group: g,
|
|
4761
4850
|
t: i,
|
|
@@ -4779,8 +4868,8 @@ const Tn = ({
|
|
|
4779
4868
|
}
|
|
4780
4869
|
)
|
|
4781
4870
|
] });
|
|
4782
|
-
},
|
|
4783
|
-
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);
|
|
4784
4873
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4785
4874
|
/* @__PURE__ */ r(
|
|
4786
4875
|
v.div,
|
|
@@ -4815,8 +4904,8 @@ const Tn = ({
|
|
|
4815
4904
|
}),
|
|
4816
4905
|
h.length > 0 ? ne(h, t) : t.pagesNotAvailable
|
|
4817
4906
|
].filter(
|
|
4818
|
-
(
|
|
4819
|
-
),
|
|
4907
|
+
(d) => d != null && d !== ""
|
|
4908
|
+
), T = {
|
|
4820
4909
|
memoryId: p.memoryId,
|
|
4821
4910
|
memoryTitle: p.memoryTitle,
|
|
4822
4911
|
memoryTypeId: p.memoryTypeId,
|
|
@@ -4897,11 +4986,11 @@ const Tn = ({
|
|
|
4897
4986
|
"aria-busy": s,
|
|
4898
4987
|
disabled: s,
|
|
4899
4988
|
onClick: async () => {
|
|
4900
|
-
|
|
4989
|
+
c(y);
|
|
4901
4990
|
try {
|
|
4902
|
-
await o(
|
|
4991
|
+
await o(T);
|
|
4903
4992
|
} finally {
|
|
4904
|
-
|
|
4993
|
+
c(null);
|
|
4905
4994
|
}
|
|
4906
4995
|
},
|
|
4907
4996
|
style: {
|
|
@@ -4941,7 +5030,7 @@ const Tn = ({
|
|
|
4941
5030
|
)
|
|
4942
5031
|
] });
|
|
4943
5032
|
}, O = ({ message: e }) => {
|
|
4944
|
-
const { colors: o } =
|
|
5033
|
+
const { colors: o } = b();
|
|
4945
5034
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
4946
5035
|
v.div,
|
|
4947
5036
|
{
|
|
@@ -4967,7 +5056,7 @@ const Tn = ({
|
|
|
4967
5056
|
}
|
|
4968
5057
|
) });
|
|
4969
5058
|
};
|
|
4970
|
-
class
|
|
5059
|
+
class Mn extends Ue.Component {
|
|
4971
5060
|
constructor(o) {
|
|
4972
5061
|
super(o), this.state = { hasError: !1 };
|
|
4973
5062
|
}
|
|
@@ -4986,7 +5075,7 @@ class wn extends Ue.Component {
|
|
|
4986
5075
|
return this.state.hasError ? null : this.props.children;
|
|
4987
5076
|
}
|
|
4988
5077
|
}
|
|
4989
|
-
const
|
|
5078
|
+
const En = ({
|
|
4990
5079
|
progressViewItems: e,
|
|
4991
5080
|
loading: o,
|
|
4992
5081
|
error: t,
|
|
@@ -4994,33 +5083,33 @@ const Cn = ({
|
|
|
4994
5083
|
t: i,
|
|
4995
5084
|
onMemoryClick: a,
|
|
4996
5085
|
onSourceClick: l,
|
|
4997
|
-
onSearchResultClick:
|
|
5086
|
+
onSearchResultClick: c,
|
|
4998
5087
|
onExploreQueryResultClick: p,
|
|
4999
5088
|
downloadFile: u
|
|
5000
5089
|
}) => {
|
|
5001
|
-
const { theme: g, colors: h } =
|
|
5090
|
+
const { theme: g, colors: h } = b(), x = A(null);
|
|
5002
5091
|
H(() => {
|
|
5003
5092
|
x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
5004
5093
|
}, [e.length]);
|
|
5005
|
-
const
|
|
5006
|
-
const
|
|
5007
|
-
if (
|
|
5094
|
+
const T = (s) => {
|
|
5095
|
+
const d = s.item.data;
|
|
5096
|
+
if (d.taskType === "StreamingChatCompletion" && d.eventType === "Text")
|
|
5008
5097
|
return /* @__PURE__ */ r(
|
|
5009
5098
|
N,
|
|
5010
5099
|
{
|
|
5011
|
-
text:
|
|
5100
|
+
text: d.text,
|
|
5012
5101
|
onMemoryClick: a
|
|
5013
5102
|
}
|
|
5014
5103
|
);
|
|
5015
|
-
if (
|
|
5016
|
-
return /* @__PURE__ */ r(lr, { data:
|
|
5017
|
-
if (
|
|
5018
|
-
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) {
|
|
5019
5108
|
case "Text":
|
|
5020
5109
|
return /* @__PURE__ */ r(
|
|
5021
5110
|
N,
|
|
5022
5111
|
{
|
|
5023
|
-
text:
|
|
5112
|
+
text: d.text,
|
|
5024
5113
|
onFileDownload: u,
|
|
5025
5114
|
onMemoryClick: a
|
|
5026
5115
|
}
|
|
@@ -5029,7 +5118,7 @@ const Cn = ({
|
|
|
5029
5118
|
return /* @__PURE__ */ r(
|
|
5030
5119
|
ge,
|
|
5031
5120
|
{
|
|
5032
|
-
data:
|
|
5121
|
+
data: d,
|
|
5033
5122
|
isLatest: s.isLatest,
|
|
5034
5123
|
durationSeconds: s.durationSeconds,
|
|
5035
5124
|
t: i
|
|
@@ -5039,7 +5128,7 @@ const Cn = ({
|
|
|
5039
5128
|
return /* @__PURE__ */ r(
|
|
5040
5129
|
Gr,
|
|
5041
5130
|
{
|
|
5042
|
-
data:
|
|
5131
|
+
data: d,
|
|
5043
5132
|
isLatest: s.isLatest,
|
|
5044
5133
|
durationSeconds: s.durationSeconds,
|
|
5045
5134
|
t: i
|
|
@@ -5049,7 +5138,7 @@ const Cn = ({
|
|
|
5049
5138
|
return /* @__PURE__ */ r(
|
|
5050
5139
|
Or,
|
|
5051
5140
|
{
|
|
5052
|
-
data:
|
|
5141
|
+
data: d,
|
|
5053
5142
|
isLatest: s.isLatest,
|
|
5054
5143
|
durationSeconds: s.durationSeconds,
|
|
5055
5144
|
t: i
|
|
@@ -5059,7 +5148,7 @@ const Cn = ({
|
|
|
5059
5148
|
return /* @__PURE__ */ r(
|
|
5060
5149
|
_r,
|
|
5061
5150
|
{
|
|
5062
|
-
data:
|
|
5151
|
+
data: d,
|
|
5063
5152
|
isLatest: s.isLatest,
|
|
5064
5153
|
durationSeconds: s.durationSeconds,
|
|
5065
5154
|
t: i
|
|
@@ -5069,7 +5158,7 @@ const Cn = ({
|
|
|
5069
5158
|
return /* @__PURE__ */ r(
|
|
5070
5159
|
qr,
|
|
5071
5160
|
{
|
|
5072
|
-
data:
|
|
5161
|
+
data: d,
|
|
5073
5162
|
isLatest: s.isLatest,
|
|
5074
5163
|
durationSeconds: s.durationSeconds,
|
|
5075
5164
|
t: i
|
|
@@ -5079,19 +5168,19 @@ const Cn = ({
|
|
|
5079
5168
|
return /* @__PURE__ */ r(
|
|
5080
5169
|
Ur,
|
|
5081
5170
|
{
|
|
5082
|
-
data:
|
|
5171
|
+
data: d,
|
|
5083
5172
|
isLatest: s.isLatest,
|
|
5084
5173
|
durationSeconds: s.durationSeconds,
|
|
5085
5174
|
t: i
|
|
5086
5175
|
}
|
|
5087
5176
|
);
|
|
5088
5177
|
case "GenerateReportCompleted":
|
|
5089
|
-
return /* @__PURE__ */ r(
|
|
5178
|
+
return /* @__PURE__ */ r(jr, { data: d, t: i });
|
|
5090
5179
|
case "FindMemories":
|
|
5091
5180
|
return /* @__PURE__ */ r(
|
|
5092
5181
|
kr,
|
|
5093
5182
|
{
|
|
5094
|
-
data:
|
|
5183
|
+
data: d,
|
|
5095
5184
|
isLatest: s.isLatest,
|
|
5096
5185
|
durationSeconds: s.durationSeconds,
|
|
5097
5186
|
t: i
|
|
@@ -5101,15 +5190,15 @@ const Cn = ({
|
|
|
5101
5190
|
return /* @__PURE__ */ r(
|
|
5102
5191
|
Sr,
|
|
5103
5192
|
{
|
|
5104
|
-
data:
|
|
5193
|
+
data: d,
|
|
5105
5194
|
t: i
|
|
5106
5195
|
}
|
|
5107
5196
|
);
|
|
5108
5197
|
case "Search":
|
|
5109
5198
|
return /* @__PURE__ */ r(
|
|
5110
|
-
|
|
5199
|
+
q,
|
|
5111
5200
|
{
|
|
5112
|
-
data:
|
|
5201
|
+
data: d,
|
|
5113
5202
|
isLatest: s.isLatest,
|
|
5114
5203
|
durationSeconds: s.durationSeconds,
|
|
5115
5204
|
t: i
|
|
@@ -5119,18 +5208,18 @@ const Cn = ({
|
|
|
5119
5208
|
return /* @__PURE__ */ r(
|
|
5120
5209
|
xr,
|
|
5121
5210
|
{
|
|
5122
|
-
data:
|
|
5211
|
+
data: d,
|
|
5123
5212
|
isLatest: s.isLatest,
|
|
5124
5213
|
durationSeconds: s.durationSeconds,
|
|
5125
5214
|
t: i,
|
|
5126
|
-
onSearchResultClick:
|
|
5215
|
+
onSearchResultClick: c
|
|
5127
5216
|
}
|
|
5128
5217
|
);
|
|
5129
5218
|
case "FindSources":
|
|
5130
5219
|
return /* @__PURE__ */ r(
|
|
5131
5220
|
ce,
|
|
5132
5221
|
{
|
|
5133
|
-
data:
|
|
5222
|
+
data: d,
|
|
5134
5223
|
isLatest: s.isLatest,
|
|
5135
5224
|
durationSeconds: s.durationSeconds,
|
|
5136
5225
|
t: i
|
|
@@ -5140,7 +5229,7 @@ const Cn = ({
|
|
|
5140
5229
|
return /* @__PURE__ */ r(
|
|
5141
5230
|
Me,
|
|
5142
5231
|
{
|
|
5143
|
-
data:
|
|
5232
|
+
data: d,
|
|
5144
5233
|
onSourceClick: l,
|
|
5145
5234
|
t: i
|
|
5146
5235
|
}
|
|
@@ -5149,7 +5238,7 @@ const Cn = ({
|
|
|
5149
5238
|
return /* @__PURE__ */ r(
|
|
5150
5239
|
Cr,
|
|
5151
5240
|
{
|
|
5152
|
-
data:
|
|
5241
|
+
data: d,
|
|
5153
5242
|
completed: s.completed,
|
|
5154
5243
|
isLatest: s.isLatest,
|
|
5155
5244
|
t: i
|
|
@@ -5159,8 +5248,8 @@ const Cn = ({
|
|
|
5159
5248
|
return /* @__PURE__ */ r(
|
|
5160
5249
|
ie,
|
|
5161
5250
|
{
|
|
5162
|
-
data:
|
|
5163
|
-
onSearchResultClick:
|
|
5251
|
+
data: d,
|
|
5252
|
+
onSearchResultClick: c,
|
|
5164
5253
|
t: i
|
|
5165
5254
|
}
|
|
5166
5255
|
);
|
|
@@ -5168,7 +5257,7 @@ const Cn = ({
|
|
|
5168
5257
|
return /* @__PURE__ */ r(
|
|
5169
5258
|
Fr,
|
|
5170
5259
|
{
|
|
5171
|
-
data:
|
|
5260
|
+
data: d,
|
|
5172
5261
|
isLatest: s.isLatest,
|
|
5173
5262
|
durationSeconds: s.durationSeconds,
|
|
5174
5263
|
t: i
|
|
@@ -5178,7 +5267,7 @@ const Cn = ({
|
|
|
5178
5267
|
return /* @__PURE__ */ r(
|
|
5179
5268
|
Hr,
|
|
5180
5269
|
{
|
|
5181
|
-
data:
|
|
5270
|
+
data: d,
|
|
5182
5271
|
isLatest: s.isLatest,
|
|
5183
5272
|
durationSeconds: s.durationSeconds,
|
|
5184
5273
|
t: i
|
|
@@ -5188,13 +5277,13 @@ const Cn = ({
|
|
|
5188
5277
|
return /* @__PURE__ */ r(
|
|
5189
5278
|
N,
|
|
5190
5279
|
{
|
|
5191
|
-
text:
|
|
5280
|
+
text: d.response.textResponse,
|
|
5192
5281
|
onFileDownload: u,
|
|
5193
5282
|
onMemoryClick: a
|
|
5194
5283
|
}
|
|
5195
5284
|
);
|
|
5196
5285
|
default: {
|
|
5197
|
-
const f =
|
|
5286
|
+
const f = d;
|
|
5198
5287
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5199
5288
|
"[fency] Unknown MemoryChat eventType (no UI):",
|
|
5200
5289
|
f.eventType,
|
|
@@ -5202,13 +5291,13 @@ const Cn = ({
|
|
|
5202
5291
|
), null);
|
|
5203
5292
|
}
|
|
5204
5293
|
}
|
|
5205
|
-
if (
|
|
5206
|
-
switch (
|
|
5294
|
+
if (d.taskType === "MemorySearch")
|
|
5295
|
+
switch (d.eventType) {
|
|
5207
5296
|
case "GeneratingQueries":
|
|
5208
5297
|
return /* @__PURE__ */ r(
|
|
5209
|
-
|
|
5298
|
+
xn,
|
|
5210
5299
|
{
|
|
5211
|
-
data:
|
|
5300
|
+
data: d,
|
|
5212
5301
|
isLatest: s.isLatest,
|
|
5213
5302
|
durationSeconds: s.durationSeconds,
|
|
5214
5303
|
t: i
|
|
@@ -5216,9 +5305,9 @@ const Cn = ({
|
|
|
5216
5305
|
);
|
|
5217
5306
|
case "ExploreQueries":
|
|
5218
5307
|
return /* @__PURE__ */ r(
|
|
5219
|
-
|
|
5308
|
+
wn,
|
|
5220
5309
|
{
|
|
5221
|
-
data:
|
|
5310
|
+
data: d,
|
|
5222
5311
|
isLatest: s.isLatest,
|
|
5223
5312
|
durationSeconds: s.durationSeconds,
|
|
5224
5313
|
onExploreQueryResultClick: p,
|
|
@@ -5227,9 +5316,9 @@ const Cn = ({
|
|
|
5227
5316
|
);
|
|
5228
5317
|
case "SearchMemoryTypes":
|
|
5229
5318
|
return /* @__PURE__ */ r(
|
|
5230
|
-
|
|
5319
|
+
mn,
|
|
5231
5320
|
{
|
|
5232
|
-
data:
|
|
5321
|
+
data: d,
|
|
5233
5322
|
isLatest: s.isLatest,
|
|
5234
5323
|
durationSeconds: s.durationSeconds,
|
|
5235
5324
|
t: i
|
|
@@ -5237,15 +5326,15 @@ const Cn = ({
|
|
|
5237
5326
|
);
|
|
5238
5327
|
case "Completed":
|
|
5239
5328
|
return /* @__PURE__ */ r(
|
|
5240
|
-
|
|
5329
|
+
Cn,
|
|
5241
5330
|
{
|
|
5242
|
-
data:
|
|
5243
|
-
onSearchResultClick:
|
|
5331
|
+
data: d,
|
|
5332
|
+
onSearchResultClick: c,
|
|
5244
5333
|
t: i
|
|
5245
5334
|
}
|
|
5246
5335
|
);
|
|
5247
5336
|
default: {
|
|
5248
|
-
const f =
|
|
5337
|
+
const f = d;
|
|
5249
5338
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5250
5339
|
"[fency] Unknown MemorySearch eventType (no UI):",
|
|
5251
5340
|
f.eventType,
|
|
@@ -5253,13 +5342,13 @@ const Cn = ({
|
|
|
5253
5342
|
), null);
|
|
5254
5343
|
}
|
|
5255
5344
|
}
|
|
5256
|
-
if (
|
|
5257
|
-
switch (
|
|
5345
|
+
if (d.taskType === "ExploreMemories")
|
|
5346
|
+
switch (d.eventType) {
|
|
5258
5347
|
case "Text":
|
|
5259
5348
|
return /* @__PURE__ */ r(
|
|
5260
5349
|
N,
|
|
5261
5350
|
{
|
|
5262
|
-
text:
|
|
5351
|
+
text: d.text,
|
|
5263
5352
|
onFileDownload: u,
|
|
5264
5353
|
onMemoryClick: a
|
|
5265
5354
|
}
|
|
@@ -5276,11 +5365,12 @@ const Cn = ({
|
|
|
5276
5365
|
);
|
|
5277
5366
|
case "Planning":
|
|
5278
5367
|
return /* @__PURE__ */ r(
|
|
5279
|
-
|
|
5368
|
+
Vr,
|
|
5280
5369
|
{
|
|
5281
|
-
data:
|
|
5370
|
+
data: d,
|
|
5282
5371
|
createdAt: s.item.createdAt,
|
|
5283
5372
|
timestamp: s.item.timestamp,
|
|
5373
|
+
completed: s.completed,
|
|
5284
5374
|
t: i,
|
|
5285
5375
|
onMemoryClick: a
|
|
5286
5376
|
}
|
|
@@ -5289,9 +5379,9 @@ const Cn = ({
|
|
|
5289
5379
|
return null;
|
|
5290
5380
|
case "ExportingMemories":
|
|
5291
5381
|
return /* @__PURE__ */ r(
|
|
5292
|
-
|
|
5382
|
+
Xr,
|
|
5293
5383
|
{
|
|
5294
|
-
data:
|
|
5384
|
+
data: d,
|
|
5295
5385
|
isLatest: s.isLatest,
|
|
5296
5386
|
durationSeconds: s.durationSeconds,
|
|
5297
5387
|
t: i
|
|
@@ -5299,32 +5389,32 @@ const Cn = ({
|
|
|
5299
5389
|
);
|
|
5300
5390
|
case "FindMemories":
|
|
5301
5391
|
return /* @__PURE__ */ r(
|
|
5302
|
-
|
|
5392
|
+
Yr,
|
|
5303
5393
|
{
|
|
5304
|
-
data:
|
|
5394
|
+
data: d,
|
|
5305
5395
|
isLatest: s.isLatest,
|
|
5306
5396
|
durationSeconds: s.durationSeconds,
|
|
5307
5397
|
t: i
|
|
5308
5398
|
}
|
|
5309
5399
|
);
|
|
5310
5400
|
case "FindMemoriesResult":
|
|
5311
|
-
return /* @__PURE__ */ r(
|
|
5401
|
+
return /* @__PURE__ */ r(Jr, { data: d, t: i });
|
|
5312
5402
|
case "SemanticSearch":
|
|
5313
5403
|
return /* @__PURE__ */ r(
|
|
5314
|
-
|
|
5404
|
+
en,
|
|
5315
5405
|
{
|
|
5316
|
-
data:
|
|
5406
|
+
data: d,
|
|
5317
5407
|
isLatest: s.isLatest,
|
|
5318
5408
|
durationSeconds: s.durationSeconds,
|
|
5319
5409
|
t: i,
|
|
5320
|
-
onSearchResultClick:
|
|
5410
|
+
onSearchResultClick: c
|
|
5321
5411
|
}
|
|
5322
5412
|
);
|
|
5323
5413
|
case "SemanticSearchForEach":
|
|
5324
5414
|
return /* @__PURE__ */ r(
|
|
5325
|
-
|
|
5415
|
+
on,
|
|
5326
5416
|
{
|
|
5327
|
-
data:
|
|
5417
|
+
data: d,
|
|
5328
5418
|
completed: s.completed,
|
|
5329
5419
|
isLatest: s.isLatest,
|
|
5330
5420
|
t: i
|
|
@@ -5332,9 +5422,20 @@ const Cn = ({
|
|
|
5332
5422
|
);
|
|
5333
5423
|
case "RunCode":
|
|
5334
5424
|
return /* @__PURE__ */ r(
|
|
5335
|
-
|
|
5425
|
+
tn,
|
|
5426
|
+
{
|
|
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,
|
|
5336
5436
|
{
|
|
5337
|
-
data:
|
|
5437
|
+
data: d,
|
|
5438
|
+
completed: s.completed,
|
|
5338
5439
|
isLatest: s.isLatest,
|
|
5339
5440
|
durationSeconds: s.durationSeconds,
|
|
5340
5441
|
t: i
|
|
@@ -5352,9 +5453,9 @@ const Cn = ({
|
|
|
5352
5453
|
);
|
|
5353
5454
|
case "SourcesResult":
|
|
5354
5455
|
return /* @__PURE__ */ r(
|
|
5355
|
-
|
|
5456
|
+
cn,
|
|
5356
5457
|
{
|
|
5357
|
-
data:
|
|
5458
|
+
data: d,
|
|
5358
5459
|
onSourceClick: l,
|
|
5359
5460
|
t: i
|
|
5360
5461
|
}
|
|
@@ -5363,13 +5464,13 @@ const Cn = ({
|
|
|
5363
5464
|
return /* @__PURE__ */ r(
|
|
5364
5465
|
N,
|
|
5365
5466
|
{
|
|
5366
|
-
text:
|
|
5467
|
+
text: d.response.textResponse,
|
|
5367
5468
|
onFileDownload: u,
|
|
5368
5469
|
onMemoryClick: a
|
|
5369
5470
|
}
|
|
5370
5471
|
);
|
|
5371
5472
|
default: {
|
|
5372
|
-
const f =
|
|
5473
|
+
const f = d;
|
|
5373
5474
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5374
5475
|
"[fency] Unknown ExploreMemories eventType (no UI):",
|
|
5375
5476
|
f.eventType,
|
|
@@ -5377,13 +5478,13 @@ const Cn = ({
|
|
|
5377
5478
|
), null);
|
|
5378
5479
|
}
|
|
5379
5480
|
}
|
|
5380
|
-
return
|
|
5481
|
+
return d.taskType === "StreamingChatCompletion" && d.eventType === "Completed" ? /* @__PURE__ */ r(
|
|
5381
5482
|
N,
|
|
5382
5483
|
{
|
|
5383
|
-
text:
|
|
5484
|
+
text: d.response.textResponse,
|
|
5384
5485
|
onMemoryClick: a
|
|
5385
5486
|
}
|
|
5386
|
-
) :
|
|
5487
|
+
) : d.eventType === "Error" && "message" in d ? /* @__PURE__ */ r(O, { message: d.message }) : null;
|
|
5387
5488
|
};
|
|
5388
5489
|
if (e.length === 0)
|
|
5389
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(
|
|
@@ -5397,42 +5498,42 @@ const Cn = ({
|
|
|
5397
5498
|
shimmerColor: h.shimmerHighlight
|
|
5398
5499
|
}
|
|
5399
5500
|
) }) : null;
|
|
5400
|
-
const y = e.filter((s,
|
|
5501
|
+
const y = e.filter((s, d) => {
|
|
5401
5502
|
const f = s.item.data;
|
|
5402
5503
|
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
|
|
5403
5504
|
return !1;
|
|
5404
5505
|
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
5405
|
-
return !e.slice(
|
|
5506
|
+
return !e.slice(d + 1).some(
|
|
5406
5507
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
|
|
5407
5508
|
);
|
|
5408
5509
|
if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
|
|
5409
|
-
return !e.slice(
|
|
5510
|
+
return !e.slice(d + 1).some(
|
|
5410
5511
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
|
|
5411
5512
|
);
|
|
5412
5513
|
if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
|
|
5413
|
-
return !e.slice(
|
|
5514
|
+
return !e.slice(d + 1).some(
|
|
5414
5515
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
|
|
5415
5516
|
);
|
|
5416
5517
|
if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
|
|
5417
|
-
return !e.slice(
|
|
5518
|
+
return !e.slice(d + 1).some(
|
|
5418
5519
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
|
|
5419
5520
|
);
|
|
5420
5521
|
if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
|
|
5421
|
-
return !e.slice(
|
|
5522
|
+
return !e.slice(d + 1).some(
|
|
5422
5523
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
|
|
5423
5524
|
);
|
|
5424
5525
|
if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
|
|
5425
|
-
return !e.slice(
|
|
5526
|
+
return !e.slice(d + 1).some(
|
|
5426
5527
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
|
|
5427
5528
|
);
|
|
5428
5529
|
if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
|
|
5429
|
-
return !e.slice(
|
|
5530
|
+
return !e.slice(d + 1).some(
|
|
5430
5531
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
|
|
5431
5532
|
);
|
|
5432
5533
|
if (f.taskType === "ExploreMemories" && (f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
|
|
5433
|
-
const
|
|
5434
|
-
return !e.slice(
|
|
5435
|
-
(se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType ===
|
|
5534
|
+
const P = f.eventType;
|
|
5535
|
+
return !e.slice(d + 1).some(
|
|
5536
|
+
(se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === P
|
|
5436
5537
|
);
|
|
5437
5538
|
}
|
|
5438
5539
|
return !0;
|
|
@@ -5444,7 +5545,7 @@ const Cn = ({
|
|
|
5444
5545
|
ref: x,
|
|
5445
5546
|
"data-theme": g,
|
|
5446
5547
|
children: [
|
|
5447
|
-
/* @__PURE__ */ r(Ve, { children: y.map((s,
|
|
5548
|
+
/* @__PURE__ */ r(Ve, { children: y.map((s, d) => /* @__PURE__ */ r(
|
|
5448
5549
|
v.div,
|
|
5449
5550
|
{
|
|
5450
5551
|
id: `agent-task-progress-item-${s.item.progressItemId}`,
|
|
@@ -5452,14 +5553,14 @@ const Cn = ({
|
|
|
5452
5553
|
animate: { opacity: 1, y: 0 },
|
|
5453
5554
|
transition: {
|
|
5454
5555
|
duration: 0.4,
|
|
5455
|
-
delay:
|
|
5556
|
+
delay: d * 0.1,
|
|
5456
5557
|
ease: "easeOut"
|
|
5457
5558
|
},
|
|
5458
5559
|
children: /* @__PURE__ */ r(
|
|
5459
|
-
|
|
5560
|
+
Mn,
|
|
5460
5561
|
{
|
|
5461
5562
|
progressItemId: s.item.progressItemId,
|
|
5462
|
-
children:
|
|
5563
|
+
children: T(s)
|
|
5463
5564
|
}
|
|
5464
5565
|
)
|
|
5465
5566
|
},
|
|
@@ -5469,12 +5570,12 @@ const Cn = ({
|
|
|
5469
5570
|
]
|
|
5470
5571
|
}
|
|
5471
5572
|
);
|
|
5472
|
-
},
|
|
5473
|
-
const { colors: n } =
|
|
5573
|
+
}, Rn = ({ taskId: e, label: o, copiedLabel: t }) => {
|
|
5574
|
+
const { colors: n } = b(), [i, a] = w(!1);
|
|
5474
5575
|
H(() => {
|
|
5475
5576
|
if (!i) return;
|
|
5476
|
-
const
|
|
5477
|
-
return () => window.clearTimeout(
|
|
5577
|
+
const c = window.setTimeout(() => a(!1), 1500);
|
|
5578
|
+
return () => window.clearTimeout(c);
|
|
5478
5579
|
}, [i]);
|
|
5479
5580
|
const l = L(async () => {
|
|
5480
5581
|
try {
|
|
@@ -5503,7 +5604,7 @@ const Cn = ({
|
|
|
5503
5604
|
children: i ? t : o
|
|
5504
5605
|
}
|
|
5505
5606
|
);
|
|
5506
|
-
},
|
|
5607
|
+
}, $n = ({
|
|
5507
5608
|
agentTask: e,
|
|
5508
5609
|
theme: o = "light",
|
|
5509
5610
|
language: t,
|
|
@@ -5513,7 +5614,7 @@ const Cn = ({
|
|
|
5513
5614
|
onExploreQueryResultClick: l
|
|
5514
5615
|
}) => {
|
|
5515
5616
|
var h;
|
|
5516
|
-
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;
|
|
5517
5618
|
return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
|
|
5518
5619
|
g ? /* @__PURE__ */ r(
|
|
5519
5620
|
"div",
|
|
@@ -5525,7 +5626,7 @@ const Cn = ({
|
|
|
5525
5626
|
zIndex: 1
|
|
5526
5627
|
},
|
|
5527
5628
|
children: /* @__PURE__ */ r(
|
|
5528
|
-
|
|
5629
|
+
Rn,
|
|
5529
5630
|
{
|
|
5530
5631
|
taskId: g,
|
|
5531
5632
|
label: u.copyId,
|
|
@@ -5535,9 +5636,9 @@ const Cn = ({
|
|
|
5535
5636
|
}
|
|
5536
5637
|
) : null,
|
|
5537
5638
|
/* @__PURE__ */ r(
|
|
5538
|
-
|
|
5639
|
+
En,
|
|
5539
5640
|
{
|
|
5540
|
-
progressViewItems:
|
|
5641
|
+
progressViewItems: c,
|
|
5541
5642
|
loading: e.loading,
|
|
5542
5643
|
error: e.error,
|
|
5543
5644
|
loadingText: e.loadingText,
|
|
@@ -5552,16 +5653,16 @@ const Cn = ({
|
|
|
5552
5653
|
] }) });
|
|
5553
5654
|
};
|
|
5554
5655
|
export {
|
|
5555
|
-
|
|
5656
|
+
$n as AgentTaskProgress,
|
|
5556
5657
|
ar as AgentTaskThemeProvider,
|
|
5557
5658
|
F as Checkmark,
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5659
|
+
Dn as FencyProvider,
|
|
5660
|
+
Cn as MemorySearchCompletedResults,
|
|
5661
|
+
Gn as StreamEventManager,
|
|
5662
|
+
_ as XMark,
|
|
5562
5663
|
ir as darkAgentTaskThemeColors,
|
|
5563
5664
|
we as getAgentTaskPrismStyle,
|
|
5564
5665
|
Te as lightAgentTaskThemeColors,
|
|
5565
|
-
|
|
5566
|
-
|
|
5666
|
+
b as useAgentTaskTheme,
|
|
5667
|
+
Wn as useAgentTasks
|
|
5567
5668
|
};
|