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