@fencyai/react 0.1.204 → 0.1.206
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/ProgressViewItem.d.ts.map +1 -1
- package/dist/agent-task/ReasoningViewport.d.ts +15 -0
- package/dist/agent-task/ReasoningViewport.d.ts.map +1 -0
- package/dist/agent-task/data-types/ExploreMemoriesPlanning.d.ts +10 -6
- package/dist/agent-task/data-types/ExploreMemoriesPlanning.d.ts.map +1 -1
- package/dist/agent-task/data-types/MemorySearchGeneratingQueries.d.ts.map +1 -1
- package/dist/index.js +921 -862
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { StreamEventManager as
|
|
3
|
-
import { StreamEventManager as
|
|
4
|
-
import
|
|
5
|
-
import { motion as v, useInView as
|
|
6
|
-
import
|
|
7
|
-
import { Prism as
|
|
8
|
-
import
|
|
9
|
-
import './assets/index.css';const
|
|
2
|
+
import { StreamEventManager as ze, StreamCacheManager as Be, toStreamData as Pe, taskReducer as Le, initialTaskStoreState as Ae, createAgentTaskFileDownloadLink as De, isTerminalAgentTaskEventData as We, agentTaskErrorFromEventData as $e, shouldAppendCompletedToProgress as Ne, getTerminalCreateAgentTaskResponse as He, createAgentTask as Ge, mapCreateAgentTaskParams as Oe, parseAgentTaskFileIdFromFencyFileHref as _e, parseAgentTaskMemoryFromFencyMemHref as qe } from "@fencyai/js";
|
|
3
|
+
import { StreamEventManager as $n } from "@fencyai/js";
|
|
4
|
+
import Ue, { createContext as fe, useState as w, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as Qe, useMemo as z, useLayoutEffect as je } from "react";
|
|
5
|
+
import { motion as v, useInView as Ke, AnimatePresence as Ve } from "motion/react";
|
|
6
|
+
import Xe from "react-markdown";
|
|
7
|
+
import { Prism as ke } from "react-syntax-highlighter";
|
|
8
|
+
import Ye from "remark-gfm";
|
|
9
|
+
import './assets/index.css';const Se = fe(
|
|
10
10
|
void 0
|
|
11
11
|
);
|
|
12
|
-
function
|
|
12
|
+
function Pn({
|
|
13
13
|
fency: e,
|
|
14
14
|
fetchCreateStreamClientToken: o,
|
|
15
15
|
children: t
|
|
16
16
|
}) {
|
|
17
17
|
const [n, i] = w(
|
|
18
18
|
null
|
|
19
|
-
), [a,
|
|
20
|
-
|
|
19
|
+
), [a, l] = w(!0), [d, p] = w(null), [u, g] = w([]), h = A(null), x = A(null);
|
|
20
|
+
H(() => {
|
|
21
21
|
e.then((c) => {
|
|
22
|
-
i(c),
|
|
22
|
+
i(c), l(!1);
|
|
23
23
|
}).catch((c) => {
|
|
24
|
-
|
|
24
|
+
p(c), l(!1);
|
|
25
25
|
});
|
|
26
|
-
}, [e]),
|
|
26
|
+
}, [e]), H(() => {
|
|
27
27
|
if (!n) return;
|
|
28
|
-
x.current || (x.current = new
|
|
29
|
-
const c = new
|
|
28
|
+
x.current || (x.current = new ze(n));
|
|
29
|
+
const c = new Be(
|
|
30
30
|
n,
|
|
31
31
|
o
|
|
32
32
|
);
|
|
33
33
|
h.current = c, c.startPeriodicCleanup();
|
|
34
|
-
const
|
|
34
|
+
const f = c.onChange((S) => {
|
|
35
35
|
var M;
|
|
36
36
|
g(S), (M = x.current) == null || M.updateStreams(S);
|
|
37
37
|
});
|
|
38
38
|
return () => {
|
|
39
39
|
var S;
|
|
40
|
-
|
|
40
|
+
f(), c.destroy(), h.current = null, (S = x.current) == null || S.cleanup(), x.current = null;
|
|
41
41
|
};
|
|
42
42
|
}, [n, o]);
|
|
43
|
-
const
|
|
43
|
+
const b = L(
|
|
44
44
|
async (c) => {
|
|
45
45
|
if (!h.current)
|
|
46
46
|
throw new Error("Fency instance not initialized");
|
|
@@ -48,40 +48,40 @@ function Rn({
|
|
|
48
48
|
},
|
|
49
49
|
[]
|
|
50
50
|
);
|
|
51
|
-
if (
|
|
51
|
+
if (d)
|
|
52
52
|
return /* @__PURE__ */ m("div", { children: [
|
|
53
53
|
"Fency error: ",
|
|
54
|
-
|
|
54
|
+
d.message
|
|
55
55
|
] });
|
|
56
56
|
if (!n)
|
|
57
57
|
return null;
|
|
58
|
-
const
|
|
58
|
+
const y = u.length > 0 ? u[u.length - 1] : null, s = {
|
|
59
59
|
fency: n,
|
|
60
60
|
loading: a,
|
|
61
|
-
error:
|
|
62
|
-
activeStreams:
|
|
63
|
-
latestStream:
|
|
61
|
+
error: d,
|
|
62
|
+
activeStreams: u,
|
|
63
|
+
latestStream: y,
|
|
64
64
|
eventManager: x.current,
|
|
65
|
-
getOrCreateStream:
|
|
65
|
+
getOrCreateStream: b
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */ r(
|
|
67
|
+
return /* @__PURE__ */ r(Se.Provider, { value: s, children: t });
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
const e =
|
|
69
|
+
function be() {
|
|
70
|
+
const e = xe(Se);
|
|
71
71
|
if (e === void 0)
|
|
72
72
|
throw new Error("useFencyContext must be used within a FencyProvider");
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
const o =
|
|
75
|
+
const Je = (e) => {
|
|
76
|
+
const o = be(), [t, n] = w(null), i = A(
|
|
77
77
|
`subscriber-${Math.random().toString(36).substr(2, 9)}`
|
|
78
78
|
);
|
|
79
|
-
return
|
|
79
|
+
return H(() => {
|
|
80
80
|
if (!o.eventManager) return;
|
|
81
|
-
const
|
|
82
|
-
onMessage: (
|
|
83
|
-
var h, x,
|
|
84
|
-
const g =
|
|
81
|
+
const l = {
|
|
82
|
+
onMessage: (p, u) => {
|
|
83
|
+
var h, x, b;
|
|
84
|
+
const g = Pe(p);
|
|
85
85
|
if (g)
|
|
86
86
|
switch (g.type) {
|
|
87
87
|
case "STREAM_TIMEOUT":
|
|
@@ -91,39 +91,39 @@ const je = (e) => {
|
|
|
91
91
|
(x = e == null ? void 0 : e.onStreamNotFound) == null || x.call(e, g);
|
|
92
92
|
break;
|
|
93
93
|
case "AGENT_TASK_PROGRESS_ITEM_UPDATED":
|
|
94
|
-
(
|
|
94
|
+
(b = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || b.call(e, g);
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
onError: (
|
|
98
|
+
onError: (p, u) => {
|
|
99
99
|
var g;
|
|
100
100
|
(g = e == null ? void 0 : e.onStreamError) == null || g.call(e, {
|
|
101
|
-
streamId:
|
|
101
|
+
streamId: p,
|
|
102
102
|
error: {
|
|
103
103
|
code: "UnknownError",
|
|
104
|
-
message:
|
|
104
|
+
message: u ?? "Unknown error in useStream"
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
return o.eventManager.subscribe(
|
|
110
110
|
i.current,
|
|
111
|
-
|
|
111
|
+
l
|
|
112
112
|
);
|
|
113
113
|
}, [o.eventManager, e]), {
|
|
114
114
|
createStream: async () => {
|
|
115
115
|
try {
|
|
116
|
-
const
|
|
117
|
-
return n(
|
|
116
|
+
const l = await o.getOrCreateStream();
|
|
117
|
+
return n(l), {
|
|
118
118
|
type: "success",
|
|
119
|
-
stream:
|
|
119
|
+
stream: l
|
|
120
120
|
};
|
|
121
|
-
} catch (
|
|
121
|
+
} catch (l) {
|
|
122
122
|
return {
|
|
123
123
|
type: "error",
|
|
124
124
|
error: {
|
|
125
125
|
code: "UnknownError",
|
|
126
|
-
message:
|
|
126
|
+
message: l instanceof Error ? l.message : "Failed to create stream"
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
}
|
|
@@ -131,7 +131,7 @@ const je = (e) => {
|
|
|
131
131
|
stream: t
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
function
|
|
134
|
+
function Ze(e) {
|
|
135
135
|
var o, t;
|
|
136
136
|
if (e && typeof e == "object") {
|
|
137
137
|
const n = (t = (o = e.body) == null ? void 0 : o.error) == null ? void 0 : t.message;
|
|
@@ -143,112 +143,112 @@ function Ke(e) {
|
|
|
143
143
|
}
|
|
144
144
|
return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown error during agent task creation";
|
|
145
145
|
}
|
|
146
|
-
const
|
|
147
|
-
const o =
|
|
148
|
-
(
|
|
149
|
-
if (
|
|
150
|
-
return async (
|
|
151
|
-
const { clientToken: c } = await
|
|
146
|
+
const Ln = (e) => {
|
|
147
|
+
const o = be(), [t, n] = Qe(Le, Ae), i = A(/* @__PURE__ */ new Set()), a = A(/* @__PURE__ */ new Map()), l = A(/* @__PURE__ */ new Map()), d = L(
|
|
148
|
+
(y) => {
|
|
149
|
+
if (y)
|
|
150
|
+
return async (s) => {
|
|
151
|
+
const { clientToken: c } = await y(s), f = await De({
|
|
152
152
|
pk: o.fency.publishableKey,
|
|
153
153
|
baseUrl: o.fency.baseUrl,
|
|
154
154
|
clientToken: c,
|
|
155
|
-
agentTaskFileId:
|
|
155
|
+
agentTaskFileId: s
|
|
156
156
|
});
|
|
157
|
-
if (
|
|
158
|
-
throw new Error(
|
|
157
|
+
if (f.type === "error")
|
|
158
|
+
throw new Error(f.error.message);
|
|
159
159
|
const S = document.createElement("a");
|
|
160
|
-
S.href =
|
|
160
|
+
S.href = f.downloadLink, S.download = "", S.click();
|
|
161
161
|
};
|
|
162
162
|
},
|
|
163
163
|
[o.fency.baseUrl, o.fency.publishableKey]
|
|
164
|
-
),
|
|
165
|
-
(
|
|
164
|
+
), p = L(
|
|
165
|
+
(y, s) => {
|
|
166
166
|
const c = t.tasks.filter(
|
|
167
|
-
(
|
|
167
|
+
(f) => {
|
|
168
168
|
var S;
|
|
169
|
-
return
|
|
169
|
+
return f.streamId === y && f.loading && ((S = f.confirmedData) == null ? void 0 : S.taskId);
|
|
170
170
|
}
|
|
171
|
-
).map((
|
|
172
|
-
n({ type: "STREAM_FAILURE", streamId:
|
|
173
|
-
for (const
|
|
174
|
-
i.current.delete(
|
|
175
|
-
const S = a.current.get(
|
|
176
|
-
S && (a.current.delete(
|
|
171
|
+
).map((f) => f.confirmedData.taskId);
|
|
172
|
+
n({ type: "STREAM_FAILURE", streamId: y, error: s });
|
|
173
|
+
for (const f of c) {
|
|
174
|
+
i.current.delete(f);
|
|
175
|
+
const S = a.current.get(f);
|
|
176
|
+
S && (a.current.delete(f), S({ type: "error", error: s }));
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
[t.tasks]
|
|
180
|
-
),
|
|
181
|
-
(
|
|
180
|
+
), u = L(
|
|
181
|
+
(y) => {
|
|
182
182
|
var c;
|
|
183
|
-
if (!i.current.has(
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
186
|
-
if (
|
|
187
|
-
const S =
|
|
183
|
+
if (!i.current.has(y.agentTaskId)) return;
|
|
184
|
+
const s = y.data;
|
|
185
|
+
if (We(s)) {
|
|
186
|
+
if (s.eventType === "Error") {
|
|
187
|
+
const S = $e(s);
|
|
188
188
|
if (!S) return;
|
|
189
189
|
n({
|
|
190
190
|
type: "TASK_ERROR",
|
|
191
|
-
agentTaskId:
|
|
191
|
+
agentTaskId: y.agentTaskId,
|
|
192
192
|
error: S
|
|
193
193
|
});
|
|
194
194
|
const M = a.current.get(
|
|
195
|
-
|
|
195
|
+
y.agentTaskId
|
|
196
196
|
);
|
|
197
|
-
M && (a.current.delete(
|
|
197
|
+
M && (a.current.delete(y.agentTaskId), M({ type: "error", error: S }));
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
n({
|
|
201
201
|
type: "TASK_COMPLETED",
|
|
202
|
-
agentTaskId:
|
|
203
|
-
data:
|
|
204
|
-
item:
|
|
202
|
+
agentTaskId: y.agentTaskId,
|
|
203
|
+
data: s,
|
|
204
|
+
item: Ne(s) ? y : void 0
|
|
205
205
|
});
|
|
206
|
-
const
|
|
207
|
-
|
|
206
|
+
const f = a.current.get(
|
|
207
|
+
y.agentTaskId
|
|
208
208
|
);
|
|
209
|
-
if (
|
|
210
|
-
a.current.delete(
|
|
211
|
-
const S =
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
if (f) {
|
|
210
|
+
a.current.delete(y.agentTaskId);
|
|
211
|
+
const S = He(
|
|
212
|
+
y.streamId,
|
|
213
|
+
y.agentTaskId,
|
|
214
|
+
s
|
|
215
215
|
);
|
|
216
|
-
S &&
|
|
216
|
+
S && f(S);
|
|
217
217
|
}
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
(c = e.onAgentTaskProgressItemUpdated) == null || c.call(e,
|
|
220
|
+
(c = e.onAgentTaskProgressItemUpdated) == null || c.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
|
|
221
221
|
},
|
|
222
222
|
[e]
|
|
223
|
-
), { createStream: g } =
|
|
224
|
-
onAgentTaskProgressItemUpdated:
|
|
225
|
-
onStreamError: (
|
|
226
|
-
var
|
|
227
|
-
(
|
|
223
|
+
), { createStream: g } = Je({
|
|
224
|
+
onAgentTaskProgressItemUpdated: u,
|
|
225
|
+
onStreamError: (y) => {
|
|
226
|
+
var s;
|
|
227
|
+
(s = e == null ? void 0 : e.onStreamError) == null || s.call(e, y), p(y.streamId, y.error);
|
|
228
228
|
},
|
|
229
|
-
onStreamNotFound: (
|
|
230
|
-
var
|
|
231
|
-
(
|
|
229
|
+
onStreamNotFound: (y) => {
|
|
230
|
+
var s;
|
|
231
|
+
(s = e == null ? void 0 : e.onStreamNotFound) == null || s.call(e, y), p(y.streamId, {
|
|
232
232
|
code: "StreamNotFound",
|
|
233
233
|
message: "Stream not found"
|
|
234
234
|
});
|
|
235
235
|
},
|
|
236
|
-
onStreamTimeout: (
|
|
237
|
-
var
|
|
238
|
-
(
|
|
236
|
+
onStreamTimeout: (y) => {
|
|
237
|
+
var s;
|
|
238
|
+
(s = e == null ? void 0 : e.onStreamTimeout) == null || s.call(e, y), p(y.streamId, {
|
|
239
239
|
code: "StreamTimeout",
|
|
240
240
|
message: "Stream timed out"
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
}), h = L(
|
|
244
|
-
async (
|
|
244
|
+
async (y, s) => {
|
|
245
245
|
var D;
|
|
246
|
-
const c = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
247
|
-
if (
|
|
246
|
+
const c = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
|
|
247
|
+
if (f === void 0)
|
|
248
248
|
throw new Error(
|
|
249
249
|
"fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
|
|
250
250
|
);
|
|
251
|
-
const S = (
|
|
251
|
+
const S = (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
254
|
taskKey: c,
|
|
@@ -256,33 +256,33 @@ const In = (e) => {
|
|
|
256
256
|
triggeredAt: W,
|
|
257
257
|
confirmedData: null,
|
|
258
258
|
error: null,
|
|
259
|
-
params:
|
|
259
|
+
params: y,
|
|
260
260
|
progressItems: [],
|
|
261
261
|
loading: !0,
|
|
262
|
-
loadingText:
|
|
262
|
+
loadingText: s == null ? void 0 : s.loadingText
|
|
263
263
|
};
|
|
264
|
-
n({ type: "TASK_PENDING", task: B }), (D =
|
|
264
|
+
n({ type: "TASK_PENDING", task: B }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
|
|
265
265
|
...B,
|
|
266
|
-
downloadFile:
|
|
266
|
+
downloadFile: d(
|
|
267
267
|
S
|
|
268
268
|
)
|
|
269
269
|
});
|
|
270
270
|
try {
|
|
271
|
-
const { clientToken:
|
|
271
|
+
const { clientToken: $ } = await f(), I = await Ge({
|
|
272
272
|
pk: o.fency.publishableKey,
|
|
273
273
|
baseUrl: o.fency.baseUrl,
|
|
274
|
-
clientToken:
|
|
274
|
+
clientToken: $,
|
|
275
275
|
streamToken: M.stream.token,
|
|
276
|
-
request:
|
|
276
|
+
request: Oe(y)
|
|
277
277
|
});
|
|
278
278
|
if (I.type === "success" && I.agentTask) {
|
|
279
279
|
i.current.add(
|
|
280
280
|
I.agentTask.id
|
|
281
281
|
);
|
|
282
|
-
const G =
|
|
282
|
+
const G = d(
|
|
283
283
|
S
|
|
284
284
|
);
|
|
285
|
-
return G &&
|
|
285
|
+
return G && l.current.set(
|
|
286
286
|
I.agentTask.id,
|
|
287
287
|
G
|
|
288
288
|
), n({
|
|
@@ -323,10 +323,10 @@ const In = (e) => {
|
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
} catch (
|
|
326
|
+
} catch ($) {
|
|
327
327
|
const I = {
|
|
328
328
|
code: "UnknownError",
|
|
329
|
-
message:
|
|
329
|
+
message: Ze($)
|
|
330
330
|
};
|
|
331
331
|
return n({
|
|
332
332
|
type: "TASK_API_ERROR",
|
|
@@ -342,38 +342,48 @@ const In = (e) => {
|
|
|
342
342
|
},
|
|
343
343
|
[
|
|
344
344
|
o,
|
|
345
|
-
|
|
345
|
+
d,
|
|
346
346
|
g,
|
|
347
347
|
e.fetchCreateAgentTaskClientToken,
|
|
348
348
|
e.fetchAgentTaskFileDownloadClientToken
|
|
349
349
|
]
|
|
350
|
-
), x =
|
|
351
|
-
var
|
|
350
|
+
), x = z(() => t.tasks.map((y) => {
|
|
351
|
+
var s;
|
|
352
352
|
return {
|
|
353
|
-
...
|
|
354
|
-
downloadFile: (
|
|
353
|
+
...y,
|
|
354
|
+
downloadFile: (s = y.confirmedData) != null && s.taskId ? l.current.get(y.confirmedData.taskId) : void 0
|
|
355
355
|
};
|
|
356
|
-
}), [t.tasks]),
|
|
356
|
+
}), [t.tasks]), b = z(() => {
|
|
357
357
|
if (x.length !== 0)
|
|
358
|
-
return [...x].sort((
|
|
358
|
+
return [...x].sort((y, s) => new Date(s.triggeredAt).getTime() - new Date(y.triggeredAt).getTime())[0];
|
|
359
359
|
}, [x]);
|
|
360
|
-
return
|
|
361
|
-
i.current.clear(), a.current.clear(),
|
|
360
|
+
return H(() => () => {
|
|
361
|
+
i.current.clear(), a.current.clear(), l.current.clear();
|
|
362
362
|
}, []), {
|
|
363
363
|
agentTasks: x,
|
|
364
364
|
createAgentTask: h,
|
|
365
|
-
latest:
|
|
365
|
+
latest: b
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
|
-
function
|
|
368
|
+
function er(e) {
|
|
369
|
+
return e.taskType === "ExploreMemories" && e.eventType === "SetupSandbox";
|
|
370
|
+
}
|
|
371
|
+
function rr(e, o) {
|
|
372
|
+
for (let t = o + 1; t < e.length; t++) {
|
|
373
|
+
const n = e[t];
|
|
374
|
+
if (!er(n.data))
|
|
375
|
+
return n;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function nr(e) {
|
|
369
379
|
return e.progressItems.map((o, t) => {
|
|
370
|
-
const n = e.progressItems
|
|
380
|
+
const n = rr(e.progressItems, t), i = n != null;
|
|
371
381
|
let a;
|
|
372
382
|
if (n != null && n.createdAt) {
|
|
373
|
-
const
|
|
383
|
+
const l = new Date(o.createdAt).getTime(), d = new Date(n.createdAt).getTime();
|
|
374
384
|
a = Math.max(
|
|
375
385
|
0,
|
|
376
|
-
Math.round((
|
|
386
|
+
Math.round((d - l) / 1e3)
|
|
377
387
|
);
|
|
378
388
|
}
|
|
379
389
|
return {
|
|
@@ -384,7 +394,7 @@ function Ve(e) {
|
|
|
384
394
|
};
|
|
385
395
|
});
|
|
386
396
|
}
|
|
387
|
-
const
|
|
397
|
+
const or = {
|
|
388
398
|
'code[class*="language-"]': {
|
|
389
399
|
color: "#f8f8f2",
|
|
390
400
|
background: "none",
|
|
@@ -535,7 +545,7 @@ const Xe = {
|
|
|
535
545
|
italic: {
|
|
536
546
|
fontStyle: "italic"
|
|
537
547
|
}
|
|
538
|
-
},
|
|
548
|
+
}, tr = {
|
|
539
549
|
'code[class*="language-"]': {
|
|
540
550
|
background: "hsl(230, 1%, 98%)",
|
|
541
551
|
color: "hsl(230, 8%, 24%)",
|
|
@@ -1023,7 +1033,7 @@ const Xe = {
|
|
|
1023
1033
|
".prism-previewer-easing.prism-previewer-easing line": {
|
|
1024
1034
|
stroke: "hsl(230, 8%, 24%)"
|
|
1025
1035
|
}
|
|
1026
|
-
},
|
|
1036
|
+
}, Te = {
|
|
1027
1037
|
textPrimary: "#1f2937",
|
|
1028
1038
|
textSecondary: "#666",
|
|
1029
1039
|
textMuted: "#94a3b8",
|
|
@@ -1047,7 +1057,7 @@ const Xe = {
|
|
|
1047
1057
|
sourcesBadgeBg: "#f5f5f5",
|
|
1048
1058
|
transparent: "transparent",
|
|
1049
1059
|
reasoningLine: "#444"
|
|
1050
|
-
},
|
|
1060
|
+
}, ir = {
|
|
1051
1061
|
textPrimary: "#f0f6fc",
|
|
1052
1062
|
textSecondary: "#9198a1",
|
|
1053
1063
|
textMuted: "#8b949e",
|
|
@@ -1071,45 +1081,45 @@ const Xe = {
|
|
|
1071
1081
|
sourcesBadgeBg: "#21262d",
|
|
1072
1082
|
transparent: "transparent",
|
|
1073
1083
|
reasoningLine: "#a1a8b0"
|
|
1074
|
-
},
|
|
1084
|
+
}, ve = fe({
|
|
1075
1085
|
theme: "light",
|
|
1076
|
-
colors:
|
|
1086
|
+
colors: Te
|
|
1077
1087
|
});
|
|
1078
|
-
function
|
|
1088
|
+
function ar({
|
|
1079
1089
|
theme: e,
|
|
1080
1090
|
children: o
|
|
1081
1091
|
}) {
|
|
1082
|
-
const t =
|
|
1092
|
+
const t = z(
|
|
1083
1093
|
() => ({
|
|
1084
1094
|
theme: e,
|
|
1085
|
-
colors: e === "dark" ?
|
|
1095
|
+
colors: e === "dark" ? ir : Te
|
|
1086
1096
|
}),
|
|
1087
1097
|
[e]
|
|
1088
1098
|
);
|
|
1089
|
-
return /* @__PURE__ */ r(
|
|
1099
|
+
return /* @__PURE__ */ r(ve.Provider, { value: t, children: o });
|
|
1090
1100
|
}
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1101
|
+
function T() {
|
|
1102
|
+
return xe(ve);
|
|
1093
1103
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return e === "dark" ?
|
|
1104
|
+
function we(e) {
|
|
1105
|
+
return e === "dark" ? or : tr;
|
|
1096
1106
|
}
|
|
1097
|
-
const
|
|
1107
|
+
const N = ({
|
|
1098
1108
|
text: e,
|
|
1099
1109
|
onFileDownload: o,
|
|
1100
1110
|
onMemoryClick: t
|
|
1101
1111
|
}) => {
|
|
1102
|
-
const { theme: n } =
|
|
1112
|
+
const { theme: n } = T(), i = we(n), [a, l] = w(
|
|
1103
1113
|
null
|
|
1104
|
-
), [
|
|
1114
|
+
), [d, p] = w(
|
|
1105
1115
|
null
|
|
1106
|
-
), [
|
|
1107
|
-
(
|
|
1108
|
-
o && (
|
|
1116
|
+
), [u, g] = w(!1), [h, x] = w(!1), b = L(
|
|
1117
|
+
(f) => {
|
|
1118
|
+
o && (l(null), g(!0), (async () => {
|
|
1109
1119
|
try {
|
|
1110
|
-
await o(
|
|
1120
|
+
await o(f);
|
|
1111
1121
|
} catch (S) {
|
|
1112
|
-
|
|
1122
|
+
l(
|
|
1113
1123
|
S instanceof Error ? S.message : "Download failed"
|
|
1114
1124
|
);
|
|
1115
1125
|
} finally {
|
|
@@ -1118,13 +1128,13 @@ const H = ({
|
|
|
1118
1128
|
})());
|
|
1119
1129
|
},
|
|
1120
1130
|
[o]
|
|
1121
|
-
),
|
|
1122
|
-
(
|
|
1123
|
-
t && (
|
|
1131
|
+
), y = L(
|
|
1132
|
+
(f) => {
|
|
1133
|
+
t && (p(null), x(!0), (async () => {
|
|
1124
1134
|
try {
|
|
1125
|
-
await t(
|
|
1135
|
+
await t(f);
|
|
1126
1136
|
} catch (S) {
|
|
1127
|
-
|
|
1137
|
+
p(
|
|
1128
1138
|
S instanceof Error ? S.message : "Memory link action failed"
|
|
1129
1139
|
);
|
|
1130
1140
|
} finally {
|
|
@@ -1133,30 +1143,30 @@ const H = ({
|
|
|
1133
1143
|
})());
|
|
1134
1144
|
},
|
|
1135
1145
|
[t]
|
|
1136
|
-
),
|
|
1137
|
-
code(
|
|
1138
|
-
const { children: S, className: M, node: D, ref: W, ...B } =
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1146
|
+
), s = z(() => ({
|
|
1147
|
+
code(f) {
|
|
1148
|
+
const { children: S, className: M, node: D, ref: W, ...B } = f, $ = /language-(\w+)/.exec(M || "");
|
|
1149
|
+
return $ ? /* @__PURE__ */ r(
|
|
1150
|
+
ke,
|
|
1141
1151
|
{
|
|
1142
1152
|
...B,
|
|
1143
1153
|
PreTag: "div",
|
|
1144
1154
|
children: String(S).replace(/\n$/, ""),
|
|
1145
|
-
language:
|
|
1155
|
+
language: $[1],
|
|
1146
1156
|
style: i
|
|
1147
1157
|
}
|
|
1148
1158
|
) : /* @__PURE__ */ r("code", { ...B, className: M, children: String(S) });
|
|
1149
1159
|
},
|
|
1150
|
-
a(
|
|
1151
|
-
const { children: S, href: M, ...D } =
|
|
1160
|
+
a(f) {
|
|
1161
|
+
const { children: S, href: M, ...D } = f, W = M ? _e(M) : null;
|
|
1152
1162
|
if (W != null)
|
|
1153
1163
|
return o ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
|
|
1154
1164
|
"button",
|
|
1155
1165
|
{
|
|
1156
1166
|
type: "button",
|
|
1157
1167
|
className: "fency-file-download-button",
|
|
1158
|
-
disabled:
|
|
1159
|
-
onClick: () =>
|
|
1168
|
+
disabled: u,
|
|
1169
|
+
onClick: () => b(W),
|
|
1160
1170
|
children: S
|
|
1161
1171
|
}
|
|
1162
1172
|
) }) : /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
|
|
@@ -1164,25 +1174,25 @@ const H = ({
|
|
|
1164
1174
|
{
|
|
1165
1175
|
type: "button",
|
|
1166
1176
|
className: "fency-file-download-button",
|
|
1167
|
-
disabled:
|
|
1177
|
+
disabled: u,
|
|
1168
1178
|
onClick: () => {
|
|
1169
1179
|
console.error(
|
|
1170
1180
|
"[fency] File download link clicked but no onFileDownload handler is configured. Pass fetchAgentTaskFileDownloadClientToken to useAgentTasks."
|
|
1171
|
-
),
|
|
1181
|
+
), l(
|
|
1172
1182
|
"File download is not configured. Please provide fetchAgentTaskFileDownloadClientToken."
|
|
1173
1183
|
);
|
|
1174
1184
|
},
|
|
1175
1185
|
children: S
|
|
1176
1186
|
}
|
|
1177
1187
|
) });
|
|
1178
|
-
const B = M ?
|
|
1188
|
+
const B = M ? qe(M) : null;
|
|
1179
1189
|
return B != null ? t ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
|
|
1180
1190
|
"button",
|
|
1181
1191
|
{
|
|
1182
1192
|
type: "button",
|
|
1183
1193
|
className: "fency-file-download-button",
|
|
1184
1194
|
disabled: h,
|
|
1185
|
-
onClick: () =>
|
|
1195
|
+
onClick: () => y({
|
|
1186
1196
|
source: {
|
|
1187
1197
|
memoryId: B.memoryId,
|
|
1188
1198
|
memoryTypeId: B.memoryTypeId ?? ""
|
|
@@ -1202,14 +1212,14 @@ const H = ({
|
|
|
1202
1212
|
);
|
|
1203
1213
|
}
|
|
1204
1214
|
}), [
|
|
1205
|
-
|
|
1215
|
+
u,
|
|
1206
1216
|
h,
|
|
1207
|
-
|
|
1208
|
-
|
|
1217
|
+
b,
|
|
1218
|
+
y,
|
|
1209
1219
|
o,
|
|
1210
1220
|
t,
|
|
1211
1221
|
i
|
|
1212
|
-
]), c = a ??
|
|
1222
|
+
]), c = a ?? d;
|
|
1213
1223
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
1214
1224
|
c ? /* @__PURE__ */ r(
|
|
1215
1225
|
"p",
|
|
@@ -1227,18 +1237,18 @@ const H = ({
|
|
|
1227
1237
|
animate: { opacity: 1, y: 0 },
|
|
1228
1238
|
transition: { duration: 0.3, delay: 0 },
|
|
1229
1239
|
children: /* @__PURE__ */ r(
|
|
1230
|
-
|
|
1240
|
+
Xe,
|
|
1231
1241
|
{
|
|
1232
|
-
remarkPlugins: [
|
|
1233
|
-
components:
|
|
1242
|
+
remarkPlugins: [Ye],
|
|
1243
|
+
components: s,
|
|
1234
1244
|
children: e
|
|
1235
1245
|
}
|
|
1236
1246
|
)
|
|
1237
1247
|
}
|
|
1238
1248
|
)
|
|
1239
1249
|
] });
|
|
1240
|
-
},
|
|
1241
|
-
const { theme: o } =
|
|
1250
|
+
}, lr = ({ data: e }) => {
|
|
1251
|
+
const { theme: o } = T(), t = we(o), n = e.response.jsonResponse;
|
|
1242
1252
|
let i;
|
|
1243
1253
|
try {
|
|
1244
1254
|
i = JSON.stringify(JSON.parse(n), null, 2);
|
|
@@ -1253,10 +1263,10 @@ const H = ({
|
|
|
1253
1263
|
initial: { opacity: 0, y: -10 },
|
|
1254
1264
|
animate: { opacity: 1, y: 0 },
|
|
1255
1265
|
transition: { duration: 0.3, delay: 0 },
|
|
1256
|
-
children: /* @__PURE__ */ r(
|
|
1266
|
+
children: /* @__PURE__ */ r(ke, { language: "json", style: t, PreTag: "div", children: i })
|
|
1257
1267
|
}
|
|
1258
1268
|
) });
|
|
1259
|
-
},
|
|
1269
|
+
}, sr = {
|
|
1260
1270
|
en: {
|
|
1261
1271
|
error: "Error",
|
|
1262
1272
|
streaming: "Streaming...",
|
|
@@ -1502,8 +1512,8 @@ const H = ({
|
|
|
1502
1512
|
copiedId: "Kopiert"
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
|
1505
|
-
function
|
|
1506
|
-
return
|
|
1515
|
+
function cr(e) {
|
|
1516
|
+
return sr[e];
|
|
1507
1517
|
}
|
|
1508
1518
|
function k(e, o) {
|
|
1509
1519
|
return Object.entries(o).reduce(
|
|
@@ -1511,7 +1521,7 @@ function k(e, o) {
|
|
|
1511
1521
|
e
|
|
1512
1522
|
);
|
|
1513
1523
|
}
|
|
1514
|
-
function
|
|
1524
|
+
function j(e, o) {
|
|
1515
1525
|
const t = e.map((n) => `'${n}'`);
|
|
1516
1526
|
if (o != null && t.length >= 2) {
|
|
1517
1527
|
const n = t.pop();
|
|
@@ -1526,15 +1536,15 @@ function C({
|
|
|
1526
1536
|
repeat: n = !0,
|
|
1527
1537
|
repeatDelay: i = 0.5,
|
|
1528
1538
|
className: a,
|
|
1529
|
-
startOnView:
|
|
1530
|
-
once:
|
|
1531
|
-
inViewMargin:
|
|
1532
|
-
spread:
|
|
1539
|
+
startOnView: l = !1,
|
|
1540
|
+
once: d = !1,
|
|
1541
|
+
inViewMargin: p,
|
|
1542
|
+
spread: u = 2,
|
|
1533
1543
|
color: g,
|
|
1534
1544
|
shimmerColor: h,
|
|
1535
1545
|
direction: x = "fromBottom"
|
|
1536
1546
|
}) {
|
|
1537
|
-
const { colors:
|
|
1547
|
+
const { colors: b } = T(), y = g ?? b.shimmerBase, s = h ?? b.shimmerHighlight, c = A(null), f = Ke(c, { once: d, margin: p }), S = z(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
|
|
1538
1548
|
return /* @__PURE__ */ r(
|
|
1539
1549
|
v.span,
|
|
1540
1550
|
{
|
|
@@ -1550,8 +1560,8 @@ function C({
|
|
|
1550
1560
|
WebkitTextFillColor: "transparent",
|
|
1551
1561
|
backgroundRepeat: "no-repeat, padding-box",
|
|
1552
1562
|
"--spread": `${S}px`,
|
|
1553
|
-
"--base-color":
|
|
1554
|
-
"--shimmer-color":
|
|
1563
|
+
"--base-color": y,
|
|
1564
|
+
"--shimmer-color": s,
|
|
1555
1565
|
"--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
|
|
1556
1566
|
backgroundImage: "var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))"
|
|
1557
1567
|
},
|
|
@@ -1580,11 +1590,11 @@ function C({
|
|
|
1580
1590
|
}
|
|
1581
1591
|
);
|
|
1582
1592
|
}
|
|
1583
|
-
const
|
|
1584
|
-
const { colors: a } =
|
|
1593
|
+
const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
|
|
1594
|
+
const { colors: a } = T(), [l, d] = w(!1), u = (e.memories ?? []).map((S) => S.memoryTitle), g = u.length > 0, h = g && u.length > X, x = h && !l ? u.slice(0, X) : u, b = u.length - X, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, c = g ? `${n.searchingIn}${j(
|
|
1585
1595
|
x,
|
|
1586
|
-
|
|
1587
|
-
)}` : "",
|
|
1596
|
+
y ? n.and : void 0
|
|
1597
|
+
)}` : "", f = g ? `${s}${c}` : `${n.searchingPrefix}${e.queryDescription}`;
|
|
1588
1598
|
return /* @__PURE__ */ m(
|
|
1589
1599
|
"div",
|
|
1590
1600
|
{
|
|
@@ -1597,7 +1607,7 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1597
1607
|
initial: { opacity: 0, y: -10 },
|
|
1598
1608
|
animate: { opacity: 1, y: 0 },
|
|
1599
1609
|
transition: { duration: 0.3, delay: 0 },
|
|
1600
|
-
children: o && !t && !h ? /* @__PURE__ */ r(C, { text:
|
|
1610
|
+
children: o && !t && !h ? /* @__PURE__ */ r(C, { text: f, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
1601
1611
|
/* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: g ? /* @__PURE__ */ m(R, { children: [
|
|
1602
1612
|
n.searchingFor,
|
|
1603
1613
|
/* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
|
|
@@ -1607,13 +1617,13 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1607
1617
|
] }),
|
|
1608
1618
|
c
|
|
1609
1619
|
] }) : `${n.searchingPrefix}${e.queryDescription}` }),
|
|
1610
|
-
h && !
|
|
1620
|
+
h && !l && /* @__PURE__ */ m(R, { children: [
|
|
1611
1621
|
" ",
|
|
1612
1622
|
/* @__PURE__ */ r(
|
|
1613
1623
|
"button",
|
|
1614
1624
|
{
|
|
1615
1625
|
type: "button",
|
|
1616
|
-
onClick: () =>
|
|
1626
|
+
onClick: () => d(!0),
|
|
1617
1627
|
style: {
|
|
1618
1628
|
background: "none",
|
|
1619
1629
|
border: "none",
|
|
@@ -1626,18 +1636,18 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1626
1636
|
fontFamily: "inherit"
|
|
1627
1637
|
},
|
|
1628
1638
|
children: k(n.moreMemories, {
|
|
1629
|
-
n:
|
|
1639
|
+
n: b
|
|
1630
1640
|
})
|
|
1631
1641
|
}
|
|
1632
1642
|
)
|
|
1633
1643
|
] }),
|
|
1634
|
-
h &&
|
|
1644
|
+
h && l && /* @__PURE__ */ m(R, { children: [
|
|
1635
1645
|
" ",
|
|
1636
1646
|
/* @__PURE__ */ r(
|
|
1637
1647
|
"button",
|
|
1638
1648
|
{
|
|
1639
1649
|
type: "button",
|
|
1640
|
-
onClick: () =>
|
|
1650
|
+
onClick: () => d(!1),
|
|
1641
1651
|
style: {
|
|
1642
1652
|
background: "none",
|
|
1643
1653
|
border: "none",
|
|
@@ -1671,12 +1681,12 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1671
1681
|
]
|
|
1672
1682
|
}
|
|
1673
1683
|
);
|
|
1674
|
-
},
|
|
1684
|
+
}, F = ({
|
|
1675
1685
|
color: e,
|
|
1676
1686
|
size: o = 24,
|
|
1677
1687
|
borderWidth: t = 7
|
|
1678
1688
|
}) => {
|
|
1679
|
-
const { colors: n } =
|
|
1689
|
+
const { colors: n } = T(), i = e ?? n.checkmarkColor, a = o * 0.5;
|
|
1680
1690
|
return /* @__PURE__ */ r(
|
|
1681
1691
|
"span",
|
|
1682
1692
|
{
|
|
@@ -1691,16 +1701,16 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1691
1701
|
}
|
|
1692
1702
|
);
|
|
1693
1703
|
};
|
|
1694
|
-
function
|
|
1704
|
+
function dr(e, o) {
|
|
1695
1705
|
const t = Math.min(e.length, o.length);
|
|
1696
1706
|
for (let n = t; n >= 0; n--)
|
|
1697
1707
|
if (e.slice(-n) === o.slice(0, n)) return n;
|
|
1698
1708
|
return 0;
|
|
1699
1709
|
}
|
|
1700
|
-
const
|
|
1710
|
+
const pr = `
|
|
1701
1711
|
|
|
1702
1712
|
`;
|
|
1703
|
-
function
|
|
1713
|
+
function re(e) {
|
|
1704
1714
|
var t, n;
|
|
1705
1715
|
if (e.length === 0) return "";
|
|
1706
1716
|
let o = ((t = e[0]) == null ? void 0 : t.content) ?? "";
|
|
@@ -1711,12 +1721,12 @@ function Z(e) {
|
|
|
1711
1721
|
o = a;
|
|
1712
1722
|
continue;
|
|
1713
1723
|
}
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1724
|
+
const l = dr(o, a);
|
|
1725
|
+
l === 0 ? o += pr + a : o += a.slice(l);
|
|
1716
1726
|
}
|
|
1717
1727
|
return o;
|
|
1718
1728
|
}
|
|
1719
|
-
function
|
|
1729
|
+
function ne(e, o) {
|
|
1720
1730
|
if (e.length === 0) return "";
|
|
1721
1731
|
if (e.length === 1)
|
|
1722
1732
|
return k(o.memorySearchPagesSingle, {
|
|
@@ -1733,51 +1743,51 @@ function ee(e, o) {
|
|
|
1733
1743
|
n: t
|
|
1734
1744
|
});
|
|
1735
1745
|
}
|
|
1736
|
-
function
|
|
1746
|
+
function oe(e) {
|
|
1737
1747
|
const o = /* @__PURE__ */ new Set();
|
|
1738
1748
|
for (const t of e)
|
|
1739
1749
|
for (const n of t.pageNumbers) o.add(n);
|
|
1740
1750
|
return [...o].sort((t, n) => t - n);
|
|
1741
1751
|
}
|
|
1742
|
-
function
|
|
1752
|
+
function te(e) {
|
|
1743
1753
|
const o = e.memoryTypeName.trim();
|
|
1744
1754
|
if (o !== "") return o;
|
|
1745
1755
|
if (e.memoryTypeId !== "") return e.memoryTypeId;
|
|
1746
1756
|
}
|
|
1747
|
-
function
|
|
1757
|
+
function Ce(e) {
|
|
1748
1758
|
return e.chunks.filter((o) => o.relation === "MATCH").length;
|
|
1749
1759
|
}
|
|
1750
|
-
function
|
|
1760
|
+
function ur(e, o) {
|
|
1751
1761
|
let t = 0, n = 0;
|
|
1752
|
-
for (const
|
|
1753
|
-
t +=
|
|
1762
|
+
for (const l of e)
|
|
1763
|
+
t += Ce(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
|
|
1754
1764
|
const i = t === 1 ? o.chunkFound : k(o.chunksFound, { n: t }), a = k(o.scoreLabel, {
|
|
1755
1765
|
n: n.toFixed(2)
|
|
1756
1766
|
});
|
|
1757
1767
|
return `${i} - ${a}`;
|
|
1758
1768
|
}
|
|
1759
|
-
function
|
|
1769
|
+
function mr(e) {
|
|
1760
1770
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
1761
1771
|
return e.forEach((n, i) => {
|
|
1762
1772
|
let a = t.get(n.memoryId);
|
|
1763
1773
|
if (a == null) {
|
|
1764
1774
|
o.push(n.memoryId);
|
|
1765
|
-
const
|
|
1775
|
+
const l = n.memoryTitle !== "" ? n.memoryTitle : n.memoryId;
|
|
1766
1776
|
a = {
|
|
1767
1777
|
memoryId: n.memoryId,
|
|
1768
|
-
memoryTitle:
|
|
1778
|
+
memoryTitle: l,
|
|
1769
1779
|
items: []
|
|
1770
1780
|
}, t.set(n.memoryId, a);
|
|
1771
1781
|
}
|
|
1772
1782
|
a.items.push({ item: n, flatIndex: i });
|
|
1773
1783
|
}), o.map((n) => t.get(n));
|
|
1774
1784
|
}
|
|
1775
|
-
function
|
|
1785
|
+
function gr({
|
|
1776
1786
|
items: e,
|
|
1777
1787
|
onSearchResultClick: o,
|
|
1778
1788
|
t
|
|
1779
1789
|
}) {
|
|
1780
|
-
const { colors: n } =
|
|
1790
|
+
const { colors: n } = T(), [i, a] = w(null), l = !!o;
|
|
1781
1791
|
return /* @__PURE__ */ r(
|
|
1782
1792
|
"div",
|
|
1783
1793
|
{
|
|
@@ -1789,24 +1799,24 @@ function lr({
|
|
|
1789
1799
|
paddingTop: 8,
|
|
1790
1800
|
borderTop: `1px solid ${n.borderDivider}`
|
|
1791
1801
|
},
|
|
1792
|
-
children: e.map((
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1802
|
+
children: e.map((d, p) => {
|
|
1803
|
+
const u = oe(
|
|
1804
|
+
d.chunks
|
|
1795
1805
|
), g = [
|
|
1796
|
-
|
|
1806
|
+
te(d),
|
|
1797
1807
|
k(t.scoreLabel, {
|
|
1798
|
-
n:
|
|
1808
|
+
n: d.matchingChunkScore.toFixed(2)
|
|
1799
1809
|
}),
|
|
1800
|
-
|
|
1810
|
+
u.length > 0 ? ne(u, t) : t.pagesNotAvailable
|
|
1801
1811
|
].filter(
|
|
1802
|
-
(
|
|
1812
|
+
(y) => y != null && y !== ""
|
|
1803
1813
|
), h = {
|
|
1804
|
-
memoryId:
|
|
1805
|
-
memoryTitle:
|
|
1806
|
-
memoryTypeId:
|
|
1807
|
-
memoryTypeName:
|
|
1808
|
-
pageNumbers:
|
|
1809
|
-
}, x = `${
|
|
1814
|
+
memoryId: d.memoryId,
|
|
1815
|
+
memoryTitle: d.memoryTitle,
|
|
1816
|
+
memoryTypeId: d.memoryTypeId,
|
|
1817
|
+
memoryTypeName: d.memoryTypeName,
|
|
1818
|
+
pageNumbers: u
|
|
1819
|
+
}, x = `${d.memoryId}-${p}`, b = i === x;
|
|
1810
1820
|
return /* @__PURE__ */ m(
|
|
1811
1821
|
"div",
|
|
1812
1822
|
{
|
|
@@ -1815,9 +1825,9 @@ function lr({
|
|
|
1815
1825
|
flexDirection: "row",
|
|
1816
1826
|
alignItems: "flex-start",
|
|
1817
1827
|
gap: "12px",
|
|
1818
|
-
paddingTop:
|
|
1819
|
-
paddingBottom:
|
|
1820
|
-
borderBottom:
|
|
1828
|
+
paddingTop: p > 0 ? 12 : 0,
|
|
1829
|
+
paddingBottom: p < e.length - 1 ? 12 : 0,
|
|
1830
|
+
borderBottom: p < e.length - 1 ? `1px solid ${n.border}` : void 0,
|
|
1821
1831
|
minWidth: 0
|
|
1822
1832
|
},
|
|
1823
1833
|
children: [
|
|
@@ -1842,7 +1852,7 @@ function lr({
|
|
|
1842
1852
|
whiteSpace: "pre-wrap",
|
|
1843
1853
|
wordBreak: "break-word"
|
|
1844
1854
|
},
|
|
1845
|
-
children:
|
|
1855
|
+
children: re(d.chunks)
|
|
1846
1856
|
}
|
|
1847
1857
|
),
|
|
1848
1858
|
/* @__PURE__ */ r(
|
|
@@ -1860,12 +1870,12 @@ function lr({
|
|
|
1860
1870
|
]
|
|
1861
1871
|
}
|
|
1862
1872
|
),
|
|
1863
|
-
|
|
1873
|
+
l && /* @__PURE__ */ m(
|
|
1864
1874
|
"button",
|
|
1865
1875
|
{
|
|
1866
1876
|
type: "button",
|
|
1867
|
-
"aria-busy":
|
|
1868
|
-
disabled:
|
|
1877
|
+
"aria-busy": b,
|
|
1878
|
+
disabled: b,
|
|
1869
1879
|
onClick: async () => {
|
|
1870
1880
|
a(x);
|
|
1871
1881
|
try {
|
|
@@ -1886,14 +1896,14 @@ function lr({
|
|
|
1886
1896
|
background: n.bgChip,
|
|
1887
1897
|
border: `1px solid ${n.bgChipBorder}`,
|
|
1888
1898
|
borderRadius: 6,
|
|
1889
|
-
cursor:
|
|
1899
|
+
cursor: b ? "wait" : "pointer",
|
|
1890
1900
|
fontFamily: "inherit",
|
|
1891
1901
|
display: "inline-flex",
|
|
1892
1902
|
alignItems: "center",
|
|
1893
1903
|
gap: 8
|
|
1894
1904
|
},
|
|
1895
1905
|
children: [
|
|
1896
|
-
|
|
1906
|
+
b && /* @__PURE__ */ r(
|
|
1897
1907
|
"span",
|
|
1898
1908
|
{
|
|
1899
1909
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -1912,14 +1922,14 @@ function lr({
|
|
|
1912
1922
|
}
|
|
1913
1923
|
);
|
|
1914
1924
|
}
|
|
1915
|
-
function
|
|
1925
|
+
function hr({
|
|
1916
1926
|
group: e,
|
|
1917
1927
|
t: o,
|
|
1918
1928
|
expanded: t,
|
|
1919
1929
|
onToggle: n,
|
|
1920
1930
|
onSearchResultClick: i
|
|
1921
1931
|
}) {
|
|
1922
|
-
const { colors: a } =
|
|
1932
|
+
const { colors: a } = T(), l = e.items.map((p) => p.item), d = l.some((p) => p.chunks.length > 0);
|
|
1923
1933
|
return /* @__PURE__ */ m(
|
|
1924
1934
|
v.div,
|
|
1925
1935
|
{
|
|
@@ -1948,7 +1958,7 @@ function sr({
|
|
|
1948
1958
|
width: 32,
|
|
1949
1959
|
paddingTop: 2
|
|
1950
1960
|
},
|
|
1951
|
-
children: /* @__PURE__ */ r(
|
|
1961
|
+
children: /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 })
|
|
1952
1962
|
}
|
|
1953
1963
|
),
|
|
1954
1964
|
/* @__PURE__ */ m(
|
|
@@ -1994,10 +2004,10 @@ function sr({
|
|
|
1994
2004
|
color: a.textSecondary,
|
|
1995
2005
|
whiteSpace: "nowrap"
|
|
1996
2006
|
},
|
|
1997
|
-
children:
|
|
2007
|
+
children: ur(l, o)
|
|
1998
2008
|
}
|
|
1999
2009
|
),
|
|
2000
|
-
|
|
2010
|
+
d && /* @__PURE__ */ r(
|
|
2001
2011
|
"button",
|
|
2002
2012
|
{
|
|
2003
2013
|
type: "button",
|
|
@@ -2018,10 +2028,10 @@ function sr({
|
|
|
2018
2028
|
]
|
|
2019
2029
|
}
|
|
2020
2030
|
),
|
|
2021
|
-
t &&
|
|
2022
|
-
|
|
2031
|
+
t && d && /* @__PURE__ */ r(
|
|
2032
|
+
gr,
|
|
2023
2033
|
{
|
|
2024
|
-
items:
|
|
2034
|
+
items: l,
|
|
2025
2035
|
onSearchResultClick: i,
|
|
2026
2036
|
t: o
|
|
2027
2037
|
}
|
|
@@ -2033,27 +2043,27 @@ function sr({
|
|
|
2033
2043
|
}
|
|
2034
2044
|
);
|
|
2035
2045
|
}
|
|
2036
|
-
function
|
|
2046
|
+
function yr(e, o) {
|
|
2037
2047
|
return e === 1 ? o.chunkFound : k(o.chunksFound, { n: e });
|
|
2038
2048
|
}
|
|
2039
|
-
const
|
|
2049
|
+
const ie = ({
|
|
2040
2050
|
data: e,
|
|
2041
2051
|
onSearchResultClick: o,
|
|
2042
2052
|
t,
|
|
2043
2053
|
compactTop: n = !1
|
|
2044
2054
|
}) => {
|
|
2045
|
-
const { colors: i } =
|
|
2046
|
-
(
|
|
2055
|
+
const { colors: i } = T(), a = e.items, l = a.reduce(
|
|
2056
|
+
(s, c) => s + Ce(c),
|
|
2047
2057
|
0
|
|
2048
|
-
),
|
|
2049
|
-
|
|
2058
|
+
), d = new Set(a.map((s) => s.memoryId)).size, [p, u] = w({}), g = L((s) => {
|
|
2059
|
+
u((c) => ({
|
|
2050
2060
|
...c,
|
|
2051
|
-
[
|
|
2061
|
+
[s]: !c[s]
|
|
2052
2062
|
}));
|
|
2053
|
-
}, []), h =
|
|
2054
|
-
n:
|
|
2055
|
-
}),
|
|
2056
|
-
return a.length === 0 ? /* @__PURE__ */ r("div", { style:
|
|
2063
|
+
}, []), h = z(() => mr(a), [a]), x = d === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
|
|
2064
|
+
n: d
|
|
2065
|
+
}), b = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
|
|
2066
|
+
return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
|
|
2057
2067
|
"div",
|
|
2058
2068
|
{
|
|
2059
2069
|
style: {
|
|
@@ -2063,17 +2073,17 @@ const oe = ({
|
|
|
2063
2073
|
},
|
|
2064
2074
|
children: t.memorySearchExploreNoResults
|
|
2065
2075
|
}
|
|
2066
|
-
) }) : /* @__PURE__ */ m("div", { style:
|
|
2067
|
-
h.map((
|
|
2068
|
-
|
|
2076
|
+
) }) : /* @__PURE__ */ m("div", { style: y, children: [
|
|
2077
|
+
h.map((s) => /* @__PURE__ */ r(
|
|
2078
|
+
hr,
|
|
2069
2079
|
{
|
|
2070
|
-
group:
|
|
2080
|
+
group: s,
|
|
2071
2081
|
t,
|
|
2072
|
-
expanded:
|
|
2073
|
-
onToggle: () => g(
|
|
2082
|
+
expanded: p[s.memoryId] === !0,
|
|
2083
|
+
onToggle: () => g(s.memoryId),
|
|
2074
2084
|
onSearchResultClick: o
|
|
2075
2085
|
},
|
|
2076
|
-
|
|
2086
|
+
s.memoryId
|
|
2077
2087
|
)),
|
|
2078
2088
|
/* @__PURE__ */ r(
|
|
2079
2089
|
"div",
|
|
@@ -2084,12 +2094,12 @@ const oe = ({
|
|
|
2084
2094
|
marginTop: "4px",
|
|
2085
2095
|
fontStyle: "italic"
|
|
2086
2096
|
},
|
|
2087
|
-
children:
|
|
2097
|
+
children: b
|
|
2088
2098
|
}
|
|
2089
2099
|
)
|
|
2090
2100
|
] });
|
|
2091
2101
|
};
|
|
2092
|
-
function
|
|
2102
|
+
function fr(e) {
|
|
2093
2103
|
return {
|
|
2094
2104
|
taskType: "MemoryChat",
|
|
2095
2105
|
eventType: "Search",
|
|
@@ -2097,14 +2107,14 @@ function dr(e) {
|
|
|
2097
2107
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
2098
2108
|
};
|
|
2099
2109
|
}
|
|
2100
|
-
const
|
|
2110
|
+
const xr = ({
|
|
2101
2111
|
data: e,
|
|
2102
2112
|
isLatest: o = !1,
|
|
2103
2113
|
durationSeconds: t,
|
|
2104
2114
|
t: n,
|
|
2105
2115
|
onSearchResultClick: i
|
|
2106
2116
|
}) => {
|
|
2107
|
-
const a =
|
|
2117
|
+
const a = fr(e);
|
|
2108
2118
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
2109
2119
|
q,
|
|
2110
2120
|
{
|
|
@@ -2125,7 +2135,7 @@ const pr = ({
|
|
|
2125
2135
|
}
|
|
2126
2136
|
),
|
|
2127
2137
|
/* @__PURE__ */ r(
|
|
2128
|
-
|
|
2138
|
+
ie,
|
|
2129
2139
|
{
|
|
2130
2140
|
data: {
|
|
2131
2141
|
taskType: "MemoryChat",
|
|
@@ -2138,8 +2148,8 @@ const pr = ({
|
|
|
2138
2148
|
}
|
|
2139
2149
|
)
|
|
2140
2150
|
] });
|
|
2141
|
-
},
|
|
2142
|
-
const { colors: i } =
|
|
2151
|
+
}, Y = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
2152
|
+
const { colors: i } = T(), [a, l] = w(!1), d = e.titles, p = d.length > 0, u = p && d.length > Y, g = u && !a ? d.slice(0, Y) : d, h = d.length - Y, x = !u || a, b = p ? `${n.findingMemoriesIn}${j(
|
|
2143
2153
|
g,
|
|
2144
2154
|
x ? n.and : void 0
|
|
2145
2155
|
)}` : n.findingMemories;
|
|
@@ -2153,15 +2163,15 @@ const pr = ({
|
|
|
2153
2163
|
initial: { opacity: 0, y: -10 },
|
|
2154
2164
|
animate: { opacity: 1, y: 0 },
|
|
2155
2165
|
transition: { duration: 0.3, delay: 0 },
|
|
2156
|
-
children: o && !t && !
|
|
2157
|
-
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children:
|
|
2158
|
-
|
|
2166
|
+
children: o && !t && !u ? /* @__PURE__ */ r(C, { text: b, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
2167
|
+
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: b }),
|
|
2168
|
+
u && !a && /* @__PURE__ */ m(R, { children: [
|
|
2159
2169
|
" ",
|
|
2160
2170
|
/* @__PURE__ */ r(
|
|
2161
2171
|
"button",
|
|
2162
2172
|
{
|
|
2163
2173
|
type: "button",
|
|
2164
|
-
onClick: () =>
|
|
2174
|
+
onClick: () => l(!0),
|
|
2165
2175
|
style: {
|
|
2166
2176
|
background: "none",
|
|
2167
2177
|
border: "none",
|
|
@@ -2179,13 +2189,13 @@ const pr = ({
|
|
|
2179
2189
|
}
|
|
2180
2190
|
)
|
|
2181
2191
|
] }),
|
|
2182
|
-
|
|
2192
|
+
u && a && /* @__PURE__ */ m(R, { children: [
|
|
2183
2193
|
" ",
|
|
2184
2194
|
/* @__PURE__ */ r(
|
|
2185
2195
|
"button",
|
|
2186
2196
|
{
|
|
2187
2197
|
type: "button",
|
|
2188
|
-
onClick: () =>
|
|
2198
|
+
onClick: () => l(!1),
|
|
2189
2199
|
style: {
|
|
2190
2200
|
background: "none",
|
|
2191
2201
|
border: "none",
|
|
@@ -2217,9 +2227,9 @@ const pr = ({
|
|
|
2217
2227
|
}
|
|
2218
2228
|
)
|
|
2219
2229
|
] });
|
|
2220
|
-
},
|
|
2221
|
-
const { colors: t } =
|
|
2222
|
-
|
|
2230
|
+
}, J = 5, Sr = ({ data: e, t: o }) => {
|
|
2231
|
+
const { colors: t } = T(), [n, i] = w(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, p = d && l.length > J, u = p && !n ? l.slice(0, J) : l, g = l.length - J, h = !p || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, b = d ? `${x}${j(
|
|
2232
|
+
u,
|
|
2223
2233
|
h ? o.and : void 0
|
|
2224
2234
|
)}` : o.memoriesFound;
|
|
2225
2235
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
@@ -2230,8 +2240,8 @@ const pr = ({
|
|
|
2230
2240
|
animate: { opacity: 1, y: 0 },
|
|
2231
2241
|
transition: { duration: 0.3, delay: 0 },
|
|
2232
2242
|
children: /* @__PURE__ */ m(R, { children: [
|
|
2233
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2234
|
-
|
|
2243
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: b }),
|
|
2244
|
+
p && !n && /* @__PURE__ */ m(R, { children: [
|
|
2235
2245
|
" ",
|
|
2236
2246
|
/* @__PURE__ */ r(
|
|
2237
2247
|
"button",
|
|
@@ -2255,7 +2265,7 @@ const pr = ({
|
|
|
2255
2265
|
}
|
|
2256
2266
|
)
|
|
2257
2267
|
] }),
|
|
2258
|
-
|
|
2268
|
+
p && n && /* @__PURE__ */ m(R, { children: [
|
|
2259
2269
|
" ",
|
|
2260
2270
|
/* @__PURE__ */ r(
|
|
2261
2271
|
"button",
|
|
@@ -2280,8 +2290,8 @@ const pr = ({
|
|
|
2280
2290
|
] })
|
|
2281
2291
|
}
|
|
2282
2292
|
) });
|
|
2283
|
-
},
|
|
2284
|
-
const { colors: n } =
|
|
2293
|
+
}, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
2294
|
+
const { colors: n } = T(), i = t.addingSources;
|
|
2285
2295
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2286
2296
|
/* @__PURE__ */ r(
|
|
2287
2297
|
v.div,
|
|
@@ -2312,7 +2322,7 @@ const pr = ({
|
|
|
2312
2322
|
)
|
|
2313
2323
|
] });
|
|
2314
2324
|
};
|
|
2315
|
-
function
|
|
2325
|
+
function br(e, o) {
|
|
2316
2326
|
if (e.length === 0) return "";
|
|
2317
2327
|
if (e.length === 1)
|
|
2318
2328
|
return k(o.pageSingle, { n: e[0] });
|
|
@@ -2324,8 +2334,8 @@ function gr(e, o) {
|
|
|
2324
2334
|
const t = e[e.length - 1], n = e.slice(0, -1).join(", ");
|
|
2325
2335
|
return k(o.pageMultiple, { list: n, n: t });
|
|
2326
2336
|
}
|
|
2327
|
-
const
|
|
2328
|
-
const { colors: n } =
|
|
2337
|
+
const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
2338
|
+
const { colors: n } = T(), [i, a] = w(null);
|
|
2329
2339
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2330
2340
|
/* @__PURE__ */ r(
|
|
2331
2341
|
v.div,
|
|
@@ -2344,20 +2354,20 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2344
2354
|
children: t.sources
|
|
2345
2355
|
}
|
|
2346
2356
|
),
|
|
2347
|
-
/* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((
|
|
2348
|
-
|
|
2357
|
+
/* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((l, d) => /* @__PURE__ */ r(
|
|
2358
|
+
Tr,
|
|
2349
2359
|
{
|
|
2350
|
-
source:
|
|
2351
|
-
index:
|
|
2360
|
+
source: l,
|
|
2361
|
+
index: d,
|
|
2352
2362
|
loadingMemoryId: i,
|
|
2353
2363
|
setLoadingMemoryId: a,
|
|
2354
2364
|
onSourceClick: o,
|
|
2355
2365
|
t
|
|
2356
2366
|
},
|
|
2357
|
-
|
|
2367
|
+
l.memoryId
|
|
2358
2368
|
)) })
|
|
2359
2369
|
] });
|
|
2360
|
-
},
|
|
2370
|
+
}, Tr = ({
|
|
2361
2371
|
source: e,
|
|
2362
2372
|
index: o,
|
|
2363
2373
|
loadingMemoryId: t,
|
|
@@ -2365,7 +2375,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2365
2375
|
onSourceClick: i,
|
|
2366
2376
|
t: a
|
|
2367
2377
|
}) => {
|
|
2368
|
-
const { colors:
|
|
2378
|
+
const { colors: l } = T(), [d, p] = w(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
|
|
2369
2379
|
return /* @__PURE__ */ m(
|
|
2370
2380
|
v.div,
|
|
2371
2381
|
{
|
|
@@ -2373,7 +2383,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2373
2383
|
initial: { opacity: 0, scale: 0.9 },
|
|
2374
2384
|
animate: { opacity: 1, scale: 1 },
|
|
2375
2385
|
transition: { duration: 0.25, delay: o * 0.05 },
|
|
2376
|
-
onClick:
|
|
2386
|
+
onClick: u && !g ? async () => {
|
|
2377
2387
|
n(e.memoryId);
|
|
2378
2388
|
try {
|
|
2379
2389
|
await i({
|
|
@@ -2387,17 +2397,17 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2387
2397
|
n(null);
|
|
2388
2398
|
}
|
|
2389
2399
|
} : void 0,
|
|
2390
|
-
onMouseEnter:
|
|
2391
|
-
onMouseLeave:
|
|
2400
|
+
onMouseEnter: u && !g ? () => p(!0) : void 0,
|
|
2401
|
+
onMouseLeave: u && !g ? () => p(!1) : void 0,
|
|
2392
2402
|
style: {
|
|
2393
2403
|
display: "inline-flex",
|
|
2394
2404
|
flexDirection: "column",
|
|
2395
2405
|
gap: "4px",
|
|
2396
2406
|
padding: "8px 12px",
|
|
2397
2407
|
borderRadius: "6px",
|
|
2398
|
-
border: `1px solid ${
|
|
2399
|
-
backgroundColor:
|
|
2400
|
-
cursor:
|
|
2408
|
+
border: `1px solid ${l.borderStrong}`,
|
|
2409
|
+
backgroundColor: d ? l.sourcesBadgeBg : l.transparent,
|
|
2410
|
+
cursor: u && !g ? "pointer" : g ? "wait" : "default",
|
|
2401
2411
|
transition: "background-color 0.15s ease",
|
|
2402
2412
|
userSelect: "none",
|
|
2403
2413
|
pointerEvents: g ? "none" : void 0
|
|
@@ -2409,7 +2419,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2409
2419
|
style: {
|
|
2410
2420
|
fontSize: "13px",
|
|
2411
2421
|
fontWeight: 500,
|
|
2412
|
-
color:
|
|
2422
|
+
color: l.textPrimary,
|
|
2413
2423
|
display: "inline-flex",
|
|
2414
2424
|
alignItems: "center",
|
|
2415
2425
|
gap: 8
|
|
@@ -2426,7 +2436,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2426
2436
|
]
|
|
2427
2437
|
}
|
|
2428
2438
|
),
|
|
2429
|
-
x && /* @__PURE__ */ r("span", { style: { fontSize: "12px", color:
|
|
2439
|
+
x && /* @__PURE__ */ r("span", { style: { fontSize: "12px", color: l.textSecondary }, children: x })
|
|
2430
2440
|
]
|
|
2431
2441
|
}
|
|
2432
2442
|
);
|
|
@@ -2435,10 +2445,10 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2435
2445
|
size: o = 32,
|
|
2436
2446
|
lineWidth: t = 2
|
|
2437
2447
|
}) => {
|
|
2438
|
-
const { colors: n } =
|
|
2448
|
+
const { colors: n } = T(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, d = (o - a) / 2, p = {
|
|
2439
2449
|
position: "absolute",
|
|
2440
|
-
left:
|
|
2441
|
-
top:
|
|
2450
|
+
left: l,
|
|
2451
|
+
top: d,
|
|
2442
2452
|
width: t,
|
|
2443
2453
|
height: a,
|
|
2444
2454
|
backgroundColor: i
|
|
@@ -2457,7 +2467,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2457
2467
|
"span",
|
|
2458
2468
|
{
|
|
2459
2469
|
style: {
|
|
2460
|
-
...
|
|
2470
|
+
...p,
|
|
2461
2471
|
transform: "rotate(45deg)"
|
|
2462
2472
|
}
|
|
2463
2473
|
}
|
|
@@ -2466,7 +2476,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2466
2476
|
"span",
|
|
2467
2477
|
{
|
|
2468
2478
|
style: {
|
|
2469
|
-
...
|
|
2479
|
+
...p,
|
|
2470
2480
|
transform: "rotate(-45deg)"
|
|
2471
2481
|
}
|
|
2472
2482
|
}
|
|
@@ -2475,26 +2485,26 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2475
2485
|
}
|
|
2476
2486
|
);
|
|
2477
2487
|
};
|
|
2478
|
-
function
|
|
2488
|
+
function vr({
|
|
2479
2489
|
memory: e,
|
|
2480
2490
|
completed: o
|
|
2481
2491
|
}) {
|
|
2482
|
-
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(
|
|
2492
|
+
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
2483
2493
|
}
|
|
2484
|
-
const
|
|
2485
|
-
function
|
|
2494
|
+
const de = 80;
|
|
2495
|
+
function wr({
|
|
2486
2496
|
memory: e,
|
|
2487
2497
|
completed: o,
|
|
2488
2498
|
t
|
|
2489
2499
|
}) {
|
|
2490
|
-
const { colors: n } =
|
|
2500
|
+
const { colors: n } = T(), [i, a] = w(!1), l = e.result ?? e.error, d = l != null && l.length > de, p = l != null ? i || !d ? l : `${l.slice(0, de)}...` : void 0, u = d, g = e.error != null;
|
|
2491
2501
|
return /* @__PURE__ */ m(
|
|
2492
2502
|
v.div,
|
|
2493
2503
|
{
|
|
2494
2504
|
initial: { opacity: 0 },
|
|
2495
2505
|
animate: { opacity: 1 },
|
|
2496
2506
|
transition: { duration: 0.25 },
|
|
2497
|
-
onClick:
|
|
2507
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
2498
2508
|
style: {
|
|
2499
2509
|
paddingTop: "12px",
|
|
2500
2510
|
paddingBottom: "12px",
|
|
@@ -2504,7 +2514,7 @@ function fr({
|
|
|
2504
2514
|
alignItems: "center",
|
|
2505
2515
|
gap: "10px",
|
|
2506
2516
|
minWidth: 0,
|
|
2507
|
-
cursor:
|
|
2517
|
+
cursor: u ? "pointer" : "default"
|
|
2508
2518
|
},
|
|
2509
2519
|
children: [
|
|
2510
2520
|
/* @__PURE__ */ r(
|
|
@@ -2517,7 +2527,7 @@ function fr({
|
|
|
2517
2527
|
flexShrink: 0,
|
|
2518
2528
|
width: 32
|
|
2519
2529
|
},
|
|
2520
|
-
children: /* @__PURE__ */ r(
|
|
2530
|
+
children: /* @__PURE__ */ r(vr, { memory: e, completed: o })
|
|
2521
2531
|
}
|
|
2522
2532
|
),
|
|
2523
2533
|
/* @__PURE__ */ m(
|
|
@@ -2537,7 +2547,7 @@ function fr({
|
|
|
2537
2547
|
children: e.memoryTitle
|
|
2538
2548
|
}
|
|
2539
2549
|
),
|
|
2540
|
-
|
|
2550
|
+
p != null && /* @__PURE__ */ r(
|
|
2541
2551
|
"span",
|
|
2542
2552
|
{
|
|
2543
2553
|
style: {
|
|
@@ -2546,10 +2556,10 @@ function fr({
|
|
|
2546
2556
|
lineHeight: 1.4,
|
|
2547
2557
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
2548
2558
|
},
|
|
2549
|
-
children:
|
|
2559
|
+
children: p
|
|
2550
2560
|
}
|
|
2551
2561
|
),
|
|
2552
|
-
|
|
2562
|
+
u && /* @__PURE__ */ r(
|
|
2553
2563
|
"span",
|
|
2554
2564
|
{
|
|
2555
2565
|
style: {
|
|
@@ -2567,27 +2577,27 @@ function fr({
|
|
|
2567
2577
|
}
|
|
2568
2578
|
);
|
|
2569
2579
|
}
|
|
2570
|
-
const
|
|
2571
|
-
|
|
2580
|
+
const Cr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
|
|
2581
|
+
wr,
|
|
2572
2582
|
{
|
|
2573
2583
|
memory: n,
|
|
2574
2584
|
completed: o,
|
|
2575
2585
|
t
|
|
2576
2586
|
},
|
|
2577
2587
|
n.memoryId
|
|
2578
|
-
)) }),
|
|
2579
|
-
function
|
|
2588
|
+
)) }), pe = 80;
|
|
2589
|
+
function Mr(e) {
|
|
2580
2590
|
try {
|
|
2581
2591
|
return new URL(e).hostname;
|
|
2582
2592
|
} catch {
|
|
2583
2593
|
return e;
|
|
2584
2594
|
}
|
|
2585
2595
|
}
|
|
2586
|
-
function
|
|
2596
|
+
function Er({
|
|
2587
2597
|
item: e,
|
|
2588
2598
|
t: o
|
|
2589
2599
|
}) {
|
|
2590
|
-
const { colors: t } =
|
|
2600
|
+
const { colors: t } = T(), [n, i] = w(!1), a = e.description ?? "", l = a.length > pe, d = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, pe)}...`;
|
|
2591
2601
|
return /* @__PURE__ */ m(
|
|
2592
2602
|
"div",
|
|
2593
2603
|
{
|
|
@@ -2611,11 +2621,11 @@ function Sr({
|
|
|
2611
2621
|
textDecoration: "none",
|
|
2612
2622
|
wordBreak: "break-word"
|
|
2613
2623
|
},
|
|
2614
|
-
onMouseEnter: (
|
|
2615
|
-
|
|
2624
|
+
onMouseEnter: (p) => {
|
|
2625
|
+
p.currentTarget.style.color = t.link;
|
|
2616
2626
|
},
|
|
2617
|
-
onMouseLeave: (
|
|
2618
|
-
|
|
2627
|
+
onMouseLeave: (p) => {
|
|
2628
|
+
p.currentTarget.style.color = t.textPrimary;
|
|
2619
2629
|
},
|
|
2620
2630
|
children: e.title
|
|
2621
2631
|
}
|
|
@@ -2631,27 +2641,27 @@ function Sr({
|
|
|
2631
2641
|
children: [
|
|
2632
2642
|
e.rank,
|
|
2633
2643
|
". ",
|
|
2634
|
-
|
|
2644
|
+
Mr(e.link)
|
|
2635
2645
|
]
|
|
2636
2646
|
}
|
|
2637
2647
|
),
|
|
2638
|
-
|
|
2648
|
+
d != null && /* @__PURE__ */ m(R, { children: [
|
|
2639
2649
|
/* @__PURE__ */ r(
|
|
2640
2650
|
"span",
|
|
2641
2651
|
{
|
|
2642
|
-
onClick:
|
|
2652
|
+
onClick: l ? () => i((p) => !p) : void 0,
|
|
2643
2653
|
style: {
|
|
2644
2654
|
fontSize: 13,
|
|
2645
2655
|
color: t.textSecondary,
|
|
2646
2656
|
lineHeight: 1.5,
|
|
2647
2657
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
2648
2658
|
wordBreak: "break-word",
|
|
2649
|
-
cursor:
|
|
2659
|
+
cursor: l ? "pointer" : "default"
|
|
2650
2660
|
},
|
|
2651
|
-
children:
|
|
2661
|
+
children: d
|
|
2652
2662
|
}
|
|
2653
2663
|
),
|
|
2654
|
-
|
|
2664
|
+
l && /* @__PURE__ */ r(
|
|
2655
2665
|
"span",
|
|
2656
2666
|
{
|
|
2657
2667
|
style: {
|
|
@@ -2667,7 +2677,7 @@ function Sr({
|
|
|
2667
2677
|
}
|
|
2668
2678
|
);
|
|
2669
2679
|
}
|
|
2670
|
-
function
|
|
2680
|
+
function Ee(e, o) {
|
|
2671
2681
|
const t = e.input.countryCode, n = e.input.query;
|
|
2672
2682
|
return t != null && t !== "" ? k(o.googleSearchingForWithCountry, {
|
|
2673
2683
|
query: n,
|
|
@@ -2676,13 +2686,13 @@ function we(e, o) {
|
|
|
2676
2686
|
query: n
|
|
2677
2687
|
});
|
|
2678
2688
|
}
|
|
2679
|
-
function
|
|
2689
|
+
function Rr({
|
|
2680
2690
|
data: e,
|
|
2681
2691
|
isLatest: o,
|
|
2682
2692
|
durationSeconds: t,
|
|
2683
2693
|
t: n
|
|
2684
2694
|
}) {
|
|
2685
|
-
const { colors: i } =
|
|
2695
|
+
const { colors: i } = T(), a = Ee(e, n);
|
|
2686
2696
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2687
2697
|
/* @__PURE__ */ r(
|
|
2688
2698
|
v.div,
|
|
@@ -2708,13 +2718,13 @@ function br({
|
|
|
2708
2718
|
)
|
|
2709
2719
|
] });
|
|
2710
2720
|
}
|
|
2711
|
-
function
|
|
2721
|
+
function Ir({
|
|
2712
2722
|
data: e,
|
|
2713
2723
|
t: o
|
|
2714
2724
|
}) {
|
|
2715
|
-
const { colors: t } =
|
|
2716
|
-
return
|
|
2717
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2725
|
+
const { colors: t } = T(), [n, i] = w(!1), a = z(() => [...e.results ?? []].sort((g, h) => g.rank - h.rank), [e.results]), l = a.length, d = l === 1 ? o.googleResultFound : k(o.googleResultsFound, { n: l }), p = Ee(e, o);
|
|
2726
|
+
return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2727
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2718
2728
|
/* @__PURE__ */ r(
|
|
2719
2729
|
"div",
|
|
2720
2730
|
{
|
|
@@ -2727,7 +2737,7 @@ function Tr({
|
|
|
2727
2737
|
}
|
|
2728
2738
|
)
|
|
2729
2739
|
] }) : /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2730
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2740
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2731
2741
|
/* @__PURE__ */ m(
|
|
2732
2742
|
v.div,
|
|
2733
2743
|
{
|
|
@@ -2752,14 +2762,14 @@ function Tr({
|
|
|
2752
2762
|
color: t.textSecondary,
|
|
2753
2763
|
whiteSpace: "nowrap"
|
|
2754
2764
|
},
|
|
2755
|
-
children:
|
|
2765
|
+
children: d
|
|
2756
2766
|
}
|
|
2757
2767
|
),
|
|
2758
2768
|
/* @__PURE__ */ r(
|
|
2759
2769
|
"button",
|
|
2760
2770
|
{
|
|
2761
2771
|
type: "button",
|
|
2762
|
-
onClick: () => i((
|
|
2772
|
+
onClick: () => i((u) => !u),
|
|
2763
2773
|
style: {
|
|
2764
2774
|
border: "none",
|
|
2765
2775
|
background: "none",
|
|
@@ -2787,7 +2797,7 @@ function Tr({
|
|
|
2787
2797
|
paddingTop: 8,
|
|
2788
2798
|
borderTop: `1px solid ${t.borderDivider}`
|
|
2789
2799
|
},
|
|
2790
|
-
children: a.map((
|
|
2800
|
+
children: a.map((u, g) => /* @__PURE__ */ r(
|
|
2791
2801
|
"div",
|
|
2792
2802
|
{
|
|
2793
2803
|
style: {
|
|
@@ -2796,29 +2806,29 @@ function Tr({
|
|
|
2796
2806
|
borderBottom: g < a.length - 1 ? `1px solid ${t.border}` : void 0,
|
|
2797
2807
|
minWidth: 0
|
|
2798
2808
|
},
|
|
2799
|
-
children: /* @__PURE__ */ r(
|
|
2809
|
+
children: /* @__PURE__ */ r(Er, { item: u, t: o })
|
|
2800
2810
|
},
|
|
2801
|
-
`${
|
|
2811
|
+
`${u.link}-${u.rank}-${g}`
|
|
2802
2812
|
))
|
|
2803
2813
|
}
|
|
2804
2814
|
)
|
|
2805
2815
|
] });
|
|
2806
2816
|
}
|
|
2807
|
-
const
|
|
2817
|
+
const Fr = ({
|
|
2808
2818
|
data: e,
|
|
2809
2819
|
isLatest: o = !1,
|
|
2810
2820
|
durationSeconds: t,
|
|
2811
2821
|
t: n
|
|
2812
2822
|
}) => e.results === void 0 ? /* @__PURE__ */ r(
|
|
2813
|
-
|
|
2823
|
+
Rr,
|
|
2814
2824
|
{
|
|
2815
2825
|
data: e,
|
|
2816
2826
|
isLatest: o,
|
|
2817
2827
|
durationSeconds: t,
|
|
2818
2828
|
t: n
|
|
2819
2829
|
}
|
|
2820
|
-
) : /* @__PURE__ */ r(
|
|
2821
|
-
function
|
|
2830
|
+
) : /* @__PURE__ */ r(Ir, { data: e, t: n });
|
|
2831
|
+
function Re(e, o) {
|
|
2822
2832
|
if (e.error != null)
|
|
2823
2833
|
return null;
|
|
2824
2834
|
switch (e.status) {
|
|
@@ -2834,16 +2844,16 @@ function Ce(e, o) {
|
|
|
2834
2844
|
return null;
|
|
2835
2845
|
}
|
|
2836
2846
|
}
|
|
2837
|
-
function
|
|
2847
|
+
function zr(e) {
|
|
2838
2848
|
var o;
|
|
2839
2849
|
return e.error != null ? !0 : e.status != null ? !1 : (((o = e.summary) == null ? void 0 : o.length) ?? 0) > 0;
|
|
2840
2850
|
}
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2843
|
-
),
|
|
2844
|
-
5 *
|
|
2851
|
+
const ue = 80, ae = 12, le = 1.4, Br = Math.ceil(
|
|
2852
|
+
ae * le
|
|
2853
|
+
), Pr = Math.ceil(
|
|
2854
|
+
5 * ae * le
|
|
2845
2855
|
);
|
|
2846
|
-
function
|
|
2856
|
+
function Ie(e, o = 48) {
|
|
2847
2857
|
try {
|
|
2848
2858
|
const t = new URL(e), n = t.pathname.length > o ? `${t.pathname.slice(0, o)}…` : t.pathname, i = n === "/" ? "" : n;
|
|
2849
2859
|
return `${t.hostname}${i}${t.search ? "…" : ""}`;
|
|
@@ -2851,20 +2861,20 @@ function Me(e, o = 48) {
|
|
|
2851
2861
|
return e.length > 64 ? `${e.slice(0, 64)}…` : e;
|
|
2852
2862
|
}
|
|
2853
2863
|
}
|
|
2854
|
-
function
|
|
2855
|
-
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(
|
|
2864
|
+
function Lr({ item: e }) {
|
|
2865
|
+
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
|
|
2856
2866
|
}
|
|
2857
|
-
function
|
|
2858
|
-
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(
|
|
2867
|
+
function Ar({ item: e }) {
|
|
2868
|
+
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null && e.summary !== "" ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : e.status != null ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
2859
2869
|
}
|
|
2860
|
-
function
|
|
2870
|
+
function Dr({
|
|
2861
2871
|
item: e,
|
|
2862
2872
|
t: o,
|
|
2863
2873
|
isLatest: t = !1
|
|
2864
2874
|
}) {
|
|
2865
|
-
const { colors: n } =
|
|
2866
|
-
return
|
|
2867
|
-
const x =
|
|
2875
|
+
const { colors: n } = T(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, d = A(null), p = e.summary != null && e.summary !== "", u = Re(e, o), g = l || p || !a && u != null, h = e.error == null && (e.summary == null || e.summary === "");
|
|
2876
|
+
return H(() => {
|
|
2877
|
+
const x = d.current;
|
|
2868
2878
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
2869
2879
|
}, [i, a]), /* @__PURE__ */ m(
|
|
2870
2880
|
v.div,
|
|
@@ -2891,7 +2901,7 @@ function Ir({
|
|
|
2891
2901
|
width: 32,
|
|
2892
2902
|
...h || !g ? {} : { paddingTop: 2 }
|
|
2893
2903
|
},
|
|
2894
|
-
children: /* @__PURE__ */ r(
|
|
2904
|
+
children: /* @__PURE__ */ r(Ar, { item: e })
|
|
2895
2905
|
}
|
|
2896
2906
|
),
|
|
2897
2907
|
/* @__PURE__ */ m(
|
|
@@ -2924,10 +2934,10 @@ function Ir({
|
|
|
2924
2934
|
onMouseLeave: (x) => {
|
|
2925
2935
|
x.currentTarget.style.textDecoration = "none";
|
|
2926
2936
|
},
|
|
2927
|
-
children:
|
|
2937
|
+
children: Ie(e.url)
|
|
2928
2938
|
}
|
|
2929
2939
|
),
|
|
2930
|
-
!a &&
|
|
2940
|
+
!a && u != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(C, { text: u, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: u }) }),
|
|
2931
2941
|
a && /* @__PURE__ */ r(
|
|
2932
2942
|
"div",
|
|
2933
2943
|
{
|
|
@@ -2940,18 +2950,18 @@ function Ir({
|
|
|
2940
2950
|
children: /* @__PURE__ */ r(
|
|
2941
2951
|
"div",
|
|
2942
2952
|
{
|
|
2943
|
-
ref:
|
|
2953
|
+
ref: d,
|
|
2944
2954
|
style: {
|
|
2945
|
-
minHeight:
|
|
2946
|
-
maxHeight:
|
|
2955
|
+
minHeight: Br,
|
|
2956
|
+
maxHeight: Pr,
|
|
2947
2957
|
height: "auto",
|
|
2948
2958
|
overflowY: "auto",
|
|
2949
2959
|
overflowX: "hidden",
|
|
2950
|
-
fontSize:
|
|
2951
|
-
lineHeight:
|
|
2960
|
+
fontSize: ae,
|
|
2961
|
+
lineHeight: le,
|
|
2952
2962
|
whiteSpace: "pre-wrap",
|
|
2953
2963
|
wordBreak: "break-word",
|
|
2954
|
-
color:
|
|
2964
|
+
color: l ? n.textError : n.textTertiary
|
|
2955
2965
|
},
|
|
2956
2966
|
children: i
|
|
2957
2967
|
}
|
|
@@ -2965,11 +2975,11 @@ function Ir({
|
|
|
2965
2975
|
}
|
|
2966
2976
|
);
|
|
2967
2977
|
}
|
|
2968
|
-
function
|
|
2978
|
+
function Wr({
|
|
2969
2979
|
item: e,
|
|
2970
2980
|
t: o
|
|
2971
2981
|
}) {
|
|
2972
|
-
const { colors: t } =
|
|
2982
|
+
const { colors: t } = T(), [n, i] = w(!1), a = e.error ?? e.summary ?? "", l = e.error != null, d = a.length > ue, p = a.length === 0 ? void 0 : n || !d ? a : `${a.slice(0, ue)}...`, u = Re(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
|
|
2973
2983
|
return /* @__PURE__ */ m(
|
|
2974
2984
|
v.div,
|
|
2975
2985
|
{
|
|
@@ -2995,7 +3005,7 @@ function Fr({
|
|
|
2995
3005
|
width: 32,
|
|
2996
3006
|
...g ? {} : { paddingTop: 2 }
|
|
2997
3007
|
},
|
|
2998
|
-
children: /* @__PURE__ */ r(
|
|
3008
|
+
children: /* @__PURE__ */ r(Lr, { item: e })
|
|
2999
3009
|
}
|
|
3000
3010
|
),
|
|
3001
3011
|
/* @__PURE__ */ m(
|
|
@@ -3028,10 +3038,10 @@ function Fr({
|
|
|
3028
3038
|
onMouseLeave: (h) => {
|
|
3029
3039
|
h.currentTarget.style.textDecoration = "none";
|
|
3030
3040
|
},
|
|
3031
|
-
children:
|
|
3041
|
+
children: Ie(e.url)
|
|
3032
3042
|
}
|
|
3033
3043
|
),
|
|
3034
|
-
|
|
3044
|
+
p == null && u != null && /* @__PURE__ */ r(
|
|
3035
3045
|
"span",
|
|
3036
3046
|
{
|
|
3037
3047
|
style: {
|
|
@@ -3039,26 +3049,26 @@ function Fr({
|
|
|
3039
3049
|
color: t.textTertiary,
|
|
3040
3050
|
lineHeight: 1.4
|
|
3041
3051
|
},
|
|
3042
|
-
children:
|
|
3052
|
+
children: u
|
|
3043
3053
|
}
|
|
3044
3054
|
),
|
|
3045
|
-
|
|
3055
|
+
p != null && /* @__PURE__ */ m(R, { children: [
|
|
3046
3056
|
/* @__PURE__ */ r(
|
|
3047
3057
|
"span",
|
|
3048
3058
|
{
|
|
3049
|
-
onClick:
|
|
3059
|
+
onClick: d ? () => i((h) => !h) : void 0,
|
|
3050
3060
|
style: {
|
|
3051
3061
|
fontSize: 12,
|
|
3052
|
-
color:
|
|
3062
|
+
color: l ? t.textError : t.textSecondary,
|
|
3053
3063
|
lineHeight: 1.4,
|
|
3054
3064
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
3055
3065
|
wordBreak: "break-word",
|
|
3056
|
-
cursor:
|
|
3066
|
+
cursor: d ? "pointer" : "default"
|
|
3057
3067
|
},
|
|
3058
|
-
children:
|
|
3068
|
+
children: p
|
|
3059
3069
|
}
|
|
3060
3070
|
),
|
|
3061
|
-
|
|
3071
|
+
d && /* @__PURE__ */ r(
|
|
3062
3072
|
"span",
|
|
3063
3073
|
{
|
|
3064
3074
|
style: {
|
|
@@ -3077,7 +3087,7 @@ function Fr({
|
|
|
3077
3087
|
}
|
|
3078
3088
|
);
|
|
3079
3089
|
}
|
|
3080
|
-
function
|
|
3090
|
+
function me(e, o, t) {
|
|
3081
3091
|
return /* @__PURE__ */ r(
|
|
3082
3092
|
"div",
|
|
3083
3093
|
{
|
|
@@ -3105,13 +3115,13 @@ function pe(e, o, t) {
|
|
|
3105
3115
|
}
|
|
3106
3116
|
);
|
|
3107
3117
|
}
|
|
3108
|
-
function
|
|
3118
|
+
function $r({
|
|
3109
3119
|
data: e,
|
|
3110
3120
|
isLatest: o,
|
|
3111
3121
|
durationSeconds: t,
|
|
3112
3122
|
t: n
|
|
3113
3123
|
}) {
|
|
3114
|
-
const { colors: i } =
|
|
3124
|
+
const { colors: i } = T(), a = e.input.urls, l = e.input.query, d = a.length, p = d === 1 ? k(n.scrapingPage, { query: l }) : k(n.scrapingPages, { n: d, query: l });
|
|
3115
3125
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3116
3126
|
/* @__PURE__ */ r(
|
|
3117
3127
|
v.div,
|
|
@@ -3120,7 +3130,7 @@ function zr({
|
|
|
3120
3130
|
initial: { opacity: 0, y: -10 },
|
|
3121
3131
|
animate: { opacity: 1, y: 0 },
|
|
3122
3132
|
transition: { duration: 0.3, delay: 0 },
|
|
3123
|
-
children: o && !t ? /* @__PURE__ */ r(C, { text:
|
|
3133
|
+
children: o && !t ? /* @__PURE__ */ r(C, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: p })
|
|
3124
3134
|
}
|
|
3125
3135
|
),
|
|
3126
3136
|
t !== void 0 && /* @__PURE__ */ r(
|
|
@@ -3137,18 +3147,18 @@ function zr({
|
|
|
3137
3147
|
)
|
|
3138
3148
|
] });
|
|
3139
3149
|
}
|
|
3140
|
-
function
|
|
3150
|
+
function Nr({
|
|
3141
3151
|
data: e,
|
|
3142
3152
|
isLatest: o = !1,
|
|
3143
3153
|
t
|
|
3144
3154
|
}) {
|
|
3145
|
-
const { colors: n } =
|
|
3146
|
-
let
|
|
3147
|
-
for (const
|
|
3148
|
-
|
|
3149
|
-
return { successCount:
|
|
3150
|
-
}, [
|
|
3151
|
-
return
|
|
3155
|
+
const { colors: n } = T(), [i, a] = w(!1), l = e.results ?? [], { successCount: d, errorCount: p } = z(() => {
|
|
3156
|
+
let s = 0, c = 0;
|
|
3157
|
+
for (const f of l)
|
|
3158
|
+
f.error != null ? c += 1 : s += 1;
|
|
3159
|
+
return { successCount: s, errorCount: c };
|
|
3160
|
+
}, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => zr(s)), x = o && !h ? u === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: u, query: g }) : u === 1 ? t.scrapedPage : k(t.scrapedPages, { n: u }), b = k(t.scrapeOkCount, { n: d }), y = p > 0 ? `${x} - ${b}, ${k(t.scrapeFailedCount, { n: p })}` : `${x} - ${b}`;
|
|
3161
|
+
return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
|
|
3152
3162
|
"div",
|
|
3153
3163
|
{
|
|
3154
3164
|
style: {
|
|
@@ -3173,22 +3183,22 @@ function Br({
|
|
|
3173
3183
|
gap: "6px 12px",
|
|
3174
3184
|
minWidth: 0
|
|
3175
3185
|
},
|
|
3176
|
-
children: o && !h ? /* @__PURE__ */ r(C, { text:
|
|
3186
|
+
children: o && !h ? /* @__PURE__ */ r(C, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r(
|
|
3177
3187
|
"span",
|
|
3178
3188
|
{
|
|
3179
3189
|
style: {
|
|
3180
3190
|
fontSize: 12,
|
|
3181
3191
|
color: n.textSecondary
|
|
3182
3192
|
},
|
|
3183
|
-
children:
|
|
3193
|
+
children: y
|
|
3184
3194
|
}
|
|
3185
3195
|
)
|
|
3186
3196
|
}
|
|
3187
3197
|
),
|
|
3188
|
-
|
|
3189
|
-
|
|
3198
|
+
me(l, n, (s) => /* @__PURE__ */ r(
|
|
3199
|
+
Dr,
|
|
3190
3200
|
{
|
|
3191
|
-
item:
|
|
3201
|
+
item: s,
|
|
3192
3202
|
t,
|
|
3193
3203
|
isLatest: o
|
|
3194
3204
|
}
|
|
@@ -3216,14 +3226,14 @@ function Br({
|
|
|
3216
3226
|
fontSize: 12,
|
|
3217
3227
|
color: n.textSecondary
|
|
3218
3228
|
},
|
|
3219
|
-
children:
|
|
3229
|
+
children: y
|
|
3220
3230
|
}
|
|
3221
3231
|
),
|
|
3222
3232
|
/* @__PURE__ */ r(
|
|
3223
3233
|
"button",
|
|
3224
3234
|
{
|
|
3225
3235
|
type: "button",
|
|
3226
|
-
onClick: () => a((
|
|
3236
|
+
onClick: () => a((s) => !s),
|
|
3227
3237
|
style: {
|
|
3228
3238
|
border: "none",
|
|
3229
3239
|
background: "none",
|
|
@@ -3240,11 +3250,11 @@ function Br({
|
|
|
3240
3250
|
]
|
|
3241
3251
|
}
|
|
3242
3252
|
),
|
|
3243
|
-
i &&
|
|
3253
|
+
i && me(l, n, (s) => /* @__PURE__ */ r(Wr, { item: s, t }))
|
|
3244
3254
|
] });
|
|
3245
3255
|
}
|
|
3246
|
-
const
|
|
3247
|
-
|
|
3256
|
+
const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.results === void 0 ? /* @__PURE__ */ r(
|
|
3257
|
+
$r,
|
|
3248
3258
|
{
|
|
3249
3259
|
data: e,
|
|
3250
3260
|
isLatest: o,
|
|
@@ -3252,14 +3262,14 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3252
3262
|
t: n
|
|
3253
3263
|
}
|
|
3254
3264
|
) : /* @__PURE__ */ r(
|
|
3255
|
-
|
|
3265
|
+
Nr,
|
|
3256
3266
|
{
|
|
3257
3267
|
data: e,
|
|
3258
3268
|
isLatest: o,
|
|
3259
3269
|
t: n
|
|
3260
3270
|
}
|
|
3261
|
-
),
|
|
3262
|
-
const { colors: o } =
|
|
3271
|
+
), ge = (e) => {
|
|
3272
|
+
const { colors: o } = T(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
|
|
3263
3273
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3264
3274
|
/* @__PURE__ */ r(
|
|
3265
3275
|
v.div,
|
|
@@ -3289,7 +3299,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3289
3299
|
}
|
|
3290
3300
|
)
|
|
3291
3301
|
] });
|
|
3292
|
-
},
|
|
3302
|
+
}, Gr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3293
3303
|
const i = `${n.generateReportSetup} '${e.userRequest}'`;
|
|
3294
3304
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3295
3305
|
/* @__PURE__ */ r(
|
|
@@ -3329,7 +3339,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3329
3339
|
}
|
|
3330
3340
|
)
|
|
3331
3341
|
] });
|
|
3332
|
-
},
|
|
3342
|
+
}, Or = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3333
3343
|
const i = e.fileCount === 1 ? n.generateReportExportingOne : k(n.generateReportExporting, {
|
|
3334
3344
|
n: e.fileCount
|
|
3335
3345
|
});
|
|
@@ -3371,7 +3381,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3371
3381
|
}
|
|
3372
3382
|
)
|
|
3373
3383
|
] });
|
|
3374
|
-
},
|
|
3384
|
+
}, _r = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3375
3385
|
const i = k(n.generateReportRunCode, {
|
|
3376
3386
|
title: e.title
|
|
3377
3387
|
});
|
|
@@ -3413,7 +3423,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3413
3423
|
}
|
|
3414
3424
|
)
|
|
3415
3425
|
] });
|
|
3416
|
-
},
|
|
3426
|
+
}, qr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3417
3427
|
const i = k(n.generateReportRunCommand, {
|
|
3418
3428
|
title: e.title
|
|
3419
3429
|
});
|
|
@@ -3455,7 +3465,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3455
3465
|
}
|
|
3456
3466
|
)
|
|
3457
3467
|
] });
|
|
3458
|
-
},
|
|
3468
|
+
}, Ur = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3459
3469
|
const i = k(n.generateReportAssembling, {
|
|
3460
3470
|
title: e.reportTitle
|
|
3461
3471
|
});
|
|
@@ -3497,7 +3507,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3497
3507
|
}
|
|
3498
3508
|
)
|
|
3499
3509
|
] });
|
|
3500
|
-
},
|
|
3510
|
+
}, Qr = ({ data: e, t: o }) => {
|
|
3501
3511
|
const t = k(o.generateReportCompleted, {
|
|
3502
3512
|
title: e.reportTitle
|
|
3503
3513
|
});
|
|
@@ -3516,79 +3526,180 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3516
3526
|
children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
|
|
3517
3527
|
}
|
|
3518
3528
|
) });
|
|
3519
|
-
}
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3529
|
+
}, K = 12, V = 1.45, jr = Math.ceil(
|
|
3530
|
+
K * V
|
|
3531
|
+
), he = Math.ceil(
|
|
3532
|
+
5 * K * V
|
|
3533
|
+
), Fe = ({
|
|
3534
|
+
text: e,
|
|
3535
|
+
streaming: o = !1,
|
|
3536
|
+
collapsed: t = !1,
|
|
3537
|
+
label: n
|
|
3538
|
+
}) => {
|
|
3539
|
+
const { colors: i } = T(), a = A(null);
|
|
3540
|
+
return je(() => {
|
|
3541
|
+
const l = a.current;
|
|
3542
|
+
if (l == null || !o || e.length === 0)
|
|
3543
|
+
return;
|
|
3544
|
+
const d = () => {
|
|
3545
|
+
l.scrollTop = l.scrollHeight;
|
|
3546
|
+
};
|
|
3547
|
+
d(), requestAnimationFrame(d);
|
|
3548
|
+
}, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
|
|
3549
|
+
n != null && n.length > 0 && /* @__PURE__ */ r(
|
|
3550
|
+
"span",
|
|
3531
3551
|
{
|
|
3532
3552
|
style: {
|
|
3533
|
-
display: "
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3553
|
+
display: "block",
|
|
3554
|
+
fontSize: 11,
|
|
3555
|
+
color: i.textMuted,
|
|
3556
|
+
marginBottom: 4,
|
|
3557
|
+
fontWeight: 500
|
|
3537
3558
|
},
|
|
3538
|
-
|
|
3539
|
-
animate: { opacity: 1, y: 0 },
|
|
3540
|
-
transition: { duration: 0.3, delay: 0 },
|
|
3541
|
-
children: i ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textSecondary }, children: a })
|
|
3559
|
+
children: n
|
|
3542
3560
|
}
|
|
3543
3561
|
),
|
|
3544
|
-
|
|
3562
|
+
/* @__PURE__ */ r(
|
|
3545
3563
|
"div",
|
|
3546
3564
|
{
|
|
3547
3565
|
style: {
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3566
|
+
backgroundColor: i.reasoningBg,
|
|
3567
|
+
borderRadius: 6,
|
|
3568
|
+
padding: "8px 10px",
|
|
3569
|
+
boxSizing: "border-box"
|
|
3552
3570
|
},
|
|
3553
|
-
children:
|
|
3571
|
+
children: /* @__PURE__ */ r(
|
|
3572
|
+
"div",
|
|
3573
|
+
{
|
|
3574
|
+
ref: a,
|
|
3575
|
+
className: "memory-search-generating-reasoning-viewport",
|
|
3576
|
+
style: {
|
|
3577
|
+
minHeight: jr,
|
|
3578
|
+
...o ? {
|
|
3579
|
+
maxHeight: he,
|
|
3580
|
+
overflowY: "auto"
|
|
3581
|
+
} : t ? {
|
|
3582
|
+
maxHeight: he,
|
|
3583
|
+
overflowY: "hidden"
|
|
3584
|
+
} : {},
|
|
3585
|
+
height: "auto",
|
|
3586
|
+
overflowX: "hidden",
|
|
3587
|
+
fontSize: K,
|
|
3588
|
+
lineHeight: V,
|
|
3589
|
+
whiteSpace: "pre-wrap",
|
|
3590
|
+
wordBreak: "break-word",
|
|
3591
|
+
color: i.textTertiary
|
|
3592
|
+
},
|
|
3593
|
+
children: e
|
|
3594
|
+
}
|
|
3595
|
+
)
|
|
3554
3596
|
}
|
|
3555
3597
|
)
|
|
3556
3598
|
] });
|
|
3557
|
-
}
|
|
3599
|
+
};
|
|
3600
|
+
function Z(e) {
|
|
3601
|
+
return e.text != null && e.text.length > 0;
|
|
3602
|
+
}
|
|
3603
|
+
function Q(e) {
|
|
3604
|
+
return e.technicalReasoning != null && e.technicalReasoning.length > 0;
|
|
3605
|
+
}
|
|
3606
|
+
function Kr(e, o) {
|
|
3607
|
+
const t = new Date(e).getTime(), n = new Date(o).getTime();
|
|
3608
|
+
return Math.max(0, Math.round((n - t) / 1e3));
|
|
3609
|
+
}
|
|
3610
|
+
const Vr = ({
|
|
3558
3611
|
data: e,
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3612
|
+
createdAt: o,
|
|
3613
|
+
timestamp: t,
|
|
3614
|
+
completed: n = !1,
|
|
3615
|
+
t: i,
|
|
3616
|
+
onMemoryClick: a
|
|
3563
3617
|
}) => {
|
|
3564
|
-
const { colors:
|
|
3618
|
+
const { colors: l } = T(), d = e.reasoningCompleted === !0 || n || Z(e), p = !d, u = !Q(e) && !Z(e), [g, h] = w(!1), x = Q(e) && e.reasoningCompleted !== !0, b = u && p, y = Q(e) && !x, s = d ? Kr(o, t) : void 0;
|
|
3565
3619
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3566
|
-
/* @__PURE__ */
|
|
3620
|
+
/* @__PURE__ */ m(
|
|
3567
3621
|
v.div,
|
|
3568
3622
|
{
|
|
3569
3623
|
style: {
|
|
3570
3624
|
display: "flex",
|
|
3571
3625
|
alignItems: "center",
|
|
3572
3626
|
gap: "10px",
|
|
3573
|
-
color:
|
|
3627
|
+
color: l.textSecondary,
|
|
3574
3628
|
marginBottom: "8px"
|
|
3575
3629
|
},
|
|
3576
3630
|
initial: { opacity: 0, y: -10 },
|
|
3577
3631
|
animate: { opacity: 1, y: 0 },
|
|
3578
3632
|
transition: { duration: 0.3, delay: 0 },
|
|
3579
|
-
children:
|
|
3633
|
+
children: [
|
|
3634
|
+
/* @__PURE__ */ r(
|
|
3635
|
+
"div",
|
|
3636
|
+
{
|
|
3637
|
+
style: {
|
|
3638
|
+
display: "flex",
|
|
3639
|
+
alignItems: "center",
|
|
3640
|
+
justifyContent: "center",
|
|
3641
|
+
flexShrink: 0,
|
|
3642
|
+
width: 32
|
|
3643
|
+
},
|
|
3644
|
+
children: d ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
|
|
3645
|
+
}
|
|
3646
|
+
),
|
|
3647
|
+
b ? /* @__PURE__ */ r(C, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
|
|
3648
|
+
]
|
|
3580
3649
|
}
|
|
3581
3650
|
),
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
|
|
3651
|
+
Q(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
|
|
3652
|
+
/* @__PURE__ */ r(
|
|
3653
|
+
Fe,
|
|
3654
|
+
{
|
|
3655
|
+
text: e.technicalReasoning,
|
|
3656
|
+
streaming: x,
|
|
3657
|
+
collapsed: !x && !g,
|
|
3658
|
+
label: i.memorySearchQueryReasoningLabel
|
|
3659
|
+
}
|
|
3660
|
+
),
|
|
3661
|
+
y && /* @__PURE__ */ r(
|
|
3662
|
+
"button",
|
|
3663
|
+
{
|
|
3664
|
+
type: "button",
|
|
3665
|
+
onClick: () => h((c) => !c),
|
|
3666
|
+
style: {
|
|
3667
|
+
alignSelf: "flex-start",
|
|
3668
|
+
border: "none",
|
|
3669
|
+
background: "none",
|
|
3670
|
+
padding: 0,
|
|
3671
|
+
marginTop: 8,
|
|
3672
|
+
cursor: "pointer",
|
|
3673
|
+
fontSize: 12,
|
|
3674
|
+
color: l.textSecondary,
|
|
3675
|
+
textDecoration: "underline"
|
|
3676
|
+
},
|
|
3677
|
+
children: g ? i.memorySearchHideReasoning : i.memorySearchViewReasoning
|
|
3678
|
+
}
|
|
3679
|
+
)
|
|
3680
|
+
] }),
|
|
3681
|
+
Z(e) && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(
|
|
3682
|
+
N,
|
|
3584
3683
|
{
|
|
3585
3684
|
text: e.text,
|
|
3586
|
-
onMemoryClick:
|
|
3685
|
+
onMemoryClick: a
|
|
3686
|
+
}
|
|
3687
|
+
) }),
|
|
3688
|
+
s !== void 0 && /* @__PURE__ */ r(
|
|
3689
|
+
"div",
|
|
3690
|
+
{
|
|
3691
|
+
style: {
|
|
3692
|
+
fontSize: "12px",
|
|
3693
|
+
color: l.textMuted,
|
|
3694
|
+
marginTop: "4px",
|
|
3695
|
+
fontStyle: "italic"
|
|
3696
|
+
},
|
|
3697
|
+
children: k(i.tookSeconds, { n: s })
|
|
3587
3698
|
}
|
|
3588
3699
|
)
|
|
3589
3700
|
] });
|
|
3590
|
-
},
|
|
3591
|
-
const { colors: i } =
|
|
3701
|
+
}, Xr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3702
|
+
const { colors: i } = T(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
|
|
3592
3703
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3593
3704
|
/* @__PURE__ */ r(
|
|
3594
3705
|
v.div,
|
|
@@ -3618,8 +3729,8 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3618
3729
|
}
|
|
3619
3730
|
)
|
|
3620
3731
|
] });
|
|
3621
|
-
},
|
|
3622
|
-
const { colors: i } =
|
|
3732
|
+
}, Yr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3733
|
+
const { colors: i } = T(), a = k(n.exploreFindMemoriesQuery, {
|
|
3623
3734
|
query: e.query
|
|
3624
3735
|
});
|
|
3625
3736
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
@@ -3653,9 +3764,9 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3653
3764
|
}
|
|
3654
3765
|
)
|
|
3655
3766
|
] });
|
|
3656
|
-
},
|
|
3657
|
-
const { colors: t } =
|
|
3658
|
-
|
|
3767
|
+
}, ee = 5, Jr = ({ data: e, t: o }) => {
|
|
3768
|
+
const { colors: t } = T(), [n, i] = w(!1), a = e.memories.map((b) => b.memoryTitle), l = a.length > 0, d = l && a.length > ee, p = d && !n ? a.slice(0, ee) : a, u = a.length - ee, g = !d || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${j(
|
|
3769
|
+
p,
|
|
3659
3770
|
g ? o.and : void 0
|
|
3660
3771
|
)}` : o.memoriesFound;
|
|
3661
3772
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ m(
|
|
@@ -3667,7 +3778,7 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3667
3778
|
transition: { duration: 0.3, delay: 0 },
|
|
3668
3779
|
children: [
|
|
3669
3780
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
|
|
3670
|
-
|
|
3781
|
+
d && !n && /* @__PURE__ */ m(R, { children: [
|
|
3671
3782
|
" ",
|
|
3672
3783
|
/* @__PURE__ */ r(
|
|
3673
3784
|
"button",
|
|
@@ -3686,12 +3797,12 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3686
3797
|
fontFamily: "inherit"
|
|
3687
3798
|
},
|
|
3688
3799
|
children: k(o.moreMemories, {
|
|
3689
|
-
n:
|
|
3800
|
+
n: u
|
|
3690
3801
|
})
|
|
3691
3802
|
}
|
|
3692
3803
|
)
|
|
3693
3804
|
] }),
|
|
3694
|
-
|
|
3805
|
+
d && n && /* @__PURE__ */ m(R, { children: [
|
|
3695
3806
|
" ",
|
|
3696
3807
|
/* @__PURE__ */ r(
|
|
3697
3808
|
"button",
|
|
@@ -3717,7 +3828,7 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3717
3828
|
}
|
|
3718
3829
|
) });
|
|
3719
3830
|
};
|
|
3720
|
-
function
|
|
3831
|
+
function Zr(e) {
|
|
3721
3832
|
return {
|
|
3722
3833
|
taskType: "MemoryChat",
|
|
3723
3834
|
eventType: "Search",
|
|
@@ -3725,8 +3836,8 @@ function Qr(e) {
|
|
|
3725
3836
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
3726
3837
|
};
|
|
3727
3838
|
}
|
|
3728
|
-
const
|
|
3729
|
-
const a =
|
|
3839
|
+
const en = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
|
|
3840
|
+
const a = Zr(e);
|
|
3730
3841
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
3731
3842
|
q,
|
|
3732
3843
|
{
|
|
@@ -3747,7 +3858,7 @@ const jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3747
3858
|
}
|
|
3748
3859
|
),
|
|
3749
3860
|
/* @__PURE__ */ r(
|
|
3750
|
-
|
|
3861
|
+
ie,
|
|
3751
3862
|
{
|
|
3752
3863
|
data: {
|
|
3753
3864
|
taskType: "MemoryChat",
|
|
@@ -3761,26 +3872,26 @@ const jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3761
3872
|
)
|
|
3762
3873
|
] });
|
|
3763
3874
|
};
|
|
3764
|
-
function
|
|
3875
|
+
function rn({
|
|
3765
3876
|
memory: e,
|
|
3766
3877
|
completed: o
|
|
3767
3878
|
}) {
|
|
3768
|
-
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null ? /* @__PURE__ */ r(
|
|
3879
|
+
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
3769
3880
|
}
|
|
3770
|
-
const
|
|
3771
|
-
function
|
|
3881
|
+
const ye = 80;
|
|
3882
|
+
function nn({
|
|
3772
3883
|
memory: e,
|
|
3773
3884
|
completed: o,
|
|
3774
3885
|
t
|
|
3775
3886
|
}) {
|
|
3776
|
-
const { colors: n } =
|
|
3887
|
+
const { colors: n } = T(), [i, a] = w(!1), l = e.summary ?? e.error, d = l != null && l.length > ye, p = l != null ? i || !d ? l : `${l.slice(0, ye)}...` : void 0, u = d, g = e.error != null;
|
|
3777
3888
|
return /* @__PURE__ */ m(
|
|
3778
3889
|
v.div,
|
|
3779
3890
|
{
|
|
3780
3891
|
initial: { opacity: 0 },
|
|
3781
3892
|
animate: { opacity: 1 },
|
|
3782
3893
|
transition: { duration: 0.25 },
|
|
3783
|
-
onClick:
|
|
3894
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
3784
3895
|
style: {
|
|
3785
3896
|
paddingTop: "12px",
|
|
3786
3897
|
paddingBottom: "12px",
|
|
@@ -3790,7 +3901,7 @@ function Vr({
|
|
|
3790
3901
|
alignItems: "center",
|
|
3791
3902
|
gap: "10px",
|
|
3792
3903
|
minWidth: 0,
|
|
3793
|
-
cursor:
|
|
3904
|
+
cursor: u ? "pointer" : "default"
|
|
3794
3905
|
},
|
|
3795
3906
|
children: [
|
|
3796
3907
|
/* @__PURE__ */ r(
|
|
@@ -3803,7 +3914,7 @@ function Vr({
|
|
|
3803
3914
|
flexShrink: 0,
|
|
3804
3915
|
width: 32
|
|
3805
3916
|
},
|
|
3806
|
-
children: /* @__PURE__ */ r(
|
|
3917
|
+
children: /* @__PURE__ */ r(rn, { memory: e, completed: o })
|
|
3807
3918
|
}
|
|
3808
3919
|
),
|
|
3809
3920
|
/* @__PURE__ */ m(
|
|
@@ -3827,7 +3938,7 @@ function Vr({
|
|
|
3827
3938
|
children: e.memoryTitle
|
|
3828
3939
|
}
|
|
3829
3940
|
),
|
|
3830
|
-
|
|
3941
|
+
p != null && /* @__PURE__ */ r(
|
|
3831
3942
|
"span",
|
|
3832
3943
|
{
|
|
3833
3944
|
style: {
|
|
@@ -3836,10 +3947,10 @@ function Vr({
|
|
|
3836
3947
|
lineHeight: 1.4,
|
|
3837
3948
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
3838
3949
|
},
|
|
3839
|
-
children:
|
|
3950
|
+
children: p
|
|
3840
3951
|
}
|
|
3841
3952
|
),
|
|
3842
|
-
|
|
3953
|
+
u && /* @__PURE__ */ r(
|
|
3843
3954
|
"span",
|
|
3844
3955
|
{
|
|
3845
3956
|
style: {
|
|
@@ -3857,8 +3968,8 @@ function Vr({
|
|
|
3857
3968
|
}
|
|
3858
3969
|
);
|
|
3859
3970
|
}
|
|
3860
|
-
const
|
|
3861
|
-
const { colors: n } =
|
|
3971
|
+
const on = ({ data: e, completed: o, t }) => {
|
|
3972
|
+
const { colors: n } = T();
|
|
3862
3973
|
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
3863
3974
|
/* @__PURE__ */ r(
|
|
3864
3975
|
"div",
|
|
@@ -3873,7 +3984,7 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3873
3984
|
}
|
|
3874
3985
|
),
|
|
3875
3986
|
e.memories.map((i) => /* @__PURE__ */ r(
|
|
3876
|
-
|
|
3987
|
+
nn,
|
|
3877
3988
|
{
|
|
3878
3989
|
memory: i,
|
|
3879
3990
|
completed: o,
|
|
@@ -3882,13 +3993,13 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3882
3993
|
i.memoryId
|
|
3883
3994
|
))
|
|
3884
3995
|
] });
|
|
3885
|
-
},
|
|
3996
|
+
}, tn = ({
|
|
3886
3997
|
data: e,
|
|
3887
3998
|
isLatest: o = !1,
|
|
3888
3999
|
durationSeconds: t,
|
|
3889
4000
|
t: n
|
|
3890
4001
|
}) => {
|
|
3891
|
-
const { colors: i } =
|
|
4002
|
+
const { colors: i } = T(), a = k(n.exploreRunCode, { title: e.title });
|
|
3892
4003
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3893
4004
|
/* @__PURE__ */ r(
|
|
3894
4005
|
v.div,
|
|
@@ -3918,8 +4029,8 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3918
4029
|
}
|
|
3919
4030
|
)
|
|
3920
4031
|
] });
|
|
3921
|
-
},
|
|
3922
|
-
|
|
4032
|
+
}, an = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
|
|
4033
|
+
Me,
|
|
3923
4034
|
{
|
|
3924
4035
|
data: {
|
|
3925
4036
|
taskType: "MemoryChat",
|
|
@@ -3930,20 +4041,20 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3930
4041
|
t
|
|
3931
4042
|
}
|
|
3932
4043
|
);
|
|
3933
|
-
function
|
|
3934
|
-
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(
|
|
4044
|
+
function ln({ item: e }) {
|
|
4045
|
+
return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
3935
4046
|
}
|
|
3936
|
-
function
|
|
4047
|
+
function sn(e, o) {
|
|
3937
4048
|
return k(o.searchingInMemoriesOfType, {
|
|
3938
4049
|
name: e.memoryTypeName
|
|
3939
4050
|
});
|
|
3940
4051
|
}
|
|
3941
|
-
function
|
|
4052
|
+
function cn({
|
|
3942
4053
|
item: e,
|
|
3943
4054
|
t: o,
|
|
3944
4055
|
showShimmerForPrimary: t
|
|
3945
4056
|
}) {
|
|
3946
|
-
const { colors: n } =
|
|
4057
|
+
const { colors: n } = T(), i = e.result != null, a = e.error != null, l = sn(e, o);
|
|
3947
4058
|
return /* @__PURE__ */ m(
|
|
3948
4059
|
v.div,
|
|
3949
4060
|
{
|
|
@@ -3971,7 +4082,7 @@ function rn({
|
|
|
3971
4082
|
flexShrink: 0,
|
|
3972
4083
|
width: 32
|
|
3973
4084
|
},
|
|
3974
|
-
children: /* @__PURE__ */ r(
|
|
4085
|
+
children: /* @__PURE__ */ r(ln, { item: e })
|
|
3975
4086
|
}
|
|
3976
4087
|
),
|
|
3977
4088
|
/* @__PURE__ */ m(
|
|
@@ -3985,7 +4096,7 @@ function rn({
|
|
|
3985
4096
|
flex: 1
|
|
3986
4097
|
},
|
|
3987
4098
|
children: [
|
|
3988
|
-
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: !i && !a && t ? /* @__PURE__ */ r(C, { text:
|
|
4099
|
+
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: !i && !a && t ? /* @__PURE__ */ r(C, { text: l, duration: 2.5, repeat: !0 }) : l }),
|
|
3989
4100
|
i && /* @__PURE__ */ r("span", { style: { fontSize: 12, color: n.textSecondary }, children: e.result.numberOfChunks === 1 ? k(
|
|
3990
4101
|
o.memorySearchTypeResultSummaryOne,
|
|
3991
4102
|
{
|
|
@@ -4010,22 +4121,22 @@ function rn({
|
|
|
4010
4121
|
}
|
|
4011
4122
|
);
|
|
4012
4123
|
}
|
|
4013
|
-
const
|
|
4014
|
-
const { colors: i } =
|
|
4015
|
-
let
|
|
4016
|
-
return e.memoryTypes.forEach((
|
|
4017
|
-
|
|
4018
|
-
}),
|
|
4124
|
+
const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4125
|
+
const { colors: i } = T(), a = z(() => {
|
|
4126
|
+
let l = -1;
|
|
4127
|
+
return e.memoryTypes.forEach((d, p) => {
|
|
4128
|
+
d.result == null && d.error == null && (l = p);
|
|
4129
|
+
}), l;
|
|
4019
4130
|
}, [e.memoryTypes]);
|
|
4020
4131
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4021
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((
|
|
4022
|
-
|
|
4132
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
|
|
4133
|
+
cn,
|
|
4023
4134
|
{
|
|
4024
|
-
item:
|
|
4135
|
+
item: l,
|
|
4025
4136
|
t: n,
|
|
4026
|
-
showShimmerForPrimary:
|
|
4137
|
+
showShimmerForPrimary: d === a && o
|
|
4027
4138
|
},
|
|
4028
|
-
|
|
4139
|
+
l.memoryTypeId
|
|
4029
4140
|
)),
|
|
4030
4141
|
t !== void 0 && /* @__PURE__ */ r(
|
|
4031
4142
|
"div",
|
|
@@ -4040,39 +4151,30 @@ const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4040
4151
|
}
|
|
4041
4152
|
)
|
|
4042
4153
|
] });
|
|
4043
|
-
}
|
|
4044
|
-
Q * j
|
|
4045
|
-
), tn = Math.ceil(
|
|
4046
|
-
5 * Q * j
|
|
4047
|
-
);
|
|
4154
|
+
};
|
|
4048
4155
|
function U(e) {
|
|
4049
4156
|
return e.queries != null && e.queries.length > 0;
|
|
4050
4157
|
}
|
|
4051
|
-
function
|
|
4158
|
+
function pn(e) {
|
|
4052
4159
|
const o = e.reasoning;
|
|
4053
4160
|
return (o == null || o === "") && !U(e);
|
|
4054
4161
|
}
|
|
4055
|
-
function
|
|
4162
|
+
function un(e) {
|
|
4056
4163
|
if (U(e)) return 3;
|
|
4057
4164
|
const o = e.reasoning;
|
|
4058
4165
|
return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
|
|
4059
4166
|
}
|
|
4060
|
-
function
|
|
4061
|
-
return e === 3 ? /* @__PURE__ */ r(
|
|
4167
|
+
function mn({ phase: e }) {
|
|
4168
|
+
return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
4062
4169
|
}
|
|
4063
|
-
function
|
|
4170
|
+
function gn({
|
|
4064
4171
|
item: e,
|
|
4065
4172
|
t: o,
|
|
4066
4173
|
isActiveRow: t
|
|
4067
4174
|
}) {
|
|
4068
|
-
const { colors: n } =
|
|
4069
|
-
$(() => {
|
|
4070
|
-
const l = d.current;
|
|
4071
|
-
l != null && a === 1 && u && (l.scrollTop = l.scrollHeight);
|
|
4072
|
-
}, [s, a, u]);
|
|
4073
|
-
const T = k(o.searchingInMemoriesOfType, {
|
|
4175
|
+
const { colors: n } = T(), i = pn(e), a = un(e), l = e.reasoning, d = l != null && l.length > 0, [p, u] = w(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
|
|
4074
4176
|
name: e.memoryTypeName
|
|
4075
|
-
}),
|
|
4177
|
+
}), b = !i && a === 3;
|
|
4076
4178
|
return /* @__PURE__ */ m(
|
|
4077
4179
|
v.div,
|
|
4078
4180
|
{
|
|
@@ -4085,7 +4187,7 @@ function cn({
|
|
|
4085
4187
|
borderBottom: `1px solid ${n.border}`,
|
|
4086
4188
|
display: "flex",
|
|
4087
4189
|
flexDirection: "row",
|
|
4088
|
-
alignItems:
|
|
4190
|
+
alignItems: b ? "flex-start" : "center",
|
|
4089
4191
|
gap: "10px",
|
|
4090
4192
|
minWidth: 0
|
|
4091
4193
|
},
|
|
@@ -4099,9 +4201,9 @@ function cn({
|
|
|
4099
4201
|
justifyContent: "center",
|
|
4100
4202
|
flexShrink: 0,
|
|
4101
4203
|
width: 32,
|
|
4102
|
-
...
|
|
4204
|
+
...b ? { paddingTop: 2 } : {}
|
|
4103
4205
|
},
|
|
4104
|
-
children: /* @__PURE__ */ r(
|
|
4206
|
+
children: /* @__PURE__ */ r(mn, { phase: i ? 1 : a })
|
|
4105
4207
|
}
|
|
4106
4208
|
),
|
|
4107
4209
|
/* @__PURE__ */ m(
|
|
@@ -4115,54 +4217,16 @@ function cn({
|
|
|
4115
4217
|
flex: 1
|
|
4116
4218
|
},
|
|
4117
4219
|
children: [
|
|
4118
|
-
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children:
|
|
4119
|
-
a === 1 &&
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
fontWeight: 500
|
|
4129
|
-
},
|
|
4130
|
-
children: o.memorySearchQueryReasoningLabel
|
|
4131
|
-
}
|
|
4132
|
-
),
|
|
4133
|
-
/* @__PURE__ */ r(
|
|
4134
|
-
"div",
|
|
4135
|
-
{
|
|
4136
|
-
style: {
|
|
4137
|
-
backgroundColor: n.reasoningBg,
|
|
4138
|
-
borderRadius: 6,
|
|
4139
|
-
padding: "8px 10px",
|
|
4140
|
-
boxSizing: "border-box"
|
|
4141
|
-
},
|
|
4142
|
-
children: /* @__PURE__ */ r(
|
|
4143
|
-
"div",
|
|
4144
|
-
{
|
|
4145
|
-
ref: d,
|
|
4146
|
-
className: "memory-search-generating-reasoning-viewport",
|
|
4147
|
-
style: {
|
|
4148
|
-
minHeight: on,
|
|
4149
|
-
maxHeight: tn,
|
|
4150
|
-
height: "auto",
|
|
4151
|
-
overflowY: "auto",
|
|
4152
|
-
overflowX: "hidden",
|
|
4153
|
-
fontSize: Q,
|
|
4154
|
-
lineHeight: j,
|
|
4155
|
-
whiteSpace: "pre-wrap",
|
|
4156
|
-
wordBreak: "break-word",
|
|
4157
|
-
color: n.textTertiary
|
|
4158
|
-
},
|
|
4159
|
-
children: s
|
|
4160
|
-
}
|
|
4161
|
-
)
|
|
4162
|
-
}
|
|
4163
|
-
)
|
|
4164
|
-
] }),
|
|
4165
|
-
a === 2 && x && /* @__PURE__ */ r("div", { style: { fontSize: 12 }, children: /* @__PURE__ */ r(
|
|
4220
|
+
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: g ? /* @__PURE__ */ r(C, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
|
|
4221
|
+
a === 1 && d && !U(e) && /* @__PURE__ */ r(
|
|
4222
|
+
Fe,
|
|
4223
|
+
{
|
|
4224
|
+
text: l,
|
|
4225
|
+
streaming: !0,
|
|
4226
|
+
label: o.memorySearchQueryReasoningLabel
|
|
4227
|
+
}
|
|
4228
|
+
),
|
|
4229
|
+
a === 2 && h && /* @__PURE__ */ r("div", { style: { fontSize: 12 }, children: /* @__PURE__ */ r(
|
|
4166
4230
|
C,
|
|
4167
4231
|
{
|
|
4168
4232
|
text: o.memorySearchGeneratingQueriesPending,
|
|
@@ -4193,7 +4257,7 @@ function cn({
|
|
|
4193
4257
|
flexDirection: "column",
|
|
4194
4258
|
gap: 6
|
|
4195
4259
|
},
|
|
4196
|
-
children: e.queries.map((
|
|
4260
|
+
children: e.queries.map((y, s) => /* @__PURE__ */ r(
|
|
4197
4261
|
"div",
|
|
4198
4262
|
{
|
|
4199
4263
|
style: {
|
|
@@ -4202,19 +4266,19 @@ function cn({
|
|
|
4202
4266
|
lineHeight: 1.5,
|
|
4203
4267
|
wordBreak: "break-word"
|
|
4204
4268
|
},
|
|
4205
|
-
children:
|
|
4269
|
+
children: y.query
|
|
4206
4270
|
},
|
|
4207
|
-
|
|
4271
|
+
s
|
|
4208
4272
|
))
|
|
4209
4273
|
}
|
|
4210
4274
|
)
|
|
4211
4275
|
] }),
|
|
4212
|
-
|
|
4276
|
+
d && /* @__PURE__ */ m(R, { children: [
|
|
4213
4277
|
/* @__PURE__ */ r(
|
|
4214
4278
|
"button",
|
|
4215
4279
|
{
|
|
4216
4280
|
type: "button",
|
|
4217
|
-
onClick: () =>
|
|
4281
|
+
onClick: () => u((y) => !y),
|
|
4218
4282
|
style: {
|
|
4219
4283
|
alignSelf: "flex-start",
|
|
4220
4284
|
border: "none",
|
|
@@ -4232,8 +4296,8 @@ function cn({
|
|
|
4232
4296
|
"div",
|
|
4233
4297
|
{
|
|
4234
4298
|
style: {
|
|
4235
|
-
fontSize:
|
|
4236
|
-
lineHeight:
|
|
4299
|
+
fontSize: K,
|
|
4300
|
+
lineHeight: V,
|
|
4237
4301
|
whiteSpace: "pre-wrap",
|
|
4238
4302
|
wordBreak: "break-word",
|
|
4239
4303
|
color: n.textTertiary,
|
|
@@ -4241,7 +4305,7 @@ function cn({
|
|
|
4241
4305
|
borderRadius: 6,
|
|
4242
4306
|
padding: "8px 10px"
|
|
4243
4307
|
},
|
|
4244
|
-
children:
|
|
4308
|
+
children: l
|
|
4245
4309
|
}
|
|
4246
4310
|
)
|
|
4247
4311
|
] })
|
|
@@ -4253,22 +4317,22 @@ function cn({
|
|
|
4253
4317
|
}
|
|
4254
4318
|
);
|
|
4255
4319
|
}
|
|
4256
|
-
const
|
|
4257
|
-
const { colors: i } =
|
|
4258
|
-
let
|
|
4259
|
-
return e.memoryTypes.forEach((
|
|
4260
|
-
U(
|
|
4261
|
-
}),
|
|
4320
|
+
const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4321
|
+
const { colors: i } = T(), a = z(() => {
|
|
4322
|
+
let l = -1;
|
|
4323
|
+
return e.memoryTypes.forEach((d, p) => {
|
|
4324
|
+
U(d) || (l = p);
|
|
4325
|
+
}), l;
|
|
4262
4326
|
}, [e.memoryTypes]);
|
|
4263
4327
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
4264
|
-
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((
|
|
4265
|
-
|
|
4328
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
|
|
4329
|
+
gn,
|
|
4266
4330
|
{
|
|
4267
|
-
item:
|
|
4331
|
+
item: l,
|
|
4268
4332
|
t: n,
|
|
4269
|
-
isActiveRow:
|
|
4333
|
+
isActiveRow: d === a && o
|
|
4270
4334
|
},
|
|
4271
|
-
|
|
4335
|
+
l.memoryTypeId
|
|
4272
4336
|
)),
|
|
4273
4337
|
t !== void 0 && /* @__PURE__ */ r(
|
|
4274
4338
|
"div",
|
|
@@ -4284,14 +4348,14 @@ const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4284
4348
|
)
|
|
4285
4349
|
] });
|
|
4286
4350
|
};
|
|
4287
|
-
function
|
|
4288
|
-
return e.some((n) => n.result == null && n.error == null) ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : e.some((n) => n.error != null) ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ r(
|
|
4351
|
+
function yn(e) {
|
|
4352
|
+
return e.some((n) => n.result == null && n.error == null) ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : e.some((n) => n.error != null) ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
|
|
4289
4353
|
}
|
|
4290
|
-
function
|
|
4354
|
+
function fn({
|
|
4291
4355
|
item: e,
|
|
4292
4356
|
t: o
|
|
4293
4357
|
}) {
|
|
4294
|
-
const { colors: t } =
|
|
4358
|
+
const { colors: t } = T();
|
|
4295
4359
|
if (e.error != null)
|
|
4296
4360
|
return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
|
|
4297
4361
|
if (e.result == null)
|
|
@@ -4305,13 +4369,13 @@ function un({
|
|
|
4305
4369
|
a
|
|
4306
4370
|
] });
|
|
4307
4371
|
}
|
|
4308
|
-
function
|
|
4372
|
+
function xn({
|
|
4309
4373
|
items: e,
|
|
4310
4374
|
queryRow: o,
|
|
4311
4375
|
onExploreQueryResultClick: t,
|
|
4312
4376
|
t: n
|
|
4313
4377
|
}) {
|
|
4314
|
-
const { colors: i } =
|
|
4378
|
+
const { colors: i } = T(), [a, l] = w(null);
|
|
4315
4379
|
if (e.length === 0)
|
|
4316
4380
|
return /* @__PURE__ */ r(
|
|
4317
4381
|
"div",
|
|
@@ -4324,7 +4388,7 @@ function mn({
|
|
|
4324
4388
|
children: n.memorySearchExploreNoResults
|
|
4325
4389
|
}
|
|
4326
4390
|
);
|
|
4327
|
-
const
|
|
4391
|
+
const d = !!t;
|
|
4328
4392
|
return /* @__PURE__ */ r(
|
|
4329
4393
|
"div",
|
|
4330
4394
|
{
|
|
@@ -4336,25 +4400,25 @@ function mn({
|
|
|
4336
4400
|
paddingTop: 8,
|
|
4337
4401
|
borderTop: `1px solid ${i.borderDivider}`
|
|
4338
4402
|
},
|
|
4339
|
-
children: e.map((
|
|
4340
|
-
const g =
|
|
4341
|
-
|
|
4403
|
+
children: e.map((p, u) => {
|
|
4404
|
+
const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
|
|
4405
|
+
p.chunks
|
|
4342
4406
|
), x = [
|
|
4343
|
-
|
|
4407
|
+
te(p),
|
|
4344
4408
|
k(n.scoreLabel, {
|
|
4345
|
-
n:
|
|
4409
|
+
n: p.matchingChunkScore.toFixed(2)
|
|
4346
4410
|
}),
|
|
4347
|
-
h.length > 0 ?
|
|
4411
|
+
h.length > 0 ? ne(h, n) : n.pagesNotAvailable
|
|
4348
4412
|
].filter(
|
|
4349
4413
|
(c) => c != null && c !== ""
|
|
4350
|
-
),
|
|
4351
|
-
memoryId:
|
|
4352
|
-
memoryTitle:
|
|
4414
|
+
), b = {
|
|
4415
|
+
memoryId: p.memoryId,
|
|
4416
|
+
memoryTitle: p.memoryTitle,
|
|
4353
4417
|
pageNumbers: h,
|
|
4354
4418
|
memoryTypeId: o.memoryTypeId,
|
|
4355
4419
|
memoryTypeName: o.memoryTypeName,
|
|
4356
4420
|
query: o.query
|
|
4357
|
-
},
|
|
4421
|
+
}, y = `${o.query}::${p.memoryId}::${u}`, s = a === y;
|
|
4358
4422
|
return /* @__PURE__ */ m(
|
|
4359
4423
|
"div",
|
|
4360
4424
|
{
|
|
@@ -4363,9 +4427,9 @@ function mn({
|
|
|
4363
4427
|
flexDirection: "row",
|
|
4364
4428
|
alignItems: "flex-start",
|
|
4365
4429
|
gap: "12px",
|
|
4366
|
-
paddingTop:
|
|
4367
|
-
paddingBottom:
|
|
4368
|
-
borderBottom:
|
|
4430
|
+
paddingTop: u > 0 ? 12 : 0,
|
|
4431
|
+
paddingBottom: u < e.length - 1 ? 12 : 0,
|
|
4432
|
+
borderBottom: u < e.length - 1 ? `1px solid ${i.border}` : void 0,
|
|
4369
4433
|
minWidth: 0
|
|
4370
4434
|
},
|
|
4371
4435
|
children: [
|
|
@@ -4401,8 +4465,8 @@ function mn({
|
|
|
4401
4465
|
whiteSpace: "pre-wrap",
|
|
4402
4466
|
wordBreak: "break-word"
|
|
4403
4467
|
},
|
|
4404
|
-
children:
|
|
4405
|
-
|
|
4468
|
+
children: re(
|
|
4469
|
+
p.chunks
|
|
4406
4470
|
)
|
|
4407
4471
|
}
|
|
4408
4472
|
),
|
|
@@ -4421,20 +4485,20 @@ function mn({
|
|
|
4421
4485
|
]
|
|
4422
4486
|
}
|
|
4423
4487
|
),
|
|
4424
|
-
|
|
4488
|
+
d && /* @__PURE__ */ m(
|
|
4425
4489
|
"button",
|
|
4426
4490
|
{
|
|
4427
4491
|
type: "button",
|
|
4428
|
-
"aria-busy":
|
|
4429
|
-
disabled:
|
|
4492
|
+
"aria-busy": s,
|
|
4493
|
+
disabled: s,
|
|
4430
4494
|
onClick: async () => {
|
|
4431
|
-
|
|
4495
|
+
l(y);
|
|
4432
4496
|
try {
|
|
4433
4497
|
await t(
|
|
4434
|
-
|
|
4498
|
+
b
|
|
4435
4499
|
);
|
|
4436
4500
|
} finally {
|
|
4437
|
-
|
|
4501
|
+
l(null);
|
|
4438
4502
|
}
|
|
4439
4503
|
},
|
|
4440
4504
|
style: {
|
|
@@ -4447,14 +4511,14 @@ function mn({
|
|
|
4447
4511
|
background: i.bgChip,
|
|
4448
4512
|
border: `1px solid ${i.bgChipBorder}`,
|
|
4449
4513
|
borderRadius: 6,
|
|
4450
|
-
cursor:
|
|
4514
|
+
cursor: s ? "wait" : "pointer",
|
|
4451
4515
|
fontFamily: "inherit",
|
|
4452
4516
|
display: "inline-flex",
|
|
4453
4517
|
alignItems: "center",
|
|
4454
4518
|
gap: 8
|
|
4455
4519
|
},
|
|
4456
4520
|
children: [
|
|
4457
|
-
|
|
4521
|
+
s && /* @__PURE__ */ r(
|
|
4458
4522
|
"span",
|
|
4459
4523
|
{
|
|
4460
4524
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -4467,13 +4531,13 @@ function mn({
|
|
|
4467
4531
|
)
|
|
4468
4532
|
]
|
|
4469
4533
|
},
|
|
4470
|
-
`${
|
|
4534
|
+
`${p.memoryId}-${u}`
|
|
4471
4535
|
);
|
|
4472
4536
|
})
|
|
4473
4537
|
}
|
|
4474
4538
|
);
|
|
4475
4539
|
}
|
|
4476
|
-
function
|
|
4540
|
+
function kn(e) {
|
|
4477
4541
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
4478
4542
|
return e.forEach((n, i) => {
|
|
4479
4543
|
let a = t.get(n.memoryTypeId);
|
|
@@ -4484,7 +4548,7 @@ function gn(e) {
|
|
|
4484
4548
|
}, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
|
|
4485
4549
|
}), o.map((n) => t.get(n));
|
|
4486
4550
|
}
|
|
4487
|
-
function
|
|
4551
|
+
function Sn({
|
|
4488
4552
|
group: e,
|
|
4489
4553
|
t: o,
|
|
4490
4554
|
isLatest: t,
|
|
@@ -4492,8 +4556,8 @@ function hn({
|
|
|
4492
4556
|
toggleExpanded: i,
|
|
4493
4557
|
onExploreQueryResultClick: a
|
|
4494
4558
|
}) {
|
|
4495
|
-
const { colors:
|
|
4496
|
-
(
|
|
4559
|
+
const { colors: l } = T(), d = e.items.map((u) => u.item), p = d.some(
|
|
4560
|
+
(u) => u.result == null && u.error == null
|
|
4497
4561
|
);
|
|
4498
4562
|
return /* @__PURE__ */ m(
|
|
4499
4563
|
v.div,
|
|
@@ -4504,10 +4568,10 @@ function hn({
|
|
|
4504
4568
|
style: {
|
|
4505
4569
|
paddingTop: "12px",
|
|
4506
4570
|
paddingBottom: "12px",
|
|
4507
|
-
borderBottom: `1px solid ${
|
|
4571
|
+
borderBottom: `1px solid ${l.border}`,
|
|
4508
4572
|
display: "flex",
|
|
4509
4573
|
flexDirection: "row",
|
|
4510
|
-
alignItems:
|
|
4574
|
+
alignItems: p ? "center" : "flex-start",
|
|
4511
4575
|
gap: "10px",
|
|
4512
4576
|
minWidth: 0
|
|
4513
4577
|
},
|
|
@@ -4521,9 +4585,9 @@ function hn({
|
|
|
4521
4585
|
justifyContent: "center",
|
|
4522
4586
|
flexShrink: 0,
|
|
4523
4587
|
width: 32,
|
|
4524
|
-
...
|
|
4588
|
+
...p ? {} : { paddingTop: 2 }
|
|
4525
4589
|
},
|
|
4526
|
-
children:
|
|
4590
|
+
children: yn(d)
|
|
4527
4591
|
}
|
|
4528
4592
|
),
|
|
4529
4593
|
/* @__PURE__ */ m(
|
|
@@ -4542,16 +4606,16 @@ function hn({
|
|
|
4542
4606
|
{
|
|
4543
4607
|
style: {
|
|
4544
4608
|
fontSize: 12,
|
|
4545
|
-
color:
|
|
4609
|
+
color: l.textTertiary
|
|
4546
4610
|
},
|
|
4547
4611
|
children: k(o.memorySearchExploreQueryTypeLabel, {
|
|
4548
4612
|
name: e.memoryTypeName
|
|
4549
4613
|
})
|
|
4550
4614
|
}
|
|
4551
4615
|
),
|
|
4552
|
-
e.items.map(({ item:
|
|
4616
|
+
e.items.map(({ item: u, flatIndex: g }) => {
|
|
4553
4617
|
var c;
|
|
4554
|
-
const h =
|
|
4618
|
+
const h = u.result != null, x = u.error != null, b = t && !h && !x, y = n[g] === !0, s = ((c = u.result) == null ? void 0 : c.items) ?? [];
|
|
4555
4619
|
return /* @__PURE__ */ m(
|
|
4556
4620
|
"div",
|
|
4557
4621
|
{
|
|
@@ -4580,19 +4644,19 @@ function hn({
|
|
|
4580
4644
|
style: {
|
|
4581
4645
|
fontSize: 13,
|
|
4582
4646
|
fontWeight: 500,
|
|
4583
|
-
color:
|
|
4647
|
+
color: l.textPrimary,
|
|
4584
4648
|
wordBreak: "break-word",
|
|
4585
4649
|
flex: "1 1 12rem",
|
|
4586
4650
|
minWidth: 0
|
|
4587
4651
|
},
|
|
4588
|
-
children:
|
|
4652
|
+
children: b ? /* @__PURE__ */ r(
|
|
4589
4653
|
C,
|
|
4590
4654
|
{
|
|
4591
|
-
text:
|
|
4655
|
+
text: u.query,
|
|
4592
4656
|
duration: 2.5,
|
|
4593
4657
|
repeat: !0
|
|
4594
4658
|
}
|
|
4595
|
-
) :
|
|
4659
|
+
) : u.query
|
|
4596
4660
|
}
|
|
4597
4661
|
),
|
|
4598
4662
|
/* @__PURE__ */ m(
|
|
@@ -4606,7 +4670,7 @@ function hn({
|
|
|
4606
4670
|
flexShrink: 0
|
|
4607
4671
|
},
|
|
4608
4672
|
children: [
|
|
4609
|
-
/* @__PURE__ */ r(
|
|
4673
|
+
/* @__PURE__ */ r(fn, { item: u, t: o }),
|
|
4610
4674
|
h && /* @__PURE__ */ r(
|
|
4611
4675
|
"button",
|
|
4612
4676
|
{
|
|
@@ -4618,11 +4682,11 @@ function hn({
|
|
|
4618
4682
|
padding: 0,
|
|
4619
4683
|
cursor: "pointer",
|
|
4620
4684
|
fontSize: 12,
|
|
4621
|
-
color:
|
|
4685
|
+
color: l.textSecondary,
|
|
4622
4686
|
textDecoration: "underline",
|
|
4623
4687
|
fontFamily: "inherit"
|
|
4624
4688
|
},
|
|
4625
|
-
children:
|
|
4689
|
+
children: y ? o.memorySearchHideExploreResults : o.memorySearchViewExploreResults
|
|
4626
4690
|
}
|
|
4627
4691
|
)
|
|
4628
4692
|
]
|
|
@@ -4631,18 +4695,18 @@ function hn({
|
|
|
4631
4695
|
]
|
|
4632
4696
|
}
|
|
4633
4697
|
),
|
|
4634
|
-
h &&
|
|
4635
|
-
|
|
4698
|
+
h && y && /* @__PURE__ */ r(
|
|
4699
|
+
xn,
|
|
4636
4700
|
{
|
|
4637
|
-
items:
|
|
4638
|
-
queryRow:
|
|
4701
|
+
items: s,
|
|
4702
|
+
queryRow: u,
|
|
4639
4703
|
onExploreQueryResultClick: a,
|
|
4640
4704
|
t: o
|
|
4641
4705
|
}
|
|
4642
4706
|
)
|
|
4643
4707
|
]
|
|
4644
4708
|
},
|
|
4645
|
-
`${e.memoryTypeId}-${g}-${
|
|
4709
|
+
`${e.memoryTypeId}-${g}-${u.query}`
|
|
4646
4710
|
);
|
|
4647
4711
|
})
|
|
4648
4712
|
]
|
|
@@ -4652,22 +4716,22 @@ function hn({
|
|
|
4652
4716
|
}
|
|
4653
4717
|
);
|
|
4654
4718
|
}
|
|
4655
|
-
const
|
|
4719
|
+
const bn = ({
|
|
4656
4720
|
data: e,
|
|
4657
4721
|
isLatest: o = !1,
|
|
4658
4722
|
durationSeconds: t,
|
|
4659
4723
|
onExploreQueryResultClick: n,
|
|
4660
4724
|
t: i
|
|
4661
4725
|
}) => {
|
|
4662
|
-
const { colors: a } =
|
|
4726
|
+
const { colors: a } = T(), [l, d] = w(
|
|
4663
4727
|
{}
|
|
4664
|
-
),
|
|
4665
|
-
|
|
4728
|
+
), p = L((g) => {
|
|
4729
|
+
d((h) => ({
|
|
4666
4730
|
...h,
|
|
4667
4731
|
[g]: !h[g]
|
|
4668
4732
|
}));
|
|
4669
|
-
}, []),
|
|
4670
|
-
() =>
|
|
4733
|
+
}, []), u = z(
|
|
4734
|
+
() => kn(e.queries),
|
|
4671
4735
|
[e.queries]
|
|
4672
4736
|
);
|
|
4673
4737
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
@@ -4678,14 +4742,14 @@ const yn = ({
|
|
|
4678
4742
|
duration: 2.5,
|
|
4679
4743
|
repeat: !0
|
|
4680
4744
|
}
|
|
4681
|
-
) :
|
|
4682
|
-
|
|
4745
|
+
) : u.map((g) => /* @__PURE__ */ r(
|
|
4746
|
+
Sn,
|
|
4683
4747
|
{
|
|
4684
4748
|
group: g,
|
|
4685
4749
|
t: i,
|
|
4686
4750
|
isLatest: o,
|
|
4687
|
-
expandedRows:
|
|
4688
|
-
toggleExpanded:
|
|
4751
|
+
expandedRows: l,
|
|
4752
|
+
toggleExpanded: p,
|
|
4689
4753
|
onExploreQueryResultClick: n
|
|
4690
4754
|
},
|
|
4691
4755
|
g.memoryTypeId
|
|
@@ -4703,8 +4767,8 @@ const yn = ({
|
|
|
4703
4767
|
}
|
|
4704
4768
|
)
|
|
4705
4769
|
] });
|
|
4706
|
-
},
|
|
4707
|
-
const { colors: n } =
|
|
4770
|
+
}, Tn = ({ data: e, onSearchResultClick: o, t }) => {
|
|
4771
|
+
const { colors: n } = T(), i = e.response.items, a = !!o, [l, d] = w(null);
|
|
4708
4772
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4709
4773
|
/* @__PURE__ */ r(
|
|
4710
4774
|
v.div,
|
|
@@ -4729,30 +4793,30 @@ const yn = ({
|
|
|
4729
4793
|
flexDirection: "column",
|
|
4730
4794
|
gap: 0
|
|
4731
4795
|
},
|
|
4732
|
-
children: i.map((
|
|
4733
|
-
const g =
|
|
4734
|
-
|
|
4796
|
+
children: i.map((p, u) => {
|
|
4797
|
+
const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
|
|
4798
|
+
p.chunks
|
|
4735
4799
|
), x = [
|
|
4736
|
-
|
|
4800
|
+
te(p),
|
|
4737
4801
|
k(t.scoreLabel, {
|
|
4738
|
-
n:
|
|
4802
|
+
n: p.matchingChunkScore.toFixed(2)
|
|
4739
4803
|
}),
|
|
4740
|
-
h.length > 0 ?
|
|
4804
|
+
h.length > 0 ? ne(h, t) : t.pagesNotAvailable
|
|
4741
4805
|
].filter(
|
|
4742
4806
|
(c) => c != null && c !== ""
|
|
4743
|
-
),
|
|
4744
|
-
memoryId:
|
|
4745
|
-
memoryTitle:
|
|
4746
|
-
memoryTypeId:
|
|
4747
|
-
memoryTypeName:
|
|
4807
|
+
), b = {
|
|
4808
|
+
memoryId: p.memoryId,
|
|
4809
|
+
memoryTitle: p.memoryTitle,
|
|
4810
|
+
memoryTypeId: p.memoryTypeId,
|
|
4811
|
+
memoryTypeName: p.memoryTypeName,
|
|
4748
4812
|
pageNumbers: h
|
|
4749
|
-
},
|
|
4813
|
+
}, y = `${p.memoryId}-${u}`, s = l === y;
|
|
4750
4814
|
return /* @__PURE__ */ m(
|
|
4751
4815
|
v.div,
|
|
4752
4816
|
{
|
|
4753
4817
|
initial: { opacity: 0 },
|
|
4754
4818
|
animate: { opacity: 1 },
|
|
4755
|
-
transition: { duration: 0.2, delay:
|
|
4819
|
+
transition: { duration: 0.2, delay: u * 0.04 },
|
|
4756
4820
|
style: {
|
|
4757
4821
|
display: "flex",
|
|
4758
4822
|
flexDirection: "row",
|
|
@@ -4760,7 +4824,7 @@ const yn = ({
|
|
|
4760
4824
|
gap: "12px",
|
|
4761
4825
|
paddingTop: "12px",
|
|
4762
4826
|
paddingBottom: "12px",
|
|
4763
|
-
borderBottom:
|
|
4827
|
+
borderBottom: u < i.length - 1 ? `1px solid ${n.border}` : void 0,
|
|
4764
4828
|
minWidth: 0
|
|
4765
4829
|
},
|
|
4766
4830
|
children: [
|
|
@@ -4796,7 +4860,7 @@ const yn = ({
|
|
|
4796
4860
|
whiteSpace: "pre-wrap",
|
|
4797
4861
|
wordBreak: "break-word"
|
|
4798
4862
|
},
|
|
4799
|
-
children:
|
|
4863
|
+
children: re(p.chunks)
|
|
4800
4864
|
}
|
|
4801
4865
|
),
|
|
4802
4866
|
/* @__PURE__ */ r(
|
|
@@ -4818,14 +4882,14 @@ const yn = ({
|
|
|
4818
4882
|
"button",
|
|
4819
4883
|
{
|
|
4820
4884
|
type: "button",
|
|
4821
|
-
"aria-busy":
|
|
4822
|
-
disabled:
|
|
4885
|
+
"aria-busy": s,
|
|
4886
|
+
disabled: s,
|
|
4823
4887
|
onClick: async () => {
|
|
4824
|
-
|
|
4888
|
+
d(y);
|
|
4825
4889
|
try {
|
|
4826
|
-
await o(
|
|
4890
|
+
await o(b);
|
|
4827
4891
|
} finally {
|
|
4828
|
-
|
|
4892
|
+
d(null);
|
|
4829
4893
|
}
|
|
4830
4894
|
},
|
|
4831
4895
|
style: {
|
|
@@ -4838,14 +4902,14 @@ const yn = ({
|
|
|
4838
4902
|
background: n.bgChip,
|
|
4839
4903
|
border: `1px solid ${n.bgChipBorder}`,
|
|
4840
4904
|
borderRadius: 6,
|
|
4841
|
-
cursor:
|
|
4905
|
+
cursor: s ? "wait" : "pointer",
|
|
4842
4906
|
fontFamily: "inherit",
|
|
4843
4907
|
display: "inline-flex",
|
|
4844
4908
|
alignItems: "center",
|
|
4845
4909
|
gap: 8
|
|
4846
4910
|
},
|
|
4847
4911
|
children: [
|
|
4848
|
-
|
|
4912
|
+
s && /* @__PURE__ */ r(
|
|
4849
4913
|
"span",
|
|
4850
4914
|
{
|
|
4851
4915
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -4858,14 +4922,14 @@ const yn = ({
|
|
|
4858
4922
|
)
|
|
4859
4923
|
]
|
|
4860
4924
|
},
|
|
4861
|
-
`${
|
|
4925
|
+
`${p.memoryId}-${u}`
|
|
4862
4926
|
);
|
|
4863
4927
|
})
|
|
4864
4928
|
}
|
|
4865
4929
|
)
|
|
4866
4930
|
] });
|
|
4867
4931
|
}, O = ({ message: e }) => {
|
|
4868
|
-
const { colors: o } =
|
|
4932
|
+
const { colors: o } = T();
|
|
4869
4933
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
4870
4934
|
v.div,
|
|
4871
4935
|
{
|
|
@@ -4891,7 +4955,7 @@ const yn = ({
|
|
|
4891
4955
|
}
|
|
4892
4956
|
) });
|
|
4893
4957
|
};
|
|
4894
|
-
class
|
|
4958
|
+
class vn extends Ue.Component {
|
|
4895
4959
|
constructor(o) {
|
|
4896
4960
|
super(o), this.state = { hasError: !1 };
|
|
4897
4961
|
}
|
|
@@ -4910,120 +4974,120 @@ class xn extends Ge.Component {
|
|
|
4910
4974
|
return this.state.hasError ? null : this.props.children;
|
|
4911
4975
|
}
|
|
4912
4976
|
}
|
|
4913
|
-
const
|
|
4977
|
+
const wn = ({
|
|
4914
4978
|
progressViewItems: e,
|
|
4915
4979
|
loading: o,
|
|
4916
4980
|
error: t,
|
|
4917
4981
|
loadingText: n,
|
|
4918
4982
|
t: i,
|
|
4919
4983
|
onMemoryClick: a,
|
|
4920
|
-
onSourceClick:
|
|
4921
|
-
onSearchResultClick:
|
|
4922
|
-
onExploreQueryResultClick:
|
|
4923
|
-
downloadFile:
|
|
4984
|
+
onSourceClick: l,
|
|
4985
|
+
onSearchResultClick: d,
|
|
4986
|
+
onExploreQueryResultClick: p,
|
|
4987
|
+
downloadFile: u
|
|
4924
4988
|
}) => {
|
|
4925
|
-
const { theme: g, colors: h } =
|
|
4926
|
-
|
|
4989
|
+
const { theme: g, colors: h } = T(), x = A(null);
|
|
4990
|
+
H(() => {
|
|
4927
4991
|
x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
4928
4992
|
}, [e.length]);
|
|
4929
|
-
const
|
|
4930
|
-
const c =
|
|
4993
|
+
const b = (s) => {
|
|
4994
|
+
const c = s.item.data;
|
|
4931
4995
|
if (c.taskType === "StreamingChatCompletion" && c.eventType === "Text")
|
|
4932
4996
|
return /* @__PURE__ */ r(
|
|
4933
|
-
|
|
4997
|
+
N,
|
|
4934
4998
|
{
|
|
4935
4999
|
text: c.text,
|
|
4936
5000
|
onMemoryClick: a
|
|
4937
5001
|
}
|
|
4938
5002
|
);
|
|
4939
5003
|
if (c.taskType === "StructuredChatCompletion" && c.eventType === "Completed")
|
|
4940
|
-
return /* @__PURE__ */ r(
|
|
5004
|
+
return /* @__PURE__ */ r(lr, { data: c });
|
|
4941
5005
|
if (c.taskType === "MemoryChat")
|
|
4942
5006
|
switch (c.eventType) {
|
|
4943
5007
|
case "Text":
|
|
4944
5008
|
return /* @__PURE__ */ r(
|
|
4945
|
-
|
|
5009
|
+
N,
|
|
4946
5010
|
{
|
|
4947
5011
|
text: c.text,
|
|
4948
|
-
onFileDownload:
|
|
5012
|
+
onFileDownload: u,
|
|
4949
5013
|
onMemoryClick: a
|
|
4950
5014
|
}
|
|
4951
5015
|
);
|
|
4952
5016
|
case "Thinking":
|
|
4953
5017
|
return /* @__PURE__ */ r(
|
|
4954
|
-
|
|
5018
|
+
ge,
|
|
4955
5019
|
{
|
|
4956
5020
|
data: c,
|
|
4957
|
-
isLatest:
|
|
4958
|
-
durationSeconds:
|
|
5021
|
+
isLatest: s.isLatest,
|
|
5022
|
+
durationSeconds: s.durationSeconds,
|
|
4959
5023
|
t: i
|
|
4960
5024
|
}
|
|
4961
5025
|
);
|
|
4962
5026
|
case "GenerateReportSetup":
|
|
4963
5027
|
return /* @__PURE__ */ r(
|
|
4964
|
-
|
|
5028
|
+
Gr,
|
|
4965
5029
|
{
|
|
4966
5030
|
data: c,
|
|
4967
|
-
isLatest:
|
|
4968
|
-
durationSeconds:
|
|
5031
|
+
isLatest: s.isLatest,
|
|
5032
|
+
durationSeconds: s.durationSeconds,
|
|
4969
5033
|
t: i
|
|
4970
5034
|
}
|
|
4971
5035
|
);
|
|
4972
5036
|
case "GenerateReportExporting":
|
|
4973
5037
|
return /* @__PURE__ */ r(
|
|
4974
|
-
|
|
5038
|
+
Or,
|
|
4975
5039
|
{
|
|
4976
5040
|
data: c,
|
|
4977
|
-
isLatest:
|
|
4978
|
-
durationSeconds:
|
|
5041
|
+
isLatest: s.isLatest,
|
|
5042
|
+
durationSeconds: s.durationSeconds,
|
|
4979
5043
|
t: i
|
|
4980
5044
|
}
|
|
4981
5045
|
);
|
|
4982
5046
|
case "GenerateReportRunCode":
|
|
4983
5047
|
return /* @__PURE__ */ r(
|
|
4984
|
-
|
|
5048
|
+
_r,
|
|
4985
5049
|
{
|
|
4986
5050
|
data: c,
|
|
4987
|
-
isLatest:
|
|
4988
|
-
durationSeconds:
|
|
5051
|
+
isLatest: s.isLatest,
|
|
5052
|
+
durationSeconds: s.durationSeconds,
|
|
4989
5053
|
t: i
|
|
4990
5054
|
}
|
|
4991
5055
|
);
|
|
4992
5056
|
case "GenerateReportRunCommand":
|
|
4993
5057
|
return /* @__PURE__ */ r(
|
|
4994
|
-
|
|
5058
|
+
qr,
|
|
4995
5059
|
{
|
|
4996
5060
|
data: c,
|
|
4997
|
-
isLatest:
|
|
4998
|
-
durationSeconds:
|
|
5061
|
+
isLatest: s.isLatest,
|
|
5062
|
+
durationSeconds: s.durationSeconds,
|
|
4999
5063
|
t: i
|
|
5000
5064
|
}
|
|
5001
5065
|
);
|
|
5002
5066
|
case "GenerateReportAssembling":
|
|
5003
5067
|
return /* @__PURE__ */ r(
|
|
5004
|
-
|
|
5068
|
+
Ur,
|
|
5005
5069
|
{
|
|
5006
5070
|
data: c,
|
|
5007
|
-
isLatest:
|
|
5008
|
-
durationSeconds:
|
|
5071
|
+
isLatest: s.isLatest,
|
|
5072
|
+
durationSeconds: s.durationSeconds,
|
|
5009
5073
|
t: i
|
|
5010
5074
|
}
|
|
5011
5075
|
);
|
|
5012
5076
|
case "GenerateReportCompleted":
|
|
5013
|
-
return /* @__PURE__ */ r(
|
|
5077
|
+
return /* @__PURE__ */ r(Qr, { data: c, t: i });
|
|
5014
5078
|
case "FindMemories":
|
|
5015
5079
|
return /* @__PURE__ */ r(
|
|
5016
|
-
|
|
5080
|
+
kr,
|
|
5017
5081
|
{
|
|
5018
5082
|
data: c,
|
|
5019
|
-
isLatest:
|
|
5020
|
-
durationSeconds:
|
|
5083
|
+
isLatest: s.isLatest,
|
|
5084
|
+
durationSeconds: s.durationSeconds,
|
|
5021
5085
|
t: i
|
|
5022
5086
|
}
|
|
5023
5087
|
);
|
|
5024
5088
|
case "FindMemoriesResult":
|
|
5025
5089
|
return /* @__PURE__ */ r(
|
|
5026
|
-
|
|
5090
|
+
Sr,
|
|
5027
5091
|
{
|
|
5028
5092
|
data: c,
|
|
5029
5093
|
t: i
|
|
@@ -5034,95 +5098,95 @@ const kn = ({
|
|
|
5034
5098
|
q,
|
|
5035
5099
|
{
|
|
5036
5100
|
data: c,
|
|
5037
|
-
isLatest:
|
|
5038
|
-
durationSeconds:
|
|
5101
|
+
isLatest: s.isLatest,
|
|
5102
|
+
durationSeconds: s.durationSeconds,
|
|
5039
5103
|
t: i
|
|
5040
5104
|
}
|
|
5041
5105
|
);
|
|
5042
5106
|
case "SearchMemoryChunks":
|
|
5043
5107
|
return /* @__PURE__ */ r(
|
|
5044
|
-
|
|
5108
|
+
xr,
|
|
5045
5109
|
{
|
|
5046
5110
|
data: c,
|
|
5047
|
-
isLatest:
|
|
5048
|
-
durationSeconds:
|
|
5111
|
+
isLatest: s.isLatest,
|
|
5112
|
+
durationSeconds: s.durationSeconds,
|
|
5049
5113
|
t: i,
|
|
5050
|
-
onSearchResultClick:
|
|
5114
|
+
onSearchResultClick: d
|
|
5051
5115
|
}
|
|
5052
5116
|
);
|
|
5053
5117
|
case "FindSources":
|
|
5054
5118
|
return /* @__PURE__ */ r(
|
|
5055
|
-
|
|
5119
|
+
ce,
|
|
5056
5120
|
{
|
|
5057
5121
|
data: c,
|
|
5058
|
-
isLatest:
|
|
5059
|
-
durationSeconds:
|
|
5122
|
+
isLatest: s.isLatest,
|
|
5123
|
+
durationSeconds: s.durationSeconds,
|
|
5060
5124
|
t: i
|
|
5061
5125
|
}
|
|
5062
5126
|
);
|
|
5063
5127
|
case "SourcesResult":
|
|
5064
5128
|
return /* @__PURE__ */ r(
|
|
5065
|
-
|
|
5129
|
+
Me,
|
|
5066
5130
|
{
|
|
5067
5131
|
data: c,
|
|
5068
|
-
onSourceClick:
|
|
5132
|
+
onSourceClick: l,
|
|
5069
5133
|
t: i
|
|
5070
5134
|
}
|
|
5071
5135
|
);
|
|
5072
5136
|
case "ExploreMemories":
|
|
5073
5137
|
return /* @__PURE__ */ r(
|
|
5074
|
-
|
|
5138
|
+
Cr,
|
|
5075
5139
|
{
|
|
5076
5140
|
data: c,
|
|
5077
|
-
completed:
|
|
5078
|
-
isLatest:
|
|
5141
|
+
completed: s.completed,
|
|
5142
|
+
isLatest: s.isLatest,
|
|
5079
5143
|
t: i
|
|
5080
5144
|
}
|
|
5081
5145
|
);
|
|
5082
5146
|
case "ChunkResults":
|
|
5083
5147
|
return /* @__PURE__ */ r(
|
|
5084
|
-
|
|
5148
|
+
ie,
|
|
5085
5149
|
{
|
|
5086
5150
|
data: c,
|
|
5087
|
-
onSearchResultClick:
|
|
5151
|
+
onSearchResultClick: d,
|
|
5088
5152
|
t: i
|
|
5089
5153
|
}
|
|
5090
5154
|
);
|
|
5091
5155
|
case "GoogleSearch":
|
|
5092
5156
|
return /* @__PURE__ */ r(
|
|
5093
|
-
|
|
5157
|
+
Fr,
|
|
5094
5158
|
{
|
|
5095
5159
|
data: c,
|
|
5096
|
-
isLatest:
|
|
5097
|
-
durationSeconds:
|
|
5160
|
+
isLatest: s.isLatest,
|
|
5161
|
+
durationSeconds: s.durationSeconds,
|
|
5098
5162
|
t: i
|
|
5099
5163
|
}
|
|
5100
5164
|
);
|
|
5101
5165
|
case "ScrapeWebsites":
|
|
5102
5166
|
return /* @__PURE__ */ r(
|
|
5103
|
-
|
|
5167
|
+
Hr,
|
|
5104
5168
|
{
|
|
5105
5169
|
data: c,
|
|
5106
|
-
isLatest:
|
|
5107
|
-
durationSeconds:
|
|
5170
|
+
isLatest: s.isLatest,
|
|
5171
|
+
durationSeconds: s.durationSeconds,
|
|
5108
5172
|
t: i
|
|
5109
5173
|
}
|
|
5110
5174
|
);
|
|
5111
5175
|
case "Completed":
|
|
5112
5176
|
return /* @__PURE__ */ r(
|
|
5113
|
-
|
|
5177
|
+
N,
|
|
5114
5178
|
{
|
|
5115
5179
|
text: c.response.textResponse,
|
|
5116
|
-
onFileDownload:
|
|
5180
|
+
onFileDownload: u,
|
|
5117
5181
|
onMemoryClick: a
|
|
5118
5182
|
}
|
|
5119
5183
|
);
|
|
5120
5184
|
default: {
|
|
5121
|
-
const
|
|
5122
|
-
return
|
|
5185
|
+
const f = c;
|
|
5186
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5123
5187
|
"[fency] Unknown MemoryChat eventType (no UI):",
|
|
5124
|
-
|
|
5125
|
-
|
|
5188
|
+
f.eventType,
|
|
5189
|
+
f
|
|
5126
5190
|
), null);
|
|
5127
5191
|
}
|
|
5128
5192
|
}
|
|
@@ -5130,50 +5194,50 @@ const kn = ({
|
|
|
5130
5194
|
switch (c.eventType) {
|
|
5131
5195
|
case "GeneratingQueries":
|
|
5132
5196
|
return /* @__PURE__ */ r(
|
|
5133
|
-
|
|
5197
|
+
hn,
|
|
5134
5198
|
{
|
|
5135
5199
|
data: c,
|
|
5136
|
-
isLatest:
|
|
5137
|
-
durationSeconds:
|
|
5200
|
+
isLatest: s.isLatest,
|
|
5201
|
+
durationSeconds: s.durationSeconds,
|
|
5138
5202
|
t: i
|
|
5139
5203
|
}
|
|
5140
5204
|
);
|
|
5141
5205
|
case "ExploreQueries":
|
|
5142
5206
|
return /* @__PURE__ */ r(
|
|
5143
|
-
|
|
5207
|
+
bn,
|
|
5144
5208
|
{
|
|
5145
5209
|
data: c,
|
|
5146
|
-
isLatest:
|
|
5147
|
-
durationSeconds:
|
|
5148
|
-
onExploreQueryResultClick:
|
|
5210
|
+
isLatest: s.isLatest,
|
|
5211
|
+
durationSeconds: s.durationSeconds,
|
|
5212
|
+
onExploreQueryResultClick: p,
|
|
5149
5213
|
t: i
|
|
5150
5214
|
}
|
|
5151
5215
|
);
|
|
5152
5216
|
case "SearchMemoryTypes":
|
|
5153
5217
|
return /* @__PURE__ */ r(
|
|
5154
|
-
|
|
5218
|
+
dn,
|
|
5155
5219
|
{
|
|
5156
5220
|
data: c,
|
|
5157
|
-
isLatest:
|
|
5158
|
-
durationSeconds:
|
|
5221
|
+
isLatest: s.isLatest,
|
|
5222
|
+
durationSeconds: s.durationSeconds,
|
|
5159
5223
|
t: i
|
|
5160
5224
|
}
|
|
5161
5225
|
);
|
|
5162
5226
|
case "Completed":
|
|
5163
5227
|
return /* @__PURE__ */ r(
|
|
5164
|
-
|
|
5228
|
+
Tn,
|
|
5165
5229
|
{
|
|
5166
5230
|
data: c,
|
|
5167
|
-
onSearchResultClick:
|
|
5231
|
+
onSearchResultClick: d,
|
|
5168
5232
|
t: i
|
|
5169
5233
|
}
|
|
5170
5234
|
);
|
|
5171
5235
|
default: {
|
|
5172
|
-
const
|
|
5173
|
-
return
|
|
5236
|
+
const f = c;
|
|
5237
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5174
5238
|
"[fency] Unknown MemorySearch eventType (no UI):",
|
|
5175
|
-
|
|
5176
|
-
|
|
5239
|
+
f.eventType,
|
|
5240
|
+
f
|
|
5177
5241
|
), null);
|
|
5178
5242
|
}
|
|
5179
5243
|
}
|
|
@@ -5181,136 +5245,129 @@ const kn = ({
|
|
|
5181
5245
|
switch (c.eventType) {
|
|
5182
5246
|
case "Text":
|
|
5183
5247
|
return /* @__PURE__ */ r(
|
|
5184
|
-
|
|
5248
|
+
N,
|
|
5185
5249
|
{
|
|
5186
5250
|
text: c.text,
|
|
5187
|
-
onFileDownload:
|
|
5251
|
+
onFileDownload: u,
|
|
5188
5252
|
onMemoryClick: a
|
|
5189
5253
|
}
|
|
5190
5254
|
);
|
|
5191
5255
|
case "Thinking":
|
|
5192
5256
|
return /* @__PURE__ */ r(
|
|
5193
|
-
|
|
5257
|
+
ge,
|
|
5194
5258
|
{
|
|
5195
5259
|
data: { taskType: "MemoryChat", eventType: "Thinking" },
|
|
5196
|
-
isLatest:
|
|
5197
|
-
durationSeconds:
|
|
5260
|
+
isLatest: s.isLatest,
|
|
5261
|
+
durationSeconds: s.durationSeconds,
|
|
5198
5262
|
t: i
|
|
5199
5263
|
}
|
|
5200
5264
|
);
|
|
5201
5265
|
case "Planning":
|
|
5202
5266
|
return /* @__PURE__ */ r(
|
|
5203
|
-
|
|
5267
|
+
Vr,
|
|
5204
5268
|
{
|
|
5205
5269
|
data: c,
|
|
5206
|
-
|
|
5207
|
-
|
|
5270
|
+
createdAt: s.item.createdAt,
|
|
5271
|
+
timestamp: s.item.timestamp,
|
|
5272
|
+
completed: s.completed,
|
|
5208
5273
|
t: i,
|
|
5209
5274
|
onMemoryClick: a
|
|
5210
5275
|
}
|
|
5211
5276
|
);
|
|
5212
5277
|
case "SetupSandbox":
|
|
5213
|
-
return
|
|
5214
|
-
Gr,
|
|
5215
|
-
{
|
|
5216
|
-
data: c,
|
|
5217
|
-
isLatest: l.isLatest,
|
|
5218
|
-
durationSeconds: l.durationSeconds,
|
|
5219
|
-
t: i
|
|
5220
|
-
}
|
|
5221
|
-
);
|
|
5278
|
+
return null;
|
|
5222
5279
|
case "ExportingMemories":
|
|
5223
5280
|
return /* @__PURE__ */ r(
|
|
5224
|
-
|
|
5281
|
+
Xr,
|
|
5225
5282
|
{
|
|
5226
5283
|
data: c,
|
|
5227
|
-
isLatest:
|
|
5228
|
-
durationSeconds:
|
|
5284
|
+
isLatest: s.isLatest,
|
|
5285
|
+
durationSeconds: s.durationSeconds,
|
|
5229
5286
|
t: i
|
|
5230
5287
|
}
|
|
5231
5288
|
);
|
|
5232
5289
|
case "FindMemories":
|
|
5233
5290
|
return /* @__PURE__ */ r(
|
|
5234
|
-
|
|
5291
|
+
Yr,
|
|
5235
5292
|
{
|
|
5236
5293
|
data: c,
|
|
5237
|
-
isLatest:
|
|
5238
|
-
durationSeconds:
|
|
5294
|
+
isLatest: s.isLatest,
|
|
5295
|
+
durationSeconds: s.durationSeconds,
|
|
5239
5296
|
t: i
|
|
5240
5297
|
}
|
|
5241
5298
|
);
|
|
5242
5299
|
case "FindMemoriesResult":
|
|
5243
|
-
return /* @__PURE__ */ r(
|
|
5300
|
+
return /* @__PURE__ */ r(Jr, { data: c, t: i });
|
|
5244
5301
|
case "SemanticSearch":
|
|
5245
5302
|
return /* @__PURE__ */ r(
|
|
5246
|
-
|
|
5303
|
+
en,
|
|
5247
5304
|
{
|
|
5248
5305
|
data: c,
|
|
5249
|
-
isLatest:
|
|
5250
|
-
durationSeconds:
|
|
5306
|
+
isLatest: s.isLatest,
|
|
5307
|
+
durationSeconds: s.durationSeconds,
|
|
5251
5308
|
t: i,
|
|
5252
|
-
onSearchResultClick:
|
|
5309
|
+
onSearchResultClick: d
|
|
5253
5310
|
}
|
|
5254
5311
|
);
|
|
5255
5312
|
case "SemanticSearchForEach":
|
|
5256
5313
|
return /* @__PURE__ */ r(
|
|
5257
|
-
|
|
5314
|
+
on,
|
|
5258
5315
|
{
|
|
5259
5316
|
data: c,
|
|
5260
|
-
completed:
|
|
5261
|
-
isLatest:
|
|
5317
|
+
completed: s.completed,
|
|
5318
|
+
isLatest: s.isLatest,
|
|
5262
5319
|
t: i
|
|
5263
5320
|
}
|
|
5264
5321
|
);
|
|
5265
5322
|
case "RunCode":
|
|
5266
5323
|
return /* @__PURE__ */ r(
|
|
5267
|
-
|
|
5324
|
+
tn,
|
|
5268
5325
|
{
|
|
5269
5326
|
data: c,
|
|
5270
|
-
isLatest:
|
|
5271
|
-
durationSeconds:
|
|
5327
|
+
isLatest: s.isLatest,
|
|
5328
|
+
durationSeconds: s.durationSeconds,
|
|
5272
5329
|
t: i
|
|
5273
5330
|
}
|
|
5274
5331
|
);
|
|
5275
5332
|
case "FindSources":
|
|
5276
5333
|
return /* @__PURE__ */ r(
|
|
5277
|
-
|
|
5334
|
+
ce,
|
|
5278
5335
|
{
|
|
5279
5336
|
data: { taskType: "MemoryChat", eventType: "FindSources" },
|
|
5280
|
-
isLatest:
|
|
5281
|
-
durationSeconds:
|
|
5337
|
+
isLatest: s.isLatest,
|
|
5338
|
+
durationSeconds: s.durationSeconds,
|
|
5282
5339
|
t: i
|
|
5283
5340
|
}
|
|
5284
5341
|
);
|
|
5285
5342
|
case "SourcesResult":
|
|
5286
5343
|
return /* @__PURE__ */ r(
|
|
5287
|
-
|
|
5344
|
+
an,
|
|
5288
5345
|
{
|
|
5289
5346
|
data: c,
|
|
5290
|
-
onSourceClick:
|
|
5347
|
+
onSourceClick: l,
|
|
5291
5348
|
t: i
|
|
5292
5349
|
}
|
|
5293
5350
|
);
|
|
5294
5351
|
case "Completed":
|
|
5295
5352
|
return /* @__PURE__ */ r(
|
|
5296
|
-
|
|
5353
|
+
N,
|
|
5297
5354
|
{
|
|
5298
5355
|
text: c.response.textResponse,
|
|
5299
|
-
onFileDownload:
|
|
5356
|
+
onFileDownload: u,
|
|
5300
5357
|
onMemoryClick: a
|
|
5301
5358
|
}
|
|
5302
5359
|
);
|
|
5303
5360
|
default: {
|
|
5304
|
-
const
|
|
5305
|
-
return
|
|
5361
|
+
const f = c;
|
|
5362
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5306
5363
|
"[fency] Unknown ExploreMemories eventType (no UI):",
|
|
5307
|
-
|
|
5308
|
-
|
|
5364
|
+
f.eventType,
|
|
5365
|
+
f
|
|
5309
5366
|
), null);
|
|
5310
5367
|
}
|
|
5311
5368
|
}
|
|
5312
5369
|
return c.taskType === "StreamingChatCompletion" && c.eventType === "Completed" ? /* @__PURE__ */ r(
|
|
5313
|
-
|
|
5370
|
+
N,
|
|
5314
5371
|
{
|
|
5315
5372
|
text: c.response.textResponse,
|
|
5316
5373
|
onMemoryClick: a
|
|
@@ -5329,40 +5386,42 @@ const kn = ({
|
|
|
5329
5386
|
shimmerColor: h.shimmerHighlight
|
|
5330
5387
|
}
|
|
5331
5388
|
) }) : null;
|
|
5332
|
-
const
|
|
5333
|
-
const
|
|
5334
|
-
if (
|
|
5389
|
+
const y = e.filter((s, c) => {
|
|
5390
|
+
const f = s.item.data;
|
|
5391
|
+
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
|
|
5392
|
+
return !1;
|
|
5393
|
+
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
5335
5394
|
return !e.slice(c + 1).some(
|
|
5336
5395
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
|
|
5337
5396
|
);
|
|
5338
|
-
if (
|
|
5397
|
+
if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
|
|
5339
5398
|
return !e.slice(c + 1).some(
|
|
5340
5399
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
|
|
5341
5400
|
);
|
|
5342
|
-
if (
|
|
5401
|
+
if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
|
|
5343
5402
|
return !e.slice(c + 1).some(
|
|
5344
5403
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
|
|
5345
5404
|
);
|
|
5346
|
-
if (
|
|
5405
|
+
if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
|
|
5347
5406
|
return !e.slice(c + 1).some(
|
|
5348
5407
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
|
|
5349
5408
|
);
|
|
5350
|
-
if (
|
|
5409
|
+
if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
|
|
5351
5410
|
return !e.slice(c + 1).some(
|
|
5352
5411
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
|
|
5353
5412
|
);
|
|
5354
|
-
if (
|
|
5413
|
+
if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
|
|
5355
5414
|
return !e.slice(c + 1).some(
|
|
5356
5415
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
|
|
5357
5416
|
);
|
|
5358
|
-
if (
|
|
5417
|
+
if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
|
|
5359
5418
|
return !e.slice(c + 1).some(
|
|
5360
5419
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
|
|
5361
5420
|
);
|
|
5362
|
-
if (
|
|
5363
|
-
const P =
|
|
5421
|
+
if (f.taskType === "ExploreMemories" && (f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
|
|
5422
|
+
const P = f.eventType;
|
|
5364
5423
|
return !e.slice(c + 1).some(
|
|
5365
|
-
(
|
|
5424
|
+
(se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === P
|
|
5366
5425
|
);
|
|
5367
5426
|
}
|
|
5368
5427
|
return !0;
|
|
@@ -5374,10 +5433,10 @@ const kn = ({
|
|
|
5374
5433
|
ref: x,
|
|
5375
5434
|
"data-theme": g,
|
|
5376
5435
|
children: [
|
|
5377
|
-
/* @__PURE__ */ r(
|
|
5436
|
+
/* @__PURE__ */ r(Ve, { children: y.map((s, c) => /* @__PURE__ */ r(
|
|
5378
5437
|
v.div,
|
|
5379
5438
|
{
|
|
5380
|
-
id: `agent-task-progress-item-${
|
|
5439
|
+
id: `agent-task-progress-item-${s.item.progressItemId}`,
|
|
5381
5440
|
initial: { opacity: 0, y: -20 },
|
|
5382
5441
|
animate: { opacity: 1, y: 0 },
|
|
5383
5442
|
transition: {
|
|
@@ -5386,27 +5445,27 @@ const kn = ({
|
|
|
5386
5445
|
ease: "easeOut"
|
|
5387
5446
|
},
|
|
5388
5447
|
children: /* @__PURE__ */ r(
|
|
5389
|
-
|
|
5448
|
+
vn,
|
|
5390
5449
|
{
|
|
5391
|
-
progressItemId:
|
|
5392
|
-
children:
|
|
5450
|
+
progressItemId: s.item.progressItemId,
|
|
5451
|
+
children: b(s)
|
|
5393
5452
|
}
|
|
5394
5453
|
)
|
|
5395
5454
|
},
|
|
5396
|
-
|
|
5455
|
+
s.item.progressItemId
|
|
5397
5456
|
)) }),
|
|
5398
5457
|
t ? /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(O, { message: t.message }) }) : null
|
|
5399
5458
|
]
|
|
5400
5459
|
}
|
|
5401
5460
|
);
|
|
5402
|
-
},
|
|
5403
|
-
const { colors: n } =
|
|
5404
|
-
|
|
5461
|
+
}, Cn = ({ taskId: e, label: o, copiedLabel: t }) => {
|
|
5462
|
+
const { colors: n } = T(), [i, a] = w(!1);
|
|
5463
|
+
H(() => {
|
|
5405
5464
|
if (!i) return;
|
|
5406
|
-
const
|
|
5407
|
-
return () => window.clearTimeout(
|
|
5465
|
+
const d = window.setTimeout(() => a(!1), 1500);
|
|
5466
|
+
return () => window.clearTimeout(d);
|
|
5408
5467
|
}, [i]);
|
|
5409
|
-
const
|
|
5468
|
+
const l = L(async () => {
|
|
5410
5469
|
try {
|
|
5411
5470
|
await navigator.clipboard.writeText(e), a(!0);
|
|
5412
5471
|
} catch {
|
|
@@ -5416,7 +5475,7 @@ const kn = ({
|
|
|
5416
5475
|
"button",
|
|
5417
5476
|
{
|
|
5418
5477
|
type: "button",
|
|
5419
|
-
onClick: () => void
|
|
5478
|
+
onClick: () => void l(),
|
|
5420
5479
|
title: o,
|
|
5421
5480
|
"aria-label": o,
|
|
5422
5481
|
style: {
|
|
@@ -5433,18 +5492,18 @@ const kn = ({
|
|
|
5433
5492
|
children: i ? t : o
|
|
5434
5493
|
}
|
|
5435
5494
|
);
|
|
5436
|
-
},
|
|
5495
|
+
}, An = ({
|
|
5437
5496
|
agentTask: e,
|
|
5438
5497
|
theme: o = "light",
|
|
5439
5498
|
language: t,
|
|
5440
5499
|
onMemoryClick: n,
|
|
5441
5500
|
onSourceClick: i,
|
|
5442
5501
|
onSearchResultClick: a,
|
|
5443
|
-
onExploreQueryResultClick:
|
|
5502
|
+
onExploreQueryResultClick: l
|
|
5444
5503
|
}) => {
|
|
5445
5504
|
var h;
|
|
5446
|
-
const
|
|
5447
|
-
return /* @__PURE__ */ r(
|
|
5505
|
+
const d = nr(e), p = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", u = cr(p), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
|
|
5506
|
+
return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
|
|
5448
5507
|
g ? /* @__PURE__ */ r(
|
|
5449
5508
|
"div",
|
|
5450
5509
|
{
|
|
@@ -5455,43 +5514,43 @@ const kn = ({
|
|
|
5455
5514
|
zIndex: 1
|
|
5456
5515
|
},
|
|
5457
5516
|
children: /* @__PURE__ */ r(
|
|
5458
|
-
|
|
5517
|
+
Cn,
|
|
5459
5518
|
{
|
|
5460
5519
|
taskId: g,
|
|
5461
|
-
label:
|
|
5462
|
-
copiedLabel:
|
|
5520
|
+
label: u.copyId,
|
|
5521
|
+
copiedLabel: u.copiedId
|
|
5463
5522
|
}
|
|
5464
5523
|
)
|
|
5465
5524
|
}
|
|
5466
5525
|
) : null,
|
|
5467
5526
|
/* @__PURE__ */ r(
|
|
5468
|
-
|
|
5527
|
+
wn,
|
|
5469
5528
|
{
|
|
5470
|
-
progressViewItems:
|
|
5529
|
+
progressViewItems: d,
|
|
5471
5530
|
loading: e.loading,
|
|
5472
5531
|
error: e.error,
|
|
5473
5532
|
loadingText: e.loadingText,
|
|
5474
|
-
t:
|
|
5533
|
+
t: u,
|
|
5475
5534
|
onMemoryClick: n,
|
|
5476
5535
|
onSourceClick: i,
|
|
5477
5536
|
onSearchResultClick: a,
|
|
5478
|
-
onExploreQueryResultClick:
|
|
5537
|
+
onExploreQueryResultClick: l,
|
|
5479
5538
|
downloadFile: e.downloadFile
|
|
5480
5539
|
}
|
|
5481
5540
|
)
|
|
5482
5541
|
] }) });
|
|
5483
5542
|
};
|
|
5484
5543
|
export {
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5544
|
+
An as AgentTaskProgress,
|
|
5545
|
+
ar as AgentTaskThemeProvider,
|
|
5546
|
+
F as Checkmark,
|
|
5547
|
+
Pn as FencyProvider,
|
|
5548
|
+
Tn as MemorySearchCompletedResults,
|
|
5549
|
+
$n as StreamEventManager,
|
|
5491
5550
|
_ as XMark,
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5551
|
+
ir as darkAgentTaskThemeColors,
|
|
5552
|
+
we as getAgentTaskPrismStyle,
|
|
5553
|
+
Te as lightAgentTaskThemeColors,
|
|
5554
|
+
T as useAgentTaskTheme,
|
|
5555
|
+
Ln as useAgentTasks
|
|
5497
5556
|
};
|