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