@fencyai/react 0.1.214 → 0.1.215
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/index.js
CHANGED
|
@@ -16,35 +16,35 @@ function Gn({
|
|
|
16
16
|
}) {
|
|
17
17
|
const [n, i] = C(
|
|
18
18
|
null
|
|
19
|
-
), [a, l] = C(!0), [d, c] = C(null), [
|
|
19
|
+
), [a, l] = C(!0), [d, c] = C(null), [u, g] = C([]), h = D(null), x = D(null);
|
|
20
20
|
N(() => {
|
|
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]), N(() => {
|
|
27
27
|
if (!n) return;
|
|
28
28
|
x.current || (x.current = new Be(n));
|
|
29
|
-
const
|
|
29
|
+
const p = new Pe(
|
|
30
30
|
n,
|
|
31
31
|
o
|
|
32
32
|
);
|
|
33
|
-
h.current =
|
|
34
|
-
const f =
|
|
33
|
+
h.current = p, p.startPeriodicCleanup();
|
|
34
|
+
const f = p.onChange((T) => {
|
|
35
35
|
var M;
|
|
36
36
|
g(T), (M = x.current) == null || M.updateStreams(T);
|
|
37
37
|
});
|
|
38
38
|
return () => {
|
|
39
39
|
var T;
|
|
40
|
-
f(),
|
|
40
|
+
f(), p.destroy(), h.current = null, (T = x.current) == null || T.cleanup(), x.current = null;
|
|
41
41
|
};
|
|
42
42
|
}, [n, o]);
|
|
43
43
|
const S = L(
|
|
44
|
-
async (
|
|
44
|
+
async (p) => {
|
|
45
45
|
if (!h.current)
|
|
46
46
|
throw new Error("Fency instance not initialized");
|
|
47
|
-
return h.current.getOrCreateStream(
|
|
47
|
+
return h.current.getOrCreateStream(p);
|
|
48
48
|
},
|
|
49
49
|
[]
|
|
50
50
|
);
|
|
@@ -55,11 +55,11 @@ function Gn({
|
|
|
55
55
|
] });
|
|
56
56
|
if (!n)
|
|
57
57
|
return null;
|
|
58
|
-
const y =
|
|
58
|
+
const y = u.length > 0 ? u[u.length - 1] : null, s = {
|
|
59
59
|
fency: n,
|
|
60
60
|
loading: a,
|
|
61
61
|
error: d,
|
|
62
|
-
activeStreams:
|
|
62
|
+
activeStreams: u,
|
|
63
63
|
latestStream: y,
|
|
64
64
|
eventManager: x.current,
|
|
65
65
|
getOrCreateStream: S
|
|
@@ -79,7 +79,7 @@ const Ze = (e) => {
|
|
|
79
79
|
return N(() => {
|
|
80
80
|
if (!o.eventManager) return;
|
|
81
81
|
const l = {
|
|
82
|
-
onMessage: (c,
|
|
82
|
+
onMessage: (c, u) => {
|
|
83
83
|
var h, x, S;
|
|
84
84
|
const g = Le(c);
|
|
85
85
|
if (g)
|
|
@@ -95,13 +95,13 @@ const Ze = (e) => {
|
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
onError: (c,
|
|
98
|
+
onError: (c, u) => {
|
|
99
99
|
var g;
|
|
100
100
|
(g = e == null ? void 0 : e.onStreamError) == null || g.call(e, {
|
|
101
101
|
streamId: c,
|
|
102
102
|
error: {
|
|
103
103
|
code: "UnknownError",
|
|
104
|
-
message:
|
|
104
|
+
message: u ?? "Unknown error in useStream"
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
}
|
|
@@ -148,10 +148,10 @@ const On = (e) => {
|
|
|
148
148
|
(y) => {
|
|
149
149
|
if (y)
|
|
150
150
|
return async (s) => {
|
|
151
|
-
const { clientToken:
|
|
151
|
+
const { clientToken: p } = await y(s), f = await We({
|
|
152
152
|
pk: o.fency.publishableKey,
|
|
153
153
|
baseUrl: o.fency.baseUrl,
|
|
154
|
-
clientToken:
|
|
154
|
+
clientToken: p,
|
|
155
155
|
agentTaskFileId: s
|
|
156
156
|
});
|
|
157
157
|
if (f.type === "error")
|
|
@@ -163,23 +163,23 @@ const On = (e) => {
|
|
|
163
163
|
[o.fency.baseUrl, o.fency.publishableKey]
|
|
164
164
|
), c = L(
|
|
165
165
|
(y, s) => {
|
|
166
|
-
const
|
|
166
|
+
const p = t.tasks.filter(
|
|
167
167
|
(f) => {
|
|
168
168
|
var T;
|
|
169
169
|
return f.streamId === y && f.loading && ((T = f.confirmedData) == null ? void 0 : T.taskId);
|
|
170
170
|
}
|
|
171
171
|
).map((f) => f.confirmedData.taskId);
|
|
172
172
|
n({ type: "STREAM_FAILURE", streamId: y, error: s });
|
|
173
|
-
for (const f of
|
|
173
|
+
for (const f of p) {
|
|
174
174
|
i.current.delete(f);
|
|
175
175
|
const T = a.current.get(f);
|
|
176
176
|
T && (a.current.delete(f), T({ type: "error", error: s }));
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
[t.tasks]
|
|
180
|
-
),
|
|
180
|
+
), u = L(
|
|
181
181
|
(y) => {
|
|
182
|
-
var
|
|
182
|
+
var p;
|
|
183
183
|
if (!i.current.has(y.agentTaskId)) return;
|
|
184
184
|
const s = y.data;
|
|
185
185
|
if (He(s)) {
|
|
@@ -217,11 +217,11 @@ const On = (e) => {
|
|
|
217
217
|
}
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
(
|
|
220
|
+
(p = e.onAgentTaskProgressItemUpdated) == null || p.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
|
|
221
221
|
},
|
|
222
222
|
[e]
|
|
223
223
|
), { createStream: g } = Ze({
|
|
224
|
-
onAgentTaskProgressItemUpdated:
|
|
224
|
+
onAgentTaskProgressItemUpdated: u,
|
|
225
225
|
onStreamError: (y) => {
|
|
226
226
|
var s;
|
|
227
227
|
(s = e == null ? void 0 : e.onStreamError) == null || s.call(e, y), c(y.streamId, y.error);
|
|
@@ -243,7 +243,7 @@ const On = (e) => {
|
|
|
243
243
|
}), h = L(
|
|
244
244
|
async (y, s) => {
|
|
245
245
|
var A;
|
|
246
|
-
const
|
|
246
|
+
const p = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
|
|
247
247
|
if (f === void 0)
|
|
248
248
|
throw new Error(
|
|
249
249
|
"fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
|
|
@@ -251,7 +251,7 @@ const On = (e) => {
|
|
|
251
251
|
const T = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
|
|
252
252
|
if (M.type === "success") {
|
|
253
253
|
const W = (/* @__PURE__ */ new Date()).toISOString(), B = {
|
|
254
|
-
taskKey:
|
|
254
|
+
taskKey: p,
|
|
255
255
|
streamId: M.stream.id,
|
|
256
256
|
triggeredAt: W,
|
|
257
257
|
confirmedData: null,
|
|
@@ -287,7 +287,7 @@ const On = (e) => {
|
|
|
287
287
|
G
|
|
288
288
|
), n({
|
|
289
289
|
type: "TASK_CONFIRMED",
|
|
290
|
-
taskKey:
|
|
290
|
+
taskKey: p,
|
|
291
291
|
taskId: I.agentTask.id,
|
|
292
292
|
createdAt: I.agentTask.createdAt
|
|
293
293
|
}), await new Promise(
|
|
@@ -302,7 +302,7 @@ const On = (e) => {
|
|
|
302
302
|
if (I.type === "error")
|
|
303
303
|
return n({
|
|
304
304
|
type: "TASK_API_ERROR",
|
|
305
|
-
taskKey:
|
|
305
|
+
taskKey: p,
|
|
306
306
|
error: I.error
|
|
307
307
|
}), {
|
|
308
308
|
type: "error",
|
|
@@ -315,7 +315,7 @@ const On = (e) => {
|
|
|
315
315
|
};
|
|
316
316
|
return n({
|
|
317
317
|
type: "TASK_API_ERROR",
|
|
318
|
-
taskKey:
|
|
318
|
+
taskKey: p,
|
|
319
319
|
error: G
|
|
320
320
|
}), {
|
|
321
321
|
type: "error",
|
|
@@ -330,7 +330,7 @@ const On = (e) => {
|
|
|
330
330
|
};
|
|
331
331
|
return n({
|
|
332
332
|
type: "TASK_API_ERROR",
|
|
333
|
-
taskKey:
|
|
333
|
+
taskKey: p,
|
|
334
334
|
error: I
|
|
335
335
|
}), {
|
|
336
336
|
type: "error",
|
|
@@ -1113,7 +1113,7 @@ const $ = ({
|
|
|
1113
1113
|
null
|
|
1114
1114
|
), [d, c] = C(
|
|
1115
1115
|
null
|
|
1116
|
-
), [
|
|
1116
|
+
), [u, g] = C(!1), [h, x] = C(!1), S = L(
|
|
1117
1117
|
(f) => {
|
|
1118
1118
|
o && (l(null), g(!0), (async () => {
|
|
1119
1119
|
try {
|
|
@@ -1165,7 +1165,7 @@ const $ = ({
|
|
|
1165
1165
|
{
|
|
1166
1166
|
type: "button",
|
|
1167
1167
|
className: "fency-file-download-button",
|
|
1168
|
-
disabled:
|
|
1168
|
+
disabled: u,
|
|
1169
1169
|
onClick: () => S(W),
|
|
1170
1170
|
children: T
|
|
1171
1171
|
}
|
|
@@ -1174,7 +1174,7 @@ const $ = ({
|
|
|
1174
1174
|
{
|
|
1175
1175
|
type: "button",
|
|
1176
1176
|
className: "fency-file-download-button",
|
|
1177
|
-
disabled:
|
|
1177
|
+
disabled: u,
|
|
1178
1178
|
onClick: () => {
|
|
1179
1179
|
console.error(
|
|
1180
1180
|
"[fency] File download link clicked but no onFileDownload handler is configured. Pass fetchAgentTaskFileDownloadClientToken to useAgentTasks."
|
|
@@ -1212,21 +1212,21 @@ const $ = ({
|
|
|
1212
1212
|
);
|
|
1213
1213
|
}
|
|
1214
1214
|
}), [
|
|
1215
|
-
|
|
1215
|
+
u,
|
|
1216
1216
|
h,
|
|
1217
1217
|
S,
|
|
1218
1218
|
y,
|
|
1219
1219
|
o,
|
|
1220
1220
|
t,
|
|
1221
1221
|
i
|
|
1222
|
-
]),
|
|
1222
|
+
]), p = a ?? d;
|
|
1223
1223
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
1224
|
-
|
|
1224
|
+
p ? /* @__PURE__ */ r(
|
|
1225
1225
|
"p",
|
|
1226
1226
|
{
|
|
1227
1227
|
role: "alert",
|
|
1228
1228
|
style: { color: "#b91c1c", marginBottom: 8, fontSize: 14 },
|
|
1229
|
-
children:
|
|
1229
|
+
children: p
|
|
1230
1230
|
}
|
|
1231
1231
|
) : null,
|
|
1232
1232
|
/* @__PURE__ */ r(
|
|
@@ -1591,16 +1591,16 @@ function w({
|
|
|
1591
1591
|
startOnView: l = !1,
|
|
1592
1592
|
once: d = !1,
|
|
1593
1593
|
inViewMargin: c,
|
|
1594
|
-
spread:
|
|
1594
|
+
spread: u = 2,
|
|
1595
1595
|
color: g,
|
|
1596
1596
|
shimmerColor: h,
|
|
1597
1597
|
direction: x = "fromBottom"
|
|
1598
1598
|
}) {
|
|
1599
|
-
const { colors: S } = b(), y = g ?? S.shimmerBase, s = h ?? S.shimmerHighlight,
|
|
1599
|
+
const { colors: S } = b(), y = g ?? S.shimmerBase, s = h ?? S.shimmerHighlight, p = D(null), f = Ve(p, { once: d, margin: c }), T = z(() => e.length * u, [e, u]), M = !l || f, A = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
|
|
1600
1600
|
return /* @__PURE__ */ r(
|
|
1601
1601
|
v.span,
|
|
1602
1602
|
{
|
|
1603
|
-
ref:
|
|
1603
|
+
ref: p,
|
|
1604
1604
|
className: a,
|
|
1605
1605
|
style: {
|
|
1606
1606
|
position: "relative",
|
|
@@ -1643,10 +1643,10 @@ function w({
|
|
|
1643
1643
|
);
|
|
1644
1644
|
}
|
|
1645
1645
|
const Z = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
|
|
1646
|
-
const { colors: a } = b(), [l, d] = C(!1),
|
|
1646
|
+
const { colors: a } = b(), [l, d] = C(!1), u = (e.memories ?? []).map((T) => T.memoryTitle), g = u.length > 0, h = g && u.length > Z, x = h && !l ? u.slice(0, Z) : u, S = u.length - Z, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, p = g ? `${n.searchingIn}${V(
|
|
1647
1647
|
x,
|
|
1648
1648
|
y ? n.and : void 0
|
|
1649
|
-
)}` : "", f = g ? `${s}${
|
|
1649
|
+
)}` : "", f = g ? `${s}${p}` : `${n.searchingPrefix}${e.queryDescription}`;
|
|
1650
1650
|
return /* @__PURE__ */ m(
|
|
1651
1651
|
"div",
|
|
1652
1652
|
{
|
|
@@ -1667,7 +1667,7 @@ const Z = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1667
1667
|
e.queryDescription,
|
|
1668
1668
|
"'"
|
|
1669
1669
|
] }),
|
|
1670
|
-
|
|
1670
|
+
p
|
|
1671
1671
|
] }) : `${n.searchingPrefix}${e.queryDescription}` }),
|
|
1672
1672
|
h && !l && /* @__PURE__ */ m(R, { children: [
|
|
1673
1673
|
" ",
|
|
@@ -1852,14 +1852,14 @@ function hr({
|
|
|
1852
1852
|
borderTop: `1px solid ${n.borderDivider}`
|
|
1853
1853
|
},
|
|
1854
1854
|
children: e.map((d, c) => {
|
|
1855
|
-
const
|
|
1855
|
+
const u = ae(
|
|
1856
1856
|
d.chunks
|
|
1857
1857
|
), g = [
|
|
1858
1858
|
le(d),
|
|
1859
1859
|
k(t.scoreLabel, {
|
|
1860
1860
|
n: d.matchingChunkScore.toFixed(2)
|
|
1861
1861
|
}),
|
|
1862
|
-
|
|
1862
|
+
u.length > 0 ? ie(u, t) : t.pagesNotAvailable
|
|
1863
1863
|
].filter(
|
|
1864
1864
|
(y) => y != null && y !== ""
|
|
1865
1865
|
), h = {
|
|
@@ -1867,7 +1867,7 @@ function hr({
|
|
|
1867
1867
|
memoryTitle: d.memoryTitle,
|
|
1868
1868
|
memoryTypeId: d.memoryTypeId,
|
|
1869
1869
|
memoryTypeName: d.memoryTypeName,
|
|
1870
|
-
pageNumbers:
|
|
1870
|
+
pageNumbers: u
|
|
1871
1871
|
}, x = `${d.memoryId}-${c}`, S = i === x;
|
|
1872
1872
|
return /* @__PURE__ */ m(
|
|
1873
1873
|
"div",
|
|
@@ -2105,12 +2105,12 @@ const se = ({
|
|
|
2105
2105
|
compactTop: n = !1
|
|
2106
2106
|
}) => {
|
|
2107
2107
|
const { colors: i } = b(), a = e.items, l = a.reduce(
|
|
2108
|
-
(s,
|
|
2108
|
+
(s, p) => s + Ee(p),
|
|
2109
2109
|
0
|
|
2110
|
-
), d = new Set(a.map((s) => s.memoryId)).size, [c,
|
|
2111
|
-
|
|
2112
|
-
...
|
|
2113
|
-
[s]: !
|
|
2110
|
+
), d = new Set(a.map((s) => s.memoryId)).size, [c, u] = C({}), g = L((s) => {
|
|
2111
|
+
u((p) => ({
|
|
2112
|
+
...p,
|
|
2113
|
+
[s]: !p[s]
|
|
2114
2114
|
}));
|
|
2115
2115
|
}, []), h = z(() => gr(a), [a]), x = d === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
|
|
2116
2116
|
n: d
|
|
@@ -2201,7 +2201,7 @@ const kr = ({
|
|
|
2201
2201
|
)
|
|
2202
2202
|
] });
|
|
2203
2203
|
}, ee = 5, Sr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
2204
|
-
const { colors: i } = b(), [a, l] = C(!1), d = e.titles, c = d.length > 0,
|
|
2204
|
+
const { colors: i } = b(), [a, l] = C(!1), d = e.titles, c = d.length > 0, u = c && d.length > ee, g = u && !a ? d.slice(0, ee) : d, h = d.length - ee, x = !u || a, S = c ? `${n.findingMemoriesIn}${V(
|
|
2205
2205
|
g,
|
|
2206
2206
|
x ? n.and : void 0
|
|
2207
2207
|
)}` : n.findingMemories;
|
|
@@ -2215,9 +2215,9 @@ const kr = ({
|
|
|
2215
2215
|
initial: { opacity: 0, y: -10 },
|
|
2216
2216
|
animate: { opacity: 1, y: 0 },
|
|
2217
2217
|
transition: { duration: 0.3, delay: 0 },
|
|
2218
|
-
children: o && !t && !
|
|
2218
|
+
children: o && !t && !u ? /* @__PURE__ */ r(w, { text: S, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
2219
2219
|
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: S }),
|
|
2220
|
-
|
|
2220
|
+
u && !a && /* @__PURE__ */ m(R, { children: [
|
|
2221
2221
|
" ",
|
|
2222
2222
|
/* @__PURE__ */ r(
|
|
2223
2223
|
"button",
|
|
@@ -2241,7 +2241,7 @@ const kr = ({
|
|
|
2241
2241
|
}
|
|
2242
2242
|
)
|
|
2243
2243
|
] }),
|
|
2244
|
-
|
|
2244
|
+
u && a && /* @__PURE__ */ m(R, { children: [
|
|
2245
2245
|
" ",
|
|
2246
2246
|
/* @__PURE__ */ r(
|
|
2247
2247
|
"button",
|
|
@@ -2280,8 +2280,8 @@ const kr = ({
|
|
|
2280
2280
|
)
|
|
2281
2281
|
] });
|
|
2282
2282
|
}, re = 5, br = ({ data: e, t: o }) => {
|
|
2283
|
-
const { colors: t } = b(), [n, i] = C(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, c = d && l.length > re,
|
|
2284
|
-
|
|
2283
|
+
const { colors: t } = b(), [n, i] = C(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, c = d && l.length > re, u = c && !n ? l.slice(0, re) : l, g = l.length - re, h = !c || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, S = d ? `${x}${V(
|
|
2284
|
+
u,
|
|
2285
2285
|
h ? o.and : void 0
|
|
2286
2286
|
)}` : o.memoriesFound;
|
|
2287
2287
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
@@ -2427,7 +2427,7 @@ const Re = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2427
2427
|
onSourceClick: i,
|
|
2428
2428
|
t: a
|
|
2429
2429
|
}) => {
|
|
2430
|
-
const { colors: l } = b(), [d, c] = C(!1),
|
|
2430
|
+
const { colors: l } = b(), [d, c] = C(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = Tr(h, a);
|
|
2431
2431
|
return /* @__PURE__ */ m(
|
|
2432
2432
|
v.div,
|
|
2433
2433
|
{
|
|
@@ -2435,7 +2435,7 @@ const Re = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2435
2435
|
initial: { opacity: 0, scale: 0.9 },
|
|
2436
2436
|
animate: { opacity: 1, scale: 1 },
|
|
2437
2437
|
transition: { duration: 0.25, delay: o * 0.05 },
|
|
2438
|
-
onClick:
|
|
2438
|
+
onClick: u && !g ? async () => {
|
|
2439
2439
|
n(e.memoryId);
|
|
2440
2440
|
try {
|
|
2441
2441
|
await i({
|
|
@@ -2449,8 +2449,8 @@ const Re = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2449
2449
|
n(null);
|
|
2450
2450
|
}
|
|
2451
2451
|
} : void 0,
|
|
2452
|
-
onMouseEnter:
|
|
2453
|
-
onMouseLeave:
|
|
2452
|
+
onMouseEnter: u && !g ? () => c(!0) : void 0,
|
|
2453
|
+
onMouseLeave: u && !g ? () => c(!1) : void 0,
|
|
2454
2454
|
style: {
|
|
2455
2455
|
display: "inline-flex",
|
|
2456
2456
|
flexDirection: "column",
|
|
@@ -2459,7 +2459,7 @@ const Re = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2459
2459
|
borderRadius: "6px",
|
|
2460
2460
|
border: `1px solid ${l.borderStrong}`,
|
|
2461
2461
|
backgroundColor: d ? l.sourcesBadgeBg : l.transparent,
|
|
2462
|
-
cursor:
|
|
2462
|
+
cursor: u && !g ? "pointer" : g ? "wait" : "default",
|
|
2463
2463
|
transition: "background-color 0.15s ease",
|
|
2464
2464
|
userSelect: "none",
|
|
2465
2465
|
pointerEvents: g ? "none" : void 0
|
|
@@ -2549,14 +2549,14 @@ function wr({
|
|
|
2549
2549
|
completed: o,
|
|
2550
2550
|
t
|
|
2551
2551
|
}) {
|
|
2552
|
-
const { colors: n } = b(), [i, a] = C(!1), l = e.result ?? e.error, d = l != null && l.length > me, c = l != null ? i || !d ? l : `${l.slice(0, me)}...` : void 0,
|
|
2552
|
+
const { colors: n } = b(), [i, a] = C(!1), l = e.result ?? e.error, d = l != null && l.length > me, c = l != null ? i || !d ? l : `${l.slice(0, me)}...` : void 0, u = d, g = e.error != null;
|
|
2553
2553
|
return /* @__PURE__ */ m(
|
|
2554
2554
|
v.div,
|
|
2555
2555
|
{
|
|
2556
2556
|
initial: { opacity: 0 },
|
|
2557
2557
|
animate: { opacity: 1 },
|
|
2558
2558
|
transition: { duration: 0.25 },
|
|
2559
|
-
onClick:
|
|
2559
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
2560
2560
|
style: {
|
|
2561
2561
|
paddingTop: "12px",
|
|
2562
2562
|
paddingBottom: "12px",
|
|
@@ -2566,7 +2566,7 @@ function wr({
|
|
|
2566
2566
|
alignItems: "center",
|
|
2567
2567
|
gap: "10px",
|
|
2568
2568
|
minWidth: 0,
|
|
2569
|
-
cursor:
|
|
2569
|
+
cursor: u ? "pointer" : "default"
|
|
2570
2570
|
},
|
|
2571
2571
|
children: [
|
|
2572
2572
|
/* @__PURE__ */ r(
|
|
@@ -2611,7 +2611,7 @@ function wr({
|
|
|
2611
2611
|
children: c
|
|
2612
2612
|
}
|
|
2613
2613
|
),
|
|
2614
|
-
|
|
2614
|
+
u && /* @__PURE__ */ r(
|
|
2615
2615
|
"span",
|
|
2616
2616
|
{
|
|
2617
2617
|
style: {
|
|
@@ -2821,7 +2821,7 @@ function Fr({
|
|
|
2821
2821
|
"button",
|
|
2822
2822
|
{
|
|
2823
2823
|
type: "button",
|
|
2824
|
-
onClick: () => i((
|
|
2824
|
+
onClick: () => i((u) => !u),
|
|
2825
2825
|
style: {
|
|
2826
2826
|
border: "none",
|
|
2827
2827
|
background: "none",
|
|
@@ -2849,7 +2849,7 @@ function Fr({
|
|
|
2849
2849
|
paddingTop: 8,
|
|
2850
2850
|
borderTop: `1px solid ${t.borderDivider}`
|
|
2851
2851
|
},
|
|
2852
|
-
children: a.map((
|
|
2852
|
+
children: a.map((u, g) => /* @__PURE__ */ r(
|
|
2853
2853
|
"div",
|
|
2854
2854
|
{
|
|
2855
2855
|
style: {
|
|
@@ -2858,9 +2858,9 @@ function Fr({
|
|
|
2858
2858
|
borderBottom: g < a.length - 1 ? `1px solid ${t.border}` : void 0,
|
|
2859
2859
|
minWidth: 0
|
|
2860
2860
|
},
|
|
2861
|
-
children: /* @__PURE__ */ r(Rr, { item:
|
|
2861
|
+
children: /* @__PURE__ */ r(Rr, { item: u, t: o })
|
|
2862
2862
|
},
|
|
2863
|
-
`${
|
|
2863
|
+
`${u.link}-${u.rank}-${g}`
|
|
2864
2864
|
))
|
|
2865
2865
|
}
|
|
2866
2866
|
)
|
|
@@ -2924,7 +2924,7 @@ function Wr({
|
|
|
2924
2924
|
t: o,
|
|
2925
2925
|
isLatest: t = !1
|
|
2926
2926
|
}) {
|
|
2927
|
-
const { colors: n } = b(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, d = D(null), c = e.summary != null && e.summary !== "",
|
|
2927
|
+
const { colors: n } = b(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, d = D(null), c = e.summary != null && e.summary !== "", u = Fe(e, o), g = l || c || !a && u != null, h = e.error == null && (e.summary == null || e.summary === "");
|
|
2928
2928
|
return N(() => {
|
|
2929
2929
|
const x = d.current;
|
|
2930
2930
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
@@ -2989,7 +2989,7 @@ function Wr({
|
|
|
2989
2989
|
children: ze(e.url)
|
|
2990
2990
|
}
|
|
2991
2991
|
),
|
|
2992
|
-
!a &&
|
|
2992
|
+
!a && u != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(w, { text: u, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: u }) }),
|
|
2993
2993
|
a && /* @__PURE__ */ r(
|
|
2994
2994
|
"div",
|
|
2995
2995
|
{
|
|
@@ -3031,7 +3031,7 @@ function Hr({
|
|
|
3031
3031
|
item: e,
|
|
3032
3032
|
t: o
|
|
3033
3033
|
}) {
|
|
3034
|
-
const { colors: t } = b(), [n, i] = C(!1), a = e.error ?? e.summary ?? "", l = e.error != null, d = a.length > he, c = a.length === 0 ? void 0 : n || !d ? a : `${a.slice(0, he)}...`,
|
|
3034
|
+
const { colors: t } = b(), [n, i] = C(!1), a = e.error ?? e.summary ?? "", l = e.error != null, d = a.length > he, c = a.length === 0 ? void 0 : n || !d ? a : `${a.slice(0, he)}...`, u = Fe(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
|
|
3035
3035
|
return /* @__PURE__ */ m(
|
|
3036
3036
|
v.div,
|
|
3037
3037
|
{
|
|
@@ -3093,7 +3093,7 @@ function Hr({
|
|
|
3093
3093
|
children: ze(e.url)
|
|
3094
3094
|
}
|
|
3095
3095
|
),
|
|
3096
|
-
c == null &&
|
|
3096
|
+
c == null && u != null && /* @__PURE__ */ r(
|
|
3097
3097
|
"span",
|
|
3098
3098
|
{
|
|
3099
3099
|
style: {
|
|
@@ -3101,7 +3101,7 @@ function Hr({
|
|
|
3101
3101
|
color: t.textTertiary,
|
|
3102
3102
|
lineHeight: 1.4
|
|
3103
3103
|
},
|
|
3104
|
-
children:
|
|
3104
|
+
children: u
|
|
3105
3105
|
}
|
|
3106
3106
|
),
|
|
3107
3107
|
c != null && /* @__PURE__ */ m(R, { children: [
|
|
@@ -3205,12 +3205,12 @@ function Nr({
|
|
|
3205
3205
|
t
|
|
3206
3206
|
}) {
|
|
3207
3207
|
const { colors: n } = b(), [i, a] = C(!1), l = e.results ?? [], { successCount: d, errorCount: c } = z(() => {
|
|
3208
|
-
let s = 0,
|
|
3208
|
+
let s = 0, p = 0;
|
|
3209
3209
|
for (const f of l)
|
|
3210
|
-
f.error != null ?
|
|
3211
|
-
return { successCount: s, errorCount:
|
|
3212
|
-
}, [l]),
|
|
3213
|
-
return
|
|
3210
|
+
f.error != null ? p += 1 : s += 1;
|
|
3211
|
+
return { successCount: s, errorCount: p };
|
|
3212
|
+
}, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => Br(s)), x = o && !h ? u === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: u, query: g }) : u === 1 ? t.scrapedPage : k(t.scrapedPages, { n: u }), S = k(t.scrapeOkCount, { n: d }), y = c > 0 ? `${x} - ${S}, ${k(t.scrapeFailedCount, { n: c })}` : `${x} - ${S}`;
|
|
3213
|
+
return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
|
|
3214
3214
|
"div",
|
|
3215
3215
|
{
|
|
3216
3216
|
style: {
|
|
@@ -3671,7 +3671,7 @@ const Yr = ({
|
|
|
3671
3671
|
t: i,
|
|
3672
3672
|
onMemoryClick: a
|
|
3673
3673
|
}) => {
|
|
3674
|
-
const { colors: l } = b(), d = e.reasoningCompleted === !0 || n || ne(e), c = !d,
|
|
3674
|
+
const { colors: l } = b(), d = e.reasoningCompleted === !0 || n || ne(e), c = !d, u = !j(e) && !ne(e), [g, h] = C(!1), x = j(e) && e.reasoningCompleted !== !0, S = u && c, y = j(e) && !x, s = d ? Xr(o, t) : void 0;
|
|
3675
3675
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3676
3676
|
/* @__PURE__ */ m(
|
|
3677
3677
|
v.div,
|
|
@@ -3718,7 +3718,7 @@ const Yr = ({
|
|
|
3718
3718
|
"button",
|
|
3719
3719
|
{
|
|
3720
3720
|
type: "button",
|
|
3721
|
-
onClick: () => h((
|
|
3721
|
+
onClick: () => h((p) => !p),
|
|
3722
3722
|
style: {
|
|
3723
3723
|
alignSelf: "flex-start",
|
|
3724
3724
|
border: "none",
|
|
@@ -3859,7 +3859,7 @@ const Zr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3859
3859
|
)
|
|
3860
3860
|
] });
|
|
3861
3861
|
}, oe = 5, nn = ({ data: e, t: o }) => {
|
|
3862
|
-
const { colors: t } = b(), [n, i] = C(!1), a = e.memories.map((S) => S.memoryTitle), l = a.length > 0, d = l && a.length > oe, c = d && !n ? a.slice(0, oe) : a,
|
|
3862
|
+
const { colors: t } = b(), [n, i] = C(!1), a = e.memories.map((S) => S.memoryTitle), l = a.length > 0, d = l && a.length > oe, c = d && !n ? a.slice(0, oe) : a, u = a.length - oe, g = !d || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${V(
|
|
3863
3863
|
c,
|
|
3864
3864
|
g ? o.and : void 0
|
|
3865
3865
|
)}` : o.memoriesFound;
|
|
@@ -3891,7 +3891,7 @@ const Zr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3891
3891
|
fontFamily: "inherit"
|
|
3892
3892
|
},
|
|
3893
3893
|
children: k(o.moreMemories, {
|
|
3894
|
-
n:
|
|
3894
|
+
n: u
|
|
3895
3895
|
})
|
|
3896
3896
|
}
|
|
3897
3897
|
)
|
|
@@ -3978,14 +3978,14 @@ function ln({
|
|
|
3978
3978
|
completed: o,
|
|
3979
3979
|
t
|
|
3980
3980
|
}) {
|
|
3981
|
-
const { colors: n } = b(), [i, a] = C(!1), l = e.summary ?? e.error, d = l != null && l.length > xe, c = l != null ? i || !d ? l : `${l.slice(0, xe)}...` : void 0,
|
|
3981
|
+
const { colors: n } = b(), [i, a] = C(!1), l = e.summary ?? e.error, d = l != null && l.length > xe, c = l != null ? i || !d ? l : `${l.slice(0, xe)}...` : void 0, u = d, g = e.error != null;
|
|
3982
3982
|
return /* @__PURE__ */ m(
|
|
3983
3983
|
v.div,
|
|
3984
3984
|
{
|
|
3985
3985
|
initial: { opacity: 0 },
|
|
3986
3986
|
animate: { opacity: 1 },
|
|
3987
3987
|
transition: { duration: 0.25 },
|
|
3988
|
-
onClick:
|
|
3988
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
3989
3989
|
style: {
|
|
3990
3990
|
paddingTop: "12px",
|
|
3991
3991
|
paddingBottom: "12px",
|
|
@@ -3995,7 +3995,7 @@ function ln({
|
|
|
3995
3995
|
alignItems: "center",
|
|
3996
3996
|
gap: "10px",
|
|
3997
3997
|
minWidth: 0,
|
|
3998
|
-
cursor:
|
|
3998
|
+
cursor: u ? "pointer" : "default"
|
|
3999
3999
|
},
|
|
4000
4000
|
children: [
|
|
4001
4001
|
/* @__PURE__ */ r(
|
|
@@ -4044,7 +4044,7 @@ function ln({
|
|
|
4044
4044
|
children: c
|
|
4045
4045
|
}
|
|
4046
4046
|
),
|
|
4047
|
-
|
|
4047
|
+
u && /* @__PURE__ */ r(
|
|
4048
4048
|
"span",
|
|
4049
4049
|
{
|
|
4050
4050
|
style: {
|
|
@@ -4093,12 +4093,11 @@ function Q(e) {
|
|
|
4093
4093
|
}
|
|
4094
4094
|
const cn = ({
|
|
4095
4095
|
data: e,
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
t: i
|
|
4096
|
+
durationSeconds: o,
|
|
4097
|
+
completed: t = !1,
|
|
4098
|
+
t: n
|
|
4100
4099
|
}) => {
|
|
4101
|
-
const { colors:
|
|
4100
|
+
const { colors: i } = b(), a = k(n.exploreRunCode, { title: e.title }), d = !(e.runCompleted === !0 || e.runCompleted === void 0 && (t || o !== void 0)), c = Q(e) && e.codeCompleted !== !0 && d, u = d, [g, h] = C(!1), x = Q(e) && !c;
|
|
4102
4101
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4103
4102
|
/* @__PURE__ */ r(
|
|
4104
4103
|
v.div,
|
|
@@ -4107,13 +4106,13 @@ const cn = ({
|
|
|
4107
4106
|
display: "flex",
|
|
4108
4107
|
alignItems: "center",
|
|
4109
4108
|
gap: "10px",
|
|
4110
|
-
color:
|
|
4109
|
+
color: i.textSecondary,
|
|
4111
4110
|
marginBottom: Q(e) ? "8px" : 0
|
|
4112
4111
|
},
|
|
4113
4112
|
initial: { opacity: 0, y: -10 },
|
|
4114
4113
|
animate: { opacity: 1, y: 0 },
|
|
4115
4114
|
transition: { duration: 0.3, delay: 0 },
|
|
4116
|
-
children:
|
|
4115
|
+
children: u ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
|
|
4117
4116
|
}
|
|
4118
4117
|
),
|
|
4119
4118
|
Q(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
|
|
@@ -4121,16 +4120,16 @@ const cn = ({
|
|
|
4121
4120
|
J,
|
|
4122
4121
|
{
|
|
4123
4122
|
text: e.code,
|
|
4124
|
-
streaming:
|
|
4125
|
-
collapsed: !
|
|
4123
|
+
streaming: c,
|
|
4124
|
+
collapsed: !c && !g,
|
|
4126
4125
|
monospace: !0
|
|
4127
4126
|
}
|
|
4128
4127
|
),
|
|
4129
|
-
|
|
4128
|
+
x && /* @__PURE__ */ r(
|
|
4130
4129
|
"button",
|
|
4131
4130
|
{
|
|
4132
4131
|
type: "button",
|
|
4133
|
-
onClick: () =>
|
|
4132
|
+
onClick: () => h((S) => !S),
|
|
4134
4133
|
style: {
|
|
4135
4134
|
alignSelf: "flex-start",
|
|
4136
4135
|
border: "none",
|
|
@@ -4139,23 +4138,23 @@ const cn = ({
|
|
|
4139
4138
|
marginTop: 8,
|
|
4140
4139
|
cursor: "pointer",
|
|
4141
4140
|
fontSize: 12,
|
|
4142
|
-
color:
|
|
4141
|
+
color: i.textSecondary,
|
|
4143
4142
|
textDecoration: "underline"
|
|
4144
4143
|
},
|
|
4145
|
-
children:
|
|
4144
|
+
children: g ? n.exploreHideCode : n.exploreViewCode
|
|
4146
4145
|
}
|
|
4147
4146
|
)
|
|
4148
4147
|
] }),
|
|
4149
|
-
|
|
4148
|
+
o !== void 0 && /* @__PURE__ */ r(
|
|
4150
4149
|
"div",
|
|
4151
4150
|
{
|
|
4152
4151
|
style: {
|
|
4153
4152
|
fontSize: "12px",
|
|
4154
|
-
color:
|
|
4153
|
+
color: i.textMuted,
|
|
4155
4154
|
marginTop: "4px",
|
|
4156
4155
|
fontStyle: "italic"
|
|
4157
4156
|
},
|
|
4158
|
-
children: k(
|
|
4157
|
+
children: k(n.tookSeconds, { n: o })
|
|
4159
4158
|
}
|
|
4160
4159
|
)
|
|
4161
4160
|
] });
|
|
@@ -4170,7 +4169,7 @@ const dn = ({
|
|
|
4170
4169
|
completed: n = !1,
|
|
4171
4170
|
t: i
|
|
4172
4171
|
}) => {
|
|
4173
|
-
const { colors: a } = b(), d = !(e.reasoningCompleted === !0 || n || t !== void 0), c = K(e) && e.reasoningCompleted !== !0 && d,
|
|
4172
|
+
const { colors: a } = b(), d = !(e.reasoningCompleted === !0 || n || t !== void 0), c = K(e) && e.reasoningCompleted !== !0 && d, u = d && o, [g, h] = C(!1), x = K(e) && !c, S = i.memoryChatThinking;
|
|
4174
4173
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4175
4174
|
/* @__PURE__ */ r(
|
|
4176
4175
|
v.div,
|
|
@@ -4185,7 +4184,7 @@ const dn = ({
|
|
|
4185
4184
|
initial: { opacity: 0, y: -10 },
|
|
4186
4185
|
animate: { opacity: 1, y: 0 },
|
|
4187
4186
|
transition: { duration: 0.3, delay: 0 },
|
|
4188
|
-
children:
|
|
4187
|
+
children: u ? /* @__PURE__ */ r(w, { text: S, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: S })
|
|
4189
4188
|
}
|
|
4190
4189
|
),
|
|
4191
4190
|
K(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
|
|
@@ -4288,10 +4287,10 @@ function un({
|
|
|
4288
4287
|
}
|
|
4289
4288
|
);
|
|
4290
4289
|
}
|
|
4291
|
-
const mn = ({ data: e, completed: o,
|
|
4292
|
-
const { colors:
|
|
4290
|
+
const mn = ({ data: e, completed: o, durationSeconds: t, t: n }) => {
|
|
4291
|
+
const { colors: i } = b(), a = k(n.exploreComposeHtmlReport, {
|
|
4293
4292
|
title: e.title
|
|
4294
|
-
}),
|
|
4293
|
+
}), l = e.sections ?? [], c = e.reportCompleted === !0 || e.reportCompleted === void 0 && o || l.length > 0 && l.every((g) => g.completed), u = !c;
|
|
4295
4294
|
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
4296
4295
|
/* @__PURE__ */ r(
|
|
4297
4296
|
v.div,
|
|
@@ -4300,16 +4299,16 @@ const mn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i
|
|
|
4300
4299
|
display: "flex",
|
|
4301
4300
|
alignItems: "center",
|
|
4302
4301
|
gap: "10px",
|
|
4303
|
-
color:
|
|
4304
|
-
marginBottom:
|
|
4302
|
+
color: i.textSecondary,
|
|
4303
|
+
marginBottom: l.length > 0 ? "4px" : void 0
|
|
4305
4304
|
},
|
|
4306
4305
|
initial: { opacity: 0, y: -10 },
|
|
4307
4306
|
animate: { opacity: 1, y: 0 },
|
|
4308
4307
|
transition: { duration: 0.3 },
|
|
4309
|
-
children:
|
|
4308
|
+
children: u ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
|
|
4310
4309
|
}
|
|
4311
4310
|
),
|
|
4312
|
-
|
|
4311
|
+
l.map((g) => /* @__PURE__ */ r(
|
|
4313
4312
|
un,
|
|
4314
4313
|
{
|
|
4315
4314
|
section: g,
|
|
@@ -4317,16 +4316,16 @@ const mn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i
|
|
|
4317
4316
|
},
|
|
4318
4317
|
g.title
|
|
4319
4318
|
)),
|
|
4320
|
-
|
|
4319
|
+
t !== void 0 && /* @__PURE__ */ r(
|
|
4321
4320
|
"div",
|
|
4322
4321
|
{
|
|
4323
4322
|
style: {
|
|
4324
4323
|
fontSize: "12px",
|
|
4325
|
-
color:
|
|
4324
|
+
color: i.textMuted,
|
|
4326
4325
|
marginTop: "4px",
|
|
4327
4326
|
fontStyle: "italic"
|
|
4328
4327
|
},
|
|
4329
|
-
children: k(
|
|
4328
|
+
children: k(n.tookSeconds, { n: t })
|
|
4330
4329
|
}
|
|
4331
4330
|
)
|
|
4332
4331
|
] });
|
|
@@ -4473,7 +4472,7 @@ function Tn({
|
|
|
4473
4472
|
t: o,
|
|
4474
4473
|
isActiveRow: t
|
|
4475
4474
|
}) {
|
|
4476
|
-
const { colors: n } = b(), i = kn(e), a = Sn(e), l = e.reasoning, d = l != null && l.length > 0, [c,
|
|
4475
|
+
const { colors: n } = b(), i = kn(e), a = Sn(e), l = e.reasoning, d = l != null && l.length > 0, [c, u] = C(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
|
|
4477
4476
|
name: e.memoryTypeName
|
|
4478
4477
|
}), S = !i && a === 3;
|
|
4479
4478
|
return /* @__PURE__ */ m(
|
|
@@ -4579,7 +4578,7 @@ function Tn({
|
|
|
4579
4578
|
"button",
|
|
4580
4579
|
{
|
|
4581
4580
|
type: "button",
|
|
4582
|
-
onClick: () =>
|
|
4581
|
+
onClick: () => u((y) => !y),
|
|
4583
4582
|
style: {
|
|
4584
4583
|
alignSelf: "flex-start",
|
|
4585
4584
|
border: "none",
|
|
@@ -4701,7 +4700,7 @@ function Mn({
|
|
|
4701
4700
|
paddingTop: 8,
|
|
4702
4701
|
borderTop: `1px solid ${i.borderDivider}`
|
|
4703
4702
|
},
|
|
4704
|
-
children: e.map((c,
|
|
4703
|
+
children: e.map((c, u) => {
|
|
4705
4704
|
const g = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, h = ae(
|
|
4706
4705
|
c.chunks
|
|
4707
4706
|
), x = [
|
|
@@ -4711,7 +4710,7 @@ function Mn({
|
|
|
4711
4710
|
}),
|
|
4712
4711
|
h.length > 0 ? ie(h, n) : n.pagesNotAvailable
|
|
4713
4712
|
].filter(
|
|
4714
|
-
(
|
|
4713
|
+
(p) => p != null && p !== ""
|
|
4715
4714
|
), S = {
|
|
4716
4715
|
memoryId: c.memoryId,
|
|
4717
4716
|
memoryTitle: c.memoryTitle,
|
|
@@ -4719,7 +4718,7 @@ function Mn({
|
|
|
4719
4718
|
memoryTypeId: o.memoryTypeId,
|
|
4720
4719
|
memoryTypeName: o.memoryTypeName,
|
|
4721
4720
|
query: o.query
|
|
4722
|
-
}, y = `${o.query}::${c.memoryId}::${
|
|
4721
|
+
}, y = `${o.query}::${c.memoryId}::${u}`, s = a === y;
|
|
4723
4722
|
return /* @__PURE__ */ m(
|
|
4724
4723
|
"div",
|
|
4725
4724
|
{
|
|
@@ -4728,9 +4727,9 @@ function Mn({
|
|
|
4728
4727
|
flexDirection: "row",
|
|
4729
4728
|
alignItems: "flex-start",
|
|
4730
4729
|
gap: "12px",
|
|
4731
|
-
paddingTop:
|
|
4732
|
-
paddingBottom:
|
|
4733
|
-
borderBottom:
|
|
4730
|
+
paddingTop: u > 0 ? 12 : 0,
|
|
4731
|
+
paddingBottom: u < e.length - 1 ? 12 : 0,
|
|
4732
|
+
borderBottom: u < e.length - 1 ? `1px solid ${i.border}` : void 0,
|
|
4734
4733
|
minWidth: 0
|
|
4735
4734
|
},
|
|
4736
4735
|
children: [
|
|
@@ -4832,7 +4831,7 @@ function Mn({
|
|
|
4832
4831
|
)
|
|
4833
4832
|
]
|
|
4834
4833
|
},
|
|
4835
|
-
`${c.memoryId}-${
|
|
4834
|
+
`${c.memoryId}-${u}`
|
|
4836
4835
|
);
|
|
4837
4836
|
})
|
|
4838
4837
|
}
|
|
@@ -4857,8 +4856,8 @@ function Rn({
|
|
|
4857
4856
|
toggleExpanded: i,
|
|
4858
4857
|
onExploreQueryResultClick: a
|
|
4859
4858
|
}) {
|
|
4860
|
-
const { colors: l } = b(), d = e.items.map((
|
|
4861
|
-
(
|
|
4859
|
+
const { colors: l } = b(), d = e.items.map((u) => u.item), c = d.some(
|
|
4860
|
+
(u) => u.result == null && u.error == null
|
|
4862
4861
|
);
|
|
4863
4862
|
return /* @__PURE__ */ m(
|
|
4864
4863
|
v.div,
|
|
@@ -4914,9 +4913,9 @@ function Rn({
|
|
|
4914
4913
|
})
|
|
4915
4914
|
}
|
|
4916
4915
|
),
|
|
4917
|
-
e.items.map(({ item:
|
|
4918
|
-
var
|
|
4919
|
-
const h =
|
|
4916
|
+
e.items.map(({ item: u, flatIndex: g }) => {
|
|
4917
|
+
var p;
|
|
4918
|
+
const h = u.result != null, x = u.error != null, S = t && !h && !x, y = n[g] === !0, s = ((p = u.result) == null ? void 0 : p.items) ?? [];
|
|
4920
4919
|
return /* @__PURE__ */ m(
|
|
4921
4920
|
"div",
|
|
4922
4921
|
{
|
|
@@ -4953,11 +4952,11 @@ function Rn({
|
|
|
4953
4952
|
children: S ? /* @__PURE__ */ r(
|
|
4954
4953
|
w,
|
|
4955
4954
|
{
|
|
4956
|
-
text:
|
|
4955
|
+
text: u.query,
|
|
4957
4956
|
duration: 2.5,
|
|
4958
4957
|
repeat: !0
|
|
4959
4958
|
}
|
|
4960
|
-
) :
|
|
4959
|
+
) : u.query
|
|
4961
4960
|
}
|
|
4962
4961
|
),
|
|
4963
4962
|
/* @__PURE__ */ m(
|
|
@@ -4971,7 +4970,7 @@ function Rn({
|
|
|
4971
4970
|
flexShrink: 0
|
|
4972
4971
|
},
|
|
4973
4972
|
children: [
|
|
4974
|
-
/* @__PURE__ */ r(wn, { item:
|
|
4973
|
+
/* @__PURE__ */ r(wn, { item: u, t: o }),
|
|
4975
4974
|
h && /* @__PURE__ */ r(
|
|
4976
4975
|
"button",
|
|
4977
4976
|
{
|
|
@@ -5000,14 +4999,14 @@ function Rn({
|
|
|
5000
4999
|
Mn,
|
|
5001
5000
|
{
|
|
5002
5001
|
items: s,
|
|
5003
|
-
queryRow:
|
|
5002
|
+
queryRow: u,
|
|
5004
5003
|
onExploreQueryResultClick: a,
|
|
5005
5004
|
t: o
|
|
5006
5005
|
}
|
|
5007
5006
|
)
|
|
5008
5007
|
]
|
|
5009
5008
|
},
|
|
5010
|
-
`${e.memoryTypeId}-${g}-${
|
|
5009
|
+
`${e.memoryTypeId}-${g}-${u.query}`
|
|
5011
5010
|
);
|
|
5012
5011
|
})
|
|
5013
5012
|
]
|
|
@@ -5031,7 +5030,7 @@ const In = ({
|
|
|
5031
5030
|
...h,
|
|
5032
5031
|
[g]: !h[g]
|
|
5033
5032
|
}));
|
|
5034
|
-
}, []),
|
|
5033
|
+
}, []), u = z(
|
|
5035
5034
|
() => En(e.queries),
|
|
5036
5035
|
[e.queries]
|
|
5037
5036
|
);
|
|
@@ -5043,7 +5042,7 @@ const In = ({
|
|
|
5043
5042
|
duration: 2.5,
|
|
5044
5043
|
repeat: !0
|
|
5045
5044
|
}
|
|
5046
|
-
) :
|
|
5045
|
+
) : u.map((g) => /* @__PURE__ */ r(
|
|
5047
5046
|
Rn,
|
|
5048
5047
|
{
|
|
5049
5048
|
group: g,
|
|
@@ -5094,7 +5093,7 @@ const In = ({
|
|
|
5094
5093
|
flexDirection: "column",
|
|
5095
5094
|
gap: 0
|
|
5096
5095
|
},
|
|
5097
|
-
children: i.map((c,
|
|
5096
|
+
children: i.map((c, u) => {
|
|
5098
5097
|
const g = c.memoryTitle !== "" ? c.memoryTitle : c.memoryId, h = ae(
|
|
5099
5098
|
c.chunks
|
|
5100
5099
|
), x = [
|
|
@@ -5104,20 +5103,20 @@ const In = ({
|
|
|
5104
5103
|
}),
|
|
5105
5104
|
h.length > 0 ? ie(h, t) : t.pagesNotAvailable
|
|
5106
5105
|
].filter(
|
|
5107
|
-
(
|
|
5106
|
+
(p) => p != null && p !== ""
|
|
5108
5107
|
), S = {
|
|
5109
5108
|
memoryId: c.memoryId,
|
|
5110
5109
|
memoryTitle: c.memoryTitle,
|
|
5111
5110
|
memoryTypeId: c.memoryTypeId,
|
|
5112
5111
|
memoryTypeName: c.memoryTypeName,
|
|
5113
5112
|
pageNumbers: h
|
|
5114
|
-
}, y = `${c.memoryId}-${
|
|
5113
|
+
}, y = `${c.memoryId}-${u}`, s = l === y;
|
|
5115
5114
|
return /* @__PURE__ */ m(
|
|
5116
5115
|
v.div,
|
|
5117
5116
|
{
|
|
5118
5117
|
initial: { opacity: 0 },
|
|
5119
5118
|
animate: { opacity: 1 },
|
|
5120
|
-
transition: { duration: 0.2, delay:
|
|
5119
|
+
transition: { duration: 0.2, delay: u * 0.04 },
|
|
5121
5120
|
style: {
|
|
5122
5121
|
display: "flex",
|
|
5123
5122
|
flexDirection: "row",
|
|
@@ -5125,7 +5124,7 @@ const In = ({
|
|
|
5125
5124
|
gap: "12px",
|
|
5126
5125
|
paddingTop: "12px",
|
|
5127
5126
|
paddingBottom: "12px",
|
|
5128
|
-
borderBottom:
|
|
5127
|
+
borderBottom: u < i.length - 1 ? `1px solid ${n.border}` : void 0,
|
|
5129
5128
|
minWidth: 0
|
|
5130
5129
|
},
|
|
5131
5130
|
children: [
|
|
@@ -5223,7 +5222,7 @@ const In = ({
|
|
|
5223
5222
|
)
|
|
5224
5223
|
]
|
|
5225
5224
|
},
|
|
5226
|
-
`${c.memoryId}-${
|
|
5225
|
+
`${c.memoryId}-${u}`
|
|
5227
5226
|
);
|
|
5228
5227
|
})
|
|
5229
5228
|
}
|
|
@@ -5285,32 +5284,32 @@ const Bn = ({
|
|
|
5285
5284
|
onSourceClick: l,
|
|
5286
5285
|
onSearchResultClick: d,
|
|
5287
5286
|
onExploreQueryResultClick: c,
|
|
5288
|
-
downloadFile:
|
|
5287
|
+
downloadFile: u
|
|
5289
5288
|
}) => {
|
|
5290
5289
|
const { theme: g, colors: h } = b(), x = D(null);
|
|
5291
5290
|
N(() => {
|
|
5292
5291
|
x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
5293
5292
|
}, [e.length]);
|
|
5294
5293
|
const S = (s) => {
|
|
5295
|
-
const
|
|
5296
|
-
if (
|
|
5294
|
+
const p = s.item.data;
|
|
5295
|
+
if (p.taskType === "StreamingChatCompletion" && p.eventType === "Text")
|
|
5297
5296
|
return /* @__PURE__ */ r(
|
|
5298
5297
|
$,
|
|
5299
5298
|
{
|
|
5300
|
-
text:
|
|
5299
|
+
text: p.text,
|
|
5301
5300
|
onMemoryClick: a
|
|
5302
5301
|
}
|
|
5303
5302
|
);
|
|
5304
|
-
if (
|
|
5305
|
-
return /* @__PURE__ */ r(sr, { data:
|
|
5306
|
-
if (
|
|
5307
|
-
switch (
|
|
5303
|
+
if (p.taskType === "StructuredChatCompletion" && p.eventType === "Completed")
|
|
5304
|
+
return /* @__PURE__ */ r(sr, { data: p });
|
|
5305
|
+
if (p.taskType === "MemoryChat")
|
|
5306
|
+
switch (p.eventType) {
|
|
5308
5307
|
case "Text":
|
|
5309
5308
|
return /* @__PURE__ */ r(
|
|
5310
5309
|
$,
|
|
5311
5310
|
{
|
|
5312
|
-
text:
|
|
5313
|
-
onFileDownload:
|
|
5311
|
+
text: p.text,
|
|
5312
|
+
onFileDownload: u,
|
|
5314
5313
|
onMemoryClick: a
|
|
5315
5314
|
}
|
|
5316
5315
|
);
|
|
@@ -5318,7 +5317,7 @@ const Bn = ({
|
|
|
5318
5317
|
return /* @__PURE__ */ r(
|
|
5319
5318
|
Or,
|
|
5320
5319
|
{
|
|
5321
|
-
data:
|
|
5320
|
+
data: p,
|
|
5322
5321
|
isLatest: s.isLatest,
|
|
5323
5322
|
durationSeconds: s.durationSeconds,
|
|
5324
5323
|
t: i
|
|
@@ -5328,7 +5327,7 @@ const Bn = ({
|
|
|
5328
5327
|
return /* @__PURE__ */ r(
|
|
5329
5328
|
_r,
|
|
5330
5329
|
{
|
|
5331
|
-
data:
|
|
5330
|
+
data: p,
|
|
5332
5331
|
isLatest: s.isLatest,
|
|
5333
5332
|
durationSeconds: s.durationSeconds,
|
|
5334
5333
|
t: i
|
|
@@ -5338,7 +5337,7 @@ const Bn = ({
|
|
|
5338
5337
|
return /* @__PURE__ */ r(
|
|
5339
5338
|
qr,
|
|
5340
5339
|
{
|
|
5341
|
-
data:
|
|
5340
|
+
data: p,
|
|
5342
5341
|
isLatest: s.isLatest,
|
|
5343
5342
|
durationSeconds: s.durationSeconds,
|
|
5344
5343
|
t: i
|
|
@@ -5348,7 +5347,7 @@ const Bn = ({
|
|
|
5348
5347
|
return /* @__PURE__ */ r(
|
|
5349
5348
|
Ur,
|
|
5350
5349
|
{
|
|
5351
|
-
data:
|
|
5350
|
+
data: p,
|
|
5352
5351
|
isLatest: s.isLatest,
|
|
5353
5352
|
durationSeconds: s.durationSeconds,
|
|
5354
5353
|
t: i
|
|
@@ -5358,7 +5357,7 @@ const Bn = ({
|
|
|
5358
5357
|
return /* @__PURE__ */ r(
|
|
5359
5358
|
jr,
|
|
5360
5359
|
{
|
|
5361
|
-
data:
|
|
5360
|
+
data: p,
|
|
5362
5361
|
isLatest: s.isLatest,
|
|
5363
5362
|
durationSeconds: s.durationSeconds,
|
|
5364
5363
|
t: i
|
|
@@ -5368,19 +5367,19 @@ const Bn = ({
|
|
|
5368
5367
|
return /* @__PURE__ */ r(
|
|
5369
5368
|
Qr,
|
|
5370
5369
|
{
|
|
5371
|
-
data:
|
|
5370
|
+
data: p,
|
|
5372
5371
|
isLatest: s.isLatest,
|
|
5373
5372
|
durationSeconds: s.durationSeconds,
|
|
5374
5373
|
t: i
|
|
5375
5374
|
}
|
|
5376
5375
|
);
|
|
5377
5376
|
case "GenerateReportCompleted":
|
|
5378
|
-
return /* @__PURE__ */ r(Kr, { data:
|
|
5377
|
+
return /* @__PURE__ */ r(Kr, { data: p, t: i });
|
|
5379
5378
|
case "FindMemories":
|
|
5380
5379
|
return /* @__PURE__ */ r(
|
|
5381
5380
|
Sr,
|
|
5382
5381
|
{
|
|
5383
|
-
data:
|
|
5382
|
+
data: p,
|
|
5384
5383
|
isLatest: s.isLatest,
|
|
5385
5384
|
durationSeconds: s.durationSeconds,
|
|
5386
5385
|
t: i
|
|
@@ -5390,7 +5389,7 @@ const Bn = ({
|
|
|
5390
5389
|
return /* @__PURE__ */ r(
|
|
5391
5390
|
br,
|
|
5392
5391
|
{
|
|
5393
|
-
data:
|
|
5392
|
+
data: p,
|
|
5394
5393
|
t: i
|
|
5395
5394
|
}
|
|
5396
5395
|
);
|
|
@@ -5398,7 +5397,7 @@ const Bn = ({
|
|
|
5398
5397
|
return /* @__PURE__ */ r(
|
|
5399
5398
|
q,
|
|
5400
5399
|
{
|
|
5401
|
-
data:
|
|
5400
|
+
data: p,
|
|
5402
5401
|
isLatest: s.isLatest,
|
|
5403
5402
|
durationSeconds: s.durationSeconds,
|
|
5404
5403
|
t: i
|
|
@@ -5408,7 +5407,7 @@ const Bn = ({
|
|
|
5408
5407
|
return /* @__PURE__ */ r(
|
|
5409
5408
|
kr,
|
|
5410
5409
|
{
|
|
5411
|
-
data:
|
|
5410
|
+
data: p,
|
|
5412
5411
|
isLatest: s.isLatest,
|
|
5413
5412
|
durationSeconds: s.durationSeconds,
|
|
5414
5413
|
t: i,
|
|
@@ -5419,7 +5418,7 @@ const Bn = ({
|
|
|
5419
5418
|
return /* @__PURE__ */ r(
|
|
5420
5419
|
ue,
|
|
5421
5420
|
{
|
|
5422
|
-
data:
|
|
5421
|
+
data: p,
|
|
5423
5422
|
isLatest: s.isLatest,
|
|
5424
5423
|
durationSeconds: s.durationSeconds,
|
|
5425
5424
|
t: i
|
|
@@ -5429,7 +5428,7 @@ const Bn = ({
|
|
|
5429
5428
|
return /* @__PURE__ */ r(
|
|
5430
5429
|
Re,
|
|
5431
5430
|
{
|
|
5432
|
-
data:
|
|
5431
|
+
data: p,
|
|
5433
5432
|
onSourceClick: l,
|
|
5434
5433
|
t: i
|
|
5435
5434
|
}
|
|
@@ -5438,7 +5437,7 @@ const Bn = ({
|
|
|
5438
5437
|
return /* @__PURE__ */ r(
|
|
5439
5438
|
Mr,
|
|
5440
5439
|
{
|
|
5441
|
-
data:
|
|
5440
|
+
data: p,
|
|
5442
5441
|
completed: s.completed,
|
|
5443
5442
|
isLatest: s.isLatest,
|
|
5444
5443
|
t: i
|
|
@@ -5448,7 +5447,7 @@ const Bn = ({
|
|
|
5448
5447
|
return /* @__PURE__ */ r(
|
|
5449
5448
|
se,
|
|
5450
5449
|
{
|
|
5451
|
-
data:
|
|
5450
|
+
data: p,
|
|
5452
5451
|
onSearchResultClick: d,
|
|
5453
5452
|
t: i
|
|
5454
5453
|
}
|
|
@@ -5457,7 +5456,7 @@ const Bn = ({
|
|
|
5457
5456
|
return /* @__PURE__ */ r(
|
|
5458
5457
|
zr,
|
|
5459
5458
|
{
|
|
5460
|
-
data:
|
|
5459
|
+
data: p,
|
|
5461
5460
|
isLatest: s.isLatest,
|
|
5462
5461
|
durationSeconds: s.durationSeconds,
|
|
5463
5462
|
t: i
|
|
@@ -5467,7 +5466,7 @@ const Bn = ({
|
|
|
5467
5466
|
return /* @__PURE__ */ r(
|
|
5468
5467
|
Gr,
|
|
5469
5468
|
{
|
|
5470
|
-
data:
|
|
5469
|
+
data: p,
|
|
5471
5470
|
isLatest: s.isLatest,
|
|
5472
5471
|
durationSeconds: s.durationSeconds,
|
|
5473
5472
|
t: i
|
|
@@ -5477,13 +5476,13 @@ const Bn = ({
|
|
|
5477
5476
|
return /* @__PURE__ */ r(
|
|
5478
5477
|
$,
|
|
5479
5478
|
{
|
|
5480
|
-
text:
|
|
5481
|
-
onFileDownload:
|
|
5479
|
+
text: p.response.textResponse,
|
|
5480
|
+
onFileDownload: u,
|
|
5482
5481
|
onMemoryClick: a
|
|
5483
5482
|
}
|
|
5484
5483
|
);
|
|
5485
5484
|
default: {
|
|
5486
|
-
const f =
|
|
5485
|
+
const f = p;
|
|
5487
5486
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5488
5487
|
"[fency] Unknown MemoryChat eventType (no UI):",
|
|
5489
5488
|
f.eventType,
|
|
@@ -5491,13 +5490,13 @@ const Bn = ({
|
|
|
5491
5490
|
), null);
|
|
5492
5491
|
}
|
|
5493
5492
|
}
|
|
5494
|
-
if (
|
|
5495
|
-
switch (
|
|
5493
|
+
if (p.taskType === "MemorySearch")
|
|
5494
|
+
switch (p.eventType) {
|
|
5496
5495
|
case "GeneratingQueries":
|
|
5497
5496
|
return /* @__PURE__ */ r(
|
|
5498
5497
|
vn,
|
|
5499
5498
|
{
|
|
5500
|
-
data:
|
|
5499
|
+
data: p,
|
|
5501
5500
|
isLatest: s.isLatest,
|
|
5502
5501
|
durationSeconds: s.durationSeconds,
|
|
5503
5502
|
t: i
|
|
@@ -5507,7 +5506,7 @@ const Bn = ({
|
|
|
5507
5506
|
return /* @__PURE__ */ r(
|
|
5508
5507
|
In,
|
|
5509
5508
|
{
|
|
5510
|
-
data:
|
|
5509
|
+
data: p,
|
|
5511
5510
|
isLatest: s.isLatest,
|
|
5512
5511
|
durationSeconds: s.durationSeconds,
|
|
5513
5512
|
onExploreQueryResultClick: c,
|
|
@@ -5518,7 +5517,7 @@ const Bn = ({
|
|
|
5518
5517
|
return /* @__PURE__ */ r(
|
|
5519
5518
|
xn,
|
|
5520
5519
|
{
|
|
5521
|
-
data:
|
|
5520
|
+
data: p,
|
|
5522
5521
|
isLatest: s.isLatest,
|
|
5523
5522
|
durationSeconds: s.durationSeconds,
|
|
5524
5523
|
t: i
|
|
@@ -5528,13 +5527,13 @@ const Bn = ({
|
|
|
5528
5527
|
return /* @__PURE__ */ r(
|
|
5529
5528
|
Fn,
|
|
5530
5529
|
{
|
|
5531
|
-
data:
|
|
5530
|
+
data: p,
|
|
5532
5531
|
onSearchResultClick: d,
|
|
5533
5532
|
t: i
|
|
5534
5533
|
}
|
|
5535
5534
|
);
|
|
5536
5535
|
default: {
|
|
5537
|
-
const f =
|
|
5536
|
+
const f = p;
|
|
5538
5537
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5539
5538
|
"[fency] Unknown MemorySearch eventType (no UI):",
|
|
5540
5539
|
f.eventType,
|
|
@@ -5542,14 +5541,14 @@ const Bn = ({
|
|
|
5542
5541
|
), null);
|
|
5543
5542
|
}
|
|
5544
5543
|
}
|
|
5545
|
-
if (
|
|
5546
|
-
switch (
|
|
5544
|
+
if (p.taskType === "ExploreMemories")
|
|
5545
|
+
switch (p.eventType) {
|
|
5547
5546
|
case "Text":
|
|
5548
5547
|
return /* @__PURE__ */ r(
|
|
5549
5548
|
$,
|
|
5550
5549
|
{
|
|
5551
|
-
text:
|
|
5552
|
-
onFileDownload:
|
|
5550
|
+
text: p.text,
|
|
5551
|
+
onFileDownload: u,
|
|
5553
5552
|
onMemoryClick: a
|
|
5554
5553
|
}
|
|
5555
5554
|
);
|
|
@@ -5557,7 +5556,7 @@ const Bn = ({
|
|
|
5557
5556
|
return /* @__PURE__ */ r(
|
|
5558
5557
|
Zr,
|
|
5559
5558
|
{
|
|
5560
|
-
data:
|
|
5559
|
+
data: p,
|
|
5561
5560
|
isLatest: s.isLatest,
|
|
5562
5561
|
durationSeconds: s.durationSeconds,
|
|
5563
5562
|
t: i
|
|
@@ -5567,7 +5566,7 @@ const Bn = ({
|
|
|
5567
5566
|
return /* @__PURE__ */ r(
|
|
5568
5567
|
dn,
|
|
5569
5568
|
{
|
|
5570
|
-
data:
|
|
5569
|
+
data: p,
|
|
5571
5570
|
isLatest: s.isLatest,
|
|
5572
5571
|
durationSeconds: s.durationSeconds,
|
|
5573
5572
|
completed: s.completed,
|
|
@@ -5578,7 +5577,7 @@ const Bn = ({
|
|
|
5578
5577
|
return /* @__PURE__ */ r(
|
|
5579
5578
|
Yr,
|
|
5580
5579
|
{
|
|
5581
|
-
data:
|
|
5580
|
+
data: p,
|
|
5582
5581
|
createdAt: s.item.createdAt,
|
|
5583
5582
|
timestamp: s.item.timestamp,
|
|
5584
5583
|
completed: s.completed,
|
|
@@ -5592,7 +5591,7 @@ const Bn = ({
|
|
|
5592
5591
|
return /* @__PURE__ */ r(
|
|
5593
5592
|
en,
|
|
5594
5593
|
{
|
|
5595
|
-
data:
|
|
5594
|
+
data: p,
|
|
5596
5595
|
isLatest: s.isLatest,
|
|
5597
5596
|
durationSeconds: s.durationSeconds,
|
|
5598
5597
|
t: i
|
|
@@ -5602,19 +5601,19 @@ const Bn = ({
|
|
|
5602
5601
|
return /* @__PURE__ */ r(
|
|
5603
5602
|
rn,
|
|
5604
5603
|
{
|
|
5605
|
-
data:
|
|
5604
|
+
data: p,
|
|
5606
5605
|
isLatest: s.isLatest,
|
|
5607
5606
|
durationSeconds: s.durationSeconds,
|
|
5608
5607
|
t: i
|
|
5609
5608
|
}
|
|
5610
5609
|
);
|
|
5611
5610
|
case "FindMemoriesResult":
|
|
5612
|
-
return /* @__PURE__ */ r(nn, { data:
|
|
5611
|
+
return /* @__PURE__ */ r(nn, { data: p, t: i });
|
|
5613
5612
|
case "SemanticSearch":
|
|
5614
5613
|
return /* @__PURE__ */ r(
|
|
5615
5614
|
tn,
|
|
5616
5615
|
{
|
|
5617
|
-
data:
|
|
5616
|
+
data: p,
|
|
5618
5617
|
isLatest: s.isLatest,
|
|
5619
5618
|
durationSeconds: s.durationSeconds,
|
|
5620
5619
|
t: i,
|
|
@@ -5625,7 +5624,7 @@ const Bn = ({
|
|
|
5625
5624
|
return /* @__PURE__ */ r(
|
|
5626
5625
|
sn,
|
|
5627
5626
|
{
|
|
5628
|
-
data:
|
|
5627
|
+
data: p,
|
|
5629
5628
|
completed: s.completed,
|
|
5630
5629
|
isLatest: s.isLatest,
|
|
5631
5630
|
t: i
|
|
@@ -5635,7 +5634,7 @@ const Bn = ({
|
|
|
5635
5634
|
return /* @__PURE__ */ r(
|
|
5636
5635
|
cn,
|
|
5637
5636
|
{
|
|
5638
|
-
data:
|
|
5637
|
+
data: p,
|
|
5639
5638
|
isLatest: s.isLatest,
|
|
5640
5639
|
durationSeconds: s.durationSeconds,
|
|
5641
5640
|
completed: s.completed,
|
|
@@ -5646,7 +5645,7 @@ const Bn = ({
|
|
|
5646
5645
|
return /* @__PURE__ */ r(
|
|
5647
5646
|
mn,
|
|
5648
5647
|
{
|
|
5649
|
-
data:
|
|
5648
|
+
data: p,
|
|
5650
5649
|
completed: s.completed,
|
|
5651
5650
|
isLatest: s.isLatest,
|
|
5652
5651
|
durationSeconds: s.durationSeconds,
|
|
@@ -5667,7 +5666,7 @@ const Bn = ({
|
|
|
5667
5666
|
return /* @__PURE__ */ r(
|
|
5668
5667
|
gn,
|
|
5669
5668
|
{
|
|
5670
|
-
data:
|
|
5669
|
+
data: p,
|
|
5671
5670
|
onSourceClick: l,
|
|
5672
5671
|
t: i
|
|
5673
5672
|
}
|
|
@@ -5676,13 +5675,13 @@ const Bn = ({
|
|
|
5676
5675
|
return /* @__PURE__ */ r(
|
|
5677
5676
|
$,
|
|
5678
5677
|
{
|
|
5679
|
-
text:
|
|
5680
|
-
onFileDownload:
|
|
5678
|
+
text: p.response.textResponse,
|
|
5679
|
+
onFileDownload: u,
|
|
5681
5680
|
onMemoryClick: a
|
|
5682
5681
|
}
|
|
5683
5682
|
);
|
|
5684
5683
|
default: {
|
|
5685
|
-
const f =
|
|
5684
|
+
const f = p;
|
|
5686
5685
|
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5687
5686
|
"[fency] Unknown ExploreMemories eventType (no UI):",
|
|
5688
5687
|
f.eventType,
|
|
@@ -5690,13 +5689,13 @@ const Bn = ({
|
|
|
5690
5689
|
), null);
|
|
5691
5690
|
}
|
|
5692
5691
|
}
|
|
5693
|
-
return
|
|
5692
|
+
return p.taskType === "StreamingChatCompletion" && p.eventType === "Completed" ? /* @__PURE__ */ r(
|
|
5694
5693
|
$,
|
|
5695
5694
|
{
|
|
5696
|
-
text:
|
|
5695
|
+
text: p.response.textResponse,
|
|
5697
5696
|
onMemoryClick: a
|
|
5698
5697
|
}
|
|
5699
|
-
) :
|
|
5698
|
+
) : p.eventType === "Error" && "message" in p ? /* @__PURE__ */ r(O, { message: p.message }) : null;
|
|
5700
5699
|
};
|
|
5701
5700
|
if (e.length === 0)
|
|
5702
5701
|
return t ? /* @__PURE__ */ r("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ r(O, { message: t.message }) }) : o ? /* @__PURE__ */ r("div", { style: { width: "fit-content", paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
@@ -5710,41 +5709,41 @@ const Bn = ({
|
|
|
5710
5709
|
shimmerColor: h.shimmerHighlight
|
|
5711
5710
|
}
|
|
5712
5711
|
) }) : null;
|
|
5713
|
-
const y = e.filter((s,
|
|
5712
|
+
const y = e.filter((s, p) => {
|
|
5714
5713
|
const f = s.item.data;
|
|
5715
5714
|
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
|
|
5716
5715
|
return !1;
|
|
5717
5716
|
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
5718
|
-
return !e.slice(
|
|
5717
|
+
return !e.slice(p + 1).some(
|
|
5719
5718
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
|
|
5720
5719
|
);
|
|
5721
5720
|
if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
|
|
5722
|
-
return !e.slice(
|
|
5721
|
+
return !e.slice(p + 1).some(
|
|
5723
5722
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
|
|
5724
5723
|
);
|
|
5725
5724
|
if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
|
|
5726
|
-
return !e.slice(
|
|
5725
|
+
return !e.slice(p + 1).some(
|
|
5727
5726
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
|
|
5728
5727
|
);
|
|
5729
5728
|
if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
|
|
5730
|
-
return !e.slice(
|
|
5729
|
+
return !e.slice(p + 1).some(
|
|
5731
5730
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
|
|
5732
5731
|
);
|
|
5733
5732
|
if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
|
|
5734
|
-
return !e.slice(
|
|
5733
|
+
return !e.slice(p + 1).some(
|
|
5735
5734
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
|
|
5736
5735
|
);
|
|
5737
5736
|
if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
|
|
5738
|
-
return !e.slice(
|
|
5737
|
+
return !e.slice(p + 1).some(
|
|
5739
5738
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
|
|
5740
5739
|
);
|
|
5741
5740
|
if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
|
|
5742
|
-
return !e.slice(
|
|
5741
|
+
return !e.slice(p + 1).some(
|
|
5743
5742
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
|
|
5744
5743
|
);
|
|
5745
5744
|
if (f.taskType === "ExploreMemories" && (f.eventType === "Classifying" || f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
|
|
5746
5745
|
const P = f.eventType;
|
|
5747
|
-
return !e.slice(
|
|
5746
|
+
return !e.slice(p + 1).some(
|
|
5748
5747
|
(pe) => pe.item.data.taskType === "ExploreMemories" && pe.item.data.eventType === P
|
|
5749
5748
|
);
|
|
5750
5749
|
}
|
|
@@ -5757,7 +5756,7 @@ const Bn = ({
|
|
|
5757
5756
|
ref: x,
|
|
5758
5757
|
"data-theme": g,
|
|
5759
5758
|
children: [
|
|
5760
|
-
/* @__PURE__ */ r(Xe, { children: y.map((s,
|
|
5759
|
+
/* @__PURE__ */ r(Xe, { children: y.map((s, p) => /* @__PURE__ */ r(
|
|
5761
5760
|
v.div,
|
|
5762
5761
|
{
|
|
5763
5762
|
id: `agent-task-progress-item-${s.item.progressItemId}`,
|
|
@@ -5765,7 +5764,7 @@ const Bn = ({
|
|
|
5765
5764
|
animate: { opacity: 1, y: 0 },
|
|
5766
5765
|
transition: {
|
|
5767
5766
|
duration: 0.4,
|
|
5768
|
-
delay:
|
|
5767
|
+
delay: p * 0.1,
|
|
5769
5768
|
ease: "easeOut"
|
|
5770
5769
|
},
|
|
5771
5770
|
children: /* @__PURE__ */ r(
|
|
@@ -5826,7 +5825,7 @@ const Bn = ({
|
|
|
5826
5825
|
onExploreQueryResultClick: l
|
|
5827
5826
|
}) => {
|
|
5828
5827
|
var h;
|
|
5829
|
-
const d = or(e), c = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en",
|
|
5828
|
+
const d = or(e), c = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", u = dr(c), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
|
|
5830
5829
|
return /* @__PURE__ */ r(lr, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
|
|
5831
5830
|
g ? /* @__PURE__ */ r(
|
|
5832
5831
|
"div",
|
|
@@ -5841,8 +5840,8 @@ const Bn = ({
|
|
|
5841
5840
|
Pn,
|
|
5842
5841
|
{
|
|
5843
5842
|
taskId: g,
|
|
5844
|
-
label:
|
|
5845
|
-
copiedLabel:
|
|
5843
|
+
label: u.copyId,
|
|
5844
|
+
copiedLabel: u.copiedId
|
|
5846
5845
|
}
|
|
5847
5846
|
)
|
|
5848
5847
|
}
|
|
@@ -5854,7 +5853,7 @@ const Bn = ({
|
|
|
5854
5853
|
loading: e.loading,
|
|
5855
5854
|
error: e.error,
|
|
5856
5855
|
loadingText: e.loadingText,
|
|
5857
|
-
t:
|
|
5856
|
+
t: u,
|
|
5858
5857
|
onMemoryClick: n,
|
|
5859
5858
|
onSourceClick: i,
|
|
5860
5859
|
onSearchResultClick: a,
|