@fencyai/react 0.1.218 → 0.1.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-task/AgentTaskProgressVerbose.d.ts.map +1 -1
- package/dist/agent-task/data-types/ExploreProductSemanticSearch.d.ts +17 -0
- package/dist/agent-task/data-types/ExploreProductSemanticSearch.d.ts.map +1 -0
- package/dist/agent-task/data-types/MemoryChatChunkResults.d.ts +2 -0
- package/dist/agent-task/data-types/MemoryChatChunkResults.d.ts.map +1 -1
- package/dist/hooks/useAgentTasks/index.d.ts.map +1 -1
- package/dist/index.js +1048 -879
- package/dist/types/UseAgentTasksProps.d.ts +6 -1
- package/dist/types/UseAgentTasksProps.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { StreamEventManager as
|
|
3
|
-
import { StreamEventManager as
|
|
4
|
-
import
|
|
5
|
-
import { motion as I, useInView as
|
|
6
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as n, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { StreamEventManager as on, StreamCacheManager as an, toStreamData as ln, submitManualActionResult as _e, ActionStatus as Y, AutoActionLedger as Ae, contentKey as he, REFRESH_CONTEXT_ACTION as sn, dispatchAutoActionCall as cn, postAutoActionResult as dn, parseWithSchema as Oe, taskReducer as un, initialTaskStoreState as pn, createAgentTaskFileDownloadLink as mn, isTerminalAgentTaskEventData as gn, agentTaskErrorFromEventData as yn, shouldAppendCompletedToProgress as hn, getTerminalCreateAgentTaskResponse as fn, createAgentTask as xn, mapCreateAgentTaskParams as kn, parseAgentTaskFileIdFromFencyFileHref as Sn, parseAgentTaskMemoryFromFencyMemHref as bn } from "@fencyai/js";
|
|
3
|
+
import { StreamEventManager as Vr } from "@fencyai/js";
|
|
4
|
+
import vn, { createContext as Ge, useState as F, useRef as H, useEffect as V, useCallback as _, useContext as qe, useMemo as j, useReducer as Tn, useLayoutEffect as Cn } from "react";
|
|
5
|
+
import { motion as I, useInView as wn, AnimatePresence as Rn } from "motion/react";
|
|
6
|
+
import En from "react-markdown";
|
|
7
7
|
import { Prism as Ue } from "react-syntax-highlighter";
|
|
8
|
-
import
|
|
8
|
+
import Mn from "remark-gfm";
|
|
9
9
|
import './assets/index.css';const je = Ge(
|
|
10
10
|
void 0
|
|
11
11
|
);
|
|
12
|
-
function
|
|
12
|
+
function Gr({
|
|
13
13
|
fency: e,
|
|
14
14
|
fetchCreateStreamClientToken: t,
|
|
15
15
|
children: o
|
|
16
16
|
}) {
|
|
17
17
|
const [r, i] = F(
|
|
18
18
|
null
|
|
19
|
-
), [a, l] = F(!0), [s, c] = F(null), [d,
|
|
19
|
+
), [a, l] = F(!0), [s, c] = F(null), [d, m] = F([]), g = H(null), x = H(null);
|
|
20
20
|
V(() => {
|
|
21
|
-
e.then((
|
|
22
|
-
i(
|
|
23
|
-
}).catch((
|
|
24
|
-
c(
|
|
21
|
+
e.then((p) => {
|
|
22
|
+
i(p), l(!1);
|
|
23
|
+
}).catch((p) => {
|
|
24
|
+
c(p), l(!1);
|
|
25
25
|
});
|
|
26
26
|
}, [e]), V(() => {
|
|
27
27
|
if (!r) return;
|
|
28
|
-
x.current || (x.current = new
|
|
29
|
-
const
|
|
28
|
+
x.current || (x.current = new on(r));
|
|
29
|
+
const p = new an(
|
|
30
30
|
r,
|
|
31
31
|
t
|
|
32
32
|
);
|
|
33
|
-
g.current =
|
|
34
|
-
const y =
|
|
35
|
-
var
|
|
36
|
-
|
|
33
|
+
g.current = p, p.startPeriodicCleanup();
|
|
34
|
+
const y = p.onChange((f) => {
|
|
35
|
+
var $;
|
|
36
|
+
m(f), ($ = x.current) == null || $.updateStreams(f);
|
|
37
37
|
});
|
|
38
38
|
return () => {
|
|
39
39
|
var f;
|
|
40
|
-
y(),
|
|
40
|
+
y(), p.destroy(), g.current = null, (f = x.current) == null || f.cleanup(), x.current = null;
|
|
41
41
|
};
|
|
42
42
|
}, [r, t]);
|
|
43
|
-
const h =
|
|
44
|
-
async (
|
|
43
|
+
const h = _(
|
|
44
|
+
async (p) => {
|
|
45
45
|
if (!g.current)
|
|
46
46
|
throw new Error("Fency instance not initialized");
|
|
47
|
-
return g.current.getOrCreateStream(
|
|
47
|
+
return g.current.getOrCreateStream(p);
|
|
48
48
|
},
|
|
49
49
|
[]
|
|
50
50
|
);
|
|
51
51
|
if (s)
|
|
52
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
53
53
|
"Fency error: ",
|
|
54
54
|
s.message
|
|
55
55
|
] });
|
|
56
56
|
if (!r)
|
|
57
57
|
return null;
|
|
58
|
-
const
|
|
58
|
+
const S = d.length > 0 ? d[d.length - 1] : null, R = {
|
|
59
59
|
fency: r,
|
|
60
60
|
loading: a,
|
|
61
61
|
error: s,
|
|
62
62
|
activeStreams: d,
|
|
63
|
-
latestStream:
|
|
63
|
+
latestStream: S,
|
|
64
64
|
eventManager: x.current,
|
|
65
65
|
getOrCreateStream: h
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */ n(je.Provider, { value:
|
|
67
|
+
return /* @__PURE__ */ n(je.Provider, { value: R, children: o });
|
|
68
68
|
}
|
|
69
69
|
function Ke() {
|
|
70
70
|
const e = qe(je);
|
|
@@ -72,8 +72,8 @@ function Ke() {
|
|
|
72
72
|
throw new Error("useFencyContext must be used within a FencyProvider");
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
const t = Ke(), [o, r] = F(null), i =
|
|
75
|
+
const In = (e) => {
|
|
76
|
+
const t = Ke(), [o, r] = F(null), i = H(
|
|
77
77
|
`subscriber-${Math.random().toString(36).substr(2, 9)}`
|
|
78
78
|
);
|
|
79
79
|
return V(() => {
|
|
@@ -81,23 +81,23 @@ const Mn = (e) => {
|
|
|
81
81
|
const l = {
|
|
82
82
|
onMessage: (c, d) => {
|
|
83
83
|
var g, x, h;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
switch (
|
|
84
|
+
const m = ln(c);
|
|
85
|
+
if (m)
|
|
86
|
+
switch (m.type) {
|
|
87
87
|
case "STREAM_TIMEOUT":
|
|
88
|
-
(g = e == null ? void 0 : e.onStreamTimeout) == null || g.call(e,
|
|
88
|
+
(g = e == null ? void 0 : e.onStreamTimeout) == null || g.call(e, m);
|
|
89
89
|
break;
|
|
90
90
|
case "STREAM_NOT_FOUND":
|
|
91
|
-
(x = e == null ? void 0 : e.onStreamNotFound) == null || x.call(e,
|
|
91
|
+
(x = e == null ? void 0 : e.onStreamNotFound) == null || x.call(e, m);
|
|
92
92
|
break;
|
|
93
93
|
case "AGENT_TASK_PROGRESS_ITEM_UPDATED":
|
|
94
|
-
(h = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || h.call(e,
|
|
94
|
+
(h = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || h.call(e, m);
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
onError: (c, d) => {
|
|
99
|
-
var
|
|
100
|
-
(
|
|
99
|
+
var m;
|
|
100
|
+
(m = e == null ? void 0 : e.onStreamError) == null || m.call(e, {
|
|
101
101
|
streamId: c,
|
|
102
102
|
error: {
|
|
103
103
|
code: "UnknownError",
|
|
@@ -130,12 +130,12 @@ const Mn = (e) => {
|
|
|
130
130
|
},
|
|
131
131
|
stream: o
|
|
132
132
|
};
|
|
133
|
-
},
|
|
134
|
-
class
|
|
133
|
+
}, fe = "fency:pending-manual-action-results";
|
|
134
|
+
class An {
|
|
135
135
|
read() {
|
|
136
136
|
var t;
|
|
137
137
|
try {
|
|
138
|
-
const o = (t = globalThis.sessionStorage) == null ? void 0 : t.getItem(
|
|
138
|
+
const o = (t = globalThis.sessionStorage) == null ? void 0 : t.getItem(fe);
|
|
139
139
|
return o ? JSON.parse(o) : [];
|
|
140
140
|
} catch {
|
|
141
141
|
return [];
|
|
@@ -144,7 +144,7 @@ class In {
|
|
|
144
144
|
write(t) {
|
|
145
145
|
var o, r;
|
|
146
146
|
try {
|
|
147
|
-
t.length === 0 ? (o = globalThis.sessionStorage) == null || o.removeItem(
|
|
147
|
+
t.length === 0 ? (o = globalThis.sessionStorage) == null || o.removeItem(fe) : (r = globalThis.sessionStorage) == null || r.setItem(fe, JSON.stringify(t));
|
|
148
148
|
} catch {
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -161,7 +161,7 @@ class In {
|
|
|
161
161
|
this.write(this.read().filter((o) => o.actionCallId !== t));
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
async function
|
|
164
|
+
async function Pn(e) {
|
|
165
165
|
const t = [], o = [];
|
|
166
166
|
for (const r of e.queue.list())
|
|
167
167
|
try {
|
|
@@ -174,7 +174,7 @@ async function An(e) {
|
|
|
174
174
|
clientToken: i,
|
|
175
175
|
agentTaskId: r.agentTaskId,
|
|
176
176
|
actionCallId: r.actionCallId,
|
|
177
|
-
result:
|
|
177
|
+
result: Fn(r)
|
|
178
178
|
});
|
|
179
179
|
a.type === "success" ? (e.queue.remove(r.actionCallId), t.push({
|
|
180
180
|
actionCallId: r.actionCallId,
|
|
@@ -194,7 +194,7 @@ async function An(e) {
|
|
|
194
194
|
}
|
|
195
195
|
return { delivered: t, failed: o };
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Fn(e) {
|
|
198
198
|
return e.status === Y.APPROVED && e.name && e.input ? {
|
|
199
199
|
status: Y.APPROVED,
|
|
200
200
|
name: e.name,
|
|
@@ -206,80 +206,80 @@ function Pn(e) {
|
|
|
206
206
|
reason: e.reason ?? "The user cancelled this action."
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
const
|
|
210
|
-
function
|
|
209
|
+
const Bn = [0, 200, 400, 800, 1200, 1600];
|
|
210
|
+
function zn(e) {
|
|
211
211
|
return new Promise((t) => setTimeout(t, e));
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Ln(e) {
|
|
214
214
|
return /never offered|ManualActionNotRequested/i.test(e);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
const [t, o] = F([]), r =
|
|
216
|
+
function Dn(e) {
|
|
217
|
+
const [t, o] = F([]), r = H(t);
|
|
218
218
|
r.current = t;
|
|
219
|
-
const i =
|
|
219
|
+
const i = H(/* @__PURE__ */ new Map()), a = H(/* @__PURE__ */ new Map()), l = H(/* @__PURE__ */ new Map()), s = H(new An()), c = H(/* @__PURE__ */ new Set()), d = H(e.actions);
|
|
220
220
|
d.current = e.actions;
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
const g =
|
|
221
|
+
const m = H(e.context);
|
|
222
|
+
m.current = e.context;
|
|
223
|
+
const g = H(e.onManualActionResultFailed);
|
|
224
224
|
g.current = e.onManualActionResultFailed;
|
|
225
|
-
const x =
|
|
225
|
+
const x = H(e.onConsentSubmitted);
|
|
226
226
|
x.current = e.onConsentSubmitted;
|
|
227
|
-
const h =
|
|
227
|
+
const h = H(e.fetchSubmitManualActionResultClientToken);
|
|
228
228
|
h.current = e.fetchSubmitManualActionResultClientToken;
|
|
229
|
-
const
|
|
229
|
+
const S = H(/* @__PURE__ */ new Set()), R = _((b) => l.current.get(b) ?? {
|
|
230
230
|
actions: d.current,
|
|
231
|
-
context:
|
|
232
|
-
}, []),
|
|
233
|
-
(
|
|
234
|
-
E && i.current.set(
|
|
231
|
+
context: m.current
|
|
232
|
+
}, []), p = _(
|
|
233
|
+
(b, E, T) => {
|
|
234
|
+
E && i.current.set(b, E), a.current.has(b) || a.current.set(b, new Ae(b)), l.current.set(b, {
|
|
235
235
|
actions: (T == null ? void 0 : T.actions) ?? d.current,
|
|
236
|
-
context: (T == null ? void 0 : T.context) ??
|
|
236
|
+
context: (T == null ? void 0 : T.context) ?? m.current
|
|
237
237
|
});
|
|
238
238
|
},
|
|
239
239
|
[]
|
|
240
|
-
), y =
|
|
241
|
-
i.current.delete(
|
|
242
|
-
}, []), f =
|
|
243
|
-
async (
|
|
244
|
-
const T = i.current.get(
|
|
240
|
+
), y = _((b) => {
|
|
241
|
+
i.current.delete(b), a.current.delete(b), l.current.delete(b);
|
|
242
|
+
}, []), f = _(
|
|
243
|
+
async (b, E) => {
|
|
244
|
+
const T = i.current.get(b);
|
|
245
245
|
if (!T) {
|
|
246
246
|
console.error(
|
|
247
|
-
`[fency] No auto action result token for task ${
|
|
247
|
+
`[fency] No auto action result token for task ${b}; the agent will time out.`
|
|
248
248
|
);
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
|
-
const A = a.current.get(
|
|
252
|
-
a.current.set(
|
|
253
|
-
const w = await he(E.action, E.input), { auto:
|
|
254
|
-
await
|
|
255
|
-
auto:
|
|
251
|
+
const A = a.current.get(b) ?? new Ae(b);
|
|
252
|
+
a.current.set(b, A);
|
|
253
|
+
const w = await he(E.action, E.input), { auto: W, manual: P } = Nn(R(b).actions), O = E.action !== sn && !!P[E.action] && !W[E.action];
|
|
254
|
+
await cn(E, {
|
|
255
|
+
auto: W,
|
|
256
256
|
manual: P,
|
|
257
|
-
tryConsumeApproval: (J) =>
|
|
257
|
+
tryConsumeApproval: (J) => S.current.has(J) ? (S.current.delete(J), ae(S.current), !0) : !1,
|
|
258
258
|
ledger: A,
|
|
259
|
-
refreshContext:
|
|
259
|
+
refreshContext: R(b).context,
|
|
260
260
|
post: async (J, ne) => {
|
|
261
|
-
|
|
262
|
-
const
|
|
261
|
+
O && (ne.status === Y.ERROR || ne.status === Y.TIMEOUT) && (S.current.add(w), ae(S.current));
|
|
262
|
+
const D = await dn({
|
|
263
263
|
baseUrl: e.baseUrl,
|
|
264
264
|
pk: e.pk,
|
|
265
265
|
autoActionResultToken: T,
|
|
266
266
|
actionCallId: J,
|
|
267
267
|
result: ne
|
|
268
268
|
});
|
|
269
|
-
|
|
270
|
-
`[fency] Failed to post auto action result: ${
|
|
269
|
+
D.type === "error" && console.error(
|
|
270
|
+
`[fency] Failed to post auto action result: ${D.message}`
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
},
|
|
275
|
-
[
|
|
276
|
-
),
|
|
277
|
-
(
|
|
278
|
-
const E =
|
|
275
|
+
[R, e.baseUrl, e.pk]
|
|
276
|
+
), $ = _(
|
|
277
|
+
(b) => {
|
|
278
|
+
const E = b.data;
|
|
279
279
|
if (!(!E || E.taskType !== "ExploreProduct")) {
|
|
280
280
|
if (E.eventType === "AutoActionCallRequested") {
|
|
281
281
|
if (E.provisional) return;
|
|
282
|
-
f(
|
|
282
|
+
f(b.agentTaskId, {
|
|
283
283
|
actionCallId: E.actionCallId,
|
|
284
284
|
action: E.action,
|
|
285
285
|
input: E.input
|
|
@@ -288,13 +288,13 @@ function Ln(e) {
|
|
|
288
288
|
}
|
|
289
289
|
if (E.eventType === "ActionApprovalRequested") {
|
|
290
290
|
if (E.provisional) return;
|
|
291
|
-
const T =
|
|
291
|
+
const T = b.agentTaskId, A = c.current.has(T);
|
|
292
292
|
o((w) => {
|
|
293
|
-
const
|
|
294
|
-
actionCallId:
|
|
293
|
+
const W = new Set(w.map((O) => O.actionCallId)), P = E.actions.filter((O) => !W.has(O.actionCallId)).map((O) => ({
|
|
294
|
+
actionCallId: O.actionCallId,
|
|
295
295
|
turnId: T,
|
|
296
|
-
name:
|
|
297
|
-
input:
|
|
296
|
+
name: O.name,
|
|
297
|
+
input: O.input,
|
|
298
298
|
answerable: A,
|
|
299
299
|
inFlight: !1,
|
|
300
300
|
decision: null
|
|
@@ -304,7 +304,7 @@ function Ln(e) {
|
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
if (E.eventType === "Completed") {
|
|
307
|
-
const T =
|
|
307
|
+
const T = b.agentTaskId;
|
|
308
308
|
c.current.add(T), o(
|
|
309
309
|
(A) => A.map(
|
|
310
310
|
(w) => w.turnId === T && !w.answerable ? { ...w, answerable: !0 } : w
|
|
@@ -314,15 +314,15 @@ function Ln(e) {
|
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
316
|
[f]
|
|
317
|
-
), C =
|
|
317
|
+
), C = _(async () => {
|
|
318
318
|
var T;
|
|
319
|
-
const
|
|
320
|
-
if (!
|
|
321
|
-
const E = await
|
|
319
|
+
const b = h.current;
|
|
320
|
+
if (!b) return;
|
|
321
|
+
const E = await Pn({
|
|
322
322
|
queue: s.current,
|
|
323
323
|
baseUrl: e.baseUrl,
|
|
324
324
|
pk: e.pk,
|
|
325
|
-
fetchClientToken:
|
|
325
|
+
fetchClientToken: b
|
|
326
326
|
});
|
|
327
327
|
for (const A of E.failed)
|
|
328
328
|
(T = g.current) == null || T.call(g, A);
|
|
@@ -331,181 +331,181 @@ function Ln(e) {
|
|
|
331
331
|
E.delivered.map((w) => [w.actionCallId, w.approved])
|
|
332
332
|
);
|
|
333
333
|
o(
|
|
334
|
-
(w) => w.map((
|
|
335
|
-
const P = A.get(
|
|
336
|
-
return P === void 0 ?
|
|
337
|
-
...
|
|
334
|
+
(w) => w.map((W) => {
|
|
335
|
+
const P = A.get(W.actionCallId);
|
|
336
|
+
return P === void 0 ? W : {
|
|
337
|
+
...W,
|
|
338
338
|
inFlight: !1,
|
|
339
339
|
decision: P ? "approved" : "cancelled"
|
|
340
340
|
};
|
|
341
341
|
})
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
|
-
}, [e.baseUrl, e.pk]),
|
|
344
|
+
}, [e.baseUrl, e.pk]), v = _(async (b, E) => {
|
|
345
345
|
const T = h.current;
|
|
346
346
|
if (!T)
|
|
347
347
|
throw new Error(
|
|
348
348
|
"fetchSubmitManualActionResultClientToken is required to answer approval cards."
|
|
349
349
|
);
|
|
350
350
|
let A, w = "";
|
|
351
|
-
for (const
|
|
352
|
-
|
|
351
|
+
for (const W of Bn) {
|
|
352
|
+
W > 0 && await zn(W);
|
|
353
353
|
try {
|
|
354
|
-
w = (await T(
|
|
354
|
+
w = (await T(b, E)).clientToken, A = void 0;
|
|
355
355
|
break;
|
|
356
356
|
} catch (P) {
|
|
357
357
|
A = P;
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
358
|
+
const O = P instanceof Error ? P.message : String(P);
|
|
359
|
+
if (!Ln(O))
|
|
360
360
|
throw P;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
if (A !== void 0)
|
|
364
364
|
throw A;
|
|
365
365
|
return w;
|
|
366
|
-
}, []),
|
|
367
|
-
async (
|
|
366
|
+
}, []), z = _(
|
|
367
|
+
async (b, E) => {
|
|
368
368
|
var P;
|
|
369
|
-
const T =
|
|
369
|
+
const T = _n(b.input);
|
|
370
370
|
if (!E)
|
|
371
371
|
return {
|
|
372
372
|
ok: !0,
|
|
373
373
|
result: {
|
|
374
374
|
status: Y.REJECTED,
|
|
375
|
-
name:
|
|
375
|
+
name: b.name,
|
|
376
376
|
input: T,
|
|
377
377
|
reason: "The user cancelled this action."
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
|
-
const A = (P =
|
|
380
|
+
const A = (P = R(b.turnId).actions) == null ? void 0 : P[b.name];
|
|
381
381
|
if (!A || A.autoApprove)
|
|
382
382
|
return {
|
|
383
383
|
ok: !1,
|
|
384
|
-
message: `No manual handler registered for "${
|
|
384
|
+
message: `No manual handler registered for "${b.name}".`
|
|
385
385
|
};
|
|
386
386
|
if (!T)
|
|
387
387
|
return { ok: !1, message: "Approved input must be a JSON object." };
|
|
388
|
-
const w = await Oe(A.input,
|
|
388
|
+
const w = await Oe(A.input, b.input);
|
|
389
389
|
if (!w.ok)
|
|
390
390
|
return { ok: !1, message: w.message };
|
|
391
|
-
const
|
|
392
|
-
return
|
|
391
|
+
const W = await he(b.name, b.input);
|
|
392
|
+
return S.current.add(W), ae(S.current), {
|
|
393
393
|
ok: !0,
|
|
394
394
|
result: {
|
|
395
395
|
status: Y.APPROVED,
|
|
396
|
-
name:
|
|
396
|
+
name: b.name,
|
|
397
397
|
input: T
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
400
|
},
|
|
401
|
-
[
|
|
402
|
-
),
|
|
403
|
-
async (
|
|
404
|
-
var P,
|
|
405
|
-
if (
|
|
401
|
+
[R]
|
|
402
|
+
), L = _(
|
|
403
|
+
async (b) => {
|
|
404
|
+
var P, O, J, ne;
|
|
405
|
+
if (b.length === 0) return;
|
|
406
406
|
if (!h.current) {
|
|
407
407
|
console.error(
|
|
408
408
|
"[fency] fetchSubmitManualActionResultClientToken is required to answer approval cards."
|
|
409
409
|
);
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
|
-
const E = new Set(
|
|
412
|
+
const E = new Set(b.map((D) => D.record.actionCallId));
|
|
413
413
|
let T = !1;
|
|
414
|
-
if (o((
|
|
414
|
+
if (o((D) => D.filter((q) => E.has(q.actionCallId)).some((q) => q.inFlight || q.decision != null) ? (T = !0, D) : D.map(
|
|
415
415
|
(q) => E.has(q.actionCallId) ? { ...q, inFlight: !0 } : q
|
|
416
416
|
)), T) return;
|
|
417
417
|
const A = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
|
|
418
|
-
let
|
|
419
|
-
for (const
|
|
420
|
-
const U = await
|
|
418
|
+
let W = 0;
|
|
419
|
+
for (const D of b) {
|
|
420
|
+
const U = await z(D.record, D.approved);
|
|
421
421
|
if (!U.ok) {
|
|
422
|
-
w.add(
|
|
423
|
-
actionCallId:
|
|
422
|
+
w.add(D.record.actionCallId), (P = g.current) == null || P.call(g, {
|
|
423
|
+
actionCallId: D.record.actionCallId,
|
|
424
424
|
message: U.message
|
|
425
425
|
});
|
|
426
426
|
continue;
|
|
427
427
|
}
|
|
428
428
|
s.current.add({
|
|
429
|
-
agentTaskId:
|
|
430
|
-
actionCallId:
|
|
429
|
+
agentTaskId: D.record.turnId,
|
|
430
|
+
actionCallId: D.record.actionCallId,
|
|
431
431
|
status: U.result.status,
|
|
432
432
|
name: U.result.name,
|
|
433
433
|
input: U.result.input,
|
|
434
434
|
reason: "reason" in U.result ? U.result.reason : void 0
|
|
435
435
|
});
|
|
436
436
|
try {
|
|
437
|
-
const q = await
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
),
|
|
437
|
+
const q = await v(
|
|
438
|
+
D.record.turnId,
|
|
439
|
+
D.record.actionCallId
|
|
440
|
+
), ye = await _e({
|
|
441
441
|
baseUrl: e.baseUrl,
|
|
442
442
|
pk: e.pk,
|
|
443
443
|
clientToken: q,
|
|
444
|
-
agentTaskId:
|
|
445
|
-
actionCallId:
|
|
444
|
+
agentTaskId: D.record.turnId,
|
|
445
|
+
actionCallId: D.record.actionCallId,
|
|
446
446
|
result: U.result
|
|
447
447
|
});
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
),
|
|
452
|
-
actionCallId:
|
|
453
|
-
message:
|
|
448
|
+
ye.type === "success" ? (s.current.remove(D.record.actionCallId), A.set(
|
|
449
|
+
D.record.actionCallId,
|
|
450
|
+
D.approved ? "approved" : "cancelled"
|
|
451
|
+
), D.approved && (W += 1)) : (ye.retryable || s.current.remove(D.record.actionCallId), w.add(D.record.actionCallId), (O = g.current) == null || O.call(g, {
|
|
452
|
+
actionCallId: D.record.actionCallId,
|
|
453
|
+
message: ye.message
|
|
454
454
|
}));
|
|
455
455
|
} catch (q) {
|
|
456
|
-
w.add(
|
|
457
|
-
actionCallId:
|
|
456
|
+
w.add(D.record.actionCallId), (J = g.current) == null || J.call(g, {
|
|
457
|
+
actionCallId: D.record.actionCallId,
|
|
458
458
|
message: q instanceof Error ? q.message : String(q)
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
o(
|
|
463
|
-
(
|
|
463
|
+
(D) => D.map((U) => {
|
|
464
464
|
const q = A.get(U.actionCallId);
|
|
465
465
|
return q ? { ...U, inFlight: !1, decision: q } : w.has(U.actionCallId) ? { ...U, inFlight: !1 } : U;
|
|
466
466
|
})
|
|
467
|
-
), w.size === 0 &&
|
|
468
|
-
turnId:
|
|
469
|
-
approvedCount:
|
|
467
|
+
), w.size === 0 && W >= 1 && ((ne = x.current) == null || ne.call(x, {
|
|
468
|
+
turnId: b[0].record.turnId,
|
|
469
|
+
approvedCount: W
|
|
470
470
|
}));
|
|
471
471
|
},
|
|
472
|
-
[
|
|
473
|
-
),
|
|
474
|
-
async (
|
|
475
|
-
await
|
|
472
|
+
[z, v, e.baseUrl, e.pk]
|
|
473
|
+
), N = _(
|
|
474
|
+
async (b, E) => {
|
|
475
|
+
await L([{ record: b, approved: E }]);
|
|
476
476
|
},
|
|
477
|
-
[
|
|
478
|
-
), Q =
|
|
479
|
-
async (
|
|
480
|
-
const T = new Set(E), A = r.current.filter((w) => w.turnId ===
|
|
477
|
+
[L]
|
|
478
|
+
), Q = _(
|
|
479
|
+
async (b, E) => {
|
|
480
|
+
const T = new Set(E), A = r.current.filter((w) => w.turnId === b && w.decision == null).map((w) => ({
|
|
481
481
|
record: w,
|
|
482
482
|
approved: T.has(w.actionCallId)
|
|
483
483
|
}));
|
|
484
|
-
await
|
|
484
|
+
await L(A);
|
|
485
485
|
},
|
|
486
|
-
[
|
|
486
|
+
[L]
|
|
487
487
|
);
|
|
488
488
|
return V(() => {
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
if (!
|
|
489
|
+
S.current = $n(), C();
|
|
490
|
+
const b = e.fetchPendingApprovals;
|
|
491
|
+
if (!b) return;
|
|
492
492
|
let E = !1;
|
|
493
493
|
return (async () => {
|
|
494
494
|
try {
|
|
495
|
-
const T =
|
|
495
|
+
const T = On(await b());
|
|
496
496
|
if (E) return;
|
|
497
497
|
for (const A of T.unusedApprovals) {
|
|
498
498
|
const w = await he(A.name, A.input);
|
|
499
|
-
|
|
499
|
+
S.current.add(w);
|
|
500
500
|
}
|
|
501
|
-
ae(
|
|
502
|
-
const w = new Set(A.map((P) => P.actionCallId)),
|
|
501
|
+
ae(S.current), o((A) => {
|
|
502
|
+
const w = new Set(A.map((P) => P.actionCallId)), W = T.pending.filter((P) => !w.has(P.actionCallId)).map((P) => ({
|
|
503
503
|
...P,
|
|
504
504
|
answerable: !0,
|
|
505
505
|
inFlight: !1,
|
|
506
506
|
decision: null
|
|
507
507
|
}));
|
|
508
|
-
return
|
|
508
|
+
return W.length > 0 ? [...A, ...W] : A;
|
|
509
509
|
});
|
|
510
510
|
} catch (T) {
|
|
511
511
|
console.error("[fency] Failed to rebuild pending approvals:", T);
|
|
@@ -514,36 +514,36 @@ function Ln(e) {
|
|
|
514
514
|
E = !0;
|
|
515
515
|
};
|
|
516
516
|
}, []), { pendingApprovals: j(
|
|
517
|
-
() => t.map((
|
|
518
|
-
actionCallId:
|
|
519
|
-
turnId:
|
|
520
|
-
name:
|
|
521
|
-
input:
|
|
522
|
-
approvalMessage:
|
|
523
|
-
|
|
524
|
-
|
|
517
|
+
() => t.map((b) => ({
|
|
518
|
+
actionCallId: b.actionCallId,
|
|
519
|
+
turnId: b.turnId,
|
|
520
|
+
name: b.name,
|
|
521
|
+
input: b.input,
|
|
522
|
+
approvalMessage: Hn(
|
|
523
|
+
R(b.turnId).actions,
|
|
524
|
+
b
|
|
525
525
|
),
|
|
526
526
|
approvalContent: Wn(
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
R(b.turnId).actions,
|
|
528
|
+
b
|
|
529
529
|
),
|
|
530
|
-
answerable:
|
|
531
|
-
inFlight:
|
|
532
|
-
decision:
|
|
533
|
-
approve: () =>
|
|
534
|
-
cancel: () =>
|
|
535
|
-
submitTurn: (E) => Q(
|
|
530
|
+
answerable: b.answerable,
|
|
531
|
+
inFlight: b.inFlight,
|
|
532
|
+
decision: b.decision,
|
|
533
|
+
approve: () => N(b, !0),
|
|
534
|
+
cancel: () => N(b, !1),
|
|
535
|
+
submitTurn: (E) => Q(b.turnId, E)
|
|
536
536
|
})),
|
|
537
|
-
[t,
|
|
538
|
-
), handleProgressItem:
|
|
537
|
+
[t, N, R, Q]
|
|
538
|
+
), handleProgressItem: $, registerTask: p, forgetTask: y };
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Nn(e) {
|
|
541
541
|
const t = {}, o = {};
|
|
542
542
|
for (const [r, i] of Object.entries(e ?? {}))
|
|
543
543
|
i.autoApprove ? t[r] = i : o[r] = i;
|
|
544
544
|
return { auto: t, manual: o };
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Hn(e, t) {
|
|
547
547
|
const o = e == null ? void 0 : e[t.name];
|
|
548
548
|
if (o != null && o.approvalMessage)
|
|
549
549
|
try {
|
|
@@ -563,11 +563,11 @@ function Wn(e, t) {
|
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
const
|
|
567
|
-
function
|
|
566
|
+
const Te = "fency:approved-action-hashes";
|
|
567
|
+
function $n() {
|
|
568
568
|
var e;
|
|
569
569
|
try {
|
|
570
|
-
const t = (e = globalThis.sessionStorage) == null ? void 0 : e.getItem(
|
|
570
|
+
const t = (e = globalThis.sessionStorage) == null ? void 0 : e.getItem(Te);
|
|
571
571
|
return t ? new Set(JSON.parse(t)) : /* @__PURE__ */ new Set();
|
|
572
572
|
} catch {
|
|
573
573
|
return /* @__PURE__ */ new Set();
|
|
@@ -577,21 +577,21 @@ function ae(e) {
|
|
|
577
577
|
var t, o;
|
|
578
578
|
try {
|
|
579
579
|
const r = [...e];
|
|
580
|
-
r.length === 0 ? (t = globalThis.sessionStorage) == null || t.removeItem(
|
|
580
|
+
r.length === 0 ? (t = globalThis.sessionStorage) == null || t.removeItem(Te) : (o = globalThis.sessionStorage) == null || o.setItem(Te, JSON.stringify(r));
|
|
581
581
|
} catch {
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function _n(e) {
|
|
585
585
|
if (e !== null && typeof e == "object" && !Array.isArray(e))
|
|
586
586
|
return e;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function On(e) {
|
|
589
589
|
return Array.isArray(e) ? { pending: e, unusedApprovals: [] } : {
|
|
590
590
|
pending: e.pending,
|
|
591
591
|
unusedApprovals: e.unusedApprovals ?? []
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Gn(e) {
|
|
595
595
|
var t, o;
|
|
596
596
|
if (e && typeof e == "object") {
|
|
597
597
|
const r = (o = (t = e.body) == null ? void 0 : t.error) == null ? void 0 : o.message;
|
|
@@ -603,26 +603,26 @@ function On(e) {
|
|
|
603
603
|
}
|
|
604
604
|
return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown error during agent task creation";
|
|
605
605
|
}
|
|
606
|
-
const
|
|
607
|
-
const t = Ke(), [o, r] =
|
|
606
|
+
const qr = (e) => {
|
|
607
|
+
const t = Ke(), [o, r] = Tn(un, pn), i = H(/* @__PURE__ */ new Set()), a = H(/* @__PURE__ */ new Map()), l = H(/* @__PURE__ */ new Map()), s = _(
|
|
608
608
|
(C) => {
|
|
609
609
|
if (C)
|
|
610
|
-
return async (
|
|
611
|
-
const { clientToken:
|
|
610
|
+
return async (v) => {
|
|
611
|
+
const { clientToken: z } = await C(v), L = await mn({
|
|
612
612
|
pk: t.fency.publishableKey,
|
|
613
613
|
baseUrl: t.fency.baseUrl,
|
|
614
|
-
clientToken:
|
|
615
|
-
agentTaskFileId:
|
|
614
|
+
clientToken: z,
|
|
615
|
+
agentTaskFileId: v
|
|
616
616
|
});
|
|
617
|
-
if (
|
|
618
|
-
throw new Error(
|
|
619
|
-
const
|
|
620
|
-
|
|
617
|
+
if (L.type === "error")
|
|
618
|
+
throw new Error(L.error.message);
|
|
619
|
+
const N = document.createElement("a");
|
|
620
|
+
N.href = L.downloadLink, N.download = "", N.click();
|
|
621
621
|
};
|
|
622
622
|
},
|
|
623
623
|
[t.fency.baseUrl, t.fency.publishableKey]
|
|
624
|
-
), c =
|
|
625
|
-
}), x =
|
|
624
|
+
), c = H(null), d = H(!1), m = H(null), g = H(() => {
|
|
625
|
+
}), x = Dn({
|
|
626
626
|
baseUrl: t.fency.baseUrl,
|
|
627
627
|
pk: t.fency.publishableKey,
|
|
628
628
|
actions: e.actions,
|
|
@@ -633,102 +633,102 @@ const Wr = (e) => {
|
|
|
633
633
|
onConsentSubmitted: ({ approvedCount: C }) => {
|
|
634
634
|
g.current(C);
|
|
635
635
|
}
|
|
636
|
-
}), h =
|
|
636
|
+
}), h = H(x);
|
|
637
637
|
h.current = x;
|
|
638
|
-
const
|
|
639
|
-
(C,
|
|
640
|
-
const
|
|
641
|
-
(
|
|
642
|
-
var
|
|
643
|
-
return
|
|
638
|
+
const S = _(
|
|
639
|
+
(C, v) => {
|
|
640
|
+
const z = o.tasks.filter(
|
|
641
|
+
(L) => {
|
|
642
|
+
var N;
|
|
643
|
+
return L.streamId === C && L.loading && ((N = L.confirmedData) == null ? void 0 : N.taskId);
|
|
644
644
|
}
|
|
645
|
-
).map((
|
|
646
|
-
r({ type: "STREAM_FAILURE", streamId: C, error:
|
|
647
|
-
for (const
|
|
648
|
-
i.current.delete(
|
|
649
|
-
const
|
|
650
|
-
|
|
645
|
+
).map((L) => L.confirmedData.taskId);
|
|
646
|
+
r({ type: "STREAM_FAILURE", streamId: C, error: v });
|
|
647
|
+
for (const L of z) {
|
|
648
|
+
i.current.delete(L);
|
|
649
|
+
const N = a.current.get(L);
|
|
650
|
+
N && (a.current.delete(L), N({ type: "error", error: v }));
|
|
651
651
|
}
|
|
652
652
|
},
|
|
653
653
|
[o.tasks]
|
|
654
|
-
),
|
|
654
|
+
), R = _(
|
|
655
655
|
(C) => {
|
|
656
|
-
var
|
|
656
|
+
var z;
|
|
657
657
|
if (!i.current.has(C.agentTaskId)) return;
|
|
658
|
-
const
|
|
659
|
-
if (h.current.handleProgressItem(C),
|
|
660
|
-
if (
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
658
|
+
const v = C.data;
|
|
659
|
+
if (h.current.handleProgressItem(C), gn(v)) {
|
|
660
|
+
if (v.eventType === "Error") {
|
|
661
|
+
const N = yn(v);
|
|
662
|
+
if (!N) return;
|
|
663
663
|
r({
|
|
664
664
|
type: "TASK_ERROR",
|
|
665
665
|
agentTaskId: C.agentTaskId,
|
|
666
|
-
error:
|
|
666
|
+
error: N
|
|
667
667
|
});
|
|
668
668
|
const Q = a.current.get(
|
|
669
669
|
C.agentTaskId
|
|
670
670
|
);
|
|
671
|
-
Q && (a.current.delete(C.agentTaskId), Q({ type: "error", error:
|
|
671
|
+
Q && (a.current.delete(C.agentTaskId), Q({ type: "error", error: N }));
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
674
|
r({
|
|
675
675
|
type: "TASK_COMPLETED",
|
|
676
676
|
agentTaskId: C.agentTaskId,
|
|
677
|
-
data:
|
|
678
|
-
item: hn(
|
|
677
|
+
data: v,
|
|
678
|
+
item: hn(v) ? C : void 0
|
|
679
679
|
});
|
|
680
|
-
const
|
|
680
|
+
const L = a.current.get(
|
|
681
681
|
C.agentTaskId
|
|
682
682
|
);
|
|
683
|
-
if (
|
|
683
|
+
if (L) {
|
|
684
684
|
a.current.delete(C.agentTaskId);
|
|
685
|
-
const
|
|
685
|
+
const N = fn(
|
|
686
686
|
C.streamId,
|
|
687
687
|
C.agentTaskId,
|
|
688
|
-
|
|
688
|
+
v
|
|
689
689
|
);
|
|
690
|
-
|
|
690
|
+
N && L(N);
|
|
691
691
|
}
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
|
-
(
|
|
694
|
+
(z = e.onAgentTaskProgressItemUpdated) == null || z.call(e, C), r({ type: "PROGRESS_ITEM", item: C });
|
|
695
695
|
},
|
|
696
696
|
[e]
|
|
697
|
-
), { createStream:
|
|
698
|
-
onAgentTaskProgressItemUpdated:
|
|
697
|
+
), { createStream: p } = In({
|
|
698
|
+
onAgentTaskProgressItemUpdated: R,
|
|
699
699
|
onStreamError: (C) => {
|
|
700
|
-
var
|
|
701
|
-
(
|
|
700
|
+
var v;
|
|
701
|
+
(v = e == null ? void 0 : e.onStreamError) == null || v.call(e, C), S(C.streamId, C.error);
|
|
702
702
|
},
|
|
703
703
|
onStreamNotFound: (C) => {
|
|
704
|
-
var
|
|
705
|
-
(
|
|
704
|
+
var v;
|
|
705
|
+
(v = e == null ? void 0 : e.onStreamNotFound) == null || v.call(e, C), S(C.streamId, {
|
|
706
706
|
code: "StreamNotFound",
|
|
707
707
|
message: "Stream not found"
|
|
708
708
|
});
|
|
709
709
|
},
|
|
710
710
|
onStreamTimeout: (C) => {
|
|
711
|
-
var
|
|
712
|
-
(
|
|
711
|
+
var v;
|
|
712
|
+
(v = e == null ? void 0 : e.onStreamTimeout) == null || v.call(e, C), S(C.streamId, {
|
|
713
713
|
code: "StreamTimeout",
|
|
714
714
|
message: "Stream timed out"
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
}), y =
|
|
718
|
-
async (C,
|
|
719
|
-
var ie,
|
|
717
|
+
}), y = _(
|
|
718
|
+
async (C, v) => {
|
|
719
|
+
var ie, b;
|
|
720
720
|
C.type === "ExploreProduct" && (c.current = C);
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
721
|
+
const z = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, L = (v == null ? void 0 : v.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
|
|
722
|
+
if (L === void 0)
|
|
723
723
|
throw new Error(
|
|
724
724
|
"fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
|
|
725
725
|
);
|
|
726
|
-
const
|
|
726
|
+
const N = (v == null ? void 0 : v.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, Q = await p(
|
|
727
727
|
C.type === "ExploreProduct" ? 0 : void 0
|
|
728
728
|
);
|
|
729
729
|
if (Q.type === "success") {
|
|
730
730
|
const E = (/* @__PURE__ */ new Date()).toISOString(), T = {
|
|
731
|
-
taskKey:
|
|
731
|
+
taskKey: z,
|
|
732
732
|
streamId: Q.stream.id,
|
|
733
733
|
triggeredAt: E,
|
|
734
734
|
confirmedData: null,
|
|
@@ -736,32 +736,34 @@ const Wr = (e) => {
|
|
|
736
736
|
params: C,
|
|
737
737
|
progressItems: [],
|
|
738
738
|
loading: !0,
|
|
739
|
-
loadingText:
|
|
739
|
+
loadingText: v == null ? void 0 : v.loadingText
|
|
740
740
|
};
|
|
741
|
-
r({ type: "TASK_PENDING", task: T }), (ie =
|
|
741
|
+
r({ type: "TASK_PENDING", task: T }), (ie = v == null ? void 0 : v.onTaskRegistered) == null || ie.call(v, {
|
|
742
742
|
...T,
|
|
743
743
|
downloadFile: s(
|
|
744
|
-
|
|
744
|
+
N
|
|
745
745
|
)
|
|
746
746
|
});
|
|
747
747
|
try {
|
|
748
|
-
const { clientToken: A } = await
|
|
748
|
+
const { clientToken: A } = await L(), w = C.type === "ExploreProduct" ? qn(C, {
|
|
749
749
|
actions: e.actions,
|
|
750
750
|
components: e.components,
|
|
751
|
+
semanticSearches: e.semanticSearches,
|
|
751
752
|
context: e.context
|
|
752
|
-
}) : void 0,
|
|
753
|
+
}) : void 0, W = C.type === "ExploreProduct" ? {
|
|
753
754
|
type: "ExploreProduct",
|
|
754
755
|
query: C.query,
|
|
755
756
|
model: C.model,
|
|
756
|
-
context: (
|
|
757
|
-
} : C, P = await
|
|
757
|
+
context: (b = w == null ? void 0 : w.context) == null ? void 0 : b.call(w)
|
|
758
|
+
} : C, P = await xn({
|
|
758
759
|
pk: t.fency.publishableKey,
|
|
759
760
|
baseUrl: t.fency.baseUrl,
|
|
760
761
|
clientToken: A,
|
|
761
762
|
streamToken: Q.stream.token,
|
|
762
|
-
request:
|
|
763
|
+
request: kn(W),
|
|
763
764
|
actions: w == null ? void 0 : w.actions,
|
|
764
|
-
components: w == null ? void 0 : w.components
|
|
765
|
+
components: w == null ? void 0 : w.components,
|
|
766
|
+
semanticSearches: w == null ? void 0 : w.semanticSearches
|
|
765
767
|
});
|
|
766
768
|
if (P.type === "success" && P.agentTask) {
|
|
767
769
|
i.current.add(
|
|
@@ -774,15 +776,15 @@ const Wr = (e) => {
|
|
|
774
776
|
context: w.context
|
|
775
777
|
} : void 0
|
|
776
778
|
);
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
+
const O = s(
|
|
780
|
+
N
|
|
779
781
|
);
|
|
780
|
-
return
|
|
782
|
+
return O && l.current.set(
|
|
781
783
|
P.agentTask.id,
|
|
782
|
-
|
|
784
|
+
O
|
|
783
785
|
), r({
|
|
784
786
|
type: "TASK_CONFIRMED",
|
|
785
|
-
taskKey:
|
|
787
|
+
taskKey: z,
|
|
786
788
|
taskId: P.agentTask.id,
|
|
787
789
|
createdAt: P.agentTask.createdAt
|
|
788
790
|
}), await new Promise(
|
|
@@ -797,35 +799,35 @@ const Wr = (e) => {
|
|
|
797
799
|
if (P.type === "error")
|
|
798
800
|
return r({
|
|
799
801
|
type: "TASK_API_ERROR",
|
|
800
|
-
taskKey:
|
|
802
|
+
taskKey: z,
|
|
801
803
|
error: P.error
|
|
802
804
|
}), {
|
|
803
805
|
type: "error",
|
|
804
806
|
error: P.error
|
|
805
807
|
};
|
|
806
808
|
{
|
|
807
|
-
const
|
|
809
|
+
const O = {
|
|
808
810
|
message: "No response received",
|
|
809
811
|
code: "UnknownError"
|
|
810
812
|
};
|
|
811
813
|
return r({
|
|
812
814
|
type: "TASK_API_ERROR",
|
|
813
|
-
taskKey:
|
|
814
|
-
error:
|
|
815
|
+
taskKey: z,
|
|
816
|
+
error: O
|
|
815
817
|
}), {
|
|
816
818
|
type: "error",
|
|
817
|
-
error:
|
|
819
|
+
error: O
|
|
818
820
|
};
|
|
819
821
|
}
|
|
820
822
|
}
|
|
821
823
|
} catch (A) {
|
|
822
824
|
const w = {
|
|
823
825
|
code: "UnknownError",
|
|
824
|
-
message:
|
|
826
|
+
message: Gn(A)
|
|
825
827
|
};
|
|
826
828
|
return r({
|
|
827
829
|
type: "TASK_API_ERROR",
|
|
828
|
-
taskKey:
|
|
830
|
+
taskKey: z,
|
|
829
831
|
error: w
|
|
830
832
|
}), {
|
|
831
833
|
type: "error",
|
|
@@ -838,26 +840,26 @@ const Wr = (e) => {
|
|
|
838
840
|
[
|
|
839
841
|
t,
|
|
840
842
|
s,
|
|
841
|
-
|
|
843
|
+
p,
|
|
842
844
|
e.fetchCreateAgentTaskClientToken,
|
|
843
845
|
e.fetchAgentTaskFileDownloadClientToken,
|
|
844
846
|
e.actions,
|
|
845
847
|
e.components
|
|
846
848
|
]
|
|
847
849
|
);
|
|
848
|
-
|
|
850
|
+
m.current = y, g.current = (C) => {
|
|
849
851
|
if (C < 1 || d.current) return;
|
|
850
|
-
const
|
|
851
|
-
!
|
|
852
|
+
const v = c.current, z = m.current;
|
|
853
|
+
!v || v.type !== "ExploreProduct" || !z || (d.current = !0, z(
|
|
852
854
|
{
|
|
853
855
|
type: "ExploreProduct",
|
|
854
|
-
model:
|
|
856
|
+
model: v.model,
|
|
855
857
|
query: "Continue with the approved actions."
|
|
856
858
|
},
|
|
857
859
|
{
|
|
858
|
-
onTaskRegistered: (
|
|
859
|
-
var
|
|
860
|
-
(
|
|
860
|
+
onTaskRegistered: (L) => {
|
|
861
|
+
var N;
|
|
862
|
+
(N = e.onFollowUpTaskRegistered) == null || N.call(e, L);
|
|
861
863
|
}
|
|
862
864
|
}
|
|
863
865
|
).finally(() => {
|
|
@@ -865,14 +867,14 @@ const Wr = (e) => {
|
|
|
865
867
|
}));
|
|
866
868
|
};
|
|
867
869
|
const f = j(() => o.tasks.map((C) => {
|
|
868
|
-
var
|
|
870
|
+
var v;
|
|
869
871
|
return {
|
|
870
872
|
...C,
|
|
871
|
-
downloadFile: (
|
|
873
|
+
downloadFile: (v = C.confirmedData) != null && v.taskId ? l.current.get(C.confirmedData.taskId) : void 0
|
|
872
874
|
};
|
|
873
|
-
}), [o.tasks]),
|
|
875
|
+
}), [o.tasks]), $ = j(() => {
|
|
874
876
|
if (f.length !== 0)
|
|
875
|
-
return [...f].sort((C,
|
|
877
|
+
return [...f].sort((C, v) => new Date(v.triggeredAt).getTime() - new Date(C.triggeredAt).getTime())[0];
|
|
876
878
|
}, [f]);
|
|
877
879
|
return V(() => () => {
|
|
878
880
|
i.current.clear(), a.current.clear(), l.current.clear();
|
|
@@ -880,20 +882,21 @@ const Wr = (e) => {
|
|
|
880
882
|
agentTasks: f,
|
|
881
883
|
pendingApprovals: x.pendingApprovals,
|
|
882
884
|
createAgentTask: y,
|
|
883
|
-
latest:
|
|
885
|
+
latest: $
|
|
884
886
|
};
|
|
885
887
|
};
|
|
886
|
-
function
|
|
888
|
+
function qn(e, t) {
|
|
887
889
|
return {
|
|
888
890
|
actions: e.actions ?? t.actions,
|
|
889
891
|
components: e.components ?? t.components,
|
|
890
|
-
|
|
892
|
+
semanticSearches: e.semanticSearches ?? t.semanticSearches,
|
|
893
|
+
context: Un(e.context, t.context)
|
|
891
894
|
};
|
|
892
895
|
}
|
|
893
|
-
function
|
|
896
|
+
function Un(e, t) {
|
|
894
897
|
return e === void 0 ? t : typeof e == "function" ? e : () => e;
|
|
895
898
|
}
|
|
896
|
-
const
|
|
899
|
+
const jn = ({
|
|
897
900
|
approval: e,
|
|
898
901
|
label: t,
|
|
899
902
|
approveLabel: o = "Approve",
|
|
@@ -902,18 +905,18 @@ const Un = ({
|
|
|
902
905
|
cancelledLabel: a = "Cancelled!",
|
|
903
906
|
className: l
|
|
904
907
|
}) => {
|
|
905
|
-
const s = !e.answerable || e.inFlight || e.decision != null, c = e.decision === "approved" ? i : o, d = e.decision === "cancelled" ? a : r,
|
|
906
|
-
return /* @__PURE__ */
|
|
908
|
+
const s = !e.answerable || e.inFlight || e.decision != null, c = e.decision === "approved" ? i : o, d = e.decision === "cancelled" ? a : r, m = ["fency-approval-card", l].filter(Boolean).join(" ");
|
|
909
|
+
return /* @__PURE__ */ u(
|
|
907
910
|
"div",
|
|
908
911
|
{
|
|
909
|
-
className:
|
|
912
|
+
className: m,
|
|
910
913
|
"data-fency-approval-card": e.actionCallId,
|
|
911
914
|
"data-fency-answerable": e.answerable ? "true" : "false",
|
|
912
915
|
"data-fency-in-flight": e.inFlight ? "true" : "false",
|
|
913
916
|
"data-fency-decision": e.decision ?? "",
|
|
914
917
|
children: [
|
|
915
918
|
/* @__PURE__ */ n("div", { className: "fency-approval-card__prompt", children: t ?? e.approvalContent ?? e.approvalMessage }),
|
|
916
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ u("div", { className: "fency-approval-card__actions", children: [
|
|
917
920
|
/* @__PURE__ */ n(
|
|
918
921
|
"button",
|
|
919
922
|
{
|
|
@@ -947,10 +950,10 @@ const Un = ({
|
|
|
947
950
|
}
|
|
948
951
|
);
|
|
949
952
|
};
|
|
950
|
-
function
|
|
953
|
+
function Kn(e, t) {
|
|
951
954
|
return t ?? e.approvalContent ?? e.approvalMessage;
|
|
952
955
|
}
|
|
953
|
-
const
|
|
956
|
+
const Ur = ({
|
|
954
957
|
approvals: e,
|
|
955
958
|
labelFor: t,
|
|
956
959
|
approveLabel: o = "Approve",
|
|
@@ -963,20 +966,20 @@ const Hr = ({
|
|
|
963
966
|
const c = j(
|
|
964
967
|
() => e.filter((h) => h.decision == null),
|
|
965
968
|
[e]
|
|
966
|
-
), [d,
|
|
969
|
+
), [d, m] = F(
|
|
967
970
|
() => Object.fromEntries(e.map((h) => [h.actionCallId, !0]))
|
|
968
971
|
);
|
|
969
972
|
if (V(() => {
|
|
970
|
-
|
|
971
|
-
const
|
|
972
|
-
for (const
|
|
973
|
-
|
|
974
|
-
return
|
|
973
|
+
m((h) => {
|
|
974
|
+
const S = { ...h };
|
|
975
|
+
for (const R of e)
|
|
976
|
+
S[R.actionCallId] === void 0 && (S[R.actionCallId] = !0);
|
|
977
|
+
return S;
|
|
975
978
|
});
|
|
976
979
|
}, [e]), e.length === 0) return null;
|
|
977
980
|
if (e.length === 1)
|
|
978
981
|
return /* @__PURE__ */ n(
|
|
979
|
-
|
|
982
|
+
jn,
|
|
980
983
|
{
|
|
981
984
|
approval: e[0],
|
|
982
985
|
label: t == null ? void 0 : t(e[0]),
|
|
@@ -988,26 +991,26 @@ const Hr = ({
|
|
|
988
991
|
}
|
|
989
992
|
);
|
|
990
993
|
const g = c.length === 0 || c.some((h) => !h.answerable || h.inFlight), x = ["fency-approval-card", "fency-approval-set", s].filter(Boolean).join(" ");
|
|
991
|
-
return /* @__PURE__ */
|
|
994
|
+
return /* @__PURE__ */ u("div", { className: x, "data-fency-approval-set": "", children: [
|
|
992
995
|
/* @__PURE__ */ n("ul", { className: "fency-approval-set__list", children: e.map((h) => {
|
|
993
|
-
const
|
|
994
|
-
return /* @__PURE__ */
|
|
996
|
+
const S = h.decision != null;
|
|
997
|
+
return /* @__PURE__ */ u(
|
|
995
998
|
"li",
|
|
996
999
|
{
|
|
997
1000
|
className: "fency-approval-set__row",
|
|
998
1001
|
"data-fency-decision": h.decision ?? "",
|
|
999
1002
|
children: [
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */ n("span", { children:
|
|
1003
|
+
/* @__PURE__ */ u("label", { className: "fency-approval-set__label", children: [
|
|
1004
|
+
/* @__PURE__ */ n("span", { children: Kn(h, t == null ? void 0 : t(h)) }),
|
|
1002
1005
|
/* @__PURE__ */ n(
|
|
1003
1006
|
"input",
|
|
1004
1007
|
{
|
|
1005
1008
|
type: "checkbox",
|
|
1006
|
-
checked:
|
|
1007
|
-
disabled: g ||
|
|
1008
|
-
onChange: (
|
|
1009
|
-
...
|
|
1010
|
-
[h.actionCallId]:
|
|
1009
|
+
checked: S ? h.decision === "approved" : d[h.actionCallId] !== !1,
|
|
1010
|
+
disabled: g || S,
|
|
1011
|
+
onChange: (R) => m((p) => ({
|
|
1012
|
+
...p,
|
|
1013
|
+
[h.actionCallId]: R.target.checked
|
|
1011
1014
|
}))
|
|
1012
1015
|
}
|
|
1013
1016
|
)
|
|
@@ -1026,7 +1029,7 @@ const Hr = ({
|
|
|
1026
1029
|
className: "fency-approval-card__button fency-approval-card__button--approve",
|
|
1027
1030
|
disabled: g,
|
|
1028
1031
|
onClick: () => {
|
|
1029
|
-
const h = c.filter((
|
|
1032
|
+
const h = c.filter((S) => d[S.actionCallId] !== !1).map((S) => S.actionCallId);
|
|
1030
1033
|
e[0].submitTurn(h);
|
|
1031
1034
|
},
|
|
1032
1035
|
children: i
|
|
@@ -1034,19 +1037,19 @@ const Hr = ({
|
|
|
1034
1037
|
) })
|
|
1035
1038
|
] });
|
|
1036
1039
|
};
|
|
1037
|
-
function
|
|
1040
|
+
function Qn(e) {
|
|
1038
1041
|
return e.taskType === "ExploreMemories" && e.eventType === "SetupSandbox";
|
|
1039
1042
|
}
|
|
1040
|
-
function
|
|
1043
|
+
function Vn(e, t) {
|
|
1041
1044
|
for (let o = t + 1; o < e.length; o++) {
|
|
1042
1045
|
const r = e[o];
|
|
1043
|
-
if (!
|
|
1046
|
+
if (!Qn(r.data))
|
|
1044
1047
|
return r;
|
|
1045
1048
|
}
|
|
1046
1049
|
}
|
|
1047
|
-
function
|
|
1050
|
+
function Jn(e) {
|
|
1048
1051
|
return e.progressItems.map((t, o) => {
|
|
1049
|
-
const r =
|
|
1052
|
+
const r = Vn(e.progressItems, o), i = r != null;
|
|
1050
1053
|
let a;
|
|
1051
1054
|
if (r != null && r.createdAt) {
|
|
1052
1055
|
const l = new Date(t.createdAt).getTime(), s = new Date(r.createdAt).getTime();
|
|
@@ -1063,7 +1066,7 @@ function Vn(e) {
|
|
|
1063
1066
|
};
|
|
1064
1067
|
});
|
|
1065
1068
|
}
|
|
1066
|
-
const
|
|
1069
|
+
const Xn = {
|
|
1067
1070
|
'code[class*="language-"]': {
|
|
1068
1071
|
color: "#f8f8f2",
|
|
1069
1072
|
background: "none",
|
|
@@ -1214,7 +1217,7 @@ const Jn = {
|
|
|
1214
1217
|
italic: {
|
|
1215
1218
|
fontStyle: "italic"
|
|
1216
1219
|
}
|
|
1217
|
-
},
|
|
1220
|
+
}, Yn = {
|
|
1218
1221
|
'code[class*="language-"]': {
|
|
1219
1222
|
background: "hsl(230, 1%, 98%)",
|
|
1220
1223
|
color: "hsl(230, 8%, 24%)",
|
|
@@ -1726,7 +1729,7 @@ const Jn = {
|
|
|
1726
1729
|
sourcesBadgeBg: "#f5f5f5",
|
|
1727
1730
|
transparent: "transparent",
|
|
1728
1731
|
reasoningLine: "#444"
|
|
1729
|
-
},
|
|
1732
|
+
}, Zn = {
|
|
1730
1733
|
textPrimary: "#f0f6fc",
|
|
1731
1734
|
textSecondary: "#9198a1",
|
|
1732
1735
|
textMuted: "#8b949e",
|
|
@@ -1754,14 +1757,14 @@ const Jn = {
|
|
|
1754
1757
|
theme: "light",
|
|
1755
1758
|
colors: Qe
|
|
1756
1759
|
});
|
|
1757
|
-
function
|
|
1760
|
+
function et({
|
|
1758
1761
|
theme: e,
|
|
1759
1762
|
children: t
|
|
1760
1763
|
}) {
|
|
1761
1764
|
const o = j(
|
|
1762
1765
|
() => ({
|
|
1763
1766
|
theme: e,
|
|
1764
|
-
colors: e === "dark" ?
|
|
1767
|
+
colors: e === "dark" ? Zn : Qe
|
|
1765
1768
|
}),
|
|
1766
1769
|
[e]
|
|
1767
1770
|
);
|
|
@@ -1771,7 +1774,7 @@ function M() {
|
|
|
1771
1774
|
return qe(Ve);
|
|
1772
1775
|
}
|
|
1773
1776
|
function Je(e) {
|
|
1774
|
-
return e === "dark" ?
|
|
1777
|
+
return e === "dark" ? Xn : Yn;
|
|
1775
1778
|
}
|
|
1776
1779
|
const X = ({
|
|
1777
1780
|
text: e,
|
|
@@ -1782,9 +1785,9 @@ const X = ({
|
|
|
1782
1785
|
null
|
|
1783
1786
|
), [s, c] = F(
|
|
1784
1787
|
null
|
|
1785
|
-
), [d,
|
|
1788
|
+
), [d, m] = F(!1), [g, x] = F(!1), h = _(
|
|
1786
1789
|
(y) => {
|
|
1787
|
-
t && (l(null),
|
|
1790
|
+
t && (l(null), m(!0), (async () => {
|
|
1788
1791
|
try {
|
|
1789
1792
|
await t(y);
|
|
1790
1793
|
} catch (f) {
|
|
@@ -1792,12 +1795,12 @@ const X = ({
|
|
|
1792
1795
|
f instanceof Error ? f.message : "Download failed"
|
|
1793
1796
|
);
|
|
1794
1797
|
} finally {
|
|
1795
|
-
|
|
1798
|
+
m(!1);
|
|
1796
1799
|
}
|
|
1797
1800
|
})());
|
|
1798
1801
|
},
|
|
1799
1802
|
[t]
|
|
1800
|
-
),
|
|
1803
|
+
), S = _(
|
|
1801
1804
|
(y) => {
|
|
1802
1805
|
o && (c(null), x(!0), (async () => {
|
|
1803
1806
|
try {
|
|
@@ -1812,30 +1815,30 @@ const X = ({
|
|
|
1812
1815
|
})());
|
|
1813
1816
|
},
|
|
1814
1817
|
[o]
|
|
1815
|
-
),
|
|
1818
|
+
), R = j(() => ({
|
|
1816
1819
|
code(y) {
|
|
1817
|
-
const { children: f, className:
|
|
1818
|
-
return
|
|
1820
|
+
const { children: f, className: $, node: C, ref: v, ...z } = y, L = /language-(\w+)/.exec($ || "");
|
|
1821
|
+
return L ? /* @__PURE__ */ n(
|
|
1819
1822
|
Ue,
|
|
1820
1823
|
{
|
|
1821
|
-
...
|
|
1824
|
+
...z,
|
|
1822
1825
|
PreTag: "div",
|
|
1823
1826
|
children: String(f).replace(/\n$/, ""),
|
|
1824
|
-
language:
|
|
1827
|
+
language: L[1],
|
|
1825
1828
|
style: i
|
|
1826
1829
|
}
|
|
1827
|
-
) : /* @__PURE__ */ n("code", { ...
|
|
1830
|
+
) : /* @__PURE__ */ n("code", { ...z, className: $, children: String(f) });
|
|
1828
1831
|
},
|
|
1829
1832
|
a(y) {
|
|
1830
|
-
const { children: f, href:
|
|
1831
|
-
if (
|
|
1833
|
+
const { children: f, href: $, ...C } = y, v = $ ? Sn($) : null;
|
|
1834
|
+
if (v != null)
|
|
1832
1835
|
return t ? /* @__PURE__ */ n("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ n(
|
|
1833
1836
|
"button",
|
|
1834
1837
|
{
|
|
1835
1838
|
type: "button",
|
|
1836
1839
|
className: "fency-file-download-button",
|
|
1837
1840
|
disabled: d,
|
|
1838
|
-
onClick: () => h(
|
|
1841
|
+
onClick: () => h(v),
|
|
1839
1842
|
children: f
|
|
1840
1843
|
}
|
|
1841
1844
|
) }) : /* @__PURE__ */ n("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ n(
|
|
@@ -1854,17 +1857,17 @@ const X = ({
|
|
|
1854
1857
|
children: f
|
|
1855
1858
|
}
|
|
1856
1859
|
) });
|
|
1857
|
-
const
|
|
1858
|
-
return
|
|
1860
|
+
const z = $ ? bn($) : null;
|
|
1861
|
+
return z != null ? o ? /* @__PURE__ */ n("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ n(
|
|
1859
1862
|
"button",
|
|
1860
1863
|
{
|
|
1861
1864
|
type: "button",
|
|
1862
1865
|
className: "fency-file-download-button",
|
|
1863
1866
|
disabled: g,
|
|
1864
|
-
onClick: () =>
|
|
1867
|
+
onClick: () => S({
|
|
1865
1868
|
source: {
|
|
1866
|
-
memoryId:
|
|
1867
|
-
memoryTypeId:
|
|
1869
|
+
memoryId: z.memoryId,
|
|
1870
|
+
memoryTypeId: z.memoryTypeId ?? ""
|
|
1868
1871
|
}
|
|
1869
1872
|
}),
|
|
1870
1873
|
children: f
|
|
@@ -1872,7 +1875,7 @@ const X = ({
|
|
|
1872
1875
|
) }) : /* @__PURE__ */ n("span", { children: f }) : /* @__PURE__ */ n(
|
|
1873
1876
|
"a",
|
|
1874
1877
|
{
|
|
1875
|
-
href:
|
|
1878
|
+
href: $,
|
|
1876
1879
|
target: "_blank",
|
|
1877
1880
|
rel: "noopener noreferrer",
|
|
1878
1881
|
...C,
|
|
@@ -1884,18 +1887,18 @@ const X = ({
|
|
|
1884
1887
|
d,
|
|
1885
1888
|
g,
|
|
1886
1889
|
h,
|
|
1887
|
-
|
|
1890
|
+
S,
|
|
1888
1891
|
t,
|
|
1889
1892
|
o,
|
|
1890
1893
|
i
|
|
1891
|
-
]),
|
|
1892
|
-
return /* @__PURE__ */
|
|
1893
|
-
|
|
1894
|
+
]), p = a ?? s;
|
|
1895
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
1896
|
+
p ? /* @__PURE__ */ n(
|
|
1894
1897
|
"p",
|
|
1895
1898
|
{
|
|
1896
1899
|
role: "alert",
|
|
1897
1900
|
style: { color: "#b91c1c", marginBottom: 8, fontSize: 14 },
|
|
1898
|
-
children:
|
|
1901
|
+
children: p
|
|
1899
1902
|
}
|
|
1900
1903
|
) : null,
|
|
1901
1904
|
/* @__PURE__ */ n(
|
|
@@ -1906,17 +1909,17 @@ const X = ({
|
|
|
1906
1909
|
animate: { opacity: 1, y: 0 },
|
|
1907
1910
|
transition: { duration: 0.3, delay: 0 },
|
|
1908
1911
|
children: /* @__PURE__ */ n(
|
|
1909
|
-
|
|
1912
|
+
En,
|
|
1910
1913
|
{
|
|
1911
|
-
remarkPlugins: [
|
|
1912
|
-
components:
|
|
1914
|
+
remarkPlugins: [Mn],
|
|
1915
|
+
components: R,
|
|
1913
1916
|
children: e
|
|
1914
1917
|
}
|
|
1915
1918
|
)
|
|
1916
1919
|
}
|
|
1917
1920
|
)
|
|
1918
1921
|
] });
|
|
1919
|
-
},
|
|
1922
|
+
}, nt = ({ data: e }) => {
|
|
1920
1923
|
const { theme: t } = M(), o = Je(t), r = e.response.jsonResponse;
|
|
1921
1924
|
let i;
|
|
1922
1925
|
try {
|
|
@@ -1935,7 +1938,7 @@ const X = ({
|
|
|
1935
1938
|
children: /* @__PURE__ */ n(Ue, { language: "json", style: o, PreTag: "div", children: i })
|
|
1936
1939
|
}
|
|
1937
1940
|
) });
|
|
1938
|
-
},
|
|
1941
|
+
}, tt = {
|
|
1939
1942
|
en: {
|
|
1940
1943
|
error: "Error",
|
|
1941
1944
|
streaming: "Streaming...",
|
|
@@ -2247,8 +2250,8 @@ const X = ({
|
|
|
2247
2250
|
copiedId: "Kopiert"
|
|
2248
2251
|
}
|
|
2249
2252
|
};
|
|
2250
|
-
function
|
|
2251
|
-
return
|
|
2253
|
+
function rt(e) {
|
|
2254
|
+
return tt[e];
|
|
2252
2255
|
}
|
|
2253
2256
|
function k(e, t) {
|
|
2254
2257
|
return Object.entries(t).reduce(
|
|
@@ -2275,15 +2278,15 @@ function B({
|
|
|
2275
2278
|
once: s = !1,
|
|
2276
2279
|
inViewMargin: c,
|
|
2277
2280
|
spread: d = 2,
|
|
2278
|
-
color:
|
|
2281
|
+
color: m,
|
|
2279
2282
|
shimmerColor: g,
|
|
2280
2283
|
direction: x = "fromBottom"
|
|
2281
2284
|
}) {
|
|
2282
|
-
const { colors: h } = M(),
|
|
2285
|
+
const { colors: h } = M(), S = m ?? h.shimmerBase, R = g ?? h.shimmerHighlight, p = H(null), y = wn(p, { once: s, margin: c }), f = j(() => e.length * d, [e, d]), $ = !l || y, C = x === "fromBottom" ? "100% center" : "-100% center", v = x === "fromBottom" ? "0% center" : "200% center";
|
|
2283
2286
|
return /* @__PURE__ */ n(
|
|
2284
2287
|
I.span,
|
|
2285
2288
|
{
|
|
2286
|
-
ref:
|
|
2289
|
+
ref: p,
|
|
2287
2290
|
className: a,
|
|
2288
2291
|
style: {
|
|
2289
2292
|
position: "relative",
|
|
@@ -2295,8 +2298,8 @@ function B({
|
|
|
2295
2298
|
WebkitTextFillColor: "transparent",
|
|
2296
2299
|
backgroundRepeat: "no-repeat, padding-box",
|
|
2297
2300
|
"--spread": `${f}px`,
|
|
2298
|
-
"--base-color":
|
|
2299
|
-
"--shimmer-color":
|
|
2301
|
+
"--base-color": S,
|
|
2302
|
+
"--shimmer-color": R,
|
|
2300
2303
|
"--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
|
|
2301
2304
|
backgroundImage: "var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))"
|
|
2302
2305
|
},
|
|
@@ -2304,8 +2307,8 @@ function B({
|
|
|
2304
2307
|
backgroundPosition: C,
|
|
2305
2308
|
opacity: 0
|
|
2306
2309
|
},
|
|
2307
|
-
animate:
|
|
2308
|
-
backgroundPosition:
|
|
2310
|
+
animate: $ ? {
|
|
2311
|
+
backgroundPosition: v,
|
|
2309
2312
|
opacity: 1
|
|
2310
2313
|
} : {},
|
|
2311
2314
|
transition: {
|
|
@@ -2325,12 +2328,12 @@ function B({
|
|
|
2325
2328
|
}
|
|
2326
2329
|
);
|
|
2327
2330
|
}
|
|
2328
|
-
const
|
|
2329
|
-
const { colors: a } = M(), [l, s] = F(!1), d = (e.memories ?? []).map((f) => f.memoryTitle),
|
|
2331
|
+
const xe = 5, te = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, compactBelow: i = !1 }) => {
|
|
2332
|
+
const { colors: a } = M(), [l, s] = F(!1), d = (e.memories ?? []).map((f) => f.memoryTitle), m = d.length > 0, g = m && d.length > xe, x = g && !l ? d.slice(0, xe) : d, h = d.length - xe, S = !g || l, R = `${r.searchingFor}'${e.queryDescription}'`, p = m ? `${r.searchingIn}${ue(
|
|
2330
2333
|
x,
|
|
2331
|
-
|
|
2332
|
-
)}` : "", y =
|
|
2333
|
-
return /* @__PURE__ */
|
|
2334
|
+
S ? r.and : void 0
|
|
2335
|
+
)}` : "", y = m ? `${R}${p}` : `${r.searchingPrefix}${e.queryDescription}`;
|
|
2336
|
+
return /* @__PURE__ */ u(
|
|
2334
2337
|
"div",
|
|
2335
2338
|
{
|
|
2336
2339
|
style: i ? { paddingTop: "16px", paddingBottom: "2px" } : { paddingBlock: "16px" },
|
|
@@ -2342,17 +2345,17 @@ const fe = 5, te = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, compa
|
|
|
2342
2345
|
initial: { opacity: 0, y: -10 },
|
|
2343
2346
|
animate: { opacity: 1, y: 0 },
|
|
2344
2347
|
transition: { duration: 0.3, delay: 0 },
|
|
2345
|
-
children: t && !o && !g ? /* @__PURE__ */ n(B, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */
|
|
2346
|
-
/* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children:
|
|
2348
|
+
children: t && !o && !g ? /* @__PURE__ */ n(B, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ u(G, { children: [
|
|
2349
|
+
/* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: m ? /* @__PURE__ */ u(G, { children: [
|
|
2347
2350
|
r.searchingFor,
|
|
2348
|
-
/* @__PURE__ */
|
|
2351
|
+
/* @__PURE__ */ u("span", { style: { fontWeight: 600 }, children: [
|
|
2349
2352
|
"'",
|
|
2350
2353
|
e.queryDescription,
|
|
2351
2354
|
"'"
|
|
2352
2355
|
] }),
|
|
2353
|
-
|
|
2356
|
+
p
|
|
2354
2357
|
] }) : `${r.searchingPrefix}${e.queryDescription}` }),
|
|
2355
|
-
g && !l && /* @__PURE__ */
|
|
2358
|
+
g && !l && /* @__PURE__ */ u(G, { children: [
|
|
2356
2359
|
" ",
|
|
2357
2360
|
/* @__PURE__ */ n(
|
|
2358
2361
|
"button",
|
|
@@ -2376,7 +2379,7 @@ const fe = 5, te = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, compa
|
|
|
2376
2379
|
}
|
|
2377
2380
|
)
|
|
2378
2381
|
] }),
|
|
2379
|
-
g && l && /* @__PURE__ */
|
|
2382
|
+
g && l && /* @__PURE__ */ u(G, { children: [
|
|
2380
2383
|
" ",
|
|
2381
2384
|
/* @__PURE__ */ n(
|
|
2382
2385
|
"button",
|
|
@@ -2436,16 +2439,16 @@ const fe = 5, te = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, compa
|
|
|
2436
2439
|
}
|
|
2437
2440
|
);
|
|
2438
2441
|
};
|
|
2439
|
-
function
|
|
2442
|
+
function ot(e, t) {
|
|
2440
2443
|
const o = Math.min(e.length, t.length);
|
|
2441
2444
|
for (let r = o; r >= 0; r--)
|
|
2442
2445
|
if (e.slice(-r) === t.slice(0, r)) return r;
|
|
2443
2446
|
return 0;
|
|
2444
2447
|
}
|
|
2445
|
-
const
|
|
2448
|
+
const it = `
|
|
2446
2449
|
|
|
2447
2450
|
`;
|
|
2448
|
-
function
|
|
2451
|
+
function Ce(e) {
|
|
2449
2452
|
var o, r;
|
|
2450
2453
|
if (e.length === 0) return "";
|
|
2451
2454
|
let t = ((o = e[0]) == null ? void 0 : o.content) ?? "";
|
|
@@ -2456,12 +2459,12 @@ function Te(e) {
|
|
|
2456
2459
|
t = a;
|
|
2457
2460
|
continue;
|
|
2458
2461
|
}
|
|
2459
|
-
const l =
|
|
2460
|
-
l === 0 ? t +=
|
|
2462
|
+
const l = ot(t, a);
|
|
2463
|
+
l === 0 ? t += it + a : t += a.slice(l);
|
|
2461
2464
|
}
|
|
2462
2465
|
return t;
|
|
2463
2466
|
}
|
|
2464
|
-
function
|
|
2467
|
+
function we(e, t) {
|
|
2465
2468
|
if (e.length === 0) return "";
|
|
2466
2469
|
if (e.length === 1)
|
|
2467
2470
|
return k(t.memorySearchPagesSingle, {
|
|
@@ -2478,13 +2481,13 @@ function Ce(e, t) {
|
|
|
2478
2481
|
n: o
|
|
2479
2482
|
});
|
|
2480
2483
|
}
|
|
2481
|
-
function
|
|
2484
|
+
function Re(e) {
|
|
2482
2485
|
const t = /* @__PURE__ */ new Set();
|
|
2483
2486
|
for (const o of e)
|
|
2484
2487
|
for (const r of o.pageNumbers) t.add(r);
|
|
2485
2488
|
return [...t].sort((o, r) => o - r);
|
|
2486
2489
|
}
|
|
2487
|
-
function
|
|
2490
|
+
function Ee(e) {
|
|
2488
2491
|
const t = e.memoryTypeName.trim();
|
|
2489
2492
|
if (t !== "") return t;
|
|
2490
2493
|
if (e.memoryTypeId !== "") return e.memoryTypeId;
|
|
@@ -2492,7 +2495,7 @@ function Re(e) {
|
|
|
2492
2495
|
function Xe(e) {
|
|
2493
2496
|
return e.chunks.filter((t) => t.relation === "MATCH").length;
|
|
2494
2497
|
}
|
|
2495
|
-
function
|
|
2498
|
+
function at(e, t) {
|
|
2496
2499
|
let o = 0, r = 0;
|
|
2497
2500
|
for (const l of e)
|
|
2498
2501
|
o += Xe(l), l.matchingChunkScore > r && (r = l.matchingChunkScore);
|
|
@@ -2501,7 +2504,7 @@ function it(e, t) {
|
|
|
2501
2504
|
});
|
|
2502
2505
|
return `${i} - ${a}`;
|
|
2503
2506
|
}
|
|
2504
|
-
function
|
|
2507
|
+
function lt(e) {
|
|
2505
2508
|
const t = [], o = /* @__PURE__ */ new Map();
|
|
2506
2509
|
return e.forEach((r, i) => {
|
|
2507
2510
|
let a = o.get(r.memoryId);
|
|
@@ -2517,7 +2520,7 @@ function at(e) {
|
|
|
2517
2520
|
a.items.push({ item: r, flatIndex: i });
|
|
2518
2521
|
}), t.map((r) => o.get(r));
|
|
2519
2522
|
}
|
|
2520
|
-
function
|
|
2523
|
+
function st({
|
|
2521
2524
|
items: e,
|
|
2522
2525
|
onSearchResultClick: t,
|
|
2523
2526
|
t: o
|
|
@@ -2535,16 +2538,16 @@ function lt({
|
|
|
2535
2538
|
borderTop: `1px solid ${r.borderDivider}`
|
|
2536
2539
|
},
|
|
2537
2540
|
children: e.map((s, c) => {
|
|
2538
|
-
const d =
|
|
2541
|
+
const d = Re(
|
|
2539
2542
|
s.chunks
|
|
2540
|
-
),
|
|
2541
|
-
|
|
2543
|
+
), m = [
|
|
2544
|
+
Ee(s),
|
|
2542
2545
|
k(o.scoreLabel, {
|
|
2543
2546
|
n: s.matchingChunkScore.toFixed(2)
|
|
2544
2547
|
}),
|
|
2545
|
-
d.length > 0 ?
|
|
2548
|
+
d.length > 0 ? we(d, o) : o.pagesNotAvailable
|
|
2546
2549
|
].filter(
|
|
2547
|
-
(
|
|
2550
|
+
(S) => S != null && S !== ""
|
|
2548
2551
|
), g = {
|
|
2549
2552
|
memoryId: s.memoryId,
|
|
2550
2553
|
memoryTitle: s.memoryTitle,
|
|
@@ -2552,7 +2555,7 @@ function lt({
|
|
|
2552
2555
|
memoryTypeName: s.memoryTypeName,
|
|
2553
2556
|
pageNumbers: d
|
|
2554
2557
|
}, x = `${s.memoryId}-${c}`, h = i === x;
|
|
2555
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ u(
|
|
2556
2559
|
"div",
|
|
2557
2560
|
{
|
|
2558
2561
|
style: {
|
|
@@ -2566,7 +2569,7 @@ function lt({
|
|
|
2566
2569
|
minWidth: 0
|
|
2567
2570
|
},
|
|
2568
2571
|
children: [
|
|
2569
|
-
/* @__PURE__ */
|
|
2572
|
+
/* @__PURE__ */ u(
|
|
2570
2573
|
"div",
|
|
2571
2574
|
{
|
|
2572
2575
|
style: {
|
|
@@ -2587,7 +2590,7 @@ function lt({
|
|
|
2587
2590
|
whiteSpace: "pre-wrap",
|
|
2588
2591
|
wordBreak: "break-word"
|
|
2589
2592
|
},
|
|
2590
|
-
children:
|
|
2593
|
+
children: Ce(s.chunks)
|
|
2591
2594
|
}
|
|
2592
2595
|
),
|
|
2593
2596
|
/* @__PURE__ */ n(
|
|
@@ -2599,13 +2602,13 @@ function lt({
|
|
|
2599
2602
|
color: r.textMuted,
|
|
2600
2603
|
lineHeight: 1.35
|
|
2601
2604
|
},
|
|
2602
|
-
children:
|
|
2605
|
+
children: m.join(" · ")
|
|
2603
2606
|
}
|
|
2604
2607
|
)
|
|
2605
2608
|
]
|
|
2606
2609
|
}
|
|
2607
2610
|
),
|
|
2608
|
-
l && /* @__PURE__ */
|
|
2611
|
+
l && /* @__PURE__ */ u(
|
|
2609
2612
|
"button",
|
|
2610
2613
|
{
|
|
2611
2614
|
type: "button",
|
|
@@ -2657,7 +2660,7 @@ function lt({
|
|
|
2657
2660
|
}
|
|
2658
2661
|
);
|
|
2659
2662
|
}
|
|
2660
|
-
function
|
|
2663
|
+
function ct({
|
|
2661
2664
|
group: e,
|
|
2662
2665
|
t,
|
|
2663
2666
|
expanded: o,
|
|
@@ -2665,7 +2668,7 @@ function st({
|
|
|
2665
2668
|
onSearchResultClick: i
|
|
2666
2669
|
}) {
|
|
2667
2670
|
const { colors: a } = M(), l = e.items.map((c) => c.item), s = l.some((c) => c.chunks.length > 0);
|
|
2668
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ u(
|
|
2669
2672
|
I.div,
|
|
2670
2673
|
{
|
|
2671
2674
|
initial: { opacity: 0 },
|
|
@@ -2696,7 +2699,7 @@ function st({
|
|
|
2696
2699
|
children: /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 })
|
|
2697
2700
|
}
|
|
2698
2701
|
),
|
|
2699
|
-
/* @__PURE__ */
|
|
2702
|
+
/* @__PURE__ */ u(
|
|
2700
2703
|
"div",
|
|
2701
2704
|
{
|
|
2702
2705
|
style: {
|
|
@@ -2719,7 +2722,7 @@ function st({
|
|
|
2719
2722
|
children: e.memoryTitle
|
|
2720
2723
|
}
|
|
2721
2724
|
),
|
|
2722
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ u(
|
|
2723
2726
|
"div",
|
|
2724
2727
|
{
|
|
2725
2728
|
style: {
|
|
@@ -2739,7 +2742,7 @@ function st({
|
|
|
2739
2742
|
color: a.textSecondary,
|
|
2740
2743
|
whiteSpace: "nowrap"
|
|
2741
2744
|
},
|
|
2742
|
-
children:
|
|
2745
|
+
children: at(l, t)
|
|
2743
2746
|
}
|
|
2744
2747
|
),
|
|
2745
2748
|
s && /* @__PURE__ */ n(
|
|
@@ -2764,7 +2767,7 @@ function st({
|
|
|
2764
2767
|
}
|
|
2765
2768
|
),
|
|
2766
2769
|
o && s && /* @__PURE__ */ n(
|
|
2767
|
-
|
|
2770
|
+
st,
|
|
2768
2771
|
{
|
|
2769
2772
|
items: l,
|
|
2770
2773
|
onSearchResultClick: i,
|
|
@@ -2778,63 +2781,96 @@ function st({
|
|
|
2778
2781
|
}
|
|
2779
2782
|
);
|
|
2780
2783
|
}
|
|
2781
|
-
function
|
|
2784
|
+
function dt(e, t) {
|
|
2782
2785
|
return e === 1 ? t.chunkFound : k(t.chunksFound, { n: e });
|
|
2783
2786
|
}
|
|
2784
|
-
const
|
|
2787
|
+
const pe = ({
|
|
2785
2788
|
data: e,
|
|
2786
2789
|
onSearchResultClick: t,
|
|
2787
2790
|
t: o,
|
|
2788
|
-
compactTop: r = !1
|
|
2791
|
+
compactTop: r = !1,
|
|
2792
|
+
maxVisibleGroups: i
|
|
2789
2793
|
}) => {
|
|
2790
|
-
const { colors:
|
|
2791
|
-
(v,
|
|
2794
|
+
const { colors: a } = M(), l = e.items, s = l.reduce(
|
|
2795
|
+
(v, z) => v + Xe(z),
|
|
2792
2796
|
0
|
|
2793
|
-
),
|
|
2794
|
-
|
|
2795
|
-
...
|
|
2796
|
-
[v]: !
|
|
2797
|
+
), c = new Set(l.map((v) => v.memoryId)).size, [d, m] = F({}), [g, x] = F(!1), h = _((v) => {
|
|
2798
|
+
m((z) => ({
|
|
2799
|
+
...z,
|
|
2800
|
+
[v]: !z[v]
|
|
2797
2801
|
}));
|
|
2798
|
-
}, []),
|
|
2799
|
-
n:
|
|
2800
|
-
}),
|
|
2801
|
-
|
|
2802
|
-
"div",
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2802
|
+
}, []), S = j(() => lt(l), [l]), R = i != null && S.length > i ? S.length - i : 0, p = R > 0 && !g ? S.slice(0, i) : S, y = c === 1 ? o.memoryChatChunkResultsInOneMemory : k(o.memoryChatChunkResultsInMemories, {
|
|
2803
|
+
n: c
|
|
2804
|
+
}), f = `${dt(s, o)} ${y}`, $ = r ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
|
|
2805
|
+
if (l.length === 0)
|
|
2806
|
+
return /* @__PURE__ */ n("div", { style: $, children: /* @__PURE__ */ n(
|
|
2807
|
+
"div",
|
|
2808
|
+
{
|
|
2809
|
+
style: {
|
|
2810
|
+
fontSize: 12,
|
|
2811
|
+
color: a.textMuted,
|
|
2812
|
+
paddingTop: 4
|
|
2813
|
+
},
|
|
2814
|
+
children: o.memorySearchExploreNoResults
|
|
2815
|
+
}
|
|
2816
|
+
) });
|
|
2817
|
+
const C = {
|
|
2818
|
+
background: "none",
|
|
2819
|
+
border: "none",
|
|
2820
|
+
padding: 0,
|
|
2821
|
+
margin: 0,
|
|
2822
|
+
fontSize: 12,
|
|
2823
|
+
color: a.textSecondary,
|
|
2824
|
+
cursor: "pointer",
|
|
2825
|
+
textDecoration: "underline",
|
|
2826
|
+
fontFamily: "inherit"
|
|
2827
|
+
};
|
|
2828
|
+
return /* @__PURE__ */ u("div", { style: $, children: [
|
|
2829
|
+
p.map((v) => /* @__PURE__ */ n(
|
|
2830
|
+
ct,
|
|
2814
2831
|
{
|
|
2815
2832
|
group: v,
|
|
2816
2833
|
t: o,
|
|
2817
|
-
expanded:
|
|
2818
|
-
onToggle: () =>
|
|
2834
|
+
expanded: d[v.memoryId] === !0,
|
|
2835
|
+
onToggle: () => h(v.memoryId),
|
|
2819
2836
|
onSearchResultClick: t
|
|
2820
2837
|
},
|
|
2821
2838
|
v.memoryId
|
|
2822
2839
|
)),
|
|
2840
|
+
R > 0 && /* @__PURE__ */ n("div", { style: { paddingTop: 8, paddingLeft: 42 }, children: g ? /* @__PURE__ */ n(
|
|
2841
|
+
"button",
|
|
2842
|
+
{
|
|
2843
|
+
type: "button",
|
|
2844
|
+
onClick: () => x(!1),
|
|
2845
|
+
style: C,
|
|
2846
|
+
children: o.clickToCollapse
|
|
2847
|
+
}
|
|
2848
|
+
) : /* @__PURE__ */ n(
|
|
2849
|
+
"button",
|
|
2850
|
+
{
|
|
2851
|
+
type: "button",
|
|
2852
|
+
onClick: () => x(!0),
|
|
2853
|
+
style: C,
|
|
2854
|
+
children: k(o.moreMemories, {
|
|
2855
|
+
n: R
|
|
2856
|
+
})
|
|
2857
|
+
}
|
|
2858
|
+
) }),
|
|
2823
2859
|
/* @__PURE__ */ n(
|
|
2824
2860
|
"div",
|
|
2825
2861
|
{
|
|
2826
2862
|
style: {
|
|
2827
2863
|
fontSize: "12px",
|
|
2828
|
-
color:
|
|
2864
|
+
color: a.textMuted,
|
|
2829
2865
|
marginTop: "4px",
|
|
2830
2866
|
fontStyle: "italic"
|
|
2831
2867
|
},
|
|
2832
|
-
children:
|
|
2868
|
+
children: f
|
|
2833
2869
|
}
|
|
2834
2870
|
)
|
|
2835
2871
|
] });
|
|
2836
2872
|
};
|
|
2837
|
-
function
|
|
2873
|
+
function ut(e) {
|
|
2838
2874
|
return {
|
|
2839
2875
|
taskType: "MemoryChat",
|
|
2840
2876
|
eventType: "Search",
|
|
@@ -2842,14 +2878,14 @@ function dt(e) {
|
|
|
2842
2878
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
2843
2879
|
};
|
|
2844
2880
|
}
|
|
2845
|
-
const
|
|
2881
|
+
const pt = ({
|
|
2846
2882
|
data: e,
|
|
2847
2883
|
isLatest: t = !1,
|
|
2848
2884
|
durationSeconds: o,
|
|
2849
2885
|
t: r,
|
|
2850
2886
|
onSearchResultClick: i
|
|
2851
2887
|
}) => {
|
|
2852
|
-
const a =
|
|
2888
|
+
const a = ut(e);
|
|
2853
2889
|
return e.items === void 0 ? /* @__PURE__ */ n(
|
|
2854
2890
|
te,
|
|
2855
2891
|
{
|
|
@@ -2858,7 +2894,7 @@ const ut = ({
|
|
|
2858
2894
|
durationSeconds: o,
|
|
2859
2895
|
t: r
|
|
2860
2896
|
}
|
|
2861
|
-
) : /* @__PURE__ */
|
|
2897
|
+
) : /* @__PURE__ */ u(G, { children: [
|
|
2862
2898
|
/* @__PURE__ */ n(
|
|
2863
2899
|
te,
|
|
2864
2900
|
{
|
|
@@ -2870,7 +2906,7 @@ const ut = ({
|
|
|
2870
2906
|
}
|
|
2871
2907
|
),
|
|
2872
2908
|
/* @__PURE__ */ n(
|
|
2873
|
-
|
|
2909
|
+
pe,
|
|
2874
2910
|
{
|
|
2875
2911
|
data: {
|
|
2876
2912
|
taskType: "MemoryChat",
|
|
@@ -2883,12 +2919,12 @@ const ut = ({
|
|
|
2883
2919
|
}
|
|
2884
2920
|
)
|
|
2885
2921
|
] });
|
|
2886
|
-
},
|
|
2887
|
-
const { colors: i } = M(), [a, l] = F(!1), s = e.titles, c = s.length > 0, d = c && s.length >
|
|
2888
|
-
|
|
2922
|
+
}, ke = 5, mt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
2923
|
+
const { colors: i } = M(), [a, l] = F(!1), s = e.titles, c = s.length > 0, d = c && s.length > ke, m = d && !a ? s.slice(0, ke) : s, g = s.length - ke, x = !d || a, h = c ? `${r.findingMemoriesIn}${ue(
|
|
2924
|
+
m,
|
|
2889
2925
|
x ? r.and : void 0
|
|
2890
2926
|
)}` : r.findingMemories;
|
|
2891
|
-
return /* @__PURE__ */
|
|
2927
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
2892
2928
|
/* @__PURE__ */ n(
|
|
2893
2929
|
I.div,
|
|
2894
2930
|
{
|
|
@@ -2898,9 +2934,9 @@ const ut = ({
|
|
|
2898
2934
|
initial: { opacity: 0, y: -10 },
|
|
2899
2935
|
animate: { opacity: 1, y: 0 },
|
|
2900
2936
|
transition: { duration: 0.3, delay: 0 },
|
|
2901
|
-
children: t && !o && !d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */
|
|
2937
|
+
children: t && !o && !d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ u(G, { children: [
|
|
2902
2938
|
/* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: h }),
|
|
2903
|
-
d && !a && /* @__PURE__ */
|
|
2939
|
+
d && !a && /* @__PURE__ */ u(G, { children: [
|
|
2904
2940
|
" ",
|
|
2905
2941
|
/* @__PURE__ */ n(
|
|
2906
2942
|
"button",
|
|
@@ -2924,7 +2960,7 @@ const ut = ({
|
|
|
2924
2960
|
}
|
|
2925
2961
|
)
|
|
2926
2962
|
] }),
|
|
2927
|
-
d && a && /* @__PURE__ */
|
|
2963
|
+
d && a && /* @__PURE__ */ u(G, { children: [
|
|
2928
2964
|
" ",
|
|
2929
2965
|
/* @__PURE__ */ n(
|
|
2930
2966
|
"button",
|
|
@@ -2962,8 +2998,8 @@ const ut = ({
|
|
|
2962
2998
|
}
|
|
2963
2999
|
)
|
|
2964
3000
|
] });
|
|
2965
|
-
},
|
|
2966
|
-
const { colors: o } = M(), [r, i] = F(!1), l = e.memories.map((
|
|
3001
|
+
}, Se = 5, gt = ({ data: e, t }) => {
|
|
3002
|
+
const { colors: o } = M(), [r, i] = F(!1), l = e.memories.map((S) => S.memoryTitle), s = l.length > 0, c = s && l.length > Se, d = c && !r ? l.slice(0, Se) : l, m = l.length - Se, g = !c || r, x = l.length === 1 ? t.memoryFound : t.memoriesFoundPrefix, h = s ? `${x}${ue(
|
|
2967
3003
|
d,
|
|
2968
3004
|
g ? t.and : void 0
|
|
2969
3005
|
)}` : t.memoriesFound;
|
|
@@ -2974,9 +3010,9 @@ const ut = ({
|
|
|
2974
3010
|
initial: { opacity: 0, y: -10 },
|
|
2975
3011
|
animate: { opacity: 1, y: 0 },
|
|
2976
3012
|
transition: { duration: 0.3, delay: 0 },
|
|
2977
|
-
children: /* @__PURE__ */
|
|
3013
|
+
children: /* @__PURE__ */ u(G, { children: [
|
|
2978
3014
|
/* @__PURE__ */ n("span", { style: { color: o.textSecondary }, children: h }),
|
|
2979
|
-
c && !r && /* @__PURE__ */
|
|
3015
|
+
c && !r && /* @__PURE__ */ u(G, { children: [
|
|
2980
3016
|
" ",
|
|
2981
3017
|
/* @__PURE__ */ n(
|
|
2982
3018
|
"button",
|
|
@@ -2995,12 +3031,12 @@ const ut = ({
|
|
|
2995
3031
|
fontFamily: "inherit"
|
|
2996
3032
|
},
|
|
2997
3033
|
children: k(t.moreMemories, {
|
|
2998
|
-
n:
|
|
3034
|
+
n: m
|
|
2999
3035
|
})
|
|
3000
3036
|
}
|
|
3001
3037
|
)
|
|
3002
3038
|
] }),
|
|
3003
|
-
c && r && /* @__PURE__ */
|
|
3039
|
+
c && r && /* @__PURE__ */ u(G, { children: [
|
|
3004
3040
|
" ",
|
|
3005
3041
|
/* @__PURE__ */ n(
|
|
3006
3042
|
"button",
|
|
@@ -3027,7 +3063,7 @@ const ut = ({
|
|
|
3027
3063
|
) });
|
|
3028
3064
|
}, Pe = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
3029
3065
|
const { colors: r } = M(), i = o.addingSources;
|
|
3030
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3031
3067
|
/* @__PURE__ */ n(
|
|
3032
3068
|
I.div,
|
|
3033
3069
|
{
|
|
@@ -3057,7 +3093,7 @@ const ut = ({
|
|
|
3057
3093
|
)
|
|
3058
3094
|
] });
|
|
3059
3095
|
};
|
|
3060
|
-
function
|
|
3096
|
+
function yt(e, t) {
|
|
3061
3097
|
if (e.length === 0) return "";
|
|
3062
3098
|
if (e.length === 1)
|
|
3063
3099
|
return k(t.pageSingle, { n: e[0] });
|
|
@@ -3071,7 +3107,7 @@ function gt(e, t) {
|
|
|
3071
3107
|
}
|
|
3072
3108
|
const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
3073
3109
|
const { colors: r } = M(), [i, a] = F(null);
|
|
3074
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3075
3111
|
/* @__PURE__ */ n(
|
|
3076
3112
|
I.div,
|
|
3077
3113
|
{
|
|
@@ -3110,15 +3146,15 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3110
3146
|
onSourceClick: i,
|
|
3111
3147
|
t: a
|
|
3112
3148
|
}) => {
|
|
3113
|
-
const { colors: l } = M(), [s, c] = F(!1), d = !!i,
|
|
3114
|
-
return /* @__PURE__ */
|
|
3149
|
+
const { colors: l } = M(), [s, c] = F(!1), d = !!i, m = o === e.memoryId, g = e.pageNumbers ?? [], x = yt(g, a);
|
|
3150
|
+
return /* @__PURE__ */ u(
|
|
3115
3151
|
I.div,
|
|
3116
3152
|
{
|
|
3117
|
-
"aria-busy":
|
|
3153
|
+
"aria-busy": m,
|
|
3118
3154
|
initial: { opacity: 0, scale: 0.9 },
|
|
3119
3155
|
animate: { opacity: 1, scale: 1 },
|
|
3120
3156
|
transition: { duration: 0.25, delay: t * 0.05 },
|
|
3121
|
-
onClick: d && !
|
|
3157
|
+
onClick: d && !m ? async () => {
|
|
3122
3158
|
r(e.memoryId);
|
|
3123
3159
|
try {
|
|
3124
3160
|
await i({
|
|
@@ -3132,8 +3168,8 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3132
3168
|
r(null);
|
|
3133
3169
|
}
|
|
3134
3170
|
} : void 0,
|
|
3135
|
-
onMouseEnter: d && !
|
|
3136
|
-
onMouseLeave: d && !
|
|
3171
|
+
onMouseEnter: d && !m ? () => c(!0) : void 0,
|
|
3172
|
+
onMouseLeave: d && !m ? () => c(!1) : void 0,
|
|
3137
3173
|
style: {
|
|
3138
3174
|
display: "inline-flex",
|
|
3139
3175
|
flexDirection: "column",
|
|
@@ -3142,13 +3178,13 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3142
3178
|
borderRadius: "6px",
|
|
3143
3179
|
border: `1px solid ${l.borderStrong}`,
|
|
3144
3180
|
backgroundColor: s ? l.sourcesBadgeBg : l.transparent,
|
|
3145
|
-
cursor: d && !
|
|
3181
|
+
cursor: d && !m ? "pointer" : m ? "wait" : "default",
|
|
3146
3182
|
transition: "background-color 0.15s ease",
|
|
3147
3183
|
userSelect: "none",
|
|
3148
|
-
pointerEvents:
|
|
3184
|
+
pointerEvents: m ? "none" : void 0
|
|
3149
3185
|
},
|
|
3150
3186
|
children: [
|
|
3151
|
-
/* @__PURE__ */
|
|
3187
|
+
/* @__PURE__ */ u(
|
|
3152
3188
|
"span",
|
|
3153
3189
|
{
|
|
3154
3190
|
style: {
|
|
@@ -3160,7 +3196,7 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3160
3196
|
gap: 8
|
|
3161
3197
|
},
|
|
3162
3198
|
children: [
|
|
3163
|
-
|
|
3199
|
+
m && /* @__PURE__ */ n(
|
|
3164
3200
|
"span",
|
|
3165
3201
|
{
|
|
3166
3202
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -3188,7 +3224,7 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3188
3224
|
height: a,
|
|
3189
3225
|
backgroundColor: i
|
|
3190
3226
|
};
|
|
3191
|
-
return /* @__PURE__ */
|
|
3227
|
+
return /* @__PURE__ */ u(
|
|
3192
3228
|
"span",
|
|
3193
3229
|
{
|
|
3194
3230
|
style: {
|
|
@@ -3220,20 +3256,20 @@ const Ye = ({ data: e, onSourceClick: t, t: o }) => {
|
|
|
3220
3256
|
}
|
|
3221
3257
|
);
|
|
3222
3258
|
};
|
|
3223
|
-
function
|
|
3259
|
+
function ft({
|
|
3224
3260
|
memory: e,
|
|
3225
3261
|
completed: t
|
|
3226
3262
|
}) {
|
|
3227
3263
|
return e.error != null ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : t ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
3228
3264
|
}
|
|
3229
3265
|
const Fe = 80;
|
|
3230
|
-
function
|
|
3266
|
+
function xt({
|
|
3231
3267
|
memory: e,
|
|
3232
3268
|
completed: t,
|
|
3233
3269
|
t: o
|
|
3234
3270
|
}) {
|
|
3235
|
-
const { colors: r } = M(), [i, a] = F(!1), l = e.result ?? e.error, s = l != null && l.length > Fe, c = l != null ? i || !s ? l : `${l.slice(0, Fe)}...` : void 0, d = s,
|
|
3236
|
-
return /* @__PURE__ */
|
|
3271
|
+
const { colors: r } = M(), [i, a] = F(!1), l = e.result ?? e.error, s = l != null && l.length > Fe, c = l != null ? i || !s ? l : `${l.slice(0, Fe)}...` : void 0, d = s, m = e.error != null;
|
|
3272
|
+
return /* @__PURE__ */ u(
|
|
3237
3273
|
I.div,
|
|
3238
3274
|
{
|
|
3239
3275
|
initial: { opacity: 0 },
|
|
@@ -3262,10 +3298,10 @@ function ft({
|
|
|
3262
3298
|
flexShrink: 0,
|
|
3263
3299
|
width: 32
|
|
3264
3300
|
},
|
|
3265
|
-
children: /* @__PURE__ */ n(
|
|
3301
|
+
children: /* @__PURE__ */ n(ft, { memory: e, completed: t })
|
|
3266
3302
|
}
|
|
3267
3303
|
),
|
|
3268
|
-
/* @__PURE__ */
|
|
3304
|
+
/* @__PURE__ */ u(
|
|
3269
3305
|
"div",
|
|
3270
3306
|
{
|
|
3271
3307
|
style: {
|
|
@@ -3287,7 +3323,7 @@ function ft({
|
|
|
3287
3323
|
{
|
|
3288
3324
|
style: {
|
|
3289
3325
|
fontSize: 12,
|
|
3290
|
-
color:
|
|
3326
|
+
color: m ? r.textError : r.textSecondary,
|
|
3291
3327
|
lineHeight: 1.4,
|
|
3292
3328
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
3293
3329
|
},
|
|
@@ -3312,8 +3348,8 @@ function ft({
|
|
|
3312
3348
|
}
|
|
3313
3349
|
);
|
|
3314
3350
|
}
|
|
3315
|
-
const
|
|
3316
|
-
|
|
3351
|
+
const kt = ({ data: e, completed: t, t: o }) => /* @__PURE__ */ n("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((r) => /* @__PURE__ */ n(
|
|
3352
|
+
xt,
|
|
3317
3353
|
{
|
|
3318
3354
|
memory: r,
|
|
3319
3355
|
completed: t,
|
|
@@ -3321,19 +3357,19 @@ const xt = ({ data: e, completed: t, t: o }) => /* @__PURE__ */ n("div", { style
|
|
|
3321
3357
|
},
|
|
3322
3358
|
r.memoryId
|
|
3323
3359
|
)) }), Be = 80;
|
|
3324
|
-
function
|
|
3360
|
+
function St(e) {
|
|
3325
3361
|
try {
|
|
3326
3362
|
return new URL(e).hostname;
|
|
3327
3363
|
} catch {
|
|
3328
3364
|
return e;
|
|
3329
3365
|
}
|
|
3330
3366
|
}
|
|
3331
|
-
function
|
|
3367
|
+
function bt({
|
|
3332
3368
|
item: e,
|
|
3333
3369
|
t
|
|
3334
3370
|
}) {
|
|
3335
3371
|
const { colors: o } = M(), [r, i] = F(!1), a = e.description ?? "", l = a.length > Be, s = a.length === 0 ? void 0 : r || !l ? a : `${a.slice(0, Be)}...`;
|
|
3336
|
-
return /* @__PURE__ */
|
|
3372
|
+
return /* @__PURE__ */ u(
|
|
3337
3373
|
"div",
|
|
3338
3374
|
{
|
|
3339
3375
|
style: {
|
|
@@ -3365,7 +3401,7 @@ function St({
|
|
|
3365
3401
|
children: e.title
|
|
3366
3402
|
}
|
|
3367
3403
|
),
|
|
3368
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ u(
|
|
3369
3405
|
"span",
|
|
3370
3406
|
{
|
|
3371
3407
|
style: {
|
|
@@ -3376,11 +3412,11 @@ function St({
|
|
|
3376
3412
|
children: [
|
|
3377
3413
|
e.rank,
|
|
3378
3414
|
". ",
|
|
3379
|
-
|
|
3415
|
+
St(e.link)
|
|
3380
3416
|
]
|
|
3381
3417
|
}
|
|
3382
3418
|
),
|
|
3383
|
-
s != null && /* @__PURE__ */
|
|
3419
|
+
s != null && /* @__PURE__ */ u(G, { children: [
|
|
3384
3420
|
/* @__PURE__ */ n(
|
|
3385
3421
|
"span",
|
|
3386
3422
|
{
|
|
@@ -3421,14 +3457,14 @@ function Ze(e, t) {
|
|
|
3421
3457
|
query: r
|
|
3422
3458
|
});
|
|
3423
3459
|
}
|
|
3424
|
-
function
|
|
3460
|
+
function vt({
|
|
3425
3461
|
data: e,
|
|
3426
3462
|
isLatest: t,
|
|
3427
3463
|
durationSeconds: o,
|
|
3428
3464
|
t: r
|
|
3429
3465
|
}) {
|
|
3430
3466
|
const { colors: i } = M(), a = Ze(e, r);
|
|
3431
|
-
return /* @__PURE__ */
|
|
3467
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3432
3468
|
/* @__PURE__ */ n(
|
|
3433
3469
|
I.div,
|
|
3434
3470
|
{
|
|
@@ -3453,12 +3489,12 @@ function bt({
|
|
|
3453
3489
|
)
|
|
3454
3490
|
] });
|
|
3455
3491
|
}
|
|
3456
|
-
function
|
|
3492
|
+
function Tt({
|
|
3457
3493
|
data: e,
|
|
3458
3494
|
t
|
|
3459
3495
|
}) {
|
|
3460
|
-
const { colors: o } = M(), [r, i] = F(!1), a = j(() => [...e.results ?? []].sort((
|
|
3461
|
-
return l === 0 ? /* @__PURE__ */
|
|
3496
|
+
const { colors: o } = M(), [r, i] = F(!1), a = j(() => [...e.results ?? []].sort((m, g) => m.rank - g.rank), [e.results]), l = a.length, s = l === 1 ? t.googleResultFound : k(t.googleResultsFound, { n: l }), c = Ze(e, t);
|
|
3497
|
+
return l === 0 ? /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3462
3498
|
/* @__PURE__ */ n("span", { style: { color: o.textSecondary }, children: c }),
|
|
3463
3499
|
/* @__PURE__ */ n(
|
|
3464
3500
|
"div",
|
|
@@ -3471,9 +3507,9 @@ function vt({
|
|
|
3471
3507
|
children: t.memorySearchExploreNoResults
|
|
3472
3508
|
}
|
|
3473
3509
|
)
|
|
3474
|
-
] }) : /* @__PURE__ */
|
|
3510
|
+
] }) : /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3475
3511
|
/* @__PURE__ */ n("span", { style: { color: o.textSecondary }, children: c }),
|
|
3476
|
-
/* @__PURE__ */
|
|
3512
|
+
/* @__PURE__ */ u(
|
|
3477
3513
|
I.div,
|
|
3478
3514
|
{
|
|
3479
3515
|
initial: { opacity: 0 },
|
|
@@ -3532,37 +3568,37 @@ function vt({
|
|
|
3532
3568
|
paddingTop: 8,
|
|
3533
3569
|
borderTop: `1px solid ${o.borderDivider}`
|
|
3534
3570
|
},
|
|
3535
|
-
children: a.map((d,
|
|
3571
|
+
children: a.map((d, m) => /* @__PURE__ */ n(
|
|
3536
3572
|
"div",
|
|
3537
3573
|
{
|
|
3538
3574
|
style: {
|
|
3539
|
-
paddingTop:
|
|
3540
|
-
paddingBottom:
|
|
3541
|
-
borderBottom:
|
|
3575
|
+
paddingTop: m > 0 ? 12 : 0,
|
|
3576
|
+
paddingBottom: m < a.length - 1 ? 12 : 0,
|
|
3577
|
+
borderBottom: m < a.length - 1 ? `1px solid ${o.border}` : void 0,
|
|
3542
3578
|
minWidth: 0
|
|
3543
3579
|
},
|
|
3544
|
-
children: /* @__PURE__ */ n(
|
|
3580
|
+
children: /* @__PURE__ */ n(bt, { item: d, t })
|
|
3545
3581
|
},
|
|
3546
|
-
`${d.link}-${d.rank}-${
|
|
3582
|
+
`${d.link}-${d.rank}-${m}`
|
|
3547
3583
|
))
|
|
3548
3584
|
}
|
|
3549
3585
|
)
|
|
3550
3586
|
] });
|
|
3551
3587
|
}
|
|
3552
|
-
const
|
|
3588
|
+
const Ct = ({
|
|
3553
3589
|
data: e,
|
|
3554
3590
|
isLatest: t = !1,
|
|
3555
3591
|
durationSeconds: o,
|
|
3556
3592
|
t: r
|
|
3557
3593
|
}) => e.results === void 0 ? /* @__PURE__ */ n(
|
|
3558
|
-
|
|
3594
|
+
vt,
|
|
3559
3595
|
{
|
|
3560
3596
|
data: e,
|
|
3561
3597
|
isLatest: t,
|
|
3562
3598
|
durationSeconds: o,
|
|
3563
3599
|
t: r
|
|
3564
3600
|
}
|
|
3565
|
-
) : /* @__PURE__ */ n(
|
|
3601
|
+
) : /* @__PURE__ */ n(Tt, { data: e, t: r });
|
|
3566
3602
|
function en(e, t) {
|
|
3567
3603
|
if (e.error != null)
|
|
3568
3604
|
return null;
|
|
@@ -3579,13 +3615,13 @@ function en(e, t) {
|
|
|
3579
3615
|
return null;
|
|
3580
3616
|
}
|
|
3581
3617
|
}
|
|
3582
|
-
function
|
|
3618
|
+
function wt(e) {
|
|
3583
3619
|
var t;
|
|
3584
3620
|
return e.error != null ? !0 : e.status != null ? !1 : (((t = e.summary) == null ? void 0 : t.length) ?? 0) > 0;
|
|
3585
3621
|
}
|
|
3586
|
-
const ze = 80, Me = 12, Ie = 1.4,
|
|
3622
|
+
const ze = 80, Me = 12, Ie = 1.4, Rt = Math.ceil(
|
|
3587
3623
|
Me * Ie
|
|
3588
|
-
),
|
|
3624
|
+
), Et = Math.ceil(
|
|
3589
3625
|
5 * Me * Ie
|
|
3590
3626
|
);
|
|
3591
3627
|
function nn(e, t = 48) {
|
|
@@ -3596,22 +3632,22 @@ function nn(e, t = 48) {
|
|
|
3596
3632
|
return e.length > 64 ? `${e.slice(0, 64)}…` : e;
|
|
3597
3633
|
}
|
|
3598
3634
|
}
|
|
3599
|
-
function
|
|
3635
|
+
function Mt({ item: e }) {
|
|
3600
3636
|
return e.error != null ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ n("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 });
|
|
3601
3637
|
}
|
|
3602
|
-
function
|
|
3638
|
+
function It({ item: e }) {
|
|
3603
3639
|
return e.error != null ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ n("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
3604
3640
|
}
|
|
3605
|
-
function
|
|
3641
|
+
function At({
|
|
3606
3642
|
item: e,
|
|
3607
3643
|
t,
|
|
3608
3644
|
isLatest: o = !1
|
|
3609
3645
|
}) {
|
|
3610
|
-
const { colors: r } = M(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, s =
|
|
3646
|
+
const { colors: r } = M(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, s = H(null), c = e.summary != null && e.summary !== "", d = en(e, t), m = l || c || !a && d != null, g = e.error == null && (e.summary == null || e.summary === "");
|
|
3611
3647
|
return V(() => {
|
|
3612
3648
|
const x = s.current;
|
|
3613
3649
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
3614
|
-
}, [i, a]), /* @__PURE__ */
|
|
3650
|
+
}, [i, a]), /* @__PURE__ */ u(
|
|
3615
3651
|
I.div,
|
|
3616
3652
|
{
|
|
3617
3653
|
initial: { opacity: 0 },
|
|
@@ -3620,7 +3656,7 @@ function It({
|
|
|
3620
3656
|
style: {
|
|
3621
3657
|
display: "flex",
|
|
3622
3658
|
flexDirection: "row",
|
|
3623
|
-
alignItems: g ? "center" :
|
|
3659
|
+
alignItems: g ? "center" : m ? "flex-start" : "center",
|
|
3624
3660
|
gap: "10px",
|
|
3625
3661
|
minWidth: 0
|
|
3626
3662
|
},
|
|
@@ -3634,12 +3670,12 @@ function It({
|
|
|
3634
3670
|
justifyContent: "center",
|
|
3635
3671
|
flexShrink: 0,
|
|
3636
3672
|
width: 32,
|
|
3637
|
-
...g || !
|
|
3673
|
+
...g || !m ? {} : { paddingTop: 2 }
|
|
3638
3674
|
},
|
|
3639
|
-
children: /* @__PURE__ */ n(
|
|
3675
|
+
children: /* @__PURE__ */ n(It, { item: e })
|
|
3640
3676
|
}
|
|
3641
3677
|
),
|
|
3642
|
-
/* @__PURE__ */
|
|
3678
|
+
/* @__PURE__ */ u(
|
|
3643
3679
|
"div",
|
|
3644
3680
|
{
|
|
3645
3681
|
style: {
|
|
@@ -3687,8 +3723,8 @@ function It({
|
|
|
3687
3723
|
{
|
|
3688
3724
|
ref: s,
|
|
3689
3725
|
style: {
|
|
3690
|
-
minHeight:
|
|
3691
|
-
maxHeight:
|
|
3726
|
+
minHeight: Rt,
|
|
3727
|
+
maxHeight: Et,
|
|
3692
3728
|
height: "auto",
|
|
3693
3729
|
overflowY: "auto",
|
|
3694
3730
|
overflowX: "hidden",
|
|
@@ -3710,12 +3746,12 @@ function It({
|
|
|
3710
3746
|
}
|
|
3711
3747
|
);
|
|
3712
3748
|
}
|
|
3713
|
-
function
|
|
3749
|
+
function Pt({
|
|
3714
3750
|
item: e,
|
|
3715
3751
|
t
|
|
3716
3752
|
}) {
|
|
3717
|
-
const { colors: o } = M(), [r, i] = F(!1), a = e.error ?? e.summary ?? "", l = e.error != null, s = a.length > ze, c = a.length === 0 ? void 0 : r || !s ? a : `${a.slice(0, ze)}...`, d = en(e, t),
|
|
3718
|
-
return /* @__PURE__ */
|
|
3753
|
+
const { colors: o } = M(), [r, i] = F(!1), a = e.error ?? e.summary ?? "", l = e.error != null, s = a.length > ze, c = a.length === 0 ? void 0 : r || !s ? a : `${a.slice(0, ze)}...`, d = en(e, t), m = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
|
|
3754
|
+
return /* @__PURE__ */ u(
|
|
3719
3755
|
I.div,
|
|
3720
3756
|
{
|
|
3721
3757
|
initial: { opacity: 0 },
|
|
@@ -3724,7 +3760,7 @@ function At({
|
|
|
3724
3760
|
style: {
|
|
3725
3761
|
display: "flex",
|
|
3726
3762
|
flexDirection: "row",
|
|
3727
|
-
alignItems:
|
|
3763
|
+
alignItems: m ? "center" : "flex-start",
|
|
3728
3764
|
gap: "10px",
|
|
3729
3765
|
minWidth: 0
|
|
3730
3766
|
},
|
|
@@ -3738,12 +3774,12 @@ function At({
|
|
|
3738
3774
|
justifyContent: "center",
|
|
3739
3775
|
flexShrink: 0,
|
|
3740
3776
|
width: 32,
|
|
3741
|
-
...
|
|
3777
|
+
...m ? {} : { paddingTop: 2 }
|
|
3742
3778
|
},
|
|
3743
|
-
children: /* @__PURE__ */ n(
|
|
3779
|
+
children: /* @__PURE__ */ n(Mt, { item: e })
|
|
3744
3780
|
}
|
|
3745
3781
|
),
|
|
3746
|
-
/* @__PURE__ */
|
|
3782
|
+
/* @__PURE__ */ u(
|
|
3747
3783
|
"div",
|
|
3748
3784
|
{
|
|
3749
3785
|
style: {
|
|
@@ -3787,7 +3823,7 @@ function At({
|
|
|
3787
3823
|
children: d
|
|
3788
3824
|
}
|
|
3789
3825
|
),
|
|
3790
|
-
c != null && /* @__PURE__ */
|
|
3826
|
+
c != null && /* @__PURE__ */ u(G, { children: [
|
|
3791
3827
|
/* @__PURE__ */ n(
|
|
3792
3828
|
"span",
|
|
3793
3829
|
{
|
|
@@ -3850,14 +3886,14 @@ function Le(e, t, o) {
|
|
|
3850
3886
|
}
|
|
3851
3887
|
);
|
|
3852
3888
|
}
|
|
3853
|
-
function
|
|
3889
|
+
function Ft({
|
|
3854
3890
|
data: e,
|
|
3855
3891
|
isLatest: t,
|
|
3856
3892
|
durationSeconds: o,
|
|
3857
3893
|
t: r
|
|
3858
3894
|
}) {
|
|
3859
3895
|
const { colors: i } = M(), a = e.input.urls, l = e.input.query, s = a.length, c = s === 1 ? k(r.scrapingPage, { query: l }) : k(r.scrapingPages, { n: s, query: l });
|
|
3860
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
3861
3897
|
/* @__PURE__ */ n(
|
|
3862
3898
|
I.div,
|
|
3863
3899
|
{
|
|
@@ -3882,17 +3918,17 @@ function Pt({
|
|
|
3882
3918
|
)
|
|
3883
3919
|
] });
|
|
3884
3920
|
}
|
|
3885
|
-
function
|
|
3921
|
+
function Bt({
|
|
3886
3922
|
data: e,
|
|
3887
3923
|
isLatest: t = !1,
|
|
3888
3924
|
t: o
|
|
3889
3925
|
}) {
|
|
3890
3926
|
const { colors: r } = M(), [i, a] = F(!1), l = e.results ?? [], { successCount: s, errorCount: c } = j(() => {
|
|
3891
|
-
let
|
|
3927
|
+
let R = 0, p = 0;
|
|
3892
3928
|
for (const y of l)
|
|
3893
|
-
y.error != null ?
|
|
3894
|
-
return { successCount:
|
|
3895
|
-
}, [l]), d = l.length,
|
|
3929
|
+
y.error != null ? p += 1 : R += 1;
|
|
3930
|
+
return { successCount: R, errorCount: p };
|
|
3931
|
+
}, [l]), d = l.length, m = e.input.query, g = l.length > 0 && l.every((R) => wt(R)), x = t && !g ? d === 1 ? k(o.scrapingPage, { query: m }) : k(o.scrapingPages, { n: d, query: m }) : d === 1 ? o.scrapedPage : k(o.scrapedPages, { n: d }), h = k(o.scrapeOkCount, { n: s }), S = c > 0 ? `${x} - ${h}, ${k(o.scrapeFailedCount, { n: c })}` : `${x} - ${h}`;
|
|
3896
3932
|
return d === 0 ? /* @__PURE__ */ n("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ n(
|
|
3897
3933
|
"div",
|
|
3898
3934
|
{
|
|
@@ -3903,7 +3939,7 @@ function Ft({
|
|
|
3903
3939
|
},
|
|
3904
3940
|
children: o.memorySearchExploreNoResults
|
|
3905
3941
|
}
|
|
3906
|
-
) }) : t ? /* @__PURE__ */
|
|
3942
|
+
) }) : t ? /* @__PURE__ */ u("div", { style: { paddingBlock: "10px" }, children: [
|
|
3907
3943
|
/* @__PURE__ */ n(
|
|
3908
3944
|
I.div,
|
|
3909
3945
|
{
|
|
@@ -3918,28 +3954,28 @@ function Ft({
|
|
|
3918
3954
|
gap: "6px 12px",
|
|
3919
3955
|
minWidth: 0
|
|
3920
3956
|
},
|
|
3921
|
-
children: t && !g ? /* @__PURE__ */ n(B, { text:
|
|
3957
|
+
children: t && !g ? /* @__PURE__ */ n(B, { text: S, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n(
|
|
3922
3958
|
"span",
|
|
3923
3959
|
{
|
|
3924
3960
|
style: {
|
|
3925
3961
|
fontSize: 12,
|
|
3926
3962
|
color: r.textSecondary
|
|
3927
3963
|
},
|
|
3928
|
-
children:
|
|
3964
|
+
children: S
|
|
3929
3965
|
}
|
|
3930
3966
|
)
|
|
3931
3967
|
}
|
|
3932
3968
|
),
|
|
3933
|
-
Le(l, r, (
|
|
3934
|
-
|
|
3969
|
+
Le(l, r, (R) => /* @__PURE__ */ n(
|
|
3970
|
+
At,
|
|
3935
3971
|
{
|
|
3936
|
-
item:
|
|
3972
|
+
item: R,
|
|
3937
3973
|
t: o,
|
|
3938
3974
|
isLatest: t
|
|
3939
3975
|
}
|
|
3940
3976
|
))
|
|
3941
|
-
] }) : /* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
3977
|
+
] }) : /* @__PURE__ */ u("div", { style: { paddingBlock: "10px" }, children: [
|
|
3978
|
+
/* @__PURE__ */ u(
|
|
3943
3979
|
I.div,
|
|
3944
3980
|
{
|
|
3945
3981
|
initial: { opacity: 0 },
|
|
@@ -3961,14 +3997,14 @@ function Ft({
|
|
|
3961
3997
|
fontSize: 12,
|
|
3962
3998
|
color: r.textSecondary
|
|
3963
3999
|
},
|
|
3964
|
-
children:
|
|
4000
|
+
children: S
|
|
3965
4001
|
}
|
|
3966
4002
|
),
|
|
3967
4003
|
/* @__PURE__ */ n(
|
|
3968
4004
|
"button",
|
|
3969
4005
|
{
|
|
3970
4006
|
type: "button",
|
|
3971
|
-
onClick: () => a((
|
|
4007
|
+
onClick: () => a((R) => !R),
|
|
3972
4008
|
style: {
|
|
3973
4009
|
border: "none",
|
|
3974
4010
|
background: "none",
|
|
@@ -3985,11 +4021,11 @@ function Ft({
|
|
|
3985
4021
|
]
|
|
3986
4022
|
}
|
|
3987
4023
|
),
|
|
3988
|
-
i && Le(l, r, (
|
|
4024
|
+
i && Le(l, r, (R) => /* @__PURE__ */ n(Pt, { item: R, t: o }))
|
|
3989
4025
|
] });
|
|
3990
4026
|
}
|
|
3991
|
-
const
|
|
3992
|
-
|
|
4027
|
+
const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.results === void 0 ? /* @__PURE__ */ n(
|
|
4028
|
+
Ft,
|
|
3993
4029
|
{
|
|
3994
4030
|
data: e,
|
|
3995
4031
|
isLatest: t,
|
|
@@ -3997,15 +4033,15 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
3997
4033
|
t: r
|
|
3998
4034
|
}
|
|
3999
4035
|
) : /* @__PURE__ */ n(
|
|
4000
|
-
|
|
4036
|
+
Bt,
|
|
4001
4037
|
{
|
|
4002
4038
|
data: e,
|
|
4003
4039
|
isLatest: t,
|
|
4004
4040
|
t: r
|
|
4005
4041
|
}
|
|
4006
|
-
),
|
|
4042
|
+
), Lt = (e) => {
|
|
4007
4043
|
const { colors: t } = M(), { isLatest: o = !1, durationSeconds: r, t: i } = e, a = i.memoryChatThinking;
|
|
4008
|
-
return /* @__PURE__ */
|
|
4044
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4009
4045
|
/* @__PURE__ */ n(
|
|
4010
4046
|
I.div,
|
|
4011
4047
|
{
|
|
@@ -4034,9 +4070,9 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4034
4070
|
}
|
|
4035
4071
|
)
|
|
4036
4072
|
] });
|
|
4037
|
-
},
|
|
4073
|
+
}, Dt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4038
4074
|
const i = `${r.generateReportSetup} '${e.userRequest}'`;
|
|
4039
|
-
return /* @__PURE__ */
|
|
4075
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4040
4076
|
/* @__PURE__ */ n(
|
|
4041
4077
|
I.div,
|
|
4042
4078
|
{
|
|
@@ -4074,11 +4110,11 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4074
4110
|
}
|
|
4075
4111
|
)
|
|
4076
4112
|
] });
|
|
4077
|
-
},
|
|
4113
|
+
}, Nt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4078
4114
|
const i = e.fileCount === 1 ? r.generateReportExportingOne : k(r.generateReportExporting, {
|
|
4079
4115
|
n: e.fileCount
|
|
4080
4116
|
});
|
|
4081
|
-
return /* @__PURE__ */
|
|
4117
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4082
4118
|
/* @__PURE__ */ n(
|
|
4083
4119
|
I.div,
|
|
4084
4120
|
{
|
|
@@ -4116,11 +4152,11 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4116
4152
|
}
|
|
4117
4153
|
)
|
|
4118
4154
|
] });
|
|
4119
|
-
},
|
|
4155
|
+
}, Ht = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4120
4156
|
const i = k(r.generateReportRunCode, {
|
|
4121
4157
|
title: e.title
|
|
4122
4158
|
});
|
|
4123
|
-
return /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4124
4160
|
/* @__PURE__ */ n(
|
|
4125
4161
|
I.div,
|
|
4126
4162
|
{
|
|
@@ -4162,7 +4198,7 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4162
4198
|
const i = k(r.generateReportRunCommand, {
|
|
4163
4199
|
title: e.title
|
|
4164
4200
|
});
|
|
4165
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4166
4202
|
/* @__PURE__ */ n(
|
|
4167
4203
|
I.div,
|
|
4168
4204
|
{
|
|
@@ -4200,11 +4236,11 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4200
4236
|
}
|
|
4201
4237
|
)
|
|
4202
4238
|
] });
|
|
4203
|
-
},
|
|
4239
|
+
}, $t = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4204
4240
|
const i = k(r.generateReportAssembling, {
|
|
4205
4241
|
title: e.reportTitle
|
|
4206
4242
|
});
|
|
4207
|
-
return /* @__PURE__ */
|
|
4243
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4208
4244
|
/* @__PURE__ */ n(
|
|
4209
4245
|
I.div,
|
|
4210
4246
|
{
|
|
@@ -4242,7 +4278,7 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4242
4278
|
}
|
|
4243
4279
|
)
|
|
4244
4280
|
] });
|
|
4245
|
-
},
|
|
4281
|
+
}, _t = ({ data: e, t }) => {
|
|
4246
4282
|
const o = k(t.generateReportCompleted, {
|
|
4247
4283
|
title: e.reportTitle
|
|
4248
4284
|
});
|
|
@@ -4261,10 +4297,10 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4261
4297
|
children: /* @__PURE__ */ n("span", { style: { color: "#666" }, children: o })
|
|
4262
4298
|
}
|
|
4263
4299
|
) });
|
|
4264
|
-
},
|
|
4265
|
-
|
|
4300
|
+
}, me = 12, ge = 1.45, Ot = Math.ceil(
|
|
4301
|
+
me * ge
|
|
4266
4302
|
), De = Math.ceil(
|
|
4267
|
-
5 *
|
|
4303
|
+
5 * me * ge
|
|
4268
4304
|
), oe = ({
|
|
4269
4305
|
text: e,
|
|
4270
4306
|
streaming: t = !1,
|
|
@@ -4272,8 +4308,8 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4272
4308
|
label: r,
|
|
4273
4309
|
monospace: i = !1
|
|
4274
4310
|
}) => {
|
|
4275
|
-
const { colors: a } = M(), l =
|
|
4276
|
-
return
|
|
4311
|
+
const { colors: a } = M(), l = H(null);
|
|
4312
|
+
return Cn(() => {
|
|
4277
4313
|
const s = l.current;
|
|
4278
4314
|
if (s == null || !t || e.length === 0)
|
|
4279
4315
|
return;
|
|
@@ -4281,7 +4317,7 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4281
4317
|
s.scrollTop = s.scrollHeight;
|
|
4282
4318
|
};
|
|
4283
4319
|
c(), requestAnimationFrame(c);
|
|
4284
|
-
}, [e, t]), /* @__PURE__ */
|
|
4320
|
+
}, [e, t]), /* @__PURE__ */ u("div", { style: { minWidth: 0 }, children: [
|
|
4285
4321
|
r != null && r.length > 0 && /* @__PURE__ */ n(
|
|
4286
4322
|
"span",
|
|
4287
4323
|
{
|
|
@@ -4310,7 +4346,7 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4310
4346
|
ref: l,
|
|
4311
4347
|
className: "memory-search-generating-reasoning-viewport",
|
|
4312
4348
|
style: {
|
|
4313
|
-
minHeight:
|
|
4349
|
+
minHeight: Ot,
|
|
4314
4350
|
...t ? {
|
|
4315
4351
|
maxHeight: De,
|
|
4316
4352
|
overflowY: "auto"
|
|
@@ -4320,8 +4356,8 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4320
4356
|
} : {},
|
|
4321
4357
|
height: "auto",
|
|
4322
4358
|
overflowX: "hidden",
|
|
4323
|
-
fontSize:
|
|
4324
|
-
lineHeight:
|
|
4359
|
+
fontSize: me,
|
|
4360
|
+
lineHeight: ge,
|
|
4325
4361
|
whiteSpace: "pre-wrap",
|
|
4326
4362
|
wordBreak: "break-word",
|
|
4327
4363
|
color: a.textTertiary,
|
|
@@ -4336,17 +4372,17 @@ const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4336
4372
|
)
|
|
4337
4373
|
] });
|
|
4338
4374
|
};
|
|
4339
|
-
function
|
|
4375
|
+
function be(e) {
|
|
4340
4376
|
return e.text != null && e.text.length > 0;
|
|
4341
4377
|
}
|
|
4342
4378
|
function le(e) {
|
|
4343
4379
|
return e.technicalReasoning != null && e.technicalReasoning.length > 0;
|
|
4344
4380
|
}
|
|
4345
|
-
function
|
|
4381
|
+
function Gt(e, t) {
|
|
4346
4382
|
const o = new Date(e).getTime(), r = new Date(t).getTime();
|
|
4347
4383
|
return Math.max(0, Math.round((r - o) / 1e3));
|
|
4348
4384
|
}
|
|
4349
|
-
const
|
|
4385
|
+
const qt = ({
|
|
4350
4386
|
data: e,
|
|
4351
4387
|
createdAt: t,
|
|
4352
4388
|
timestamp: o,
|
|
@@ -4354,9 +4390,9 @@ const Gt = ({
|
|
|
4354
4390
|
t: i,
|
|
4355
4391
|
onMemoryClick: a
|
|
4356
4392
|
}) => {
|
|
4357
|
-
const { colors: l } = M(), s = e.reasoningCompleted === !0 || r ||
|
|
4358
|
-
return /* @__PURE__ */
|
|
4359
|
-
/* @__PURE__ */
|
|
4393
|
+
const { colors: l } = M(), s = e.reasoningCompleted === !0 || r || be(e), c = !s, d = !le(e) && !be(e), [m, g] = F(!1), x = le(e) && e.reasoningCompleted !== !0, h = d && c, S = le(e) && !x, R = s ? Gt(t, o) : void 0;
|
|
4394
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4395
|
+
/* @__PURE__ */ u(
|
|
4360
4396
|
I.div,
|
|
4361
4397
|
{
|
|
4362
4398
|
style: {
|
|
@@ -4387,21 +4423,21 @@ const Gt = ({
|
|
|
4387
4423
|
]
|
|
4388
4424
|
}
|
|
4389
4425
|
),
|
|
4390
|
-
le(e) && /* @__PURE__ */
|
|
4426
|
+
le(e) && /* @__PURE__ */ u("div", { style: { marginTop: 8 }, children: [
|
|
4391
4427
|
/* @__PURE__ */ n(
|
|
4392
4428
|
oe,
|
|
4393
4429
|
{
|
|
4394
4430
|
text: e.technicalReasoning,
|
|
4395
4431
|
streaming: x,
|
|
4396
|
-
collapsed: !x && !
|
|
4432
|
+
collapsed: !x && !m,
|
|
4397
4433
|
label: i.memorySearchQueryReasoningLabel
|
|
4398
4434
|
}
|
|
4399
4435
|
),
|
|
4400
|
-
|
|
4436
|
+
S && /* @__PURE__ */ n(
|
|
4401
4437
|
"button",
|
|
4402
4438
|
{
|
|
4403
4439
|
type: "button",
|
|
4404
|
-
onClick: () => g((
|
|
4440
|
+
onClick: () => g((p) => !p),
|
|
4405
4441
|
style: {
|
|
4406
4442
|
alignSelf: "flex-start",
|
|
4407
4443
|
border: "none",
|
|
@@ -4413,18 +4449,18 @@ const Gt = ({
|
|
|
4413
4449
|
color: l.textSecondary,
|
|
4414
4450
|
textDecoration: "underline"
|
|
4415
4451
|
},
|
|
4416
|
-
children:
|
|
4452
|
+
children: m ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
|
|
4417
4453
|
}
|
|
4418
4454
|
)
|
|
4419
4455
|
] }),
|
|
4420
|
-
|
|
4456
|
+
be(e) && /* @__PURE__ */ n("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ n(
|
|
4421
4457
|
X,
|
|
4422
4458
|
{
|
|
4423
4459
|
text: e.text,
|
|
4424
4460
|
onMemoryClick: a
|
|
4425
4461
|
}
|
|
4426
4462
|
) }),
|
|
4427
|
-
|
|
4463
|
+
R !== void 0 && /* @__PURE__ */ n(
|
|
4428
4464
|
"div",
|
|
4429
4465
|
{
|
|
4430
4466
|
style: {
|
|
@@ -4433,20 +4469,20 @@ const Gt = ({
|
|
|
4433
4469
|
marginTop: "4px",
|
|
4434
4470
|
fontStyle: "italic"
|
|
4435
4471
|
},
|
|
4436
|
-
children: k(i.tookSeconds, { n:
|
|
4472
|
+
children: k(i.tookSeconds, { n: R })
|
|
4437
4473
|
}
|
|
4438
4474
|
)
|
|
4439
4475
|
] });
|
|
4440
4476
|
};
|
|
4441
|
-
function
|
|
4477
|
+
function Ut(e) {
|
|
4442
4478
|
const [t] = F(
|
|
4443
4479
|
() => e[Math.floor(Math.random() * e.length)] ?? e[0] ?? ""
|
|
4444
4480
|
);
|
|
4445
4481
|
return t;
|
|
4446
4482
|
}
|
|
4447
|
-
const
|
|
4448
|
-
const { colors: r } = M(), i = e && t === void 0, a =
|
|
4449
|
-
return /* @__PURE__ */
|
|
4483
|
+
const jt = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
4484
|
+
const { colors: r } = M(), i = e && t === void 0, a = Ut(o.exploreClassifyingPhrases) || o.exploreClassifying;
|
|
4485
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4450
4486
|
/* @__PURE__ */ n(
|
|
4451
4487
|
I.div,
|
|
4452
4488
|
{
|
|
@@ -4475,9 +4511,9 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4475
4511
|
}
|
|
4476
4512
|
)
|
|
4477
4513
|
] });
|
|
4478
|
-
},
|
|
4514
|
+
}, Kt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4479
4515
|
const { colors: i } = M(), a = e.fileCount === 1 ? r.exploreExportingOne : k(r.exploreExporting, { n: e.fileCount });
|
|
4480
|
-
return /* @__PURE__ */
|
|
4516
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4481
4517
|
/* @__PURE__ */ n(
|
|
4482
4518
|
I.div,
|
|
4483
4519
|
{
|
|
@@ -4506,11 +4542,11 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4506
4542
|
}
|
|
4507
4543
|
)
|
|
4508
4544
|
] });
|
|
4509
|
-
},
|
|
4545
|
+
}, Qt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4510
4546
|
const { colors: i } = M(), a = k(r.exploreFindMemoriesQuery, {
|
|
4511
4547
|
query: e.query
|
|
4512
4548
|
});
|
|
4513
|
-
return /* @__PURE__ */
|
|
4549
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4514
4550
|
/* @__PURE__ */ n(
|
|
4515
4551
|
I.div,
|
|
4516
4552
|
{
|
|
@@ -4518,9 +4554,9 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4518
4554
|
initial: { opacity: 0, y: -10 },
|
|
4519
4555
|
animate: { opacity: 1, y: 0 },
|
|
4520
4556
|
transition: { duration: 0.3, delay: 0 },
|
|
4521
|
-
children: t && !o ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */
|
|
4557
|
+
children: t && !o ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ u("span", { style: { color: i.textSecondary }, children: [
|
|
4522
4558
|
r.exploreFindMemoriesPrefix,
|
|
4523
|
-
/* @__PURE__ */
|
|
4559
|
+
/* @__PURE__ */ u("span", { style: { fontWeight: 600 }, children: [
|
|
4524
4560
|
"'",
|
|
4525
4561
|
e.query,
|
|
4526
4562
|
"'"
|
|
@@ -4541,12 +4577,12 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4541
4577
|
}
|
|
4542
4578
|
)
|
|
4543
4579
|
] });
|
|
4544
|
-
},
|
|
4545
|
-
const { colors: o } = M(), [r, i] = F(!1), a = e.memories.map((h) => h.memoryTitle), l = a.length > 0, s = l && a.length >
|
|
4580
|
+
}, ve = 5, Vt = ({ data: e, t }) => {
|
|
4581
|
+
const { colors: o } = M(), [r, i] = F(!1), a = e.memories.map((h) => h.memoryTitle), l = a.length > 0, s = l && a.length > ve, c = s && !r ? a.slice(0, ve) : a, d = a.length - ve, m = !s || r, g = a.length === 1 ? t.memoryFound : t.memoriesFoundPrefix, x = l ? `${g}${ue(
|
|
4546
4582
|
c,
|
|
4547
|
-
|
|
4583
|
+
m ? t.and : void 0
|
|
4548
4584
|
)}` : t.memoriesFound;
|
|
4549
|
-
return /* @__PURE__ */ n("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ n("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ u(
|
|
4550
4586
|
I.div,
|
|
4551
4587
|
{
|
|
4552
4588
|
style: { color: o.textSecondary },
|
|
@@ -4555,7 +4591,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4555
4591
|
transition: { duration: 0.3, delay: 0 },
|
|
4556
4592
|
children: [
|
|
4557
4593
|
/* @__PURE__ */ n("span", { style: { color: o.textSecondary }, children: x }),
|
|
4558
|
-
s && !r && /* @__PURE__ */
|
|
4594
|
+
s && !r && /* @__PURE__ */ u(G, { children: [
|
|
4559
4595
|
" ",
|
|
4560
4596
|
/* @__PURE__ */ n(
|
|
4561
4597
|
"button",
|
|
@@ -4579,7 +4615,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4579
4615
|
}
|
|
4580
4616
|
)
|
|
4581
4617
|
] }),
|
|
4582
|
-
s && r && /* @__PURE__ */
|
|
4618
|
+
s && r && /* @__PURE__ */ u(G, { children: [
|
|
4583
4619
|
" ",
|
|
4584
4620
|
/* @__PURE__ */ n(
|
|
4585
4621
|
"button",
|
|
@@ -4605,7 +4641,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4605
4641
|
}
|
|
4606
4642
|
) });
|
|
4607
4643
|
};
|
|
4608
|
-
function
|
|
4644
|
+
function Jt(e) {
|
|
4609
4645
|
return {
|
|
4610
4646
|
taskType: "MemoryChat",
|
|
4611
4647
|
eventType: "Search",
|
|
@@ -4613,8 +4649,8 @@ function Vt(e) {
|
|
|
4613
4649
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
4614
4650
|
};
|
|
4615
4651
|
}
|
|
4616
|
-
const
|
|
4617
|
-
const a =
|
|
4652
|
+
const Xt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, onSearchResultClick: i }) => {
|
|
4653
|
+
const a = Jt(e);
|
|
4618
4654
|
return e.items === void 0 ? /* @__PURE__ */ n(
|
|
4619
4655
|
te,
|
|
4620
4656
|
{
|
|
@@ -4623,7 +4659,7 @@ const Jt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, onSearchResul
|
|
|
4623
4659
|
durationSeconds: o,
|
|
4624
4660
|
t: r
|
|
4625
4661
|
}
|
|
4626
|
-
) : /* @__PURE__ */
|
|
4662
|
+
) : /* @__PURE__ */ u(G, { children: [
|
|
4627
4663
|
/* @__PURE__ */ n(
|
|
4628
4664
|
te,
|
|
4629
4665
|
{
|
|
@@ -4635,7 +4671,7 @@ const Jt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, onSearchResul
|
|
|
4635
4671
|
}
|
|
4636
4672
|
),
|
|
4637
4673
|
/* @__PURE__ */ n(
|
|
4638
|
-
|
|
4674
|
+
pe,
|
|
4639
4675
|
{
|
|
4640
4676
|
data: {
|
|
4641
4677
|
taskType: "MemoryChat",
|
|
@@ -4649,20 +4685,20 @@ const Jt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, onSearchResul
|
|
|
4649
4685
|
)
|
|
4650
4686
|
] });
|
|
4651
4687
|
};
|
|
4652
|
-
function
|
|
4688
|
+
function Yt({
|
|
4653
4689
|
memory: e,
|
|
4654
4690
|
completed: t
|
|
4655
4691
|
}) {
|
|
4656
4692
|
return e.error != null ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : e.summary != null ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : t ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
4657
4693
|
}
|
|
4658
4694
|
const Ne = 80;
|
|
4659
|
-
function
|
|
4695
|
+
function Zt({
|
|
4660
4696
|
memory: e,
|
|
4661
4697
|
completed: t,
|
|
4662
4698
|
t: o
|
|
4663
4699
|
}) {
|
|
4664
|
-
const { colors: r } = M(), [i, a] = F(!1), l = e.summary ?? e.error, s = l != null && l.length > Ne, c = l != null ? i || !s ? l : `${l.slice(0, Ne)}...` : void 0, d = s,
|
|
4665
|
-
return /* @__PURE__ */
|
|
4700
|
+
const { colors: r } = M(), [i, a] = F(!1), l = e.summary ?? e.error, s = l != null && l.length > Ne, c = l != null ? i || !s ? l : `${l.slice(0, Ne)}...` : void 0, d = s, m = e.error != null;
|
|
4701
|
+
return /* @__PURE__ */ u(
|
|
4666
4702
|
I.div,
|
|
4667
4703
|
{
|
|
4668
4704
|
initial: { opacity: 0 },
|
|
@@ -4691,10 +4727,10 @@ function Yt({
|
|
|
4691
4727
|
flexShrink: 0,
|
|
4692
4728
|
width: 32
|
|
4693
4729
|
},
|
|
4694
|
-
children: /* @__PURE__ */ n(
|
|
4730
|
+
children: /* @__PURE__ */ n(Yt, { memory: e, completed: t })
|
|
4695
4731
|
}
|
|
4696
4732
|
),
|
|
4697
|
-
/* @__PURE__ */
|
|
4733
|
+
/* @__PURE__ */ u(
|
|
4698
4734
|
"div",
|
|
4699
4735
|
{
|
|
4700
4736
|
style: {
|
|
@@ -4720,7 +4756,7 @@ function Yt({
|
|
|
4720
4756
|
{
|
|
4721
4757
|
style: {
|
|
4722
4758
|
fontSize: 12,
|
|
4723
|
-
color:
|
|
4759
|
+
color: m ? r.textError : r.textSecondary,
|
|
4724
4760
|
lineHeight: 1.4,
|
|
4725
4761
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
4726
4762
|
},
|
|
@@ -4745,9 +4781,9 @@ function Yt({
|
|
|
4745
4781
|
}
|
|
4746
4782
|
);
|
|
4747
4783
|
}
|
|
4748
|
-
const
|
|
4784
|
+
const er = ({ data: e, completed: t, t: o }) => {
|
|
4749
4785
|
const { colors: r } = M();
|
|
4750
|
-
return /* @__PURE__ */
|
|
4786
|
+
return /* @__PURE__ */ u("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
4751
4787
|
/* @__PURE__ */ n(
|
|
4752
4788
|
"div",
|
|
4753
4789
|
{
|
|
@@ -4761,7 +4797,7 @@ const Zt = ({ data: e, completed: t, t: o }) => {
|
|
|
4761
4797
|
}
|
|
4762
4798
|
),
|
|
4763
4799
|
e.memories.map((i) => /* @__PURE__ */ n(
|
|
4764
|
-
|
|
4800
|
+
Zt,
|
|
4765
4801
|
{
|
|
4766
4802
|
memory: i,
|
|
4767
4803
|
completed: t,
|
|
@@ -4774,14 +4810,14 @@ const Zt = ({ data: e, completed: t, t: o }) => {
|
|
|
4774
4810
|
function se(e) {
|
|
4775
4811
|
return e.code != null && e.code.length > 0;
|
|
4776
4812
|
}
|
|
4777
|
-
const
|
|
4813
|
+
const nr = ({
|
|
4778
4814
|
data: e,
|
|
4779
4815
|
durationSeconds: t,
|
|
4780
4816
|
completed: o = !1,
|
|
4781
4817
|
t: r
|
|
4782
4818
|
}) => {
|
|
4783
|
-
const { colors: i } = M(), a = k(r.exploreRunCode, { title: e.title }), s = !(e.runCompleted === !0 || e.runCompleted === void 0 && (o || t !== void 0)), c = se(e) && e.codeCompleted !== !0 && s, d = s, [
|
|
4784
|
-
return /* @__PURE__ */
|
|
4819
|
+
const { colors: i } = M(), a = k(r.exploreRunCode, { title: e.title }), s = !(e.runCompleted === !0 || e.runCompleted === void 0 && (o || t !== void 0)), c = se(e) && e.codeCompleted !== !0 && s, d = s, [m, g] = F(!1), x = se(e) && !c;
|
|
4820
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4785
4821
|
/* @__PURE__ */ n(
|
|
4786
4822
|
I.div,
|
|
4787
4823
|
{
|
|
@@ -4798,13 +4834,13 @@ const er = ({
|
|
|
4798
4834
|
children: d ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
4799
4835
|
}
|
|
4800
4836
|
),
|
|
4801
|
-
se(e) && /* @__PURE__ */
|
|
4837
|
+
se(e) && /* @__PURE__ */ u("div", { style: { marginTop: 0 }, children: [
|
|
4802
4838
|
/* @__PURE__ */ n(
|
|
4803
4839
|
oe,
|
|
4804
4840
|
{
|
|
4805
4841
|
text: e.code,
|
|
4806
4842
|
streaming: c,
|
|
4807
|
-
collapsed: !c && !
|
|
4843
|
+
collapsed: !c && !m,
|
|
4808
4844
|
monospace: !0
|
|
4809
4845
|
}
|
|
4810
4846
|
),
|
|
@@ -4824,7 +4860,7 @@ const er = ({
|
|
|
4824
4860
|
color: i.textSecondary,
|
|
4825
4861
|
textDecoration: "underline"
|
|
4826
4862
|
},
|
|
4827
|
-
children:
|
|
4863
|
+
children: m ? r.exploreHideCode : r.exploreViewCode
|
|
4828
4864
|
}
|
|
4829
4865
|
)
|
|
4830
4866
|
] }),
|
|
@@ -4845,15 +4881,15 @@ const er = ({
|
|
|
4845
4881
|
function ce(e) {
|
|
4846
4882
|
return e.reasoning != null && e.reasoning.length > 0;
|
|
4847
4883
|
}
|
|
4848
|
-
const
|
|
4884
|
+
const tr = ({
|
|
4849
4885
|
data: e,
|
|
4850
4886
|
isLatest: t = !1,
|
|
4851
4887
|
durationSeconds: o,
|
|
4852
4888
|
completed: r = !1,
|
|
4853
4889
|
t: i
|
|
4854
4890
|
}) => {
|
|
4855
|
-
const { colors: a } = M(), s = !(e.reasoningCompleted === !0 || r || o !== void 0), c = ce(e) && e.reasoningCompleted !== !0 && s, d = s && t, [
|
|
4856
|
-
return /* @__PURE__ */
|
|
4891
|
+
const { colors: a } = M(), s = !(e.reasoningCompleted === !0 || r || o !== void 0), c = ce(e) && e.reasoningCompleted !== !0 && s, d = s && t, [m, g] = F(!1), x = ce(e) && !c, h = i.memoryChatThinking;
|
|
4892
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
4857
4893
|
/* @__PURE__ */ n(
|
|
4858
4894
|
I.div,
|
|
4859
4895
|
{
|
|
@@ -4870,13 +4906,13 @@ const nr = ({
|
|
|
4870
4906
|
children: d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: h })
|
|
4871
4907
|
}
|
|
4872
4908
|
),
|
|
4873
|
-
ce(e) && /* @__PURE__ */
|
|
4909
|
+
ce(e) && /* @__PURE__ */ u("div", { style: { marginTop: 0 }, children: [
|
|
4874
4910
|
/* @__PURE__ */ n(
|
|
4875
4911
|
oe,
|
|
4876
4912
|
{
|
|
4877
4913
|
text: e.reasoning,
|
|
4878
4914
|
streaming: c,
|
|
4879
|
-
collapsed: !c && !
|
|
4915
|
+
collapsed: !c && !m,
|
|
4880
4916
|
label: i.memorySearchQueryReasoningLabel
|
|
4881
4917
|
}
|
|
4882
4918
|
),
|
|
@@ -4884,7 +4920,7 @@ const nr = ({
|
|
|
4884
4920
|
"button",
|
|
4885
4921
|
{
|
|
4886
4922
|
type: "button",
|
|
4887
|
-
onClick: () => g((
|
|
4923
|
+
onClick: () => g((S) => !S),
|
|
4888
4924
|
style: {
|
|
4889
4925
|
alignSelf: "flex-start",
|
|
4890
4926
|
border: "none",
|
|
@@ -4896,7 +4932,7 @@ const nr = ({
|
|
|
4896
4932
|
color: a.textSecondary,
|
|
4897
4933
|
textDecoration: "underline"
|
|
4898
4934
|
},
|
|
4899
|
-
children:
|
|
4935
|
+
children: m ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
|
|
4900
4936
|
}
|
|
4901
4937
|
)
|
|
4902
4938
|
] }),
|
|
@@ -4914,18 +4950,18 @@ const nr = ({
|
|
|
4914
4950
|
)
|
|
4915
4951
|
] });
|
|
4916
4952
|
};
|
|
4917
|
-
function
|
|
4953
|
+
function rr({
|
|
4918
4954
|
section: e,
|
|
4919
4955
|
allCompleted: t
|
|
4920
4956
|
}) {
|
|
4921
4957
|
return e.completed || t ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
4922
4958
|
}
|
|
4923
|
-
function
|
|
4959
|
+
function or({
|
|
4924
4960
|
section: e,
|
|
4925
4961
|
allCompleted: t
|
|
4926
4962
|
}) {
|
|
4927
4963
|
const { colors: o } = M();
|
|
4928
|
-
return /* @__PURE__ */
|
|
4964
|
+
return /* @__PURE__ */ u(
|
|
4929
4965
|
I.div,
|
|
4930
4966
|
{
|
|
4931
4967
|
initial: { opacity: 0 },
|
|
@@ -4952,7 +4988,7 @@ function rr({
|
|
|
4952
4988
|
flexShrink: 0,
|
|
4953
4989
|
width: 32
|
|
4954
4990
|
},
|
|
4955
|
-
children: /* @__PURE__ */ n(
|
|
4991
|
+
children: /* @__PURE__ */ n(rr, { section: e, allCompleted: t })
|
|
4956
4992
|
}
|
|
4957
4993
|
),
|
|
4958
4994
|
/* @__PURE__ */ n(
|
|
@@ -4970,11 +5006,11 @@ function rr({
|
|
|
4970
5006
|
}
|
|
4971
5007
|
);
|
|
4972
5008
|
}
|
|
4973
|
-
const
|
|
5009
|
+
const ir = ({ data: e, completed: t, durationSeconds: o, t: r }) => {
|
|
4974
5010
|
const { colors: i } = M(), a = k(r.exploreComposeHtmlReport, {
|
|
4975
5011
|
title: e.title
|
|
4976
|
-
}), l = e.sections ?? [], c = e.reportCompleted === !0 || e.reportCompleted === void 0 && t || l.length > 0 && l.every((
|
|
4977
|
-
return /* @__PURE__ */
|
|
5012
|
+
}), l = e.sections ?? [], c = e.reportCompleted === !0 || e.reportCompleted === void 0 && t || l.length > 0 && l.every((m) => m.completed), d = !c;
|
|
5013
|
+
return /* @__PURE__ */ u("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
4978
5014
|
/* @__PURE__ */ n(
|
|
4979
5015
|
I.div,
|
|
4980
5016
|
{
|
|
@@ -4991,13 +5027,13 @@ const or = ({ data: e, completed: t, durationSeconds: o, t: r }) => {
|
|
|
4991
5027
|
children: d ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
4992
5028
|
}
|
|
4993
5029
|
),
|
|
4994
|
-
l.map((
|
|
4995
|
-
|
|
5030
|
+
l.map((m) => /* @__PURE__ */ n(
|
|
5031
|
+
or,
|
|
4996
5032
|
{
|
|
4997
|
-
section:
|
|
5033
|
+
section: m,
|
|
4998
5034
|
allCompleted: c
|
|
4999
5035
|
},
|
|
5000
|
-
|
|
5036
|
+
m.title
|
|
5001
5037
|
)),
|
|
5002
5038
|
o !== void 0 && /* @__PURE__ */ n(
|
|
5003
5039
|
"div",
|
|
@@ -5012,7 +5048,7 @@ const or = ({ data: e, completed: t, durationSeconds: o, t: r }) => {
|
|
|
5012
5048
|
}
|
|
5013
5049
|
)
|
|
5014
5050
|
] });
|
|
5015
|
-
},
|
|
5051
|
+
}, ar = ({ data: e, onSourceClick: t, t: o }) => /* @__PURE__ */ n(
|
|
5016
5052
|
Ye,
|
|
5017
5053
|
{
|
|
5018
5054
|
data: {
|
|
@@ -5027,15 +5063,15 @@ const or = ({ data: e, completed: t, durationSeconds: o, t: r }) => {
|
|
|
5027
5063
|
function de(e) {
|
|
5028
5064
|
return e.reasoning != null && e.reasoning.length > 0;
|
|
5029
5065
|
}
|
|
5030
|
-
const
|
|
5066
|
+
const lr = ({
|
|
5031
5067
|
data: e,
|
|
5032
5068
|
isLatest: t = !1,
|
|
5033
5069
|
durationSeconds: o,
|
|
5034
5070
|
completed: r = !1,
|
|
5035
5071
|
t: i
|
|
5036
5072
|
}) => {
|
|
5037
|
-
const { colors: a } = M(), s = !(e.reasoningCompleted === !0 || r || o !== void 0), c = de(e) && e.reasoningCompleted !== !0 && s, d = s && t, [
|
|
5038
|
-
return /* @__PURE__ */
|
|
5073
|
+
const { colors: a } = M(), s = !(e.reasoningCompleted === !0 || r || o !== void 0), c = de(e) && e.reasoningCompleted !== !0 && s, d = s && t, [m, g] = F(!1), x = de(e) && !c, h = i.memoryChatThinking;
|
|
5074
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
5039
5075
|
/* @__PURE__ */ n(
|
|
5040
5076
|
I.div,
|
|
5041
5077
|
{
|
|
@@ -5052,13 +5088,13 @@ const ar = ({
|
|
|
5052
5088
|
children: d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: h })
|
|
5053
5089
|
}
|
|
5054
5090
|
),
|
|
5055
|
-
de(e) && /* @__PURE__ */
|
|
5091
|
+
de(e) && /* @__PURE__ */ u("div", { style: { marginTop: 0 }, children: [
|
|
5056
5092
|
/* @__PURE__ */ n(
|
|
5057
5093
|
oe,
|
|
5058
5094
|
{
|
|
5059
5095
|
text: e.reasoning,
|
|
5060
5096
|
streaming: c,
|
|
5061
|
-
collapsed: !c && !
|
|
5097
|
+
collapsed: !c && !m,
|
|
5062
5098
|
label: i.memorySearchQueryReasoningLabel
|
|
5063
5099
|
}
|
|
5064
5100
|
),
|
|
@@ -5066,7 +5102,7 @@ const ar = ({
|
|
|
5066
5102
|
"button",
|
|
5067
5103
|
{
|
|
5068
5104
|
type: "button",
|
|
5069
|
-
onClick: () => g((
|
|
5105
|
+
onClick: () => g((S) => !S),
|
|
5070
5106
|
style: {
|
|
5071
5107
|
alignSelf: "flex-start",
|
|
5072
5108
|
border: "none",
|
|
@@ -5078,7 +5114,7 @@ const ar = ({
|
|
|
5078
5114
|
color: a.textSecondary,
|
|
5079
5115
|
textDecoration: "underline"
|
|
5080
5116
|
},
|
|
5081
|
-
children:
|
|
5117
|
+
children: m ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
|
|
5082
5118
|
}
|
|
5083
5119
|
)
|
|
5084
5120
|
] }),
|
|
@@ -5096,10 +5132,10 @@ const ar = ({
|
|
|
5096
5132
|
)
|
|
5097
5133
|
] });
|
|
5098
5134
|
};
|
|
5099
|
-
function
|
|
5135
|
+
function sr(e) {
|
|
5100
5136
|
return e === "SUCCESS";
|
|
5101
5137
|
}
|
|
5102
|
-
function
|
|
5138
|
+
function cr(e) {
|
|
5103
5139
|
if (e == null || typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0)
|
|
5104
5140
|
return null;
|
|
5105
5141
|
try {
|
|
@@ -5108,15 +5144,15 @@ function sr(e) {
|
|
|
5108
5144
|
return String(e);
|
|
5109
5145
|
}
|
|
5110
5146
|
}
|
|
5111
|
-
const
|
|
5147
|
+
const dr = ({
|
|
5112
5148
|
data: e,
|
|
5113
5149
|
isLatest: t = !1,
|
|
5114
5150
|
durationSeconds: o,
|
|
5115
5151
|
t: r
|
|
5116
5152
|
}) => {
|
|
5117
|
-
const { colors: i } = M(), [a, l] = F(!1), s = e.eventType === "AutoActionCallSettled", c = e.eventType === "AutoActionCallRequested" ? e.action : e.action ?? e.actionCallId, d = (e.eventType === "AutoActionCallRequested", e.input),
|
|
5118
|
-
return /* @__PURE__ */
|
|
5119
|
-
/* @__PURE__ */
|
|
5153
|
+
const { colors: i } = M(), [a, l] = F(!1), s = e.eventType === "AutoActionCallSettled", c = e.eventType === "AutoActionCallRequested" ? e.action : e.action ?? e.actionCallId, d = (e.eventType === "AutoActionCallRequested", e.input), m = j(() => cr(d), [d]), g = !s, x = s && !sr(e.status), h = g ? k(r.exploreProductRunningAction, { action: c }) : x ? k(r.exploreProductActionFailed, { action: c }) : k(r.exploreProductRanAction, { action: c });
|
|
5154
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
5155
|
+
/* @__PURE__ */ u(
|
|
5120
5156
|
I.div,
|
|
5121
5157
|
{
|
|
5122
5158
|
style: {
|
|
@@ -5145,12 +5181,12 @@ const cr = ({
|
|
|
5145
5181
|
]
|
|
5146
5182
|
}
|
|
5147
5183
|
),
|
|
5148
|
-
|
|
5184
|
+
m != null && /* @__PURE__ */ u("div", { style: { marginTop: 8, marginLeft: 42 }, children: [
|
|
5149
5185
|
/* @__PURE__ */ n(
|
|
5150
5186
|
"button",
|
|
5151
5187
|
{
|
|
5152
5188
|
type: "button",
|
|
5153
|
-
onClick: () => l((
|
|
5189
|
+
onClick: () => l((S) => !S),
|
|
5154
5190
|
style: {
|
|
5155
5191
|
border: "none",
|
|
5156
5192
|
background: "none",
|
|
@@ -5180,7 +5216,7 @@ const cr = ({
|
|
|
5180
5216
|
whiteSpace: "pre-wrap",
|
|
5181
5217
|
wordBreak: "break-word"
|
|
5182
5218
|
},
|
|
5183
|
-
children:
|
|
5219
|
+
children: m
|
|
5184
5220
|
}
|
|
5185
5221
|
)
|
|
5186
5222
|
] }),
|
|
@@ -5199,7 +5235,7 @@ const cr = ({
|
|
|
5199
5235
|
)
|
|
5200
5236
|
] });
|
|
5201
5237
|
};
|
|
5202
|
-
function
|
|
5238
|
+
function He(e) {
|
|
5203
5239
|
if (e == null || typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0)
|
|
5204
5240
|
return null;
|
|
5205
5241
|
try {
|
|
@@ -5208,16 +5244,16 @@ function We(e) {
|
|
|
5208
5244
|
return String(e);
|
|
5209
5245
|
}
|
|
5210
5246
|
}
|
|
5211
|
-
const
|
|
5212
|
-
const { colors: a } = M(), [l, s] = F(!1), c = e.actions.map((h) => h.name).join(", "), d = k(i.exploreProductAskingApproval, { names: c }),
|
|
5247
|
+
const ur = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1, t: i }) => {
|
|
5248
|
+
const { colors: a } = M(), [l, s] = F(!1), c = e.actions.map((h) => h.name).join(", "), d = k(i.exploreProductAskingApproval, { names: c }), m = !!e.provisional || !r && o === void 0 && t, g = !e.provisional && e.actions.some((h) => He(h.input) != null), x = j(
|
|
5213
5249
|
() => e.actions.map((h) => ({
|
|
5214
5250
|
name: h.name,
|
|
5215
|
-
inputJson:
|
|
5251
|
+
inputJson: He(h.input)
|
|
5216
5252
|
})),
|
|
5217
5253
|
[e.actions]
|
|
5218
5254
|
);
|
|
5219
|
-
return /* @__PURE__ */
|
|
5220
|
-
/* @__PURE__ */
|
|
5255
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
5256
|
+
/* @__PURE__ */ u(
|
|
5221
5257
|
I.div,
|
|
5222
5258
|
{
|
|
5223
5259
|
style: {
|
|
@@ -5239,14 +5275,14 @@ const dr = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1,
|
|
|
5239
5275
|
justifyContent: "center",
|
|
5240
5276
|
flexShrink: 0
|
|
5241
5277
|
},
|
|
5242
|
-
children:
|
|
5278
|
+
children: m ? /* @__PURE__ */ n("div", { className: "explore-memory-loader", "aria-hidden": !0 }) : /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 })
|
|
5243
5279
|
}
|
|
5244
5280
|
),
|
|
5245
|
-
|
|
5281
|
+
m ? /* @__PURE__ */ n(B, { text: d, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: d })
|
|
5246
5282
|
]
|
|
5247
5283
|
}
|
|
5248
5284
|
),
|
|
5249
|
-
g && /* @__PURE__ */
|
|
5285
|
+
g && /* @__PURE__ */ u("div", { style: { marginTop: 8, marginLeft: 42 }, children: [
|
|
5250
5286
|
/* @__PURE__ */ n(
|
|
5251
5287
|
"button",
|
|
5252
5288
|
{
|
|
@@ -5264,7 +5300,7 @@ const dr = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1,
|
|
|
5264
5300
|
children: l ? i.memorySearchHideExploreResults : i.memorySearchViewExploreResults
|
|
5265
5301
|
}
|
|
5266
5302
|
),
|
|
5267
|
-
l && /* @__PURE__ */ n("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 8 }, children: x.map((h) => /* @__PURE__ */
|
|
5303
|
+
l && /* @__PURE__ */ n("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 8 }, children: x.map((h) => /* @__PURE__ */ u("div", { children: [
|
|
5268
5304
|
/* @__PURE__ */ n(
|
|
5269
5305
|
"div",
|
|
5270
5306
|
{
|
|
@@ -5313,7 +5349,7 @@ const dr = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1,
|
|
|
5313
5349
|
)
|
|
5314
5350
|
] });
|
|
5315
5351
|
};
|
|
5316
|
-
class tn extends
|
|
5352
|
+
class tn extends vn.Component {
|
|
5317
5353
|
constructor(t) {
|
|
5318
5354
|
super(t), this.state = { hasError: !1 };
|
|
5319
5355
|
}
|
|
@@ -5332,7 +5368,7 @@ class tn extends bn.Component {
|
|
|
5332
5368
|
return this.state.hasError ? null : this.props.children;
|
|
5333
5369
|
}
|
|
5334
5370
|
}
|
|
5335
|
-
function
|
|
5371
|
+
function We({ text: e }) {
|
|
5336
5372
|
const { colors: t } = M();
|
|
5337
5373
|
return /* @__PURE__ */ n("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ n(
|
|
5338
5374
|
I.div,
|
|
@@ -5352,7 +5388,7 @@ function He({ text: e }) {
|
|
|
5352
5388
|
}
|
|
5353
5389
|
function $e({ name: e, t }) {
|
|
5354
5390
|
const { colors: o } = M(), r = k(t.exploreProductRenderingComponent, { name: e });
|
|
5355
|
-
return /* @__PURE__ */ n("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */
|
|
5391
|
+
return /* @__PURE__ */ n("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ u(
|
|
5356
5392
|
I.div,
|
|
5357
5393
|
{
|
|
5358
5394
|
style: {
|
|
@@ -5382,7 +5418,7 @@ function $e({ name: e, t }) {
|
|
|
5382
5418
|
}
|
|
5383
5419
|
) });
|
|
5384
5420
|
}
|
|
5385
|
-
const
|
|
5421
|
+
const pr = ({ data: e, components: t, t: o }) => {
|
|
5386
5422
|
const r = t == null ? void 0 : t[e.name], [i, a] = F({ status: "pending" });
|
|
5387
5423
|
return V(() => {
|
|
5388
5424
|
if (e.provisional) {
|
|
@@ -5406,14 +5442,14 @@ const ur = ({ data: e, components: t, t: o }) => {
|
|
|
5406
5442
|
l = !0;
|
|
5407
5443
|
};
|
|
5408
5444
|
}, [r, e.input, e.provisional]), e.provisional ? /* @__PURE__ */ n($e, { name: e.name, t: o }) : !r || i.status === "unknown" ? /* @__PURE__ */ n(
|
|
5409
|
-
|
|
5445
|
+
We,
|
|
5410
5446
|
{
|
|
5411
5447
|
text: k(o.exploreProductUnknownComponent, {
|
|
5412
5448
|
name: e.name
|
|
5413
5449
|
})
|
|
5414
5450
|
}
|
|
5415
5451
|
) : i.status === "invalid" ? /* @__PURE__ */ n(
|
|
5416
|
-
|
|
5452
|
+
We,
|
|
5417
5453
|
{
|
|
5418
5454
|
text: k(o.exploreProductInvalidComponent, {
|
|
5419
5455
|
name: e.name
|
|
@@ -5432,22 +5468,144 @@ const ur = ({ data: e, components: t, t: o }) => {
|
|
|
5432
5468
|
},
|
|
5433
5469
|
e.renderCallId
|
|
5434
5470
|
);
|
|
5471
|
+
}, mr = 3;
|
|
5472
|
+
function gr(e) {
|
|
5473
|
+
return {
|
|
5474
|
+
taskType: "MemoryChat",
|
|
5475
|
+
eventType: "Search",
|
|
5476
|
+
queryDescription: e.query
|
|
5477
|
+
};
|
|
5478
|
+
}
|
|
5479
|
+
function yr(e, t) {
|
|
5480
|
+
const o = e.trim();
|
|
5481
|
+
return o ? `${t.searchingPrefix}${o}` : t.searchingPrefix.replace(/:\s*$/, "...");
|
|
5482
|
+
}
|
|
5483
|
+
function rn({
|
|
5484
|
+
name: e,
|
|
5485
|
+
durationSeconds: t,
|
|
5486
|
+
t: o,
|
|
5487
|
+
indent: r
|
|
5488
|
+
}) {
|
|
5489
|
+
const { colors: i } = M(), a = t !== void 0 ? k(o.tookSeconds, { n: t }) : null;
|
|
5490
|
+
return /* @__PURE__ */ u(
|
|
5491
|
+
"div",
|
|
5492
|
+
{
|
|
5493
|
+
style: {
|
|
5494
|
+
fontSize: "11px",
|
|
5495
|
+
color: i.textMuted,
|
|
5496
|
+
marginTop: "4px",
|
|
5497
|
+
marginLeft: r,
|
|
5498
|
+
fontStyle: "italic"
|
|
5499
|
+
},
|
|
5500
|
+
children: [
|
|
5501
|
+
e,
|
|
5502
|
+
a != null ? ` - ${a}` : ""
|
|
5503
|
+
]
|
|
5504
|
+
}
|
|
5505
|
+
);
|
|
5506
|
+
}
|
|
5507
|
+
function hr({
|
|
5508
|
+
query: e,
|
|
5509
|
+
name: t,
|
|
5510
|
+
isLatest: o,
|
|
5511
|
+
durationSeconds: r,
|
|
5512
|
+
t: i
|
|
5513
|
+
}) {
|
|
5514
|
+
const { colors: a } = M(), l = yr(e, i), s = o && r === void 0;
|
|
5515
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
5516
|
+
/* @__PURE__ */ u(
|
|
5517
|
+
I.div,
|
|
5518
|
+
{
|
|
5519
|
+
style: {
|
|
5520
|
+
display: "flex",
|
|
5521
|
+
alignItems: "center",
|
|
5522
|
+
gap: "10px",
|
|
5523
|
+
color: a.textSecondary
|
|
5524
|
+
},
|
|
5525
|
+
initial: { opacity: 0, y: -10 },
|
|
5526
|
+
animate: { opacity: 1, y: 0 },
|
|
5527
|
+
transition: { duration: 0.3, delay: 0 },
|
|
5528
|
+
children: [
|
|
5529
|
+
/* @__PURE__ */ n(
|
|
5530
|
+
"div",
|
|
5531
|
+
{
|
|
5532
|
+
style: {
|
|
5533
|
+
width: 32,
|
|
5534
|
+
display: "flex",
|
|
5535
|
+
justifyContent: "center",
|
|
5536
|
+
flexShrink: 0
|
|
5537
|
+
},
|
|
5538
|
+
children: s ? /* @__PURE__ */ n("div", { className: "explore-memory-loader", "aria-hidden": !0 }) : null
|
|
5539
|
+
}
|
|
5540
|
+
),
|
|
5541
|
+
s ? /* @__PURE__ */ n(B, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: l })
|
|
5542
|
+
]
|
|
5543
|
+
}
|
|
5544
|
+
),
|
|
5545
|
+
/* @__PURE__ */ n(
|
|
5546
|
+
rn,
|
|
5547
|
+
{
|
|
5548
|
+
name: t,
|
|
5549
|
+
durationSeconds: r,
|
|
5550
|
+
t: i,
|
|
5551
|
+
indent: 42
|
|
5552
|
+
}
|
|
5553
|
+
)
|
|
5554
|
+
] });
|
|
5555
|
+
}
|
|
5556
|
+
const fr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, onSearchResultClick: i }) => {
|
|
5557
|
+
const a = gr(e);
|
|
5558
|
+
return e.items === void 0 ? /* @__PURE__ */ n(
|
|
5559
|
+
hr,
|
|
5560
|
+
{
|
|
5561
|
+
query: e.query,
|
|
5562
|
+
name: e.name,
|
|
5563
|
+
isLatest: t,
|
|
5564
|
+
durationSeconds: o,
|
|
5565
|
+
t: r
|
|
5566
|
+
}
|
|
5567
|
+
) : /* @__PURE__ */ u(G, { children: [
|
|
5568
|
+
/* @__PURE__ */ n(
|
|
5569
|
+
te,
|
|
5570
|
+
{
|
|
5571
|
+
data: a,
|
|
5572
|
+
isLatest: !1,
|
|
5573
|
+
t: r,
|
|
5574
|
+
compactBelow: !0
|
|
5575
|
+
}
|
|
5576
|
+
),
|
|
5577
|
+
/* @__PURE__ */ n(rn, { name: e.name, durationSeconds: o, t: r }),
|
|
5578
|
+
/* @__PURE__ */ n(
|
|
5579
|
+
pe,
|
|
5580
|
+
{
|
|
5581
|
+
data: {
|
|
5582
|
+
taskType: "MemoryChat",
|
|
5583
|
+
eventType: "ChunkResults",
|
|
5584
|
+
items: e.items
|
|
5585
|
+
},
|
|
5586
|
+
onSearchResultClick: i,
|
|
5587
|
+
t: r,
|
|
5588
|
+
compactTop: !0,
|
|
5589
|
+
maxVisibleGroups: mr
|
|
5590
|
+
}
|
|
5591
|
+
)
|
|
5592
|
+
] });
|
|
5435
5593
|
};
|
|
5436
|
-
function
|
|
5594
|
+
function xr({ item: e }) {
|
|
5437
5595
|
return e.error != null ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
5438
5596
|
}
|
|
5439
|
-
function
|
|
5597
|
+
function kr(e, t) {
|
|
5440
5598
|
return k(t.searchingInMemoriesOfType, {
|
|
5441
5599
|
name: e.memoryTypeName
|
|
5442
5600
|
});
|
|
5443
5601
|
}
|
|
5444
|
-
function
|
|
5602
|
+
function Sr({
|
|
5445
5603
|
item: e,
|
|
5446
5604
|
t,
|
|
5447
5605
|
showShimmerForPrimary: o
|
|
5448
5606
|
}) {
|
|
5449
|
-
const { colors: r } = M(), i = e.result != null, a = e.error != null, l =
|
|
5450
|
-
return /* @__PURE__ */
|
|
5607
|
+
const { colors: r } = M(), i = e.result != null, a = e.error != null, l = kr(e, t);
|
|
5608
|
+
return /* @__PURE__ */ u(
|
|
5451
5609
|
I.div,
|
|
5452
5610
|
{
|
|
5453
5611
|
initial: { opacity: 0 },
|
|
@@ -5474,10 +5632,10 @@ function gr({
|
|
|
5474
5632
|
flexShrink: 0,
|
|
5475
5633
|
width: 32
|
|
5476
5634
|
},
|
|
5477
|
-
children: /* @__PURE__ */ n(
|
|
5635
|
+
children: /* @__PURE__ */ n(xr, { item: e })
|
|
5478
5636
|
}
|
|
5479
5637
|
),
|
|
5480
|
-
/* @__PURE__ */
|
|
5638
|
+
/* @__PURE__ */ u(
|
|
5481
5639
|
"div",
|
|
5482
5640
|
{
|
|
5483
5641
|
style: {
|
|
@@ -5513,16 +5671,16 @@ function gr({
|
|
|
5513
5671
|
}
|
|
5514
5672
|
);
|
|
5515
5673
|
}
|
|
5516
|
-
const
|
|
5674
|
+
const br = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
5517
5675
|
const { colors: i } = M(), a = j(() => {
|
|
5518
5676
|
let l = -1;
|
|
5519
5677
|
return e.memoryTypes.forEach((s, c) => {
|
|
5520
5678
|
s.result == null && s.error == null && (l = c);
|
|
5521
5679
|
}), l;
|
|
5522
5680
|
}, [e.memoryTypes]);
|
|
5523
|
-
return /* @__PURE__ */
|
|
5681
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "10px" }, children: [
|
|
5524
5682
|
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(B, { text: r.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, s) => /* @__PURE__ */ n(
|
|
5525
|
-
|
|
5683
|
+
Sr,
|
|
5526
5684
|
{
|
|
5527
5685
|
item: l,
|
|
5528
5686
|
t: r,
|
|
@@ -5547,27 +5705,27 @@ const hr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
|
5547
5705
|
function re(e) {
|
|
5548
5706
|
return e.queries != null && e.queries.length > 0;
|
|
5549
5707
|
}
|
|
5550
|
-
function
|
|
5708
|
+
function vr(e) {
|
|
5551
5709
|
const t = e.reasoning;
|
|
5552
5710
|
return (t == null || t === "") && !re(e);
|
|
5553
5711
|
}
|
|
5554
|
-
function
|
|
5712
|
+
function Tr(e) {
|
|
5555
5713
|
if (re(e)) return 3;
|
|
5556
5714
|
const t = e.reasoning;
|
|
5557
5715
|
return t == null || t === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
|
|
5558
5716
|
}
|
|
5559
|
-
function
|
|
5717
|
+
function Cr({ phase: e }) {
|
|
5560
5718
|
return e === 3 ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" });
|
|
5561
5719
|
}
|
|
5562
|
-
function
|
|
5720
|
+
function wr({
|
|
5563
5721
|
item: e,
|
|
5564
5722
|
t,
|
|
5565
5723
|
isActiveRow: o
|
|
5566
5724
|
}) {
|
|
5567
|
-
const { colors: r } = M(), i =
|
|
5725
|
+
const { colors: r } = M(), i = vr(e), a = Tr(e), l = e.reasoning, s = l != null && l.length > 0, [c, d] = F(!1), m = i && o, g = a === 2 && o && !re(e), x = k(t.searchingInMemoriesOfType, {
|
|
5568
5726
|
name: e.memoryTypeName
|
|
5569
5727
|
}), h = !i && a === 3;
|
|
5570
|
-
return /* @__PURE__ */
|
|
5728
|
+
return /* @__PURE__ */ u(
|
|
5571
5729
|
I.div,
|
|
5572
5730
|
{
|
|
5573
5731
|
initial: { opacity: 0 },
|
|
@@ -5595,10 +5753,10 @@ function kr({
|
|
|
5595
5753
|
width: 32,
|
|
5596
5754
|
...h ? { paddingTop: 2 } : {}
|
|
5597
5755
|
},
|
|
5598
|
-
children: /* @__PURE__ */ n(
|
|
5756
|
+
children: /* @__PURE__ */ n(Cr, { phase: i ? 1 : a })
|
|
5599
5757
|
}
|
|
5600
5758
|
),
|
|
5601
|
-
/* @__PURE__ */
|
|
5759
|
+
/* @__PURE__ */ u(
|
|
5602
5760
|
"div",
|
|
5603
5761
|
{
|
|
5604
5762
|
style: {
|
|
@@ -5609,7 +5767,7 @@ function kr({
|
|
|
5609
5767
|
flex: 1
|
|
5610
5768
|
},
|
|
5611
5769
|
children: [
|
|
5612
|
-
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children:
|
|
5770
|
+
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children: m ? /* @__PURE__ */ n(B, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
|
|
5613
5771
|
a === 1 && s && !re(e) && /* @__PURE__ */ n(
|
|
5614
5772
|
oe,
|
|
5615
5773
|
{
|
|
@@ -5626,8 +5784,8 @@ function kr({
|
|
|
5626
5784
|
repeat: !0
|
|
5627
5785
|
}
|
|
5628
5786
|
) }),
|
|
5629
|
-
a === 3 && /* @__PURE__ */
|
|
5630
|
-
/* @__PURE__ */
|
|
5787
|
+
a === 3 && /* @__PURE__ */ u(G, { children: [
|
|
5788
|
+
/* @__PURE__ */ u("div", { style: { minWidth: 0 }, children: [
|
|
5631
5789
|
/* @__PURE__ */ n(
|
|
5632
5790
|
"span",
|
|
5633
5791
|
{
|
|
@@ -5649,7 +5807,7 @@ function kr({
|
|
|
5649
5807
|
flexDirection: "column",
|
|
5650
5808
|
gap: 6
|
|
5651
5809
|
},
|
|
5652
|
-
children: e.queries.map((
|
|
5810
|
+
children: e.queries.map((S, R) => /* @__PURE__ */ n(
|
|
5653
5811
|
"div",
|
|
5654
5812
|
{
|
|
5655
5813
|
style: {
|
|
@@ -5658,19 +5816,19 @@ function kr({
|
|
|
5658
5816
|
lineHeight: 1.5,
|
|
5659
5817
|
wordBreak: "break-word"
|
|
5660
5818
|
},
|
|
5661
|
-
children:
|
|
5819
|
+
children: S.query
|
|
5662
5820
|
},
|
|
5663
|
-
|
|
5821
|
+
R
|
|
5664
5822
|
))
|
|
5665
5823
|
}
|
|
5666
5824
|
)
|
|
5667
5825
|
] }),
|
|
5668
|
-
s && /* @__PURE__ */
|
|
5826
|
+
s && /* @__PURE__ */ u(G, { children: [
|
|
5669
5827
|
/* @__PURE__ */ n(
|
|
5670
5828
|
"button",
|
|
5671
5829
|
{
|
|
5672
5830
|
type: "button",
|
|
5673
|
-
onClick: () => d((
|
|
5831
|
+
onClick: () => d((S) => !S),
|
|
5674
5832
|
style: {
|
|
5675
5833
|
alignSelf: "flex-start",
|
|
5676
5834
|
border: "none",
|
|
@@ -5688,8 +5846,8 @@ function kr({
|
|
|
5688
5846
|
"div",
|
|
5689
5847
|
{
|
|
5690
5848
|
style: {
|
|
5691
|
-
fontSize:
|
|
5692
|
-
lineHeight:
|
|
5849
|
+
fontSize: me,
|
|
5850
|
+
lineHeight: ge,
|
|
5693
5851
|
whiteSpace: "pre-wrap",
|
|
5694
5852
|
wordBreak: "break-word",
|
|
5695
5853
|
color: r.textTertiary,
|
|
@@ -5709,16 +5867,16 @@ function kr({
|
|
|
5709
5867
|
}
|
|
5710
5868
|
);
|
|
5711
5869
|
}
|
|
5712
|
-
const
|
|
5870
|
+
const Rr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
5713
5871
|
const { colors: i } = M(), a = j(() => {
|
|
5714
5872
|
let l = -1;
|
|
5715
5873
|
return e.memoryTypes.forEach((s, c) => {
|
|
5716
5874
|
re(s) || (l = c);
|
|
5717
5875
|
}), l;
|
|
5718
5876
|
}, [e.memoryTypes]);
|
|
5719
|
-
return /* @__PURE__ */
|
|
5877
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "10px" }, children: [
|
|
5720
5878
|
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(B, { text: r.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, s) => /* @__PURE__ */ n(
|
|
5721
|
-
|
|
5879
|
+
wr,
|
|
5722
5880
|
{
|
|
5723
5881
|
item: l,
|
|
5724
5882
|
t: r,
|
|
@@ -5740,10 +5898,10 @@ const Sr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
|
5740
5898
|
)
|
|
5741
5899
|
] });
|
|
5742
5900
|
};
|
|
5743
|
-
function
|
|
5901
|
+
function Er(e) {
|
|
5744
5902
|
return e.some((r) => r.result == null && r.error == null) ? /* @__PURE__ */ n("span", { className: "explore-memory-loader" }) : e.some((r) => r.error != null) ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 });
|
|
5745
5903
|
}
|
|
5746
|
-
function
|
|
5904
|
+
function Mr({
|
|
5747
5905
|
item: e,
|
|
5748
5906
|
t
|
|
5749
5907
|
}) {
|
|
@@ -5755,13 +5913,13 @@ function vr({
|
|
|
5755
5913
|
const r = e.result, i = r.numberOfChunks === 1 ? t.chunkFound : k(t.chunksFound, { n: r.numberOfChunks }), a = k(t.scoreLabel, {
|
|
5756
5914
|
n: r.highestChunkScore.toFixed(2)
|
|
5757
5915
|
});
|
|
5758
|
-
return /* @__PURE__ */
|
|
5916
|
+
return /* @__PURE__ */ u("span", { style: { fontSize: 12, color: o.textSecondary, whiteSpace: "nowrap" }, children: [
|
|
5759
5917
|
i,
|
|
5760
5918
|
" · ",
|
|
5761
5919
|
a
|
|
5762
5920
|
] });
|
|
5763
5921
|
}
|
|
5764
|
-
function
|
|
5922
|
+
function Ir({
|
|
5765
5923
|
items: e,
|
|
5766
5924
|
queryRow: t,
|
|
5767
5925
|
onExploreQueryResultClick: o,
|
|
@@ -5793,16 +5951,16 @@ function Tr({
|
|
|
5793
5951
|
borderTop: `1px solid ${i.borderDivider}`
|
|
5794
5952
|
},
|
|
5795
5953
|
children: e.map((c, d) => {
|
|
5796
|
-
const
|
|
5954
|
+
const m = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, g = Re(
|
|
5797
5955
|
c.chunks
|
|
5798
5956
|
), x = [
|
|
5799
|
-
|
|
5957
|
+
Ee(c),
|
|
5800
5958
|
k(r.scoreLabel, {
|
|
5801
5959
|
n: c.matchingChunkScore.toFixed(2)
|
|
5802
5960
|
}),
|
|
5803
|
-
g.length > 0 ?
|
|
5961
|
+
g.length > 0 ? we(g, r) : r.pagesNotAvailable
|
|
5804
5962
|
].filter(
|
|
5805
|
-
(
|
|
5963
|
+
(p) => p != null && p !== ""
|
|
5806
5964
|
), h = {
|
|
5807
5965
|
memoryId: c.memoryId,
|
|
5808
5966
|
memoryTitle: c.memoryTitle,
|
|
@@ -5810,8 +5968,8 @@ function Tr({
|
|
|
5810
5968
|
memoryTypeId: t.memoryTypeId,
|
|
5811
5969
|
memoryTypeName: t.memoryTypeName,
|
|
5812
5970
|
query: t.query
|
|
5813
|
-
},
|
|
5814
|
-
return /* @__PURE__ */
|
|
5971
|
+
}, S = `${t.query}::${c.memoryId}::${d}`, R = a === S;
|
|
5972
|
+
return /* @__PURE__ */ u(
|
|
5815
5973
|
"div",
|
|
5816
5974
|
{
|
|
5817
5975
|
style: {
|
|
@@ -5825,7 +5983,7 @@ function Tr({
|
|
|
5825
5983
|
minWidth: 0
|
|
5826
5984
|
},
|
|
5827
5985
|
children: [
|
|
5828
|
-
/* @__PURE__ */
|
|
5986
|
+
/* @__PURE__ */ u(
|
|
5829
5987
|
"div",
|
|
5830
5988
|
{
|
|
5831
5989
|
style: {
|
|
@@ -5844,7 +6002,7 @@ function Tr({
|
|
|
5844
6002
|
fontWeight: 600,
|
|
5845
6003
|
color: i.textPrimary
|
|
5846
6004
|
},
|
|
5847
|
-
children:
|
|
6005
|
+
children: m
|
|
5848
6006
|
}
|
|
5849
6007
|
),
|
|
5850
6008
|
/* @__PURE__ */ n(
|
|
@@ -5857,7 +6015,7 @@ function Tr({
|
|
|
5857
6015
|
whiteSpace: "pre-wrap",
|
|
5858
6016
|
wordBreak: "break-word"
|
|
5859
6017
|
},
|
|
5860
|
-
children:
|
|
6018
|
+
children: Ce(
|
|
5861
6019
|
c.chunks
|
|
5862
6020
|
)
|
|
5863
6021
|
}
|
|
@@ -5877,14 +6035,14 @@ function Tr({
|
|
|
5877
6035
|
]
|
|
5878
6036
|
}
|
|
5879
6037
|
),
|
|
5880
|
-
s && /* @__PURE__ */
|
|
6038
|
+
s && /* @__PURE__ */ u(
|
|
5881
6039
|
"button",
|
|
5882
6040
|
{
|
|
5883
6041
|
type: "button",
|
|
5884
|
-
"aria-busy":
|
|
5885
|
-
disabled:
|
|
6042
|
+
"aria-busy": R,
|
|
6043
|
+
disabled: R,
|
|
5886
6044
|
onClick: async () => {
|
|
5887
|
-
l(
|
|
6045
|
+
l(S);
|
|
5888
6046
|
try {
|
|
5889
6047
|
await o(
|
|
5890
6048
|
h
|
|
@@ -5903,14 +6061,14 @@ function Tr({
|
|
|
5903
6061
|
background: i.bgChip,
|
|
5904
6062
|
border: `1px solid ${i.bgChipBorder}`,
|
|
5905
6063
|
borderRadius: 6,
|
|
5906
|
-
cursor:
|
|
6064
|
+
cursor: R ? "wait" : "pointer",
|
|
5907
6065
|
fontFamily: "inherit",
|
|
5908
6066
|
display: "inline-flex",
|
|
5909
6067
|
alignItems: "center",
|
|
5910
6068
|
gap: 8
|
|
5911
6069
|
},
|
|
5912
6070
|
children: [
|
|
5913
|
-
|
|
6071
|
+
R && /* @__PURE__ */ n(
|
|
5914
6072
|
"span",
|
|
5915
6073
|
{
|
|
5916
6074
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -5929,7 +6087,7 @@ function Tr({
|
|
|
5929
6087
|
}
|
|
5930
6088
|
);
|
|
5931
6089
|
}
|
|
5932
|
-
function
|
|
6090
|
+
function Ar(e) {
|
|
5933
6091
|
const t = [], o = /* @__PURE__ */ new Map();
|
|
5934
6092
|
return e.forEach((r, i) => {
|
|
5935
6093
|
let a = o.get(r.memoryTypeId);
|
|
@@ -5940,7 +6098,7 @@ function Cr(e) {
|
|
|
5940
6098
|
}, o.set(r.memoryTypeId, a)), a.items.push({ item: r, flatIndex: i });
|
|
5941
6099
|
}), t.map((r) => o.get(r));
|
|
5942
6100
|
}
|
|
5943
|
-
function
|
|
6101
|
+
function Pr({
|
|
5944
6102
|
group: e,
|
|
5945
6103
|
t,
|
|
5946
6104
|
isLatest: o,
|
|
@@ -5951,7 +6109,7 @@ function wr({
|
|
|
5951
6109
|
const { colors: l } = M(), s = e.items.map((d) => d.item), c = s.some(
|
|
5952
6110
|
(d) => d.result == null && d.error == null
|
|
5953
6111
|
);
|
|
5954
|
-
return /* @__PURE__ */
|
|
6112
|
+
return /* @__PURE__ */ u(
|
|
5955
6113
|
I.div,
|
|
5956
6114
|
{
|
|
5957
6115
|
initial: { opacity: 0 },
|
|
@@ -5979,10 +6137,10 @@ function wr({
|
|
|
5979
6137
|
width: 32,
|
|
5980
6138
|
...c ? {} : { paddingTop: 2 }
|
|
5981
6139
|
},
|
|
5982
|
-
children:
|
|
6140
|
+
children: Er(s)
|
|
5983
6141
|
}
|
|
5984
6142
|
),
|
|
5985
|
-
/* @__PURE__ */
|
|
6143
|
+
/* @__PURE__ */ u(
|
|
5986
6144
|
"div",
|
|
5987
6145
|
{
|
|
5988
6146
|
style: {
|
|
@@ -6005,10 +6163,10 @@ function wr({
|
|
|
6005
6163
|
})
|
|
6006
6164
|
}
|
|
6007
6165
|
),
|
|
6008
|
-
e.items.map(({ item: d, flatIndex:
|
|
6009
|
-
var
|
|
6010
|
-
const g = d.result != null, x = d.error != null, h = o && !g && !x,
|
|
6011
|
-
return /* @__PURE__ */
|
|
6166
|
+
e.items.map(({ item: d, flatIndex: m }) => {
|
|
6167
|
+
var p;
|
|
6168
|
+
const g = d.result != null, x = d.error != null, h = o && !g && !x, S = r[m] === !0, R = ((p = d.result) == null ? void 0 : p.items) ?? [];
|
|
6169
|
+
return /* @__PURE__ */ u(
|
|
6012
6170
|
"div",
|
|
6013
6171
|
{
|
|
6014
6172
|
style: {
|
|
@@ -6018,7 +6176,7 @@ function wr({
|
|
|
6018
6176
|
minWidth: 0
|
|
6019
6177
|
},
|
|
6020
6178
|
children: [
|
|
6021
|
-
/* @__PURE__ */
|
|
6179
|
+
/* @__PURE__ */ u(
|
|
6022
6180
|
"div",
|
|
6023
6181
|
{
|
|
6024
6182
|
style: {
|
|
@@ -6051,7 +6209,7 @@ function wr({
|
|
|
6051
6209
|
) : d.query
|
|
6052
6210
|
}
|
|
6053
6211
|
),
|
|
6054
|
-
/* @__PURE__ */
|
|
6212
|
+
/* @__PURE__ */ u(
|
|
6055
6213
|
"div",
|
|
6056
6214
|
{
|
|
6057
6215
|
style: {
|
|
@@ -6062,12 +6220,12 @@ function wr({
|
|
|
6062
6220
|
flexShrink: 0
|
|
6063
6221
|
},
|
|
6064
6222
|
children: [
|
|
6065
|
-
/* @__PURE__ */ n(
|
|
6223
|
+
/* @__PURE__ */ n(Mr, { item: d, t }),
|
|
6066
6224
|
g && /* @__PURE__ */ n(
|
|
6067
6225
|
"button",
|
|
6068
6226
|
{
|
|
6069
6227
|
type: "button",
|
|
6070
|
-
onClick: () => i(
|
|
6228
|
+
onClick: () => i(m),
|
|
6071
6229
|
style: {
|
|
6072
6230
|
border: "none",
|
|
6073
6231
|
background: "none",
|
|
@@ -6078,7 +6236,7 @@ function wr({
|
|
|
6078
6236
|
textDecoration: "underline",
|
|
6079
6237
|
fontFamily: "inherit"
|
|
6080
6238
|
},
|
|
6081
|
-
children:
|
|
6239
|
+
children: S ? t.memorySearchHideExploreResults : t.memorySearchViewExploreResults
|
|
6082
6240
|
}
|
|
6083
6241
|
)
|
|
6084
6242
|
]
|
|
@@ -6087,10 +6245,10 @@ function wr({
|
|
|
6087
6245
|
]
|
|
6088
6246
|
}
|
|
6089
6247
|
),
|
|
6090
|
-
g &&
|
|
6091
|
-
|
|
6248
|
+
g && S && /* @__PURE__ */ n(
|
|
6249
|
+
Ir,
|
|
6092
6250
|
{
|
|
6093
|
-
items:
|
|
6251
|
+
items: R,
|
|
6094
6252
|
queryRow: d,
|
|
6095
6253
|
onExploreQueryResultClick: a,
|
|
6096
6254
|
t
|
|
@@ -6098,7 +6256,7 @@ function wr({
|
|
|
6098
6256
|
)
|
|
6099
6257
|
]
|
|
6100
6258
|
},
|
|
6101
|
-
`${e.memoryTypeId}-${
|
|
6259
|
+
`${e.memoryTypeId}-${m}-${d.query}`
|
|
6102
6260
|
);
|
|
6103
6261
|
})
|
|
6104
6262
|
]
|
|
@@ -6108,7 +6266,7 @@ function wr({
|
|
|
6108
6266
|
}
|
|
6109
6267
|
);
|
|
6110
6268
|
}
|
|
6111
|
-
const
|
|
6269
|
+
const Fr = ({
|
|
6112
6270
|
data: e,
|
|
6113
6271
|
isLatest: t = !1,
|
|
6114
6272
|
durationSeconds: o,
|
|
@@ -6117,16 +6275,16 @@ const Rr = ({
|
|
|
6117
6275
|
}) => {
|
|
6118
6276
|
const { colors: a } = M(), [l, s] = F(
|
|
6119
6277
|
{}
|
|
6120
|
-
), c =
|
|
6278
|
+
), c = _((m) => {
|
|
6121
6279
|
s((g) => ({
|
|
6122
6280
|
...g,
|
|
6123
|
-
[
|
|
6281
|
+
[m]: !g[m]
|
|
6124
6282
|
}));
|
|
6125
6283
|
}, []), d = j(
|
|
6126
|
-
() =>
|
|
6284
|
+
() => Ar(e.queries),
|
|
6127
6285
|
[e.queries]
|
|
6128
6286
|
);
|
|
6129
|
-
return /* @__PURE__ */
|
|
6287
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "10px" }, children: [
|
|
6130
6288
|
t && !o && e.queries.length === 0 ? /* @__PURE__ */ n(
|
|
6131
6289
|
B,
|
|
6132
6290
|
{
|
|
@@ -6134,17 +6292,17 @@ const Rr = ({
|
|
|
6134
6292
|
duration: 2.5,
|
|
6135
6293
|
repeat: !0
|
|
6136
6294
|
}
|
|
6137
|
-
) : d.map((
|
|
6138
|
-
|
|
6295
|
+
) : d.map((m) => /* @__PURE__ */ n(
|
|
6296
|
+
Pr,
|
|
6139
6297
|
{
|
|
6140
|
-
group:
|
|
6298
|
+
group: m,
|
|
6141
6299
|
t: i,
|
|
6142
6300
|
isLatest: t,
|
|
6143
6301
|
expandedRows: l,
|
|
6144
6302
|
toggleExpanded: c,
|
|
6145
6303
|
onExploreQueryResultClick: r
|
|
6146
6304
|
},
|
|
6147
|
-
|
|
6305
|
+
m.memoryTypeId
|
|
6148
6306
|
)),
|
|
6149
6307
|
o !== void 0 && /* @__PURE__ */ n(
|
|
6150
6308
|
"div",
|
|
@@ -6159,9 +6317,9 @@ const Rr = ({
|
|
|
6159
6317
|
}
|
|
6160
6318
|
)
|
|
6161
6319
|
] });
|
|
6162
|
-
},
|
|
6320
|
+
}, Br = ({ data: e, onSearchResultClick: t, t: o }) => {
|
|
6163
6321
|
const { colors: r } = M(), i = e.response.items, a = !!t, [l, s] = F(null);
|
|
6164
|
-
return /* @__PURE__ */
|
|
6322
|
+
return /* @__PURE__ */ u("div", { style: { paddingBlock: "16px" }, children: [
|
|
6165
6323
|
/* @__PURE__ */ n(
|
|
6166
6324
|
I.div,
|
|
6167
6325
|
{
|
|
@@ -6186,24 +6344,24 @@ const Rr = ({
|
|
|
6186
6344
|
gap: 0
|
|
6187
6345
|
},
|
|
6188
6346
|
children: i.map((c, d) => {
|
|
6189
|
-
const
|
|
6347
|
+
const m = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, g = Re(
|
|
6190
6348
|
c.chunks
|
|
6191
6349
|
), x = [
|
|
6192
|
-
|
|
6350
|
+
Ee(c),
|
|
6193
6351
|
k(o.scoreLabel, {
|
|
6194
6352
|
n: c.matchingChunkScore.toFixed(2)
|
|
6195
6353
|
}),
|
|
6196
|
-
g.length > 0 ?
|
|
6354
|
+
g.length > 0 ? we(g, o) : o.pagesNotAvailable
|
|
6197
6355
|
].filter(
|
|
6198
|
-
(
|
|
6356
|
+
(p) => p != null && p !== ""
|
|
6199
6357
|
), h = {
|
|
6200
6358
|
memoryId: c.memoryId,
|
|
6201
6359
|
memoryTitle: c.memoryTitle,
|
|
6202
6360
|
memoryTypeId: c.memoryTypeId,
|
|
6203
6361
|
memoryTypeName: c.memoryTypeName,
|
|
6204
6362
|
pageNumbers: g
|
|
6205
|
-
},
|
|
6206
|
-
return /* @__PURE__ */
|
|
6363
|
+
}, S = `${c.memoryId}-${d}`, R = l === S;
|
|
6364
|
+
return /* @__PURE__ */ u(
|
|
6207
6365
|
I.div,
|
|
6208
6366
|
{
|
|
6209
6367
|
initial: { opacity: 0 },
|
|
@@ -6220,7 +6378,7 @@ const Rr = ({
|
|
|
6220
6378
|
minWidth: 0
|
|
6221
6379
|
},
|
|
6222
6380
|
children: [
|
|
6223
|
-
/* @__PURE__ */
|
|
6381
|
+
/* @__PURE__ */ u(
|
|
6224
6382
|
"div",
|
|
6225
6383
|
{
|
|
6226
6384
|
style: {
|
|
@@ -6239,7 +6397,7 @@ const Rr = ({
|
|
|
6239
6397
|
fontWeight: 600,
|
|
6240
6398
|
color: r.textPrimary
|
|
6241
6399
|
},
|
|
6242
|
-
children:
|
|
6400
|
+
children: m
|
|
6243
6401
|
}
|
|
6244
6402
|
),
|
|
6245
6403
|
/* @__PURE__ */ n(
|
|
@@ -6252,7 +6410,7 @@ const Rr = ({
|
|
|
6252
6410
|
whiteSpace: "pre-wrap",
|
|
6253
6411
|
wordBreak: "break-word"
|
|
6254
6412
|
},
|
|
6255
|
-
children:
|
|
6413
|
+
children: Ce(c.chunks)
|
|
6256
6414
|
}
|
|
6257
6415
|
),
|
|
6258
6416
|
/* @__PURE__ */ n(
|
|
@@ -6270,14 +6428,14 @@ const Rr = ({
|
|
|
6270
6428
|
]
|
|
6271
6429
|
}
|
|
6272
6430
|
),
|
|
6273
|
-
a && /* @__PURE__ */
|
|
6431
|
+
a && /* @__PURE__ */ u(
|
|
6274
6432
|
"button",
|
|
6275
6433
|
{
|
|
6276
6434
|
type: "button",
|
|
6277
|
-
"aria-busy":
|
|
6278
|
-
disabled:
|
|
6435
|
+
"aria-busy": R,
|
|
6436
|
+
disabled: R,
|
|
6279
6437
|
onClick: async () => {
|
|
6280
|
-
s(
|
|
6438
|
+
s(S);
|
|
6281
6439
|
try {
|
|
6282
6440
|
await t(h);
|
|
6283
6441
|
} finally {
|
|
@@ -6294,14 +6452,14 @@ const Rr = ({
|
|
|
6294
6452
|
background: r.bgChip,
|
|
6295
6453
|
border: `1px solid ${r.bgChipBorder}`,
|
|
6296
6454
|
borderRadius: 6,
|
|
6297
|
-
cursor:
|
|
6455
|
+
cursor: R ? "wait" : "pointer",
|
|
6298
6456
|
fontFamily: "inherit",
|
|
6299
6457
|
display: "inline-flex",
|
|
6300
6458
|
alignItems: "center",
|
|
6301
6459
|
gap: 8
|
|
6302
6460
|
},
|
|
6303
6461
|
children: [
|
|
6304
|
-
|
|
6462
|
+
R && /* @__PURE__ */ n(
|
|
6305
6463
|
"span",
|
|
6306
6464
|
{
|
|
6307
6465
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -6346,7 +6504,7 @@ const Rr = ({
|
|
|
6346
6504
|
)
|
|
6347
6505
|
}
|
|
6348
6506
|
) });
|
|
6349
|
-
},
|
|
6507
|
+
}, zr = ({
|
|
6350
6508
|
progressViewItems: e,
|
|
6351
6509
|
loading: t,
|
|
6352
6510
|
error: o,
|
|
@@ -6357,14 +6515,14 @@ const Rr = ({
|
|
|
6357
6515
|
onSearchResultClick: s,
|
|
6358
6516
|
onExploreQueryResultClick: c,
|
|
6359
6517
|
downloadFile: d,
|
|
6360
|
-
components:
|
|
6518
|
+
components: m
|
|
6361
6519
|
}) => {
|
|
6362
|
-
const { theme: g, colors: x } = M(), h =
|
|
6520
|
+
const { theme: g, colors: x } = M(), h = H(null);
|
|
6363
6521
|
V(() => {
|
|
6364
6522
|
h.current && (h.current.scrollTop = h.current.scrollHeight);
|
|
6365
6523
|
}, [e.length]);
|
|
6366
|
-
const
|
|
6367
|
-
const y =
|
|
6524
|
+
const S = (p) => {
|
|
6525
|
+
const y = p.item.data;
|
|
6368
6526
|
if (y.taskType === "StreamingChatCompletion" && y.eventType === "Text")
|
|
6369
6527
|
return /* @__PURE__ */ n(
|
|
6370
6528
|
X,
|
|
@@ -6374,7 +6532,7 @@ const Rr = ({
|
|
|
6374
6532
|
}
|
|
6375
6533
|
);
|
|
6376
6534
|
if (y.taskType === "StructuredChatCompletion" && y.eventType === "Completed")
|
|
6377
|
-
return /* @__PURE__ */ n(
|
|
6535
|
+
return /* @__PURE__ */ n(nt, { data: y });
|
|
6378
6536
|
if (y.taskType === "MemoryChat")
|
|
6379
6537
|
switch (y.eventType) {
|
|
6380
6538
|
case "Text":
|
|
@@ -6388,41 +6546,41 @@ const Rr = ({
|
|
|
6388
6546
|
);
|
|
6389
6547
|
case "Thinking":
|
|
6390
6548
|
return /* @__PURE__ */ n(
|
|
6391
|
-
|
|
6549
|
+
Lt,
|
|
6392
6550
|
{
|
|
6393
6551
|
data: y,
|
|
6394
|
-
isLatest:
|
|
6395
|
-
durationSeconds:
|
|
6552
|
+
isLatest: p.isLatest,
|
|
6553
|
+
durationSeconds: p.durationSeconds,
|
|
6396
6554
|
t: i
|
|
6397
6555
|
}
|
|
6398
6556
|
);
|
|
6399
6557
|
case "GenerateReportSetup":
|
|
6400
6558
|
return /* @__PURE__ */ n(
|
|
6401
|
-
|
|
6559
|
+
Dt,
|
|
6402
6560
|
{
|
|
6403
6561
|
data: y,
|
|
6404
|
-
isLatest:
|
|
6405
|
-
durationSeconds:
|
|
6562
|
+
isLatest: p.isLatest,
|
|
6563
|
+
durationSeconds: p.durationSeconds,
|
|
6406
6564
|
t: i
|
|
6407
6565
|
}
|
|
6408
6566
|
);
|
|
6409
6567
|
case "GenerateReportExporting":
|
|
6410
6568
|
return /* @__PURE__ */ n(
|
|
6411
|
-
|
|
6569
|
+
Nt,
|
|
6412
6570
|
{
|
|
6413
6571
|
data: y,
|
|
6414
|
-
isLatest:
|
|
6415
|
-
durationSeconds:
|
|
6572
|
+
isLatest: p.isLatest,
|
|
6573
|
+
durationSeconds: p.durationSeconds,
|
|
6416
6574
|
t: i
|
|
6417
6575
|
}
|
|
6418
6576
|
);
|
|
6419
6577
|
case "GenerateReportRunCode":
|
|
6420
6578
|
return /* @__PURE__ */ n(
|
|
6421
|
-
|
|
6579
|
+
Ht,
|
|
6422
6580
|
{
|
|
6423
6581
|
data: y,
|
|
6424
|
-
isLatest:
|
|
6425
|
-
durationSeconds:
|
|
6582
|
+
isLatest: p.isLatest,
|
|
6583
|
+
durationSeconds: p.durationSeconds,
|
|
6426
6584
|
t: i
|
|
6427
6585
|
}
|
|
6428
6586
|
);
|
|
@@ -6431,36 +6589,36 @@ const Rr = ({
|
|
|
6431
6589
|
Wt,
|
|
6432
6590
|
{
|
|
6433
6591
|
data: y,
|
|
6434
|
-
isLatest:
|
|
6435
|
-
durationSeconds:
|
|
6592
|
+
isLatest: p.isLatest,
|
|
6593
|
+
durationSeconds: p.durationSeconds,
|
|
6436
6594
|
t: i
|
|
6437
6595
|
}
|
|
6438
6596
|
);
|
|
6439
6597
|
case "GenerateReportAssembling":
|
|
6440
6598
|
return /* @__PURE__ */ n(
|
|
6441
|
-
|
|
6599
|
+
$t,
|
|
6442
6600
|
{
|
|
6443
6601
|
data: y,
|
|
6444
|
-
isLatest:
|
|
6445
|
-
durationSeconds:
|
|
6602
|
+
isLatest: p.isLatest,
|
|
6603
|
+
durationSeconds: p.durationSeconds,
|
|
6446
6604
|
t: i
|
|
6447
6605
|
}
|
|
6448
6606
|
);
|
|
6449
6607
|
case "GenerateReportCompleted":
|
|
6450
|
-
return /* @__PURE__ */ n(
|
|
6608
|
+
return /* @__PURE__ */ n(_t, { data: y, t: i });
|
|
6451
6609
|
case "FindMemories":
|
|
6452
6610
|
return /* @__PURE__ */ n(
|
|
6453
|
-
|
|
6611
|
+
mt,
|
|
6454
6612
|
{
|
|
6455
6613
|
data: y,
|
|
6456
|
-
isLatest:
|
|
6457
|
-
durationSeconds:
|
|
6614
|
+
isLatest: p.isLatest,
|
|
6615
|
+
durationSeconds: p.durationSeconds,
|
|
6458
6616
|
t: i
|
|
6459
6617
|
}
|
|
6460
6618
|
);
|
|
6461
6619
|
case "FindMemoriesResult":
|
|
6462
6620
|
return /* @__PURE__ */ n(
|
|
6463
|
-
|
|
6621
|
+
gt,
|
|
6464
6622
|
{
|
|
6465
6623
|
data: y,
|
|
6466
6624
|
t: i
|
|
@@ -6471,18 +6629,18 @@ const Rr = ({
|
|
|
6471
6629
|
te,
|
|
6472
6630
|
{
|
|
6473
6631
|
data: y,
|
|
6474
|
-
isLatest:
|
|
6475
|
-
durationSeconds:
|
|
6632
|
+
isLatest: p.isLatest,
|
|
6633
|
+
durationSeconds: p.durationSeconds,
|
|
6476
6634
|
t: i
|
|
6477
6635
|
}
|
|
6478
6636
|
);
|
|
6479
6637
|
case "SearchMemoryChunks":
|
|
6480
6638
|
return /* @__PURE__ */ n(
|
|
6481
|
-
|
|
6639
|
+
pt,
|
|
6482
6640
|
{
|
|
6483
6641
|
data: y,
|
|
6484
|
-
isLatest:
|
|
6485
|
-
durationSeconds:
|
|
6642
|
+
isLatest: p.isLatest,
|
|
6643
|
+
durationSeconds: p.durationSeconds,
|
|
6486
6644
|
t: i,
|
|
6487
6645
|
onSearchResultClick: s
|
|
6488
6646
|
}
|
|
@@ -6492,8 +6650,8 @@ const Rr = ({
|
|
|
6492
6650
|
Pe,
|
|
6493
6651
|
{
|
|
6494
6652
|
data: y,
|
|
6495
|
-
isLatest:
|
|
6496
|
-
durationSeconds:
|
|
6653
|
+
isLatest: p.isLatest,
|
|
6654
|
+
durationSeconds: p.durationSeconds,
|
|
6497
6655
|
t: i
|
|
6498
6656
|
}
|
|
6499
6657
|
);
|
|
@@ -6508,17 +6666,17 @@ const Rr = ({
|
|
|
6508
6666
|
);
|
|
6509
6667
|
case "ExploreMemories":
|
|
6510
6668
|
return /* @__PURE__ */ n(
|
|
6511
|
-
|
|
6669
|
+
kt,
|
|
6512
6670
|
{
|
|
6513
6671
|
data: y,
|
|
6514
|
-
completed:
|
|
6515
|
-
isLatest:
|
|
6672
|
+
completed: p.completed,
|
|
6673
|
+
isLatest: p.isLatest,
|
|
6516
6674
|
t: i
|
|
6517
6675
|
}
|
|
6518
6676
|
);
|
|
6519
6677
|
case "ChunkResults":
|
|
6520
6678
|
return /* @__PURE__ */ n(
|
|
6521
|
-
|
|
6679
|
+
pe,
|
|
6522
6680
|
{
|
|
6523
6681
|
data: y,
|
|
6524
6682
|
onSearchResultClick: s,
|
|
@@ -6527,21 +6685,21 @@ const Rr = ({
|
|
|
6527
6685
|
);
|
|
6528
6686
|
case "GoogleSearch":
|
|
6529
6687
|
return /* @__PURE__ */ n(
|
|
6530
|
-
|
|
6688
|
+
Ct,
|
|
6531
6689
|
{
|
|
6532
6690
|
data: y,
|
|
6533
|
-
isLatest:
|
|
6534
|
-
durationSeconds:
|
|
6691
|
+
isLatest: p.isLatest,
|
|
6692
|
+
durationSeconds: p.durationSeconds,
|
|
6535
6693
|
t: i
|
|
6536
6694
|
}
|
|
6537
6695
|
);
|
|
6538
6696
|
case "ScrapeWebsites":
|
|
6539
6697
|
return /* @__PURE__ */ n(
|
|
6540
|
-
|
|
6698
|
+
zt,
|
|
6541
6699
|
{
|
|
6542
6700
|
data: y,
|
|
6543
|
-
isLatest:
|
|
6544
|
-
durationSeconds:
|
|
6701
|
+
isLatest: p.isLatest,
|
|
6702
|
+
durationSeconds: p.durationSeconds,
|
|
6545
6703
|
t: i
|
|
6546
6704
|
}
|
|
6547
6705
|
);
|
|
@@ -6567,38 +6725,38 @@ const Rr = ({
|
|
|
6567
6725
|
switch (y.eventType) {
|
|
6568
6726
|
case "GeneratingQueries":
|
|
6569
6727
|
return /* @__PURE__ */ n(
|
|
6570
|
-
|
|
6728
|
+
Rr,
|
|
6571
6729
|
{
|
|
6572
6730
|
data: y,
|
|
6573
|
-
isLatest:
|
|
6574
|
-
durationSeconds:
|
|
6731
|
+
isLatest: p.isLatest,
|
|
6732
|
+
durationSeconds: p.durationSeconds,
|
|
6575
6733
|
t: i
|
|
6576
6734
|
}
|
|
6577
6735
|
);
|
|
6578
6736
|
case "ExploreQueries":
|
|
6579
6737
|
return /* @__PURE__ */ n(
|
|
6580
|
-
|
|
6738
|
+
Fr,
|
|
6581
6739
|
{
|
|
6582
6740
|
data: y,
|
|
6583
|
-
isLatest:
|
|
6584
|
-
durationSeconds:
|
|
6741
|
+
isLatest: p.isLatest,
|
|
6742
|
+
durationSeconds: p.durationSeconds,
|
|
6585
6743
|
onExploreQueryResultClick: c,
|
|
6586
6744
|
t: i
|
|
6587
6745
|
}
|
|
6588
6746
|
);
|
|
6589
6747
|
case "SearchMemoryTypes":
|
|
6590
6748
|
return /* @__PURE__ */ n(
|
|
6591
|
-
|
|
6749
|
+
br,
|
|
6592
6750
|
{
|
|
6593
6751
|
data: y,
|
|
6594
|
-
isLatest:
|
|
6595
|
-
durationSeconds:
|
|
6752
|
+
isLatest: p.isLatest,
|
|
6753
|
+
durationSeconds: p.durationSeconds,
|
|
6596
6754
|
t: i
|
|
6597
6755
|
}
|
|
6598
6756
|
);
|
|
6599
6757
|
case "Completed":
|
|
6600
6758
|
return /* @__PURE__ */ n(
|
|
6601
|
-
|
|
6759
|
+
Br,
|
|
6602
6760
|
{
|
|
6603
6761
|
data: y,
|
|
6604
6762
|
onSearchResultClick: s,
|
|
@@ -6627,33 +6785,33 @@ const Rr = ({
|
|
|
6627
6785
|
);
|
|
6628
6786
|
case "Classifying":
|
|
6629
6787
|
return /* @__PURE__ */ n(
|
|
6630
|
-
|
|
6788
|
+
jt,
|
|
6631
6789
|
{
|
|
6632
6790
|
data: y,
|
|
6633
|
-
isLatest:
|
|
6634
|
-
durationSeconds:
|
|
6791
|
+
isLatest: p.isLatest,
|
|
6792
|
+
durationSeconds: p.durationSeconds,
|
|
6635
6793
|
t: i
|
|
6636
6794
|
}
|
|
6637
6795
|
);
|
|
6638
6796
|
case "Thinking":
|
|
6639
6797
|
return /* @__PURE__ */ n(
|
|
6640
|
-
|
|
6798
|
+
tr,
|
|
6641
6799
|
{
|
|
6642
6800
|
data: y,
|
|
6643
|
-
isLatest:
|
|
6644
|
-
durationSeconds:
|
|
6645
|
-
completed:
|
|
6801
|
+
isLatest: p.isLatest,
|
|
6802
|
+
durationSeconds: p.durationSeconds,
|
|
6803
|
+
completed: p.completed,
|
|
6646
6804
|
t: i
|
|
6647
6805
|
}
|
|
6648
6806
|
);
|
|
6649
6807
|
case "Planning":
|
|
6650
6808
|
return /* @__PURE__ */ n(
|
|
6651
|
-
|
|
6809
|
+
qt,
|
|
6652
6810
|
{
|
|
6653
6811
|
data: y,
|
|
6654
|
-
createdAt:
|
|
6655
|
-
timestamp:
|
|
6656
|
-
completed:
|
|
6812
|
+
createdAt: p.item.createdAt,
|
|
6813
|
+
timestamp: p.item.timestamp,
|
|
6814
|
+
completed: p.completed,
|
|
6657
6815
|
t: i,
|
|
6658
6816
|
onMemoryClick: a
|
|
6659
6817
|
}
|
|
@@ -6662,66 +6820,66 @@ const Rr = ({
|
|
|
6662
6820
|
return null;
|
|
6663
6821
|
case "ExportingMemories":
|
|
6664
6822
|
return /* @__PURE__ */ n(
|
|
6665
|
-
|
|
6823
|
+
Kt,
|
|
6666
6824
|
{
|
|
6667
6825
|
data: y,
|
|
6668
|
-
isLatest:
|
|
6669
|
-
durationSeconds:
|
|
6826
|
+
isLatest: p.isLatest,
|
|
6827
|
+
durationSeconds: p.durationSeconds,
|
|
6670
6828
|
t: i
|
|
6671
6829
|
}
|
|
6672
6830
|
);
|
|
6673
6831
|
case "FindMemories":
|
|
6674
6832
|
return /* @__PURE__ */ n(
|
|
6675
|
-
|
|
6833
|
+
Qt,
|
|
6676
6834
|
{
|
|
6677
6835
|
data: y,
|
|
6678
|
-
isLatest:
|
|
6679
|
-
durationSeconds:
|
|
6836
|
+
isLatest: p.isLatest,
|
|
6837
|
+
durationSeconds: p.durationSeconds,
|
|
6680
6838
|
t: i
|
|
6681
6839
|
}
|
|
6682
6840
|
);
|
|
6683
6841
|
case "FindMemoriesResult":
|
|
6684
|
-
return /* @__PURE__ */ n(
|
|
6842
|
+
return /* @__PURE__ */ n(Vt, { data: y, t: i });
|
|
6685
6843
|
case "SemanticSearch":
|
|
6686
6844
|
return /* @__PURE__ */ n(
|
|
6687
|
-
|
|
6845
|
+
Xt,
|
|
6688
6846
|
{
|
|
6689
6847
|
data: y,
|
|
6690
|
-
isLatest:
|
|
6691
|
-
durationSeconds:
|
|
6848
|
+
isLatest: p.isLatest,
|
|
6849
|
+
durationSeconds: p.durationSeconds,
|
|
6692
6850
|
t: i,
|
|
6693
6851
|
onSearchResultClick: s
|
|
6694
6852
|
}
|
|
6695
6853
|
);
|
|
6696
6854
|
case "SemanticSearchForEach":
|
|
6697
6855
|
return /* @__PURE__ */ n(
|
|
6698
|
-
|
|
6856
|
+
er,
|
|
6699
6857
|
{
|
|
6700
6858
|
data: y,
|
|
6701
|
-
completed:
|
|
6702
|
-
isLatest:
|
|
6859
|
+
completed: p.completed,
|
|
6860
|
+
isLatest: p.isLatest,
|
|
6703
6861
|
t: i
|
|
6704
6862
|
}
|
|
6705
6863
|
);
|
|
6706
6864
|
case "RunCode":
|
|
6707
6865
|
return /* @__PURE__ */ n(
|
|
6708
|
-
|
|
6866
|
+
nr,
|
|
6709
6867
|
{
|
|
6710
6868
|
data: y,
|
|
6711
|
-
isLatest:
|
|
6712
|
-
durationSeconds:
|
|
6713
|
-
completed:
|
|
6869
|
+
isLatest: p.isLatest,
|
|
6870
|
+
durationSeconds: p.durationSeconds,
|
|
6871
|
+
completed: p.completed,
|
|
6714
6872
|
t: i
|
|
6715
6873
|
}
|
|
6716
6874
|
);
|
|
6717
6875
|
case "ComposeHtmlReport":
|
|
6718
6876
|
return /* @__PURE__ */ n(
|
|
6719
|
-
|
|
6877
|
+
ir,
|
|
6720
6878
|
{
|
|
6721
6879
|
data: y,
|
|
6722
|
-
completed:
|
|
6723
|
-
isLatest:
|
|
6724
|
-
durationSeconds:
|
|
6880
|
+
completed: p.completed,
|
|
6881
|
+
isLatest: p.isLatest,
|
|
6882
|
+
durationSeconds: p.durationSeconds,
|
|
6725
6883
|
t: i
|
|
6726
6884
|
}
|
|
6727
6885
|
);
|
|
@@ -6730,14 +6888,14 @@ const Rr = ({
|
|
|
6730
6888
|
Pe,
|
|
6731
6889
|
{
|
|
6732
6890
|
data: { taskType: "MemoryChat", eventType: "FindSources" },
|
|
6733
|
-
isLatest:
|
|
6734
|
-
durationSeconds:
|
|
6891
|
+
isLatest: p.isLatest,
|
|
6892
|
+
durationSeconds: p.durationSeconds,
|
|
6735
6893
|
t: i
|
|
6736
6894
|
}
|
|
6737
6895
|
);
|
|
6738
6896
|
case "SourcesResult":
|
|
6739
6897
|
return /* @__PURE__ */ n(
|
|
6740
|
-
|
|
6898
|
+
ar,
|
|
6741
6899
|
{
|
|
6742
6900
|
data: y,
|
|
6743
6901
|
onSourceClick: l,
|
|
@@ -6766,12 +6924,12 @@ const Rr = ({
|
|
|
6766
6924
|
switch (y.eventType) {
|
|
6767
6925
|
case "Thinking":
|
|
6768
6926
|
return /* @__PURE__ */ n(
|
|
6769
|
-
|
|
6927
|
+
lr,
|
|
6770
6928
|
{
|
|
6771
6929
|
data: y,
|
|
6772
|
-
isLatest:
|
|
6773
|
-
durationSeconds:
|
|
6774
|
-
completed:
|
|
6930
|
+
isLatest: p.isLatest,
|
|
6931
|
+
durationSeconds: p.durationSeconds,
|
|
6932
|
+
completed: p.completed,
|
|
6775
6933
|
t: i
|
|
6776
6934
|
}
|
|
6777
6935
|
);
|
|
@@ -6786,34 +6944,45 @@ const Rr = ({
|
|
|
6786
6944
|
case "AutoActionCallRequested":
|
|
6787
6945
|
case "AutoActionCallSettled":
|
|
6788
6946
|
return /* @__PURE__ */ n(
|
|
6789
|
-
|
|
6947
|
+
dr,
|
|
6790
6948
|
{
|
|
6791
6949
|
data: y,
|
|
6792
|
-
isLatest:
|
|
6793
|
-
durationSeconds:
|
|
6950
|
+
isLatest: p.isLatest,
|
|
6951
|
+
durationSeconds: p.durationSeconds,
|
|
6794
6952
|
t: i
|
|
6795
6953
|
}
|
|
6796
6954
|
);
|
|
6797
6955
|
case "ActionApprovalRequested":
|
|
6798
6956
|
return /* @__PURE__ */ n(
|
|
6799
|
-
|
|
6957
|
+
ur,
|
|
6800
6958
|
{
|
|
6801
6959
|
data: y,
|
|
6802
|
-
isLatest:
|
|
6803
|
-
durationSeconds:
|
|
6804
|
-
completed:
|
|
6960
|
+
isLatest: p.isLatest,
|
|
6961
|
+
durationSeconds: p.durationSeconds,
|
|
6962
|
+
completed: p.completed,
|
|
6805
6963
|
t: i
|
|
6806
6964
|
}
|
|
6807
6965
|
);
|
|
6808
6966
|
case "ComponentRenderRequested":
|
|
6809
6967
|
return /* @__PURE__ */ n(
|
|
6810
|
-
|
|
6968
|
+
pr,
|
|
6811
6969
|
{
|
|
6812
6970
|
data: y,
|
|
6813
|
-
components:
|
|
6971
|
+
components: m,
|
|
6814
6972
|
t: i
|
|
6815
6973
|
}
|
|
6816
6974
|
);
|
|
6975
|
+
case "SemanticSearch":
|
|
6976
|
+
return /* @__PURE__ */ n(
|
|
6977
|
+
fr,
|
|
6978
|
+
{
|
|
6979
|
+
data: y,
|
|
6980
|
+
isLatest: p.isLatest,
|
|
6981
|
+
durationSeconds: p.durationSeconds,
|
|
6982
|
+
t: i,
|
|
6983
|
+
onSearchResultClick: s
|
|
6984
|
+
}
|
|
6985
|
+
);
|
|
6817
6986
|
case "Completed":
|
|
6818
6987
|
return /* @__PURE__ */ n(
|
|
6819
6988
|
X,
|
|
@@ -6851,8 +7020,8 @@ const Rr = ({
|
|
|
6851
7020
|
shimmerColor: x.shimmerHighlight
|
|
6852
7021
|
}
|
|
6853
7022
|
) }) : null;
|
|
6854
|
-
const
|
|
6855
|
-
const f =
|
|
7023
|
+
const R = e.filter((p, y) => {
|
|
7024
|
+
const f = p.item.data;
|
|
6856
7025
|
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox" || f.taskType === "ExploreProduct" && f.eventType === "ActionApprovalRequested" && !f.provisional)
|
|
6857
7026
|
return !1;
|
|
6858
7027
|
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
@@ -6902,17 +7071,17 @@ const Rr = ({
|
|
|
6902
7071
|
}
|
|
6903
7072
|
return !0;
|
|
6904
7073
|
});
|
|
6905
|
-
return /* @__PURE__ */
|
|
7074
|
+
return /* @__PURE__ */ u(
|
|
6906
7075
|
"div",
|
|
6907
7076
|
{
|
|
6908
7077
|
id: "agent-task-progress-verbose",
|
|
6909
7078
|
ref: h,
|
|
6910
7079
|
"data-theme": g,
|
|
6911
7080
|
children: [
|
|
6912
|
-
/* @__PURE__ */ n(
|
|
7081
|
+
/* @__PURE__ */ n(Rn, { children: R.map((p, y) => /* @__PURE__ */ n(
|
|
6913
7082
|
I.div,
|
|
6914
7083
|
{
|
|
6915
|
-
id: `agent-task-progress-item-${
|
|
7084
|
+
id: `agent-task-progress-item-${p.item.progressItemId}`,
|
|
6916
7085
|
initial: { opacity: 0, y: -20 },
|
|
6917
7086
|
animate: { opacity: 1, y: 0 },
|
|
6918
7087
|
transition: {
|
|
@@ -6923,25 +7092,25 @@ const Rr = ({
|
|
|
6923
7092
|
children: /* @__PURE__ */ n(
|
|
6924
7093
|
tn,
|
|
6925
7094
|
{
|
|
6926
|
-
progressItemId:
|
|
6927
|
-
children:
|
|
7095
|
+
progressItemId: p.item.progressItemId,
|
|
7096
|
+
children: S(p)
|
|
6928
7097
|
}
|
|
6929
7098
|
)
|
|
6930
7099
|
},
|
|
6931
|
-
|
|
7100
|
+
p.item.progressItemId
|
|
6932
7101
|
)) }),
|
|
6933
7102
|
o ? /* @__PURE__ */ n("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ n(Z, { message: o.message }) }) : null
|
|
6934
7103
|
]
|
|
6935
7104
|
}
|
|
6936
7105
|
);
|
|
6937
|
-
},
|
|
7106
|
+
}, Lr = ({ taskId: e, label: t, copiedLabel: o }) => {
|
|
6938
7107
|
const { colors: r } = M(), [i, a] = F(!1);
|
|
6939
7108
|
V(() => {
|
|
6940
7109
|
if (!i) return;
|
|
6941
7110
|
const s = window.setTimeout(() => a(!1), 1500);
|
|
6942
7111
|
return () => window.clearTimeout(s);
|
|
6943
7112
|
}, [i]);
|
|
6944
|
-
const l =
|
|
7113
|
+
const l = _(async () => {
|
|
6945
7114
|
try {
|
|
6946
7115
|
await navigator.clipboard.writeText(e), a(!0);
|
|
6947
7116
|
} catch {
|
|
@@ -6968,7 +7137,7 @@ const Rr = ({
|
|
|
6968
7137
|
children: i ? o : t
|
|
6969
7138
|
}
|
|
6970
7139
|
);
|
|
6971
|
-
},
|
|
7140
|
+
}, jr = ({
|
|
6972
7141
|
agentTask: e,
|
|
6973
7142
|
theme: t = "light",
|
|
6974
7143
|
language: o,
|
|
@@ -6979,8 +7148,8 @@ const Rr = ({
|
|
|
6979
7148
|
components: s
|
|
6980
7149
|
}) => {
|
|
6981
7150
|
var x;
|
|
6982
|
-
const c =
|
|
6983
|
-
return /* @__PURE__ */ n(
|
|
7151
|
+
const c = Jn(e), d = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : o ?? "en", m = rt(d), g = (x = e.confirmedData) == null ? void 0 : x.taskId;
|
|
7152
|
+
return /* @__PURE__ */ n(et, { theme: t, children: /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
|
|
6984
7153
|
g ? /* @__PURE__ */ n(
|
|
6985
7154
|
"div",
|
|
6986
7155
|
{
|
|
@@ -6991,23 +7160,23 @@ const Rr = ({
|
|
|
6991
7160
|
zIndex: 1
|
|
6992
7161
|
},
|
|
6993
7162
|
children: /* @__PURE__ */ n(
|
|
6994
|
-
|
|
7163
|
+
Lr,
|
|
6995
7164
|
{
|
|
6996
7165
|
taskId: g,
|
|
6997
|
-
label:
|
|
6998
|
-
copiedLabel:
|
|
7166
|
+
label: m.copyId,
|
|
7167
|
+
copiedLabel: m.copiedId
|
|
6999
7168
|
}
|
|
7000
7169
|
)
|
|
7001
7170
|
}
|
|
7002
7171
|
) : null,
|
|
7003
7172
|
/* @__PURE__ */ n(
|
|
7004
|
-
|
|
7173
|
+
zr,
|
|
7005
7174
|
{
|
|
7006
7175
|
progressViewItems: c,
|
|
7007
7176
|
loading: e.loading,
|
|
7008
7177
|
error: e.error,
|
|
7009
7178
|
loadingText: e.loadingText,
|
|
7010
|
-
t:
|
|
7179
|
+
t: m,
|
|
7011
7180
|
onMemoryClick: r,
|
|
7012
7181
|
onSourceClick: i,
|
|
7013
7182
|
onSearchResultClick: a,
|
|
@@ -7019,18 +7188,18 @@ const Rr = ({
|
|
|
7019
7188
|
] }) });
|
|
7020
7189
|
};
|
|
7021
7190
|
export {
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7191
|
+
jr as AgentTaskProgress,
|
|
7192
|
+
et as AgentTaskThemeProvider,
|
|
7193
|
+
jn as ApprovalCard,
|
|
7194
|
+
Ur as ApprovalSet,
|
|
7026
7195
|
K as Checkmark,
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7196
|
+
Gr as FencyProvider,
|
|
7197
|
+
Br as MemorySearchCompletedResults,
|
|
7198
|
+
Vr as StreamEventManager,
|
|
7030
7199
|
ee as XMark,
|
|
7031
|
-
|
|
7200
|
+
Zn as darkAgentTaskThemeColors,
|
|
7032
7201
|
Je as getAgentTaskPrismStyle,
|
|
7033
7202
|
Qe as lightAgentTaskThemeColors,
|
|
7034
7203
|
M as useAgentTaskTheme,
|
|
7035
|
-
|
|
7204
|
+
qr as useAgentTasks
|
|
7036
7205
|
};
|