@fencyai/react 0.1.204 → 0.1.205
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 +8 -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/agent-task/translations.d.ts +2 -0
- package/dist/agent-task/translations.d.ts.map +1 -1
- package/dist/index.js +946 -876
- 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 Pe, StreamCacheManager as ze, toStreamData as Be, 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 Nn } 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 P, 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 Ln({
|
|
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 Pe(n));
|
|
29
|
+
const c = new ze(
|
|
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 = Be(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,146 +143,146 @@ 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 An = (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
|
-
const W = (/* @__PURE__ */ new Date()).toISOString(),
|
|
253
|
+
const W = (/* @__PURE__ */ new Date()).toISOString(), z = {
|
|
254
254
|
taskKey: c,
|
|
255
255
|
streamId: M.stream.id,
|
|
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:
|
|
265
|
-
...
|
|
266
|
-
downloadFile:
|
|
264
|
+
n({ type: "TASK_PENDING", task: z }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
|
|
265
|
+
...z,
|
|
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({
|
|
@@ -291,10 +291,10 @@ const In = (e) => {
|
|
|
291
291
|
taskId: I.agentTask.id,
|
|
292
292
|
createdAt: I.agentTask.createdAt
|
|
293
293
|
}), await new Promise(
|
|
294
|
-
(
|
|
294
|
+
(B) => {
|
|
295
295
|
a.current.set(
|
|
296
296
|
I.agentTask.id,
|
|
297
|
-
|
|
297
|
+
B
|
|
298
298
|
);
|
|
299
299
|
}
|
|
300
300
|
);
|
|
@@ -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 = P(() => 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 = P(() => {
|
|
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 = P(
|
|
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, ...
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1146
|
+
), s = P(() => ({
|
|
1147
|
+
code(f) {
|
|
1148
|
+
const { children: S, className: M, node: D, ref: W, ...z } = f, $ = /language-(\w+)/.exec(M || "");
|
|
1149
|
+
return $ ? /* @__PURE__ */ r(
|
|
1150
|
+
ke,
|
|
1141
1151
|
{
|
|
1142
|
-
...
|
|
1152
|
+
...z,
|
|
1143
1153
|
PreTag: "div",
|
|
1144
1154
|
children: String(S).replace(/\n$/, ""),
|
|
1145
|
-
language:
|
|
1155
|
+
language: $[1],
|
|
1146
1156
|
style: i
|
|
1147
1157
|
}
|
|
1148
|
-
) : /* @__PURE__ */ r("code", { ...
|
|
1158
|
+
) : /* @__PURE__ */ r("code", { ...z, 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,28 +1174,28 @@ 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
|
|
1179
|
-
return
|
|
1188
|
+
const z = M ? qe(M) : null;
|
|
1189
|
+
return z != 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
|
-
memoryId:
|
|
1188
|
-
memoryTypeId:
|
|
1197
|
+
memoryId: z.memoryId,
|
|
1198
|
+
memoryTypeId: z.memoryTypeId ?? ""
|
|
1189
1199
|
}
|
|
1190
1200
|
}),
|
|
1191
1201
|
children: S
|
|
@@ -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...",
|
|
@@ -1372,6 +1382,7 @@ const H = ({
|
|
|
1372
1382
|
"Kwisatz-haderaching..."
|
|
1373
1383
|
],
|
|
1374
1384
|
explorePlanning: "Planning approach...",
|
|
1385
|
+
explorePlanningUserPlanPending: "Preparing your plan...",
|
|
1375
1386
|
exploreFindMemoriesQuery: "Finding memories: '{query}'",
|
|
1376
1387
|
exploreFindMemoriesPrefix: "Finding memories: ",
|
|
1377
1388
|
exploreSemanticSearchForEach: "Reading memories for '{query}'",
|
|
@@ -1495,6 +1506,7 @@ const H = ({
|
|
|
1495
1506
|
"Kwisatz-haderacher..."
|
|
1496
1507
|
],
|
|
1497
1508
|
explorePlanning: "Planlegger tilnærming...",
|
|
1509
|
+
explorePlanningUserPlanPending: "Forbereder planen...",
|
|
1498
1510
|
exploreFindMemoriesQuery: "Finner minner: '{query}'",
|
|
1499
1511
|
exploreFindMemoriesPrefix: "Finner minner: ",
|
|
1500
1512
|
exploreSemanticSearchForEach: "Leser minner for '{query}'",
|
|
@@ -1502,8 +1514,8 @@ const H = ({
|
|
|
1502
1514
|
copiedId: "Kopiert"
|
|
1503
1515
|
}
|
|
1504
1516
|
};
|
|
1505
|
-
function
|
|
1506
|
-
return
|
|
1517
|
+
function cr(e) {
|
|
1518
|
+
return sr[e];
|
|
1507
1519
|
}
|
|
1508
1520
|
function k(e, o) {
|
|
1509
1521
|
return Object.entries(o).reduce(
|
|
@@ -1526,15 +1538,15 @@ function C({
|
|
|
1526
1538
|
repeat: n = !0,
|
|
1527
1539
|
repeatDelay: i = 0.5,
|
|
1528
1540
|
className: a,
|
|
1529
|
-
startOnView:
|
|
1530
|
-
once:
|
|
1531
|
-
inViewMargin:
|
|
1532
|
-
spread:
|
|
1541
|
+
startOnView: l = !1,
|
|
1542
|
+
once: d = !1,
|
|
1543
|
+
inViewMargin: p,
|
|
1544
|
+
spread: u = 2,
|
|
1533
1545
|
color: g,
|
|
1534
1546
|
shimmerColor: h,
|
|
1535
1547
|
direction: x = "fromBottom"
|
|
1536
1548
|
}) {
|
|
1537
|
-
const { colors:
|
|
1549
|
+
const { colors: b } = T(), y = g ?? b.shimmerBase, s = h ?? b.shimmerHighlight, c = A(null), f = Ke(c, { once: d, margin: p }), S = P(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
|
|
1538
1550
|
return /* @__PURE__ */ r(
|
|
1539
1551
|
v.span,
|
|
1540
1552
|
{
|
|
@@ -1550,8 +1562,8 @@ function C({
|
|
|
1550
1562
|
WebkitTextFillColor: "transparent",
|
|
1551
1563
|
backgroundRepeat: "no-repeat, padding-box",
|
|
1552
1564
|
"--spread": `${S}px`,
|
|
1553
|
-
"--base-color":
|
|
1554
|
-
"--shimmer-color":
|
|
1565
|
+
"--base-color": y,
|
|
1566
|
+
"--shimmer-color": s,
|
|
1555
1567
|
"--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
|
|
1556
1568
|
backgroundImage: "var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))"
|
|
1557
1569
|
},
|
|
@@ -1580,11 +1592,11 @@ function C({
|
|
|
1580
1592
|
}
|
|
1581
1593
|
);
|
|
1582
1594
|
}
|
|
1583
|
-
const
|
|
1584
|
-
const { colors: a } =
|
|
1595
|
+
const Y = 5, Q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
|
|
1596
|
+
const { colors: a } = T(), [l, d] = w(!1), u = (e.memories ?? []).map((S) => S.memoryTitle), g = u.length > 0, h = g && u.length > Y, x = h && !l ? u.slice(0, Y) : u, b = u.length - Y, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, c = g ? `${n.searchingIn}${K(
|
|
1585
1597
|
x,
|
|
1586
|
-
|
|
1587
|
-
)}` : "",
|
|
1598
|
+
y ? n.and : void 0
|
|
1599
|
+
)}` : "", f = g ? `${s}${c}` : `${n.searchingPrefix}${e.queryDescription}`;
|
|
1588
1600
|
return /* @__PURE__ */ m(
|
|
1589
1601
|
"div",
|
|
1590
1602
|
{
|
|
@@ -1597,7 +1609,7 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1597
1609
|
initial: { opacity: 0, y: -10 },
|
|
1598
1610
|
animate: { opacity: 1, y: 0 },
|
|
1599
1611
|
transition: { duration: 0.3, delay: 0 },
|
|
1600
|
-
children: o && !t && !h ? /* @__PURE__ */ r(C, { text:
|
|
1612
|
+
children: o && !t && !h ? /* @__PURE__ */ r(C, { text: f, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
1601
1613
|
/* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: g ? /* @__PURE__ */ m(R, { children: [
|
|
1602
1614
|
n.searchingFor,
|
|
1603
1615
|
/* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
|
|
@@ -1607,13 +1619,13 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1607
1619
|
] }),
|
|
1608
1620
|
c
|
|
1609
1621
|
] }) : `${n.searchingPrefix}${e.queryDescription}` }),
|
|
1610
|
-
h && !
|
|
1622
|
+
h && !l && /* @__PURE__ */ m(R, { children: [
|
|
1611
1623
|
" ",
|
|
1612
1624
|
/* @__PURE__ */ r(
|
|
1613
1625
|
"button",
|
|
1614
1626
|
{
|
|
1615
1627
|
type: "button",
|
|
1616
|
-
onClick: () =>
|
|
1628
|
+
onClick: () => d(!0),
|
|
1617
1629
|
style: {
|
|
1618
1630
|
background: "none",
|
|
1619
1631
|
border: "none",
|
|
@@ -1626,18 +1638,18 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1626
1638
|
fontFamily: "inherit"
|
|
1627
1639
|
},
|
|
1628
1640
|
children: k(n.moreMemories, {
|
|
1629
|
-
n:
|
|
1641
|
+
n: b
|
|
1630
1642
|
})
|
|
1631
1643
|
}
|
|
1632
1644
|
)
|
|
1633
1645
|
] }),
|
|
1634
|
-
h &&
|
|
1646
|
+
h && l && /* @__PURE__ */ m(R, { children: [
|
|
1635
1647
|
" ",
|
|
1636
1648
|
/* @__PURE__ */ r(
|
|
1637
1649
|
"button",
|
|
1638
1650
|
{
|
|
1639
1651
|
type: "button",
|
|
1640
|
-
onClick: () =>
|
|
1652
|
+
onClick: () => d(!1),
|
|
1641
1653
|
style: {
|
|
1642
1654
|
background: "none",
|
|
1643
1655
|
border: "none",
|
|
@@ -1671,12 +1683,12 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1671
1683
|
]
|
|
1672
1684
|
}
|
|
1673
1685
|
);
|
|
1674
|
-
},
|
|
1686
|
+
}, F = ({
|
|
1675
1687
|
color: e,
|
|
1676
1688
|
size: o = 24,
|
|
1677
1689
|
borderWidth: t = 7
|
|
1678
1690
|
}) => {
|
|
1679
|
-
const { colors: n } =
|
|
1691
|
+
const { colors: n } = T(), i = e ?? n.checkmarkColor, a = o * 0.5;
|
|
1680
1692
|
return /* @__PURE__ */ r(
|
|
1681
1693
|
"span",
|
|
1682
1694
|
{
|
|
@@ -1691,16 +1703,16 @@ const V = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
|
|
|
1691
1703
|
}
|
|
1692
1704
|
);
|
|
1693
1705
|
};
|
|
1694
|
-
function
|
|
1706
|
+
function dr(e, o) {
|
|
1695
1707
|
const t = Math.min(e.length, o.length);
|
|
1696
1708
|
for (let n = t; n >= 0; n--)
|
|
1697
1709
|
if (e.slice(-n) === o.slice(0, n)) return n;
|
|
1698
1710
|
return 0;
|
|
1699
1711
|
}
|
|
1700
|
-
const
|
|
1712
|
+
const pr = `
|
|
1701
1713
|
|
|
1702
1714
|
`;
|
|
1703
|
-
function
|
|
1715
|
+
function re(e) {
|
|
1704
1716
|
var t, n;
|
|
1705
1717
|
if (e.length === 0) return "";
|
|
1706
1718
|
let o = ((t = e[0]) == null ? void 0 : t.content) ?? "";
|
|
@@ -1711,12 +1723,12 @@ function Z(e) {
|
|
|
1711
1723
|
o = a;
|
|
1712
1724
|
continue;
|
|
1713
1725
|
}
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1726
|
+
const l = dr(o, a);
|
|
1727
|
+
l === 0 ? o += pr + a : o += a.slice(l);
|
|
1716
1728
|
}
|
|
1717
1729
|
return o;
|
|
1718
1730
|
}
|
|
1719
|
-
function
|
|
1731
|
+
function ne(e, o) {
|
|
1720
1732
|
if (e.length === 0) return "";
|
|
1721
1733
|
if (e.length === 1)
|
|
1722
1734
|
return k(o.memorySearchPagesSingle, {
|
|
@@ -1733,51 +1745,51 @@ function ee(e, o) {
|
|
|
1733
1745
|
n: t
|
|
1734
1746
|
});
|
|
1735
1747
|
}
|
|
1736
|
-
function
|
|
1748
|
+
function oe(e) {
|
|
1737
1749
|
const o = /* @__PURE__ */ new Set();
|
|
1738
1750
|
for (const t of e)
|
|
1739
1751
|
for (const n of t.pageNumbers) o.add(n);
|
|
1740
1752
|
return [...o].sort((t, n) => t - n);
|
|
1741
1753
|
}
|
|
1742
|
-
function
|
|
1754
|
+
function te(e) {
|
|
1743
1755
|
const o = e.memoryTypeName.trim();
|
|
1744
1756
|
if (o !== "") return o;
|
|
1745
1757
|
if (e.memoryTypeId !== "") return e.memoryTypeId;
|
|
1746
1758
|
}
|
|
1747
|
-
function
|
|
1759
|
+
function Ce(e) {
|
|
1748
1760
|
return e.chunks.filter((o) => o.relation === "MATCH").length;
|
|
1749
1761
|
}
|
|
1750
|
-
function
|
|
1762
|
+
function ur(e, o) {
|
|
1751
1763
|
let t = 0, n = 0;
|
|
1752
|
-
for (const
|
|
1753
|
-
t +=
|
|
1764
|
+
for (const l of e)
|
|
1765
|
+
t += Ce(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
|
|
1754
1766
|
const i = t === 1 ? o.chunkFound : k(o.chunksFound, { n: t }), a = k(o.scoreLabel, {
|
|
1755
1767
|
n: n.toFixed(2)
|
|
1756
1768
|
});
|
|
1757
1769
|
return `${i} - ${a}`;
|
|
1758
1770
|
}
|
|
1759
|
-
function
|
|
1771
|
+
function mr(e) {
|
|
1760
1772
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
1761
1773
|
return e.forEach((n, i) => {
|
|
1762
1774
|
let a = t.get(n.memoryId);
|
|
1763
1775
|
if (a == null) {
|
|
1764
1776
|
o.push(n.memoryId);
|
|
1765
|
-
const
|
|
1777
|
+
const l = n.memoryTitle !== "" ? n.memoryTitle : n.memoryId;
|
|
1766
1778
|
a = {
|
|
1767
1779
|
memoryId: n.memoryId,
|
|
1768
|
-
memoryTitle:
|
|
1780
|
+
memoryTitle: l,
|
|
1769
1781
|
items: []
|
|
1770
1782
|
}, t.set(n.memoryId, a);
|
|
1771
1783
|
}
|
|
1772
1784
|
a.items.push({ item: n, flatIndex: i });
|
|
1773
1785
|
}), o.map((n) => t.get(n));
|
|
1774
1786
|
}
|
|
1775
|
-
function
|
|
1787
|
+
function gr({
|
|
1776
1788
|
items: e,
|
|
1777
1789
|
onSearchResultClick: o,
|
|
1778
1790
|
t
|
|
1779
1791
|
}) {
|
|
1780
|
-
const { colors: n } =
|
|
1792
|
+
const { colors: n } = T(), [i, a] = w(null), l = !!o;
|
|
1781
1793
|
return /* @__PURE__ */ r(
|
|
1782
1794
|
"div",
|
|
1783
1795
|
{
|
|
@@ -1789,24 +1801,24 @@ function lr({
|
|
|
1789
1801
|
paddingTop: 8,
|
|
1790
1802
|
borderTop: `1px solid ${n.borderDivider}`
|
|
1791
1803
|
},
|
|
1792
|
-
children: e.map((
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1804
|
+
children: e.map((d, p) => {
|
|
1805
|
+
const u = oe(
|
|
1806
|
+
d.chunks
|
|
1795
1807
|
), g = [
|
|
1796
|
-
|
|
1808
|
+
te(d),
|
|
1797
1809
|
k(t.scoreLabel, {
|
|
1798
|
-
n:
|
|
1810
|
+
n: d.matchingChunkScore.toFixed(2)
|
|
1799
1811
|
}),
|
|
1800
|
-
|
|
1812
|
+
u.length > 0 ? ne(u, t) : t.pagesNotAvailable
|
|
1801
1813
|
].filter(
|
|
1802
|
-
(
|
|
1814
|
+
(y) => y != null && y !== ""
|
|
1803
1815
|
), h = {
|
|
1804
|
-
memoryId:
|
|
1805
|
-
memoryTitle:
|
|
1806
|
-
memoryTypeId:
|
|
1807
|
-
memoryTypeName:
|
|
1808
|
-
pageNumbers:
|
|
1809
|
-
}, x = `${
|
|
1816
|
+
memoryId: d.memoryId,
|
|
1817
|
+
memoryTitle: d.memoryTitle,
|
|
1818
|
+
memoryTypeId: d.memoryTypeId,
|
|
1819
|
+
memoryTypeName: d.memoryTypeName,
|
|
1820
|
+
pageNumbers: u
|
|
1821
|
+
}, x = `${d.memoryId}-${p}`, b = i === x;
|
|
1810
1822
|
return /* @__PURE__ */ m(
|
|
1811
1823
|
"div",
|
|
1812
1824
|
{
|
|
@@ -1815,9 +1827,9 @@ function lr({
|
|
|
1815
1827
|
flexDirection: "row",
|
|
1816
1828
|
alignItems: "flex-start",
|
|
1817
1829
|
gap: "12px",
|
|
1818
|
-
paddingTop:
|
|
1819
|
-
paddingBottom:
|
|
1820
|
-
borderBottom:
|
|
1830
|
+
paddingTop: p > 0 ? 12 : 0,
|
|
1831
|
+
paddingBottom: p < e.length - 1 ? 12 : 0,
|
|
1832
|
+
borderBottom: p < e.length - 1 ? `1px solid ${n.border}` : void 0,
|
|
1821
1833
|
minWidth: 0
|
|
1822
1834
|
},
|
|
1823
1835
|
children: [
|
|
@@ -1842,7 +1854,7 @@ function lr({
|
|
|
1842
1854
|
whiteSpace: "pre-wrap",
|
|
1843
1855
|
wordBreak: "break-word"
|
|
1844
1856
|
},
|
|
1845
|
-
children:
|
|
1857
|
+
children: re(d.chunks)
|
|
1846
1858
|
}
|
|
1847
1859
|
),
|
|
1848
1860
|
/* @__PURE__ */ r(
|
|
@@ -1860,12 +1872,12 @@ function lr({
|
|
|
1860
1872
|
]
|
|
1861
1873
|
}
|
|
1862
1874
|
),
|
|
1863
|
-
|
|
1875
|
+
l && /* @__PURE__ */ m(
|
|
1864
1876
|
"button",
|
|
1865
1877
|
{
|
|
1866
1878
|
type: "button",
|
|
1867
|
-
"aria-busy":
|
|
1868
|
-
disabled:
|
|
1879
|
+
"aria-busy": b,
|
|
1880
|
+
disabled: b,
|
|
1869
1881
|
onClick: async () => {
|
|
1870
1882
|
a(x);
|
|
1871
1883
|
try {
|
|
@@ -1886,14 +1898,14 @@ function lr({
|
|
|
1886
1898
|
background: n.bgChip,
|
|
1887
1899
|
border: `1px solid ${n.bgChipBorder}`,
|
|
1888
1900
|
borderRadius: 6,
|
|
1889
|
-
cursor:
|
|
1901
|
+
cursor: b ? "wait" : "pointer",
|
|
1890
1902
|
fontFamily: "inherit",
|
|
1891
1903
|
display: "inline-flex",
|
|
1892
1904
|
alignItems: "center",
|
|
1893
1905
|
gap: 8
|
|
1894
1906
|
},
|
|
1895
1907
|
children: [
|
|
1896
|
-
|
|
1908
|
+
b && /* @__PURE__ */ r(
|
|
1897
1909
|
"span",
|
|
1898
1910
|
{
|
|
1899
1911
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -1912,14 +1924,14 @@ function lr({
|
|
|
1912
1924
|
}
|
|
1913
1925
|
);
|
|
1914
1926
|
}
|
|
1915
|
-
function
|
|
1927
|
+
function hr({
|
|
1916
1928
|
group: e,
|
|
1917
1929
|
t: o,
|
|
1918
1930
|
expanded: t,
|
|
1919
1931
|
onToggle: n,
|
|
1920
1932
|
onSearchResultClick: i
|
|
1921
1933
|
}) {
|
|
1922
|
-
const { colors: a } =
|
|
1934
|
+
const { colors: a } = T(), l = e.items.map((p) => p.item), d = l.some((p) => p.chunks.length > 0);
|
|
1923
1935
|
return /* @__PURE__ */ m(
|
|
1924
1936
|
v.div,
|
|
1925
1937
|
{
|
|
@@ -1948,7 +1960,7 @@ function sr({
|
|
|
1948
1960
|
width: 32,
|
|
1949
1961
|
paddingTop: 2
|
|
1950
1962
|
},
|
|
1951
|
-
children: /* @__PURE__ */ r(
|
|
1963
|
+
children: /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 })
|
|
1952
1964
|
}
|
|
1953
1965
|
),
|
|
1954
1966
|
/* @__PURE__ */ m(
|
|
@@ -1994,10 +2006,10 @@ function sr({
|
|
|
1994
2006
|
color: a.textSecondary,
|
|
1995
2007
|
whiteSpace: "nowrap"
|
|
1996
2008
|
},
|
|
1997
|
-
children:
|
|
2009
|
+
children: ur(l, o)
|
|
1998
2010
|
}
|
|
1999
2011
|
),
|
|
2000
|
-
|
|
2012
|
+
d && /* @__PURE__ */ r(
|
|
2001
2013
|
"button",
|
|
2002
2014
|
{
|
|
2003
2015
|
type: "button",
|
|
@@ -2018,10 +2030,10 @@ function sr({
|
|
|
2018
2030
|
]
|
|
2019
2031
|
}
|
|
2020
2032
|
),
|
|
2021
|
-
t &&
|
|
2022
|
-
|
|
2033
|
+
t && d && /* @__PURE__ */ r(
|
|
2034
|
+
gr,
|
|
2023
2035
|
{
|
|
2024
|
-
items:
|
|
2036
|
+
items: l,
|
|
2025
2037
|
onSearchResultClick: i,
|
|
2026
2038
|
t: o
|
|
2027
2039
|
}
|
|
@@ -2033,27 +2045,27 @@ function sr({
|
|
|
2033
2045
|
}
|
|
2034
2046
|
);
|
|
2035
2047
|
}
|
|
2036
|
-
function
|
|
2048
|
+
function yr(e, o) {
|
|
2037
2049
|
return e === 1 ? o.chunkFound : k(o.chunksFound, { n: e });
|
|
2038
2050
|
}
|
|
2039
|
-
const
|
|
2051
|
+
const ie = ({
|
|
2040
2052
|
data: e,
|
|
2041
2053
|
onSearchResultClick: o,
|
|
2042
2054
|
t,
|
|
2043
2055
|
compactTop: n = !1
|
|
2044
2056
|
}) => {
|
|
2045
|
-
const { colors: i } =
|
|
2046
|
-
(
|
|
2057
|
+
const { colors: i } = T(), a = e.items, l = a.reduce(
|
|
2058
|
+
(s, c) => s + Ce(c),
|
|
2047
2059
|
0
|
|
2048
|
-
),
|
|
2049
|
-
|
|
2060
|
+
), d = new Set(a.map((s) => s.memoryId)).size, [p, u] = w({}), g = L((s) => {
|
|
2061
|
+
u((c) => ({
|
|
2050
2062
|
...c,
|
|
2051
|
-
[
|
|
2063
|
+
[s]: !c[s]
|
|
2052
2064
|
}));
|
|
2053
|
-
}, []), h =
|
|
2054
|
-
n:
|
|
2055
|
-
}),
|
|
2056
|
-
return a.length === 0 ? /* @__PURE__ */ r("div", { style:
|
|
2065
|
+
}, []), h = P(() => mr(a), [a]), x = d === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
|
|
2066
|
+
n: d
|
|
2067
|
+
}), b = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
|
|
2068
|
+
return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
|
|
2057
2069
|
"div",
|
|
2058
2070
|
{
|
|
2059
2071
|
style: {
|
|
@@ -2063,17 +2075,17 @@ const oe = ({
|
|
|
2063
2075
|
},
|
|
2064
2076
|
children: t.memorySearchExploreNoResults
|
|
2065
2077
|
}
|
|
2066
|
-
) }) : /* @__PURE__ */ m("div", { style:
|
|
2067
|
-
h.map((
|
|
2068
|
-
|
|
2078
|
+
) }) : /* @__PURE__ */ m("div", { style: y, children: [
|
|
2079
|
+
h.map((s) => /* @__PURE__ */ r(
|
|
2080
|
+
hr,
|
|
2069
2081
|
{
|
|
2070
|
-
group:
|
|
2082
|
+
group: s,
|
|
2071
2083
|
t,
|
|
2072
|
-
expanded:
|
|
2073
|
-
onToggle: () => g(
|
|
2084
|
+
expanded: p[s.memoryId] === !0,
|
|
2085
|
+
onToggle: () => g(s.memoryId),
|
|
2074
2086
|
onSearchResultClick: o
|
|
2075
2087
|
},
|
|
2076
|
-
|
|
2088
|
+
s.memoryId
|
|
2077
2089
|
)),
|
|
2078
2090
|
/* @__PURE__ */ r(
|
|
2079
2091
|
"div",
|
|
@@ -2084,12 +2096,12 @@ const oe = ({
|
|
|
2084
2096
|
marginTop: "4px",
|
|
2085
2097
|
fontStyle: "italic"
|
|
2086
2098
|
},
|
|
2087
|
-
children:
|
|
2099
|
+
children: b
|
|
2088
2100
|
}
|
|
2089
2101
|
)
|
|
2090
2102
|
] });
|
|
2091
2103
|
};
|
|
2092
|
-
function
|
|
2104
|
+
function fr(e) {
|
|
2093
2105
|
return {
|
|
2094
2106
|
taskType: "MemoryChat",
|
|
2095
2107
|
eventType: "Search",
|
|
@@ -2097,16 +2109,16 @@ function dr(e) {
|
|
|
2097
2109
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
2098
2110
|
};
|
|
2099
2111
|
}
|
|
2100
|
-
const
|
|
2112
|
+
const xr = ({
|
|
2101
2113
|
data: e,
|
|
2102
2114
|
isLatest: o = !1,
|
|
2103
2115
|
durationSeconds: t,
|
|
2104
2116
|
t: n,
|
|
2105
2117
|
onSearchResultClick: i
|
|
2106
2118
|
}) => {
|
|
2107
|
-
const a =
|
|
2119
|
+
const a = fr(e);
|
|
2108
2120
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
2109
|
-
|
|
2121
|
+
Q,
|
|
2110
2122
|
{
|
|
2111
2123
|
data: a,
|
|
2112
2124
|
isLatest: o,
|
|
@@ -2115,7 +2127,7 @@ const pr = ({
|
|
|
2115
2127
|
}
|
|
2116
2128
|
) : /* @__PURE__ */ m(R, { children: [
|
|
2117
2129
|
/* @__PURE__ */ r(
|
|
2118
|
-
|
|
2130
|
+
Q,
|
|
2119
2131
|
{
|
|
2120
2132
|
data: a,
|
|
2121
2133
|
isLatest: !1,
|
|
@@ -2125,7 +2137,7 @@ const pr = ({
|
|
|
2125
2137
|
}
|
|
2126
2138
|
),
|
|
2127
2139
|
/* @__PURE__ */ r(
|
|
2128
|
-
|
|
2140
|
+
ie,
|
|
2129
2141
|
{
|
|
2130
2142
|
data: {
|
|
2131
2143
|
taskType: "MemoryChat",
|
|
@@ -2138,8 +2150,8 @@ const pr = ({
|
|
|
2138
2150
|
}
|
|
2139
2151
|
)
|
|
2140
2152
|
] });
|
|
2141
|
-
},
|
|
2142
|
-
const { colors: i } =
|
|
2153
|
+
}, J = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
2154
|
+
const { colors: i } = T(), [a, l] = w(!1), d = e.titles, p = d.length > 0, u = p && d.length > J, g = u && !a ? d.slice(0, J) : d, h = d.length - J, x = !u || a, b = p ? `${n.findingMemoriesIn}${K(
|
|
2143
2155
|
g,
|
|
2144
2156
|
x ? n.and : void 0
|
|
2145
2157
|
)}` : n.findingMemories;
|
|
@@ -2153,15 +2165,15 @@ const pr = ({
|
|
|
2153
2165
|
initial: { opacity: 0, y: -10 },
|
|
2154
2166
|
animate: { opacity: 1, y: 0 },
|
|
2155
2167
|
transition: { duration: 0.3, delay: 0 },
|
|
2156
|
-
children: o && !t && !
|
|
2157
|
-
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children:
|
|
2158
|
-
|
|
2168
|
+
children: o && !t && !u ? /* @__PURE__ */ r(C, { text: b, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
|
|
2169
|
+
/* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: b }),
|
|
2170
|
+
u && !a && /* @__PURE__ */ m(R, { children: [
|
|
2159
2171
|
" ",
|
|
2160
2172
|
/* @__PURE__ */ r(
|
|
2161
2173
|
"button",
|
|
2162
2174
|
{
|
|
2163
2175
|
type: "button",
|
|
2164
|
-
onClick: () =>
|
|
2176
|
+
onClick: () => l(!0),
|
|
2165
2177
|
style: {
|
|
2166
2178
|
background: "none",
|
|
2167
2179
|
border: "none",
|
|
@@ -2179,13 +2191,13 @@ const pr = ({
|
|
|
2179
2191
|
}
|
|
2180
2192
|
)
|
|
2181
2193
|
] }),
|
|
2182
|
-
|
|
2194
|
+
u && a && /* @__PURE__ */ m(R, { children: [
|
|
2183
2195
|
" ",
|
|
2184
2196
|
/* @__PURE__ */ r(
|
|
2185
2197
|
"button",
|
|
2186
2198
|
{
|
|
2187
2199
|
type: "button",
|
|
2188
|
-
onClick: () =>
|
|
2200
|
+
onClick: () => l(!1),
|
|
2189
2201
|
style: {
|
|
2190
2202
|
background: "none",
|
|
2191
2203
|
border: "none",
|
|
@@ -2217,9 +2229,9 @@ const pr = ({
|
|
|
2217
2229
|
}
|
|
2218
2230
|
)
|
|
2219
2231
|
] });
|
|
2220
|
-
},
|
|
2221
|
-
const { colors: t } =
|
|
2222
|
-
|
|
2232
|
+
}, Z = 5, Sr = ({ data: e, t: o }) => {
|
|
2233
|
+
const { colors: t } = T(), [n, i] = w(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, p = d && l.length > Z, u = p && !n ? l.slice(0, Z) : l, g = l.length - Z, h = !p || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, b = d ? `${x}${K(
|
|
2234
|
+
u,
|
|
2223
2235
|
h ? o.and : void 0
|
|
2224
2236
|
)}` : o.memoriesFound;
|
|
2225
2237
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
@@ -2230,8 +2242,8 @@ const pr = ({
|
|
|
2230
2242
|
animate: { opacity: 1, y: 0 },
|
|
2231
2243
|
transition: { duration: 0.3, delay: 0 },
|
|
2232
2244
|
children: /* @__PURE__ */ m(R, { children: [
|
|
2233
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2234
|
-
|
|
2245
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: b }),
|
|
2246
|
+
p && !n && /* @__PURE__ */ m(R, { children: [
|
|
2235
2247
|
" ",
|
|
2236
2248
|
/* @__PURE__ */ r(
|
|
2237
2249
|
"button",
|
|
@@ -2255,7 +2267,7 @@ const pr = ({
|
|
|
2255
2267
|
}
|
|
2256
2268
|
)
|
|
2257
2269
|
] }),
|
|
2258
|
-
|
|
2270
|
+
p && n && /* @__PURE__ */ m(R, { children: [
|
|
2259
2271
|
" ",
|
|
2260
2272
|
/* @__PURE__ */ r(
|
|
2261
2273
|
"button",
|
|
@@ -2280,8 +2292,8 @@ const pr = ({
|
|
|
2280
2292
|
] })
|
|
2281
2293
|
}
|
|
2282
2294
|
) });
|
|
2283
|
-
},
|
|
2284
|
-
const { colors: n } =
|
|
2295
|
+
}, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
2296
|
+
const { colors: n } = T(), i = t.addingSources;
|
|
2285
2297
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2286
2298
|
/* @__PURE__ */ r(
|
|
2287
2299
|
v.div,
|
|
@@ -2312,7 +2324,7 @@ const pr = ({
|
|
|
2312
2324
|
)
|
|
2313
2325
|
] });
|
|
2314
2326
|
};
|
|
2315
|
-
function
|
|
2327
|
+
function br(e, o) {
|
|
2316
2328
|
if (e.length === 0) return "";
|
|
2317
2329
|
if (e.length === 1)
|
|
2318
2330
|
return k(o.pageSingle, { n: e[0] });
|
|
@@ -2324,8 +2336,8 @@ function gr(e, o) {
|
|
|
2324
2336
|
const t = e[e.length - 1], n = e.slice(0, -1).join(", ");
|
|
2325
2337
|
return k(o.pageMultiple, { list: n, n: t });
|
|
2326
2338
|
}
|
|
2327
|
-
const
|
|
2328
|
-
const { colors: n } =
|
|
2339
|
+
const Me = ({ data: e, onSourceClick: o, t }) => {
|
|
2340
|
+
const { colors: n } = T(), [i, a] = w(null);
|
|
2329
2341
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2330
2342
|
/* @__PURE__ */ r(
|
|
2331
2343
|
v.div,
|
|
@@ -2344,20 +2356,20 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2344
2356
|
children: t.sources
|
|
2345
2357
|
}
|
|
2346
2358
|
),
|
|
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
|
-
|
|
2359
|
+
/* @__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(
|
|
2360
|
+
Tr,
|
|
2349
2361
|
{
|
|
2350
|
-
source:
|
|
2351
|
-
index:
|
|
2362
|
+
source: l,
|
|
2363
|
+
index: d,
|
|
2352
2364
|
loadingMemoryId: i,
|
|
2353
2365
|
setLoadingMemoryId: a,
|
|
2354
2366
|
onSourceClick: o,
|
|
2355
2367
|
t
|
|
2356
2368
|
},
|
|
2357
|
-
|
|
2369
|
+
l.memoryId
|
|
2358
2370
|
)) })
|
|
2359
2371
|
] });
|
|
2360
|
-
},
|
|
2372
|
+
}, Tr = ({
|
|
2361
2373
|
source: e,
|
|
2362
2374
|
index: o,
|
|
2363
2375
|
loadingMemoryId: t,
|
|
@@ -2365,7 +2377,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2365
2377
|
onSourceClick: i,
|
|
2366
2378
|
t: a
|
|
2367
2379
|
}) => {
|
|
2368
|
-
const { colors:
|
|
2380
|
+
const { colors: l } = T(), [d, p] = w(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
|
|
2369
2381
|
return /* @__PURE__ */ m(
|
|
2370
2382
|
v.div,
|
|
2371
2383
|
{
|
|
@@ -2373,7 +2385,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2373
2385
|
initial: { opacity: 0, scale: 0.9 },
|
|
2374
2386
|
animate: { opacity: 1, scale: 1 },
|
|
2375
2387
|
transition: { duration: 0.25, delay: o * 0.05 },
|
|
2376
|
-
onClick:
|
|
2388
|
+
onClick: u && !g ? async () => {
|
|
2377
2389
|
n(e.memoryId);
|
|
2378
2390
|
try {
|
|
2379
2391
|
await i({
|
|
@@ -2387,17 +2399,17 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2387
2399
|
n(null);
|
|
2388
2400
|
}
|
|
2389
2401
|
} : void 0,
|
|
2390
|
-
onMouseEnter:
|
|
2391
|
-
onMouseLeave:
|
|
2402
|
+
onMouseEnter: u && !g ? () => p(!0) : void 0,
|
|
2403
|
+
onMouseLeave: u && !g ? () => p(!1) : void 0,
|
|
2392
2404
|
style: {
|
|
2393
2405
|
display: "inline-flex",
|
|
2394
2406
|
flexDirection: "column",
|
|
2395
2407
|
gap: "4px",
|
|
2396
2408
|
padding: "8px 12px",
|
|
2397
2409
|
borderRadius: "6px",
|
|
2398
|
-
border: `1px solid ${
|
|
2399
|
-
backgroundColor:
|
|
2400
|
-
cursor:
|
|
2410
|
+
border: `1px solid ${l.borderStrong}`,
|
|
2411
|
+
backgroundColor: d ? l.sourcesBadgeBg : l.transparent,
|
|
2412
|
+
cursor: u && !g ? "pointer" : g ? "wait" : "default",
|
|
2401
2413
|
transition: "background-color 0.15s ease",
|
|
2402
2414
|
userSelect: "none",
|
|
2403
2415
|
pointerEvents: g ? "none" : void 0
|
|
@@ -2409,7 +2421,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2409
2421
|
style: {
|
|
2410
2422
|
fontSize: "13px",
|
|
2411
2423
|
fontWeight: 500,
|
|
2412
|
-
color:
|
|
2424
|
+
color: l.textPrimary,
|
|
2413
2425
|
display: "inline-flex",
|
|
2414
2426
|
alignItems: "center",
|
|
2415
2427
|
gap: 8
|
|
@@ -2426,19 +2438,19 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2426
2438
|
]
|
|
2427
2439
|
}
|
|
2428
2440
|
),
|
|
2429
|
-
x && /* @__PURE__ */ r("span", { style: { fontSize: "12px", color:
|
|
2441
|
+
x && /* @__PURE__ */ r("span", { style: { fontSize: "12px", color: l.textSecondary }, children: x })
|
|
2430
2442
|
]
|
|
2431
2443
|
}
|
|
2432
2444
|
);
|
|
2433
|
-
},
|
|
2445
|
+
}, q = ({
|
|
2434
2446
|
color: e,
|
|
2435
2447
|
size: o = 32,
|
|
2436
2448
|
lineWidth: t = 2
|
|
2437
2449
|
}) => {
|
|
2438
|
-
const { colors: n } =
|
|
2450
|
+
const { colors: n } = T(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, d = (o - a) / 2, p = {
|
|
2439
2451
|
position: "absolute",
|
|
2440
|
-
left:
|
|
2441
|
-
top:
|
|
2452
|
+
left: l,
|
|
2453
|
+
top: d,
|
|
2442
2454
|
width: t,
|
|
2443
2455
|
height: a,
|
|
2444
2456
|
backgroundColor: i
|
|
@@ -2457,7 +2469,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2457
2469
|
"span",
|
|
2458
2470
|
{
|
|
2459
2471
|
style: {
|
|
2460
|
-
...
|
|
2472
|
+
...p,
|
|
2461
2473
|
transform: "rotate(45deg)"
|
|
2462
2474
|
}
|
|
2463
2475
|
}
|
|
@@ -2466,7 +2478,7 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2466
2478
|
"span",
|
|
2467
2479
|
{
|
|
2468
2480
|
style: {
|
|
2469
|
-
...
|
|
2481
|
+
...p,
|
|
2470
2482
|
transform: "rotate(-45deg)"
|
|
2471
2483
|
}
|
|
2472
2484
|
}
|
|
@@ -2475,26 +2487,26 @@ const ve = ({ data: e, onSourceClick: o, t }) => {
|
|
|
2475
2487
|
}
|
|
2476
2488
|
);
|
|
2477
2489
|
};
|
|
2478
|
-
function
|
|
2490
|
+
function vr({
|
|
2479
2491
|
memory: e,
|
|
2480
2492
|
completed: o
|
|
2481
2493
|
}) {
|
|
2482
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2494
|
+
return e.error != null ? /* @__PURE__ */ r(q, { 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
2495
|
}
|
|
2484
|
-
const
|
|
2485
|
-
function
|
|
2496
|
+
const de = 80;
|
|
2497
|
+
function wr({
|
|
2486
2498
|
memory: e,
|
|
2487
2499
|
completed: o,
|
|
2488
2500
|
t
|
|
2489
2501
|
}) {
|
|
2490
|
-
const { colors: n } =
|
|
2502
|
+
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
2503
|
return /* @__PURE__ */ m(
|
|
2492
2504
|
v.div,
|
|
2493
2505
|
{
|
|
2494
2506
|
initial: { opacity: 0 },
|
|
2495
2507
|
animate: { opacity: 1 },
|
|
2496
2508
|
transition: { duration: 0.25 },
|
|
2497
|
-
onClick:
|
|
2509
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
2498
2510
|
style: {
|
|
2499
2511
|
paddingTop: "12px",
|
|
2500
2512
|
paddingBottom: "12px",
|
|
@@ -2504,7 +2516,7 @@ function fr({
|
|
|
2504
2516
|
alignItems: "center",
|
|
2505
2517
|
gap: "10px",
|
|
2506
2518
|
minWidth: 0,
|
|
2507
|
-
cursor:
|
|
2519
|
+
cursor: u ? "pointer" : "default"
|
|
2508
2520
|
},
|
|
2509
2521
|
children: [
|
|
2510
2522
|
/* @__PURE__ */ r(
|
|
@@ -2517,7 +2529,7 @@ function fr({
|
|
|
2517
2529
|
flexShrink: 0,
|
|
2518
2530
|
width: 32
|
|
2519
2531
|
},
|
|
2520
|
-
children: /* @__PURE__ */ r(
|
|
2532
|
+
children: /* @__PURE__ */ r(vr, { memory: e, completed: o })
|
|
2521
2533
|
}
|
|
2522
2534
|
),
|
|
2523
2535
|
/* @__PURE__ */ m(
|
|
@@ -2537,7 +2549,7 @@ function fr({
|
|
|
2537
2549
|
children: e.memoryTitle
|
|
2538
2550
|
}
|
|
2539
2551
|
),
|
|
2540
|
-
|
|
2552
|
+
p != null && /* @__PURE__ */ r(
|
|
2541
2553
|
"span",
|
|
2542
2554
|
{
|
|
2543
2555
|
style: {
|
|
@@ -2546,10 +2558,10 @@ function fr({
|
|
|
2546
2558
|
lineHeight: 1.4,
|
|
2547
2559
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
2548
2560
|
},
|
|
2549
|
-
children:
|
|
2561
|
+
children: p
|
|
2550
2562
|
}
|
|
2551
2563
|
),
|
|
2552
|
-
|
|
2564
|
+
u && /* @__PURE__ */ r(
|
|
2553
2565
|
"span",
|
|
2554
2566
|
{
|
|
2555
2567
|
style: {
|
|
@@ -2567,27 +2579,27 @@ function fr({
|
|
|
2567
2579
|
}
|
|
2568
2580
|
);
|
|
2569
2581
|
}
|
|
2570
|
-
const
|
|
2571
|
-
|
|
2582
|
+
const Cr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
|
|
2583
|
+
wr,
|
|
2572
2584
|
{
|
|
2573
2585
|
memory: n,
|
|
2574
2586
|
completed: o,
|
|
2575
2587
|
t
|
|
2576
2588
|
},
|
|
2577
2589
|
n.memoryId
|
|
2578
|
-
)) }),
|
|
2579
|
-
function
|
|
2590
|
+
)) }), pe = 80;
|
|
2591
|
+
function Mr(e) {
|
|
2580
2592
|
try {
|
|
2581
2593
|
return new URL(e).hostname;
|
|
2582
2594
|
} catch {
|
|
2583
2595
|
return e;
|
|
2584
2596
|
}
|
|
2585
2597
|
}
|
|
2586
|
-
function
|
|
2598
|
+
function Er({
|
|
2587
2599
|
item: e,
|
|
2588
2600
|
t: o
|
|
2589
2601
|
}) {
|
|
2590
|
-
const { colors: t } =
|
|
2602
|
+
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
2603
|
return /* @__PURE__ */ m(
|
|
2592
2604
|
"div",
|
|
2593
2605
|
{
|
|
@@ -2611,11 +2623,11 @@ function Sr({
|
|
|
2611
2623
|
textDecoration: "none",
|
|
2612
2624
|
wordBreak: "break-word"
|
|
2613
2625
|
},
|
|
2614
|
-
onMouseEnter: (
|
|
2615
|
-
|
|
2626
|
+
onMouseEnter: (p) => {
|
|
2627
|
+
p.currentTarget.style.color = t.link;
|
|
2616
2628
|
},
|
|
2617
|
-
onMouseLeave: (
|
|
2618
|
-
|
|
2629
|
+
onMouseLeave: (p) => {
|
|
2630
|
+
p.currentTarget.style.color = t.textPrimary;
|
|
2619
2631
|
},
|
|
2620
2632
|
children: e.title
|
|
2621
2633
|
}
|
|
@@ -2631,27 +2643,27 @@ function Sr({
|
|
|
2631
2643
|
children: [
|
|
2632
2644
|
e.rank,
|
|
2633
2645
|
". ",
|
|
2634
|
-
|
|
2646
|
+
Mr(e.link)
|
|
2635
2647
|
]
|
|
2636
2648
|
}
|
|
2637
2649
|
),
|
|
2638
|
-
|
|
2650
|
+
d != null && /* @__PURE__ */ m(R, { children: [
|
|
2639
2651
|
/* @__PURE__ */ r(
|
|
2640
2652
|
"span",
|
|
2641
2653
|
{
|
|
2642
|
-
onClick:
|
|
2654
|
+
onClick: l ? () => i((p) => !p) : void 0,
|
|
2643
2655
|
style: {
|
|
2644
2656
|
fontSize: 13,
|
|
2645
2657
|
color: t.textSecondary,
|
|
2646
2658
|
lineHeight: 1.5,
|
|
2647
2659
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
2648
2660
|
wordBreak: "break-word",
|
|
2649
|
-
cursor:
|
|
2661
|
+
cursor: l ? "pointer" : "default"
|
|
2650
2662
|
},
|
|
2651
|
-
children:
|
|
2663
|
+
children: d
|
|
2652
2664
|
}
|
|
2653
2665
|
),
|
|
2654
|
-
|
|
2666
|
+
l && /* @__PURE__ */ r(
|
|
2655
2667
|
"span",
|
|
2656
2668
|
{
|
|
2657
2669
|
style: {
|
|
@@ -2667,7 +2679,7 @@ function Sr({
|
|
|
2667
2679
|
}
|
|
2668
2680
|
);
|
|
2669
2681
|
}
|
|
2670
|
-
function
|
|
2682
|
+
function Ee(e, o) {
|
|
2671
2683
|
const t = e.input.countryCode, n = e.input.query;
|
|
2672
2684
|
return t != null && t !== "" ? k(o.googleSearchingForWithCountry, {
|
|
2673
2685
|
query: n,
|
|
@@ -2676,13 +2688,13 @@ function we(e, o) {
|
|
|
2676
2688
|
query: n
|
|
2677
2689
|
});
|
|
2678
2690
|
}
|
|
2679
|
-
function
|
|
2691
|
+
function Rr({
|
|
2680
2692
|
data: e,
|
|
2681
2693
|
isLatest: o,
|
|
2682
2694
|
durationSeconds: t,
|
|
2683
2695
|
t: n
|
|
2684
2696
|
}) {
|
|
2685
|
-
const { colors: i } =
|
|
2697
|
+
const { colors: i } = T(), a = Ee(e, n);
|
|
2686
2698
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2687
2699
|
/* @__PURE__ */ r(
|
|
2688
2700
|
v.div,
|
|
@@ -2708,13 +2720,13 @@ function br({
|
|
|
2708
2720
|
)
|
|
2709
2721
|
] });
|
|
2710
2722
|
}
|
|
2711
|
-
function
|
|
2723
|
+
function Ir({
|
|
2712
2724
|
data: e,
|
|
2713
2725
|
t: o
|
|
2714
2726
|
}) {
|
|
2715
|
-
const { colors: t } =
|
|
2716
|
-
return
|
|
2717
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2727
|
+
const { colors: t } = T(), [n, i] = w(!1), a = P(() => [...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);
|
|
2728
|
+
return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2729
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2718
2730
|
/* @__PURE__ */ r(
|
|
2719
2731
|
"div",
|
|
2720
2732
|
{
|
|
@@ -2727,7 +2739,7 @@ function Tr({
|
|
|
2727
2739
|
}
|
|
2728
2740
|
)
|
|
2729
2741
|
] }) : /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
2730
|
-
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children:
|
|
2742
|
+
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
|
|
2731
2743
|
/* @__PURE__ */ m(
|
|
2732
2744
|
v.div,
|
|
2733
2745
|
{
|
|
@@ -2752,14 +2764,14 @@ function Tr({
|
|
|
2752
2764
|
color: t.textSecondary,
|
|
2753
2765
|
whiteSpace: "nowrap"
|
|
2754
2766
|
},
|
|
2755
|
-
children:
|
|
2767
|
+
children: d
|
|
2756
2768
|
}
|
|
2757
2769
|
),
|
|
2758
2770
|
/* @__PURE__ */ r(
|
|
2759
2771
|
"button",
|
|
2760
2772
|
{
|
|
2761
2773
|
type: "button",
|
|
2762
|
-
onClick: () => i((
|
|
2774
|
+
onClick: () => i((u) => !u),
|
|
2763
2775
|
style: {
|
|
2764
2776
|
border: "none",
|
|
2765
2777
|
background: "none",
|
|
@@ -2787,7 +2799,7 @@ function Tr({
|
|
|
2787
2799
|
paddingTop: 8,
|
|
2788
2800
|
borderTop: `1px solid ${t.borderDivider}`
|
|
2789
2801
|
},
|
|
2790
|
-
children: a.map((
|
|
2802
|
+
children: a.map((u, g) => /* @__PURE__ */ r(
|
|
2791
2803
|
"div",
|
|
2792
2804
|
{
|
|
2793
2805
|
style: {
|
|
@@ -2796,29 +2808,29 @@ function Tr({
|
|
|
2796
2808
|
borderBottom: g < a.length - 1 ? `1px solid ${t.border}` : void 0,
|
|
2797
2809
|
minWidth: 0
|
|
2798
2810
|
},
|
|
2799
|
-
children: /* @__PURE__ */ r(
|
|
2811
|
+
children: /* @__PURE__ */ r(Er, { item: u, t: o })
|
|
2800
2812
|
},
|
|
2801
|
-
`${
|
|
2813
|
+
`${u.link}-${u.rank}-${g}`
|
|
2802
2814
|
))
|
|
2803
2815
|
}
|
|
2804
2816
|
)
|
|
2805
2817
|
] });
|
|
2806
2818
|
}
|
|
2807
|
-
const
|
|
2819
|
+
const Fr = ({
|
|
2808
2820
|
data: e,
|
|
2809
2821
|
isLatest: o = !1,
|
|
2810
2822
|
durationSeconds: t,
|
|
2811
2823
|
t: n
|
|
2812
2824
|
}) => e.results === void 0 ? /* @__PURE__ */ r(
|
|
2813
|
-
|
|
2825
|
+
Rr,
|
|
2814
2826
|
{
|
|
2815
2827
|
data: e,
|
|
2816
2828
|
isLatest: o,
|
|
2817
2829
|
durationSeconds: t,
|
|
2818
2830
|
t: n
|
|
2819
2831
|
}
|
|
2820
|
-
) : /* @__PURE__ */ r(
|
|
2821
|
-
function
|
|
2832
|
+
) : /* @__PURE__ */ r(Ir, { data: e, t: n });
|
|
2833
|
+
function Re(e, o) {
|
|
2822
2834
|
if (e.error != null)
|
|
2823
2835
|
return null;
|
|
2824
2836
|
switch (e.status) {
|
|
@@ -2834,16 +2846,16 @@ function Ce(e, o) {
|
|
|
2834
2846
|
return null;
|
|
2835
2847
|
}
|
|
2836
2848
|
}
|
|
2837
|
-
function
|
|
2849
|
+
function Pr(e) {
|
|
2838
2850
|
var o;
|
|
2839
2851
|
return e.error != null ? !0 : e.status != null ? !1 : (((o = e.summary) == null ? void 0 : o.length) ?? 0) > 0;
|
|
2840
2852
|
}
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2843
|
-
),
|
|
2844
|
-
5 *
|
|
2853
|
+
const ue = 80, ae = 12, le = 1.4, zr = Math.ceil(
|
|
2854
|
+
ae * le
|
|
2855
|
+
), Br = Math.ceil(
|
|
2856
|
+
5 * ae * le
|
|
2845
2857
|
);
|
|
2846
|
-
function
|
|
2858
|
+
function Ie(e, o = 48) {
|
|
2847
2859
|
try {
|
|
2848
2860
|
const t = new URL(e), n = t.pathname.length > o ? `${t.pathname.slice(0, o)}…` : t.pathname, i = n === "/" ? "" : n;
|
|
2849
2861
|
return `${t.hostname}${i}${t.search ? "…" : ""}`;
|
|
@@ -2851,20 +2863,20 @@ function Me(e, o = 48) {
|
|
|
2851
2863
|
return e.length > 64 ? `${e.slice(0, 64)}…` : e;
|
|
2852
2864
|
}
|
|
2853
2865
|
}
|
|
2854
|
-
function
|
|
2855
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2866
|
+
function Lr({ item: e }) {
|
|
2867
|
+
return e.error != null ? /* @__PURE__ */ r(q, { 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
2868
|
}
|
|
2857
|
-
function
|
|
2858
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
2869
|
+
function Ar({ item: e }) {
|
|
2870
|
+
return e.error != null ? /* @__PURE__ */ r(q, { 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
2871
|
}
|
|
2860
|
-
function
|
|
2872
|
+
function Dr({
|
|
2861
2873
|
item: e,
|
|
2862
2874
|
t: o,
|
|
2863
2875
|
isLatest: t = !1
|
|
2864
2876
|
}) {
|
|
2865
|
-
const { colors: n } =
|
|
2866
|
-
return
|
|
2867
|
-
const x =
|
|
2877
|
+
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 === "");
|
|
2878
|
+
return H(() => {
|
|
2879
|
+
const x = d.current;
|
|
2868
2880
|
x != null && a && (x.scrollTop = x.scrollHeight);
|
|
2869
2881
|
}, [i, a]), /* @__PURE__ */ m(
|
|
2870
2882
|
v.div,
|
|
@@ -2891,7 +2903,7 @@ function Ir({
|
|
|
2891
2903
|
width: 32,
|
|
2892
2904
|
...h || !g ? {} : { paddingTop: 2 }
|
|
2893
2905
|
},
|
|
2894
|
-
children: /* @__PURE__ */ r(
|
|
2906
|
+
children: /* @__PURE__ */ r(Ar, { item: e })
|
|
2895
2907
|
}
|
|
2896
2908
|
),
|
|
2897
2909
|
/* @__PURE__ */ m(
|
|
@@ -2924,10 +2936,10 @@ function Ir({
|
|
|
2924
2936
|
onMouseLeave: (x) => {
|
|
2925
2937
|
x.currentTarget.style.textDecoration = "none";
|
|
2926
2938
|
},
|
|
2927
|
-
children:
|
|
2939
|
+
children: Ie(e.url)
|
|
2928
2940
|
}
|
|
2929
2941
|
),
|
|
2930
|
-
!a &&
|
|
2942
|
+
!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
2943
|
a && /* @__PURE__ */ r(
|
|
2932
2944
|
"div",
|
|
2933
2945
|
{
|
|
@@ -2940,18 +2952,18 @@ function Ir({
|
|
|
2940
2952
|
children: /* @__PURE__ */ r(
|
|
2941
2953
|
"div",
|
|
2942
2954
|
{
|
|
2943
|
-
ref:
|
|
2955
|
+
ref: d,
|
|
2944
2956
|
style: {
|
|
2945
|
-
minHeight:
|
|
2946
|
-
maxHeight:
|
|
2957
|
+
minHeight: zr,
|
|
2958
|
+
maxHeight: Br,
|
|
2947
2959
|
height: "auto",
|
|
2948
2960
|
overflowY: "auto",
|
|
2949
2961
|
overflowX: "hidden",
|
|
2950
|
-
fontSize:
|
|
2951
|
-
lineHeight:
|
|
2962
|
+
fontSize: ae,
|
|
2963
|
+
lineHeight: le,
|
|
2952
2964
|
whiteSpace: "pre-wrap",
|
|
2953
2965
|
wordBreak: "break-word",
|
|
2954
|
-
color:
|
|
2966
|
+
color: l ? n.textError : n.textTertiary
|
|
2955
2967
|
},
|
|
2956
2968
|
children: i
|
|
2957
2969
|
}
|
|
@@ -2965,11 +2977,11 @@ function Ir({
|
|
|
2965
2977
|
}
|
|
2966
2978
|
);
|
|
2967
2979
|
}
|
|
2968
|
-
function
|
|
2980
|
+
function Wr({
|
|
2969
2981
|
item: e,
|
|
2970
2982
|
t: o
|
|
2971
2983
|
}) {
|
|
2972
|
-
const { colors: t } =
|
|
2984
|
+
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
2985
|
return /* @__PURE__ */ m(
|
|
2974
2986
|
v.div,
|
|
2975
2987
|
{
|
|
@@ -2995,7 +3007,7 @@ function Fr({
|
|
|
2995
3007
|
width: 32,
|
|
2996
3008
|
...g ? {} : { paddingTop: 2 }
|
|
2997
3009
|
},
|
|
2998
|
-
children: /* @__PURE__ */ r(
|
|
3010
|
+
children: /* @__PURE__ */ r(Lr, { item: e })
|
|
2999
3011
|
}
|
|
3000
3012
|
),
|
|
3001
3013
|
/* @__PURE__ */ m(
|
|
@@ -3028,10 +3040,10 @@ function Fr({
|
|
|
3028
3040
|
onMouseLeave: (h) => {
|
|
3029
3041
|
h.currentTarget.style.textDecoration = "none";
|
|
3030
3042
|
},
|
|
3031
|
-
children:
|
|
3043
|
+
children: Ie(e.url)
|
|
3032
3044
|
}
|
|
3033
3045
|
),
|
|
3034
|
-
|
|
3046
|
+
p == null && u != null && /* @__PURE__ */ r(
|
|
3035
3047
|
"span",
|
|
3036
3048
|
{
|
|
3037
3049
|
style: {
|
|
@@ -3039,26 +3051,26 @@ function Fr({
|
|
|
3039
3051
|
color: t.textTertiary,
|
|
3040
3052
|
lineHeight: 1.4
|
|
3041
3053
|
},
|
|
3042
|
-
children:
|
|
3054
|
+
children: u
|
|
3043
3055
|
}
|
|
3044
3056
|
),
|
|
3045
|
-
|
|
3057
|
+
p != null && /* @__PURE__ */ m(R, { children: [
|
|
3046
3058
|
/* @__PURE__ */ r(
|
|
3047
3059
|
"span",
|
|
3048
3060
|
{
|
|
3049
|
-
onClick:
|
|
3061
|
+
onClick: d ? () => i((h) => !h) : void 0,
|
|
3050
3062
|
style: {
|
|
3051
3063
|
fontSize: 12,
|
|
3052
|
-
color:
|
|
3064
|
+
color: l ? t.textError : t.textSecondary,
|
|
3053
3065
|
lineHeight: 1.4,
|
|
3054
3066
|
whiteSpace: n ? "pre-wrap" : void 0,
|
|
3055
3067
|
wordBreak: "break-word",
|
|
3056
|
-
cursor:
|
|
3068
|
+
cursor: d ? "pointer" : "default"
|
|
3057
3069
|
},
|
|
3058
|
-
children:
|
|
3070
|
+
children: p
|
|
3059
3071
|
}
|
|
3060
3072
|
),
|
|
3061
|
-
|
|
3073
|
+
d && /* @__PURE__ */ r(
|
|
3062
3074
|
"span",
|
|
3063
3075
|
{
|
|
3064
3076
|
style: {
|
|
@@ -3077,7 +3089,7 @@ function Fr({
|
|
|
3077
3089
|
}
|
|
3078
3090
|
);
|
|
3079
3091
|
}
|
|
3080
|
-
function
|
|
3092
|
+
function me(e, o, t) {
|
|
3081
3093
|
return /* @__PURE__ */ r(
|
|
3082
3094
|
"div",
|
|
3083
3095
|
{
|
|
@@ -3105,13 +3117,13 @@ function pe(e, o, t) {
|
|
|
3105
3117
|
}
|
|
3106
3118
|
);
|
|
3107
3119
|
}
|
|
3108
|
-
function
|
|
3120
|
+
function $r({
|
|
3109
3121
|
data: e,
|
|
3110
3122
|
isLatest: o,
|
|
3111
3123
|
durationSeconds: t,
|
|
3112
3124
|
t: n
|
|
3113
3125
|
}) {
|
|
3114
|
-
const { colors: i } =
|
|
3126
|
+
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
3127
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3116
3128
|
/* @__PURE__ */ r(
|
|
3117
3129
|
v.div,
|
|
@@ -3120,7 +3132,7 @@ function zr({
|
|
|
3120
3132
|
initial: { opacity: 0, y: -10 },
|
|
3121
3133
|
animate: { opacity: 1, y: 0 },
|
|
3122
3134
|
transition: { duration: 0.3, delay: 0 },
|
|
3123
|
-
children: o && !t ? /* @__PURE__ */ r(C, { text:
|
|
3135
|
+
children: o && !t ? /* @__PURE__ */ r(C, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: p })
|
|
3124
3136
|
}
|
|
3125
3137
|
),
|
|
3126
3138
|
t !== void 0 && /* @__PURE__ */ r(
|
|
@@ -3137,18 +3149,18 @@ function zr({
|
|
|
3137
3149
|
)
|
|
3138
3150
|
] });
|
|
3139
3151
|
}
|
|
3140
|
-
function
|
|
3152
|
+
function Nr({
|
|
3141
3153
|
data: e,
|
|
3142
3154
|
isLatest: o = !1,
|
|
3143
3155
|
t
|
|
3144
3156
|
}) {
|
|
3145
|
-
const { colors: n } =
|
|
3146
|
-
let
|
|
3147
|
-
for (const
|
|
3148
|
-
|
|
3149
|
-
return { successCount:
|
|
3150
|
-
}, [
|
|
3151
|
-
return
|
|
3157
|
+
const { colors: n } = T(), [i, a] = w(!1), l = e.results ?? [], { successCount: d, errorCount: p } = P(() => {
|
|
3158
|
+
let s = 0, c = 0;
|
|
3159
|
+
for (const f of l)
|
|
3160
|
+
f.error != null ? c += 1 : s += 1;
|
|
3161
|
+
return { successCount: s, errorCount: c };
|
|
3162
|
+
}, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => Pr(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}`;
|
|
3163
|
+
return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
|
|
3152
3164
|
"div",
|
|
3153
3165
|
{
|
|
3154
3166
|
style: {
|
|
@@ -3173,22 +3185,22 @@ function Br({
|
|
|
3173
3185
|
gap: "6px 12px",
|
|
3174
3186
|
minWidth: 0
|
|
3175
3187
|
},
|
|
3176
|
-
children: o && !h ? /* @__PURE__ */ r(C, { text:
|
|
3188
|
+
children: o && !h ? /* @__PURE__ */ r(C, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r(
|
|
3177
3189
|
"span",
|
|
3178
3190
|
{
|
|
3179
3191
|
style: {
|
|
3180
3192
|
fontSize: 12,
|
|
3181
3193
|
color: n.textSecondary
|
|
3182
3194
|
},
|
|
3183
|
-
children:
|
|
3195
|
+
children: y
|
|
3184
3196
|
}
|
|
3185
3197
|
)
|
|
3186
3198
|
}
|
|
3187
3199
|
),
|
|
3188
|
-
|
|
3189
|
-
|
|
3200
|
+
me(l, n, (s) => /* @__PURE__ */ r(
|
|
3201
|
+
Dr,
|
|
3190
3202
|
{
|
|
3191
|
-
item:
|
|
3203
|
+
item: s,
|
|
3192
3204
|
t,
|
|
3193
3205
|
isLatest: o
|
|
3194
3206
|
}
|
|
@@ -3216,14 +3228,14 @@ function Br({
|
|
|
3216
3228
|
fontSize: 12,
|
|
3217
3229
|
color: n.textSecondary
|
|
3218
3230
|
},
|
|
3219
|
-
children:
|
|
3231
|
+
children: y
|
|
3220
3232
|
}
|
|
3221
3233
|
),
|
|
3222
3234
|
/* @__PURE__ */ r(
|
|
3223
3235
|
"button",
|
|
3224
3236
|
{
|
|
3225
3237
|
type: "button",
|
|
3226
|
-
onClick: () => a((
|
|
3238
|
+
onClick: () => a((s) => !s),
|
|
3227
3239
|
style: {
|
|
3228
3240
|
border: "none",
|
|
3229
3241
|
background: "none",
|
|
@@ -3240,11 +3252,11 @@ function Br({
|
|
|
3240
3252
|
]
|
|
3241
3253
|
}
|
|
3242
3254
|
),
|
|
3243
|
-
i &&
|
|
3255
|
+
i && me(l, n, (s) => /* @__PURE__ */ r(Wr, { item: s, t }))
|
|
3244
3256
|
] });
|
|
3245
3257
|
}
|
|
3246
|
-
const
|
|
3247
|
-
|
|
3258
|
+
const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.results === void 0 ? /* @__PURE__ */ r(
|
|
3259
|
+
$r,
|
|
3248
3260
|
{
|
|
3249
3261
|
data: e,
|
|
3250
3262
|
isLatest: o,
|
|
@@ -3252,14 +3264,14 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3252
3264
|
t: n
|
|
3253
3265
|
}
|
|
3254
3266
|
) : /* @__PURE__ */ r(
|
|
3255
|
-
|
|
3267
|
+
Nr,
|
|
3256
3268
|
{
|
|
3257
3269
|
data: e,
|
|
3258
3270
|
isLatest: o,
|
|
3259
3271
|
t: n
|
|
3260
3272
|
}
|
|
3261
|
-
),
|
|
3262
|
-
const { colors: o } =
|
|
3273
|
+
), ge = (e) => {
|
|
3274
|
+
const { colors: o } = T(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
|
|
3263
3275
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3264
3276
|
/* @__PURE__ */ r(
|
|
3265
3277
|
v.div,
|
|
@@ -3289,7 +3301,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3289
3301
|
}
|
|
3290
3302
|
)
|
|
3291
3303
|
] });
|
|
3292
|
-
},
|
|
3304
|
+
}, Gr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3293
3305
|
const i = `${n.generateReportSetup} '${e.userRequest}'`;
|
|
3294
3306
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3295
3307
|
/* @__PURE__ */ r(
|
|
@@ -3329,7 +3341,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3329
3341
|
}
|
|
3330
3342
|
)
|
|
3331
3343
|
] });
|
|
3332
|
-
},
|
|
3344
|
+
}, Or = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3333
3345
|
const i = e.fileCount === 1 ? n.generateReportExportingOne : k(n.generateReportExporting, {
|
|
3334
3346
|
n: e.fileCount
|
|
3335
3347
|
});
|
|
@@ -3371,7 +3383,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3371
3383
|
}
|
|
3372
3384
|
)
|
|
3373
3385
|
] });
|
|
3374
|
-
},
|
|
3386
|
+
}, _r = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3375
3387
|
const i = k(n.generateReportRunCode, {
|
|
3376
3388
|
title: e.title
|
|
3377
3389
|
});
|
|
@@ -3413,7 +3425,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3413
3425
|
}
|
|
3414
3426
|
)
|
|
3415
3427
|
] });
|
|
3416
|
-
},
|
|
3428
|
+
}, qr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3417
3429
|
const i = k(n.generateReportRunCommand, {
|
|
3418
3430
|
title: e.title
|
|
3419
3431
|
});
|
|
@@ -3455,7 +3467,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3455
3467
|
}
|
|
3456
3468
|
)
|
|
3457
3469
|
] });
|
|
3458
|
-
},
|
|
3470
|
+
}, Ur = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3459
3471
|
const i = k(n.generateReportAssembling, {
|
|
3460
3472
|
title: e.reportTitle
|
|
3461
3473
|
});
|
|
@@ -3497,7 +3509,7 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3497
3509
|
}
|
|
3498
3510
|
)
|
|
3499
3511
|
] });
|
|
3500
|
-
},
|
|
3512
|
+
}, Qr = ({ data: e, t: o }) => {
|
|
3501
3513
|
const t = k(o.generateReportCompleted, {
|
|
3502
3514
|
title: e.reportTitle
|
|
3503
3515
|
});
|
|
@@ -3516,54 +3528,100 @@ const Pr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
|
|
|
3516
3528
|
children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
|
|
3517
3529
|
}
|
|
3518
3530
|
) });
|
|
3519
|
-
}
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
+
}, V = 12, X = 1.45, jr = Math.ceil(
|
|
3532
|
+
V * X
|
|
3533
|
+
), he = Math.ceil(
|
|
3534
|
+
5 * V * X
|
|
3535
|
+
), Fe = ({
|
|
3536
|
+
text: e,
|
|
3537
|
+
streaming: o = !1,
|
|
3538
|
+
collapsed: t = !1,
|
|
3539
|
+
label: n
|
|
3540
|
+
}) => {
|
|
3541
|
+
const { colors: i } = T(), a = A(null);
|
|
3542
|
+
return je(() => {
|
|
3543
|
+
const l = a.current;
|
|
3544
|
+
if (l == null || !o || e.length === 0)
|
|
3545
|
+
return;
|
|
3546
|
+
const d = () => {
|
|
3547
|
+
l.scrollTop = l.scrollHeight;
|
|
3548
|
+
};
|
|
3549
|
+
d(), requestAnimationFrame(d);
|
|
3550
|
+
}, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
|
|
3551
|
+
n != null && n.length > 0 && /* @__PURE__ */ r(
|
|
3552
|
+
"span",
|
|
3531
3553
|
{
|
|
3532
3554
|
style: {
|
|
3533
|
-
display: "
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3555
|
+
display: "block",
|
|
3556
|
+
fontSize: 11,
|
|
3557
|
+
color: i.textMuted,
|
|
3558
|
+
marginBottom: 4,
|
|
3559
|
+
fontWeight: 500
|
|
3537
3560
|
},
|
|
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 })
|
|
3561
|
+
children: n
|
|
3542
3562
|
}
|
|
3543
3563
|
),
|
|
3544
|
-
|
|
3564
|
+
/* @__PURE__ */ r(
|
|
3545
3565
|
"div",
|
|
3546
3566
|
{
|
|
3547
3567
|
style: {
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3568
|
+
backgroundColor: i.reasoningBg,
|
|
3569
|
+
borderRadius: 6,
|
|
3570
|
+
padding: "8px 10px",
|
|
3571
|
+
boxSizing: "border-box"
|
|
3552
3572
|
},
|
|
3553
|
-
children:
|
|
3573
|
+
children: /* @__PURE__ */ r(
|
|
3574
|
+
"div",
|
|
3575
|
+
{
|
|
3576
|
+
ref: a,
|
|
3577
|
+
className: "memory-search-generating-reasoning-viewport",
|
|
3578
|
+
style: {
|
|
3579
|
+
minHeight: jr,
|
|
3580
|
+
...o ? {
|
|
3581
|
+
maxHeight: he,
|
|
3582
|
+
overflowY: "auto"
|
|
3583
|
+
} : t ? {
|
|
3584
|
+
maxHeight: he,
|
|
3585
|
+
overflowY: "hidden"
|
|
3586
|
+
} : {},
|
|
3587
|
+
height: "auto",
|
|
3588
|
+
overflowX: "hidden",
|
|
3589
|
+
fontSize: V,
|
|
3590
|
+
lineHeight: X,
|
|
3591
|
+
whiteSpace: "pre-wrap",
|
|
3592
|
+
wordBreak: "break-word",
|
|
3593
|
+
color: i.textTertiary
|
|
3594
|
+
},
|
|
3595
|
+
children: e
|
|
3596
|
+
}
|
|
3597
|
+
)
|
|
3554
3598
|
}
|
|
3555
3599
|
)
|
|
3556
3600
|
] });
|
|
3557
|
-
}
|
|
3601
|
+
};
|
|
3602
|
+
function _(e) {
|
|
3603
|
+
return e.text != null && e.text.length > 0;
|
|
3604
|
+
}
|
|
3605
|
+
function U(e) {
|
|
3606
|
+
return e.technicalReasoning != null && e.technicalReasoning.length > 0;
|
|
3607
|
+
}
|
|
3608
|
+
function Kr(e, o) {
|
|
3609
|
+
const t = new Date(e).getTime(), n = new Date(o).getTime();
|
|
3610
|
+
return Math.max(0, Math.round((n - t) / 1e3));
|
|
3611
|
+
}
|
|
3612
|
+
function Vr(e) {
|
|
3613
|
+
return _(e) ? 3 : e.reasoningCompleted === !0 ? 2 : (U(e), 1);
|
|
3614
|
+
}
|
|
3615
|
+
const Xr = ({
|
|
3558
3616
|
data: e,
|
|
3559
|
-
|
|
3560
|
-
|
|
3617
|
+
createdAt: o,
|
|
3618
|
+
timestamp: t,
|
|
3561
3619
|
t: n,
|
|
3562
3620
|
onMemoryClick: i
|
|
3563
3621
|
}) => {
|
|
3564
|
-
const { colors: a } = b(), s = o
|
|
3622
|
+
const { colors: a } = T(), l = !_(e), d = !U(e) && !_(e), p = Vr(e), [u, g] = w(!1), h = U(e) && e.reasoningCompleted !== !0, x = p === 2 && l, b = d && l, y = U(e) && !h, s = _(e) ? Kr(o, t) : void 0;
|
|
3565
3623
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3566
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ m(
|
|
3567
3625
|
v.div,
|
|
3568
3626
|
{
|
|
3569
3627
|
style: {
|
|
@@ -3576,19 +3634,84 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3576
3634
|
initial: { opacity: 0, y: -10 },
|
|
3577
3635
|
animate: { opacity: 1, y: 0 },
|
|
3578
3636
|
transition: { duration: 0.3, delay: 0 },
|
|
3579
|
-
children:
|
|
3637
|
+
children: [
|
|
3638
|
+
/* @__PURE__ */ r(
|
|
3639
|
+
"div",
|
|
3640
|
+
{
|
|
3641
|
+
style: {
|
|
3642
|
+
display: "flex",
|
|
3643
|
+
alignItems: "center",
|
|
3644
|
+
justifyContent: "center",
|
|
3645
|
+
flexShrink: 0,
|
|
3646
|
+
width: 32
|
|
3647
|
+
},
|
|
3648
|
+
children: _(e) ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
|
|
3649
|
+
}
|
|
3650
|
+
),
|
|
3651
|
+
b ? /* @__PURE__ */ r(C, { text: n.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: n.explorePlanning })
|
|
3652
|
+
]
|
|
3580
3653
|
}
|
|
3581
3654
|
),
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
|
|
3655
|
+
U(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
|
|
3656
|
+
/* @__PURE__ */ r(
|
|
3657
|
+
Fe,
|
|
3658
|
+
{
|
|
3659
|
+
text: e.technicalReasoning,
|
|
3660
|
+
streaming: h,
|
|
3661
|
+
collapsed: !h && !u,
|
|
3662
|
+
label: n.memorySearchQueryReasoningLabel
|
|
3663
|
+
}
|
|
3664
|
+
),
|
|
3665
|
+
y && /* @__PURE__ */ r(
|
|
3666
|
+
"button",
|
|
3667
|
+
{
|
|
3668
|
+
type: "button",
|
|
3669
|
+
onClick: () => g((c) => !c),
|
|
3670
|
+
style: {
|
|
3671
|
+
alignSelf: "flex-start",
|
|
3672
|
+
border: "none",
|
|
3673
|
+
background: "none",
|
|
3674
|
+
padding: 0,
|
|
3675
|
+
marginTop: 8,
|
|
3676
|
+
cursor: "pointer",
|
|
3677
|
+
fontSize: 12,
|
|
3678
|
+
color: a.textSecondary,
|
|
3679
|
+
textDecoration: "underline"
|
|
3680
|
+
},
|
|
3681
|
+
children: u ? n.memorySearchHideReasoning : n.memorySearchViewReasoning
|
|
3682
|
+
}
|
|
3683
|
+
)
|
|
3684
|
+
] }),
|
|
3685
|
+
x && /* @__PURE__ */ r("div", { style: { marginTop: 8, color: a.textSecondary }, children: /* @__PURE__ */ r(
|
|
3686
|
+
C,
|
|
3687
|
+
{
|
|
3688
|
+
text: n.explorePlanningUserPlanPending,
|
|
3689
|
+
duration: 2.5,
|
|
3690
|
+
repeat: !0
|
|
3691
|
+
}
|
|
3692
|
+
) }),
|
|
3693
|
+
_(e) && /* @__PURE__ */ r("div", { style: { marginTop: p === 3 && !d ? 0 : 8 }, children: /* @__PURE__ */ r(
|
|
3694
|
+
N,
|
|
3584
3695
|
{
|
|
3585
3696
|
text: e.text,
|
|
3586
3697
|
onMemoryClick: i
|
|
3587
3698
|
}
|
|
3699
|
+
) }),
|
|
3700
|
+
s !== void 0 && /* @__PURE__ */ r(
|
|
3701
|
+
"div",
|
|
3702
|
+
{
|
|
3703
|
+
style: {
|
|
3704
|
+
fontSize: "12px",
|
|
3705
|
+
color: a.textMuted,
|
|
3706
|
+
marginTop: "4px",
|
|
3707
|
+
fontStyle: "italic"
|
|
3708
|
+
},
|
|
3709
|
+
children: k(n.tookSeconds, { n: s })
|
|
3710
|
+
}
|
|
3588
3711
|
)
|
|
3589
3712
|
] });
|
|
3590
|
-
},
|
|
3591
|
-
const { colors: i } =
|
|
3713
|
+
}, Yr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3714
|
+
const { colors: i } = T(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
|
|
3592
3715
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3593
3716
|
/* @__PURE__ */ r(
|
|
3594
3717
|
v.div,
|
|
@@ -3618,8 +3741,8 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3618
3741
|
}
|
|
3619
3742
|
)
|
|
3620
3743
|
] });
|
|
3621
|
-
},
|
|
3622
|
-
const { colors: i } =
|
|
3744
|
+
}, Jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
3745
|
+
const { colors: i } = T(), a = k(n.exploreFindMemoriesQuery, {
|
|
3623
3746
|
query: e.query
|
|
3624
3747
|
});
|
|
3625
3748
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
@@ -3653,9 +3776,9 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3653
3776
|
}
|
|
3654
3777
|
)
|
|
3655
3778
|
] });
|
|
3656
|
-
},
|
|
3657
|
-
const { colors: t } =
|
|
3658
|
-
|
|
3779
|
+
}, ee = 5, Zr = ({ data: e, t: o }) => {
|
|
3780
|
+
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}${K(
|
|
3781
|
+
p,
|
|
3659
3782
|
g ? o.and : void 0
|
|
3660
3783
|
)}` : o.memoriesFound;
|
|
3661
3784
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ m(
|
|
@@ -3667,7 +3790,7 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3667
3790
|
transition: { duration: 0.3, delay: 0 },
|
|
3668
3791
|
children: [
|
|
3669
3792
|
/* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
|
|
3670
|
-
|
|
3793
|
+
d && !n && /* @__PURE__ */ m(R, { children: [
|
|
3671
3794
|
" ",
|
|
3672
3795
|
/* @__PURE__ */ r(
|
|
3673
3796
|
"button",
|
|
@@ -3686,12 +3809,12 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3686
3809
|
fontFamily: "inherit"
|
|
3687
3810
|
},
|
|
3688
3811
|
children: k(o.moreMemories, {
|
|
3689
|
-
n:
|
|
3812
|
+
n: u
|
|
3690
3813
|
})
|
|
3691
3814
|
}
|
|
3692
3815
|
)
|
|
3693
3816
|
] }),
|
|
3694
|
-
|
|
3817
|
+
d && n && /* @__PURE__ */ m(R, { children: [
|
|
3695
3818
|
" ",
|
|
3696
3819
|
/* @__PURE__ */ r(
|
|
3697
3820
|
"button",
|
|
@@ -3717,7 +3840,7 @@ const Gr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
|
|
|
3717
3840
|
}
|
|
3718
3841
|
) });
|
|
3719
3842
|
};
|
|
3720
|
-
function
|
|
3843
|
+
function en(e) {
|
|
3721
3844
|
return {
|
|
3722
3845
|
taskType: "MemoryChat",
|
|
3723
3846
|
eventType: "Search",
|
|
@@ -3725,10 +3848,10 @@ function Qr(e) {
|
|
|
3725
3848
|
...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
|
|
3726
3849
|
};
|
|
3727
3850
|
}
|
|
3728
|
-
const
|
|
3729
|
-
const a =
|
|
3851
|
+
const rn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
|
|
3852
|
+
const a = en(e);
|
|
3730
3853
|
return e.items === void 0 ? /* @__PURE__ */ r(
|
|
3731
|
-
|
|
3854
|
+
Q,
|
|
3732
3855
|
{
|
|
3733
3856
|
data: a,
|
|
3734
3857
|
isLatest: o,
|
|
@@ -3737,7 +3860,7 @@ const jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3737
3860
|
}
|
|
3738
3861
|
) : /* @__PURE__ */ m(R, { children: [
|
|
3739
3862
|
/* @__PURE__ */ r(
|
|
3740
|
-
|
|
3863
|
+
Q,
|
|
3741
3864
|
{
|
|
3742
3865
|
data: a,
|
|
3743
3866
|
isLatest: !1,
|
|
@@ -3747,7 +3870,7 @@ const jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3747
3870
|
}
|
|
3748
3871
|
),
|
|
3749
3872
|
/* @__PURE__ */ r(
|
|
3750
|
-
|
|
3873
|
+
ie,
|
|
3751
3874
|
{
|
|
3752
3875
|
data: {
|
|
3753
3876
|
taskType: "MemoryChat",
|
|
@@ -3761,26 +3884,26 @@ const jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
|
|
|
3761
3884
|
)
|
|
3762
3885
|
] });
|
|
3763
3886
|
};
|
|
3764
|
-
function
|
|
3887
|
+
function nn({
|
|
3765
3888
|
memory: e,
|
|
3766
3889
|
completed: o
|
|
3767
3890
|
}) {
|
|
3768
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
3891
|
+
return e.error != null ? /* @__PURE__ */ r(q, { 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
3892
|
}
|
|
3770
|
-
const
|
|
3771
|
-
function
|
|
3893
|
+
const ye = 80;
|
|
3894
|
+
function on({
|
|
3772
3895
|
memory: e,
|
|
3773
3896
|
completed: o,
|
|
3774
3897
|
t
|
|
3775
3898
|
}) {
|
|
3776
|
-
const { colors: n } =
|
|
3899
|
+
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
3900
|
return /* @__PURE__ */ m(
|
|
3778
3901
|
v.div,
|
|
3779
3902
|
{
|
|
3780
3903
|
initial: { opacity: 0 },
|
|
3781
3904
|
animate: { opacity: 1 },
|
|
3782
3905
|
transition: { duration: 0.25 },
|
|
3783
|
-
onClick:
|
|
3906
|
+
onClick: u ? () => a((h) => !h) : void 0,
|
|
3784
3907
|
style: {
|
|
3785
3908
|
paddingTop: "12px",
|
|
3786
3909
|
paddingBottom: "12px",
|
|
@@ -3790,7 +3913,7 @@ function Vr({
|
|
|
3790
3913
|
alignItems: "center",
|
|
3791
3914
|
gap: "10px",
|
|
3792
3915
|
minWidth: 0,
|
|
3793
|
-
cursor:
|
|
3916
|
+
cursor: u ? "pointer" : "default"
|
|
3794
3917
|
},
|
|
3795
3918
|
children: [
|
|
3796
3919
|
/* @__PURE__ */ r(
|
|
@@ -3803,7 +3926,7 @@ function Vr({
|
|
|
3803
3926
|
flexShrink: 0,
|
|
3804
3927
|
width: 32
|
|
3805
3928
|
},
|
|
3806
|
-
children: /* @__PURE__ */ r(
|
|
3929
|
+
children: /* @__PURE__ */ r(nn, { memory: e, completed: o })
|
|
3807
3930
|
}
|
|
3808
3931
|
),
|
|
3809
3932
|
/* @__PURE__ */ m(
|
|
@@ -3827,7 +3950,7 @@ function Vr({
|
|
|
3827
3950
|
children: e.memoryTitle
|
|
3828
3951
|
}
|
|
3829
3952
|
),
|
|
3830
|
-
|
|
3953
|
+
p != null && /* @__PURE__ */ r(
|
|
3831
3954
|
"span",
|
|
3832
3955
|
{
|
|
3833
3956
|
style: {
|
|
@@ -3836,10 +3959,10 @@ function Vr({
|
|
|
3836
3959
|
lineHeight: 1.4,
|
|
3837
3960
|
whiteSpace: i ? "pre-wrap" : void 0
|
|
3838
3961
|
},
|
|
3839
|
-
children:
|
|
3962
|
+
children: p
|
|
3840
3963
|
}
|
|
3841
3964
|
),
|
|
3842
|
-
|
|
3965
|
+
u && /* @__PURE__ */ r(
|
|
3843
3966
|
"span",
|
|
3844
3967
|
{
|
|
3845
3968
|
style: {
|
|
@@ -3857,8 +3980,8 @@ function Vr({
|
|
|
3857
3980
|
}
|
|
3858
3981
|
);
|
|
3859
3982
|
}
|
|
3860
|
-
const
|
|
3861
|
-
const { colors: n } =
|
|
3983
|
+
const tn = ({ data: e, completed: o, t }) => {
|
|
3984
|
+
const { colors: n } = T();
|
|
3862
3985
|
return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
|
|
3863
3986
|
/* @__PURE__ */ r(
|
|
3864
3987
|
"div",
|
|
@@ -3873,7 +3996,7 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3873
3996
|
}
|
|
3874
3997
|
),
|
|
3875
3998
|
e.memories.map((i) => /* @__PURE__ */ r(
|
|
3876
|
-
|
|
3999
|
+
on,
|
|
3877
4000
|
{
|
|
3878
4001
|
memory: i,
|
|
3879
4002
|
completed: o,
|
|
@@ -3882,13 +4005,13 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3882
4005
|
i.memoryId
|
|
3883
4006
|
))
|
|
3884
4007
|
] });
|
|
3885
|
-
},
|
|
4008
|
+
}, an = ({
|
|
3886
4009
|
data: e,
|
|
3887
4010
|
isLatest: o = !1,
|
|
3888
4011
|
durationSeconds: t,
|
|
3889
4012
|
t: n
|
|
3890
4013
|
}) => {
|
|
3891
|
-
const { colors: i } =
|
|
4014
|
+
const { colors: i } = T(), a = k(n.exploreRunCode, { title: e.title });
|
|
3892
4015
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
3893
4016
|
/* @__PURE__ */ r(
|
|
3894
4017
|
v.div,
|
|
@@ -3918,8 +4041,8 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3918
4041
|
}
|
|
3919
4042
|
)
|
|
3920
4043
|
] });
|
|
3921
|
-
},
|
|
3922
|
-
|
|
4044
|
+
}, ln = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
|
|
4045
|
+
Me,
|
|
3923
4046
|
{
|
|
3924
4047
|
data: {
|
|
3925
4048
|
taskType: "MemoryChat",
|
|
@@ -3930,20 +4053,20 @@ const Xr = ({ data: e, completed: o, t }) => {
|
|
|
3930
4053
|
t
|
|
3931
4054
|
}
|
|
3932
4055
|
);
|
|
3933
|
-
function
|
|
3934
|
-
return e.error != null ? /* @__PURE__ */ r(
|
|
4056
|
+
function sn({ item: e }) {
|
|
4057
|
+
return e.error != null ? /* @__PURE__ */ r(q, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
3935
4058
|
}
|
|
3936
|
-
function
|
|
4059
|
+
function cn(e, o) {
|
|
3937
4060
|
return k(o.searchingInMemoriesOfType, {
|
|
3938
4061
|
name: e.memoryTypeName
|
|
3939
4062
|
});
|
|
3940
4063
|
}
|
|
3941
|
-
function
|
|
4064
|
+
function dn({
|
|
3942
4065
|
item: e,
|
|
3943
4066
|
t: o,
|
|
3944
4067
|
showShimmerForPrimary: t
|
|
3945
4068
|
}) {
|
|
3946
|
-
const { colors: n } =
|
|
4069
|
+
const { colors: n } = T(), i = e.result != null, a = e.error != null, l = cn(e, o);
|
|
3947
4070
|
return /* @__PURE__ */ m(
|
|
3948
4071
|
v.div,
|
|
3949
4072
|
{
|
|
@@ -3971,7 +4094,7 @@ function rn({
|
|
|
3971
4094
|
flexShrink: 0,
|
|
3972
4095
|
width: 32
|
|
3973
4096
|
},
|
|
3974
|
-
children: /* @__PURE__ */ r(
|
|
4097
|
+
children: /* @__PURE__ */ r(sn, { item: e })
|
|
3975
4098
|
}
|
|
3976
4099
|
),
|
|
3977
4100
|
/* @__PURE__ */ m(
|
|
@@ -3985,7 +4108,7 @@ function rn({
|
|
|
3985
4108
|
flex: 1
|
|
3986
4109
|
},
|
|
3987
4110
|
children: [
|
|
3988
|
-
/* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: !i && !a && t ? /* @__PURE__ */ r(C, { text:
|
|
4111
|
+
/* @__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
4112
|
i && /* @__PURE__ */ r("span", { style: { fontSize: 12, color: n.textSecondary }, children: e.result.numberOfChunks === 1 ? k(
|
|
3990
4113
|
o.memorySearchTypeResultSummaryOne,
|
|
3991
4114
|
{
|
|
@@ -4010,22 +4133,22 @@ function rn({
|
|
|
4010
4133
|
}
|
|
4011
4134
|
);
|
|
4012
4135
|
}
|
|
4013
|
-
const
|
|
4014
|
-
const { colors: i } =
|
|
4015
|
-
let
|
|
4016
|
-
return e.memoryTypes.forEach((
|
|
4017
|
-
|
|
4018
|
-
}),
|
|
4136
|
+
const pn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4137
|
+
const { colors: i } = T(), a = P(() => {
|
|
4138
|
+
let l = -1;
|
|
4139
|
+
return e.memoryTypes.forEach((d, p) => {
|
|
4140
|
+
d.result == null && d.error == null && (l = p);
|
|
4141
|
+
}), l;
|
|
4019
4142
|
}, [e.memoryTypes]);
|
|
4020
4143
|
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
|
-
|
|
4144
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
|
|
4145
|
+
dn,
|
|
4023
4146
|
{
|
|
4024
|
-
item:
|
|
4147
|
+
item: l,
|
|
4025
4148
|
t: n,
|
|
4026
|
-
showShimmerForPrimary:
|
|
4149
|
+
showShimmerForPrimary: d === a && o
|
|
4027
4150
|
},
|
|
4028
|
-
|
|
4151
|
+
l.memoryTypeId
|
|
4029
4152
|
)),
|
|
4030
4153
|
t !== void 0 && /* @__PURE__ */ r(
|
|
4031
4154
|
"div",
|
|
@@ -4040,39 +4163,30 @@ const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4040
4163
|
}
|
|
4041
4164
|
)
|
|
4042
4165
|
] });
|
|
4043
|
-
}
|
|
4044
|
-
|
|
4045
|
-
), tn = Math.ceil(
|
|
4046
|
-
5 * Q * j
|
|
4047
|
-
);
|
|
4048
|
-
function U(e) {
|
|
4166
|
+
};
|
|
4167
|
+
function j(e) {
|
|
4049
4168
|
return e.queries != null && e.queries.length > 0;
|
|
4050
4169
|
}
|
|
4051
|
-
function
|
|
4170
|
+
function un(e) {
|
|
4052
4171
|
const o = e.reasoning;
|
|
4053
|
-
return (o == null || o === "") && !
|
|
4172
|
+
return (o == null || o === "") && !j(e);
|
|
4054
4173
|
}
|
|
4055
|
-
function
|
|
4056
|
-
if (
|
|
4174
|
+
function mn(e) {
|
|
4175
|
+
if (j(e)) return 3;
|
|
4057
4176
|
const o = e.reasoning;
|
|
4058
4177
|
return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
|
|
4059
4178
|
}
|
|
4060
|
-
function
|
|
4061
|
-
return e === 3 ? /* @__PURE__ */ r(
|
|
4179
|
+
function gn({ phase: e }) {
|
|
4180
|
+
return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
|
|
4062
4181
|
}
|
|
4063
|
-
function
|
|
4182
|
+
function hn({
|
|
4064
4183
|
item: e,
|
|
4065
4184
|
t: o,
|
|
4066
4185
|
isActiveRow: t
|
|
4067
4186
|
}) {
|
|
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, {
|
|
4187
|
+
const { colors: n } = T(), i = un(e), a = mn(e), l = e.reasoning, d = l != null && l.length > 0, [p, u] = w(!1), g = i && t, h = a === 2 && t && !j(e), x = k(o.searchingInMemoriesOfType, {
|
|
4074
4188
|
name: e.memoryTypeName
|
|
4075
|
-
}),
|
|
4189
|
+
}), b = !i && a === 3;
|
|
4076
4190
|
return /* @__PURE__ */ m(
|
|
4077
4191
|
v.div,
|
|
4078
4192
|
{
|
|
@@ -4085,7 +4199,7 @@ function cn({
|
|
|
4085
4199
|
borderBottom: `1px solid ${n.border}`,
|
|
4086
4200
|
display: "flex",
|
|
4087
4201
|
flexDirection: "row",
|
|
4088
|
-
alignItems:
|
|
4202
|
+
alignItems: b ? "flex-start" : "center",
|
|
4089
4203
|
gap: "10px",
|
|
4090
4204
|
minWidth: 0
|
|
4091
4205
|
},
|
|
@@ -4099,9 +4213,9 @@ function cn({
|
|
|
4099
4213
|
justifyContent: "center",
|
|
4100
4214
|
flexShrink: 0,
|
|
4101
4215
|
width: 32,
|
|
4102
|
-
...
|
|
4216
|
+
...b ? { paddingTop: 2 } : {}
|
|
4103
4217
|
},
|
|
4104
|
-
children: /* @__PURE__ */ r(
|
|
4218
|
+
children: /* @__PURE__ */ r(gn, { phase: i ? 1 : a })
|
|
4105
4219
|
}
|
|
4106
4220
|
),
|
|
4107
4221
|
/* @__PURE__ */ m(
|
|
@@ -4115,54 +4229,16 @@ function cn({
|
|
|
4115
4229
|
flex: 1
|
|
4116
4230
|
},
|
|
4117
4231
|
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(
|
|
4232
|
+
/* @__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 }),
|
|
4233
|
+
a === 1 && d && !j(e) && /* @__PURE__ */ r(
|
|
4234
|
+
Fe,
|
|
4235
|
+
{
|
|
4236
|
+
text: l,
|
|
4237
|
+
streaming: !0,
|
|
4238
|
+
label: o.memorySearchQueryReasoningLabel
|
|
4239
|
+
}
|
|
4240
|
+
),
|
|
4241
|
+
a === 2 && h && /* @__PURE__ */ r("div", { style: { fontSize: 12 }, children: /* @__PURE__ */ r(
|
|
4166
4242
|
C,
|
|
4167
4243
|
{
|
|
4168
4244
|
text: o.memorySearchGeneratingQueriesPending,
|
|
@@ -4193,7 +4269,7 @@ function cn({
|
|
|
4193
4269
|
flexDirection: "column",
|
|
4194
4270
|
gap: 6
|
|
4195
4271
|
},
|
|
4196
|
-
children: e.queries.map((
|
|
4272
|
+
children: e.queries.map((y, s) => /* @__PURE__ */ r(
|
|
4197
4273
|
"div",
|
|
4198
4274
|
{
|
|
4199
4275
|
style: {
|
|
@@ -4202,19 +4278,19 @@ function cn({
|
|
|
4202
4278
|
lineHeight: 1.5,
|
|
4203
4279
|
wordBreak: "break-word"
|
|
4204
4280
|
},
|
|
4205
|
-
children:
|
|
4281
|
+
children: y.query
|
|
4206
4282
|
},
|
|
4207
|
-
|
|
4283
|
+
s
|
|
4208
4284
|
))
|
|
4209
4285
|
}
|
|
4210
4286
|
)
|
|
4211
4287
|
] }),
|
|
4212
|
-
|
|
4288
|
+
d && /* @__PURE__ */ m(R, { children: [
|
|
4213
4289
|
/* @__PURE__ */ r(
|
|
4214
4290
|
"button",
|
|
4215
4291
|
{
|
|
4216
4292
|
type: "button",
|
|
4217
|
-
onClick: () =>
|
|
4293
|
+
onClick: () => u((y) => !y),
|
|
4218
4294
|
style: {
|
|
4219
4295
|
alignSelf: "flex-start",
|
|
4220
4296
|
border: "none",
|
|
@@ -4232,8 +4308,8 @@ function cn({
|
|
|
4232
4308
|
"div",
|
|
4233
4309
|
{
|
|
4234
4310
|
style: {
|
|
4235
|
-
fontSize:
|
|
4236
|
-
lineHeight:
|
|
4311
|
+
fontSize: V,
|
|
4312
|
+
lineHeight: X,
|
|
4237
4313
|
whiteSpace: "pre-wrap",
|
|
4238
4314
|
wordBreak: "break-word",
|
|
4239
4315
|
color: n.textTertiary,
|
|
@@ -4241,7 +4317,7 @@ function cn({
|
|
|
4241
4317
|
borderRadius: 6,
|
|
4242
4318
|
padding: "8px 10px"
|
|
4243
4319
|
},
|
|
4244
|
-
children:
|
|
4320
|
+
children: l
|
|
4245
4321
|
}
|
|
4246
4322
|
)
|
|
4247
4323
|
] })
|
|
@@ -4253,22 +4329,22 @@ function cn({
|
|
|
4253
4329
|
}
|
|
4254
4330
|
);
|
|
4255
4331
|
}
|
|
4256
|
-
const
|
|
4257
|
-
const { colors: i } =
|
|
4258
|
-
let
|
|
4259
|
-
return e.memoryTypes.forEach((
|
|
4260
|
-
|
|
4261
|
-
}),
|
|
4332
|
+
const yn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
4333
|
+
const { colors: i } = T(), a = P(() => {
|
|
4334
|
+
let l = -1;
|
|
4335
|
+
return e.memoryTypes.forEach((d, p) => {
|
|
4336
|
+
j(d) || (l = p);
|
|
4337
|
+
}), l;
|
|
4262
4338
|
}, [e.memoryTypes]);
|
|
4263
4339
|
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
|
-
|
|
4340
|
+
o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
|
|
4341
|
+
hn,
|
|
4266
4342
|
{
|
|
4267
|
-
item:
|
|
4343
|
+
item: l,
|
|
4268
4344
|
t: n,
|
|
4269
|
-
isActiveRow:
|
|
4345
|
+
isActiveRow: d === a && o
|
|
4270
4346
|
},
|
|
4271
|
-
|
|
4347
|
+
l.memoryTypeId
|
|
4272
4348
|
)),
|
|
4273
4349
|
t !== void 0 && /* @__PURE__ */ r(
|
|
4274
4350
|
"div",
|
|
@@ -4284,14 +4360,14 @@ const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
|
|
|
4284
4360
|
)
|
|
4285
4361
|
] });
|
|
4286
4362
|
};
|
|
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(
|
|
4363
|
+
function fn(e) {
|
|
4364
|
+
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(q, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
|
|
4289
4365
|
}
|
|
4290
|
-
function
|
|
4366
|
+
function xn({
|
|
4291
4367
|
item: e,
|
|
4292
4368
|
t: o
|
|
4293
4369
|
}) {
|
|
4294
|
-
const { colors: t } =
|
|
4370
|
+
const { colors: t } = T();
|
|
4295
4371
|
if (e.error != null)
|
|
4296
4372
|
return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
|
|
4297
4373
|
if (e.result == null)
|
|
@@ -4305,13 +4381,13 @@ function un({
|
|
|
4305
4381
|
a
|
|
4306
4382
|
] });
|
|
4307
4383
|
}
|
|
4308
|
-
function
|
|
4384
|
+
function kn({
|
|
4309
4385
|
items: e,
|
|
4310
4386
|
queryRow: o,
|
|
4311
4387
|
onExploreQueryResultClick: t,
|
|
4312
4388
|
t: n
|
|
4313
4389
|
}) {
|
|
4314
|
-
const { colors: i } =
|
|
4390
|
+
const { colors: i } = T(), [a, l] = w(null);
|
|
4315
4391
|
if (e.length === 0)
|
|
4316
4392
|
return /* @__PURE__ */ r(
|
|
4317
4393
|
"div",
|
|
@@ -4324,7 +4400,7 @@ function mn({
|
|
|
4324
4400
|
children: n.memorySearchExploreNoResults
|
|
4325
4401
|
}
|
|
4326
4402
|
);
|
|
4327
|
-
const
|
|
4403
|
+
const d = !!t;
|
|
4328
4404
|
return /* @__PURE__ */ r(
|
|
4329
4405
|
"div",
|
|
4330
4406
|
{
|
|
@@ -4336,25 +4412,25 @@ function mn({
|
|
|
4336
4412
|
paddingTop: 8,
|
|
4337
4413
|
borderTop: `1px solid ${i.borderDivider}`
|
|
4338
4414
|
},
|
|
4339
|
-
children: e.map((
|
|
4340
|
-
const g =
|
|
4341
|
-
|
|
4415
|
+
children: e.map((p, u) => {
|
|
4416
|
+
const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
|
|
4417
|
+
p.chunks
|
|
4342
4418
|
), x = [
|
|
4343
|
-
|
|
4419
|
+
te(p),
|
|
4344
4420
|
k(n.scoreLabel, {
|
|
4345
|
-
n:
|
|
4421
|
+
n: p.matchingChunkScore.toFixed(2)
|
|
4346
4422
|
}),
|
|
4347
|
-
h.length > 0 ?
|
|
4423
|
+
h.length > 0 ? ne(h, n) : n.pagesNotAvailable
|
|
4348
4424
|
].filter(
|
|
4349
4425
|
(c) => c != null && c !== ""
|
|
4350
|
-
),
|
|
4351
|
-
memoryId:
|
|
4352
|
-
memoryTitle:
|
|
4426
|
+
), b = {
|
|
4427
|
+
memoryId: p.memoryId,
|
|
4428
|
+
memoryTitle: p.memoryTitle,
|
|
4353
4429
|
pageNumbers: h,
|
|
4354
4430
|
memoryTypeId: o.memoryTypeId,
|
|
4355
4431
|
memoryTypeName: o.memoryTypeName,
|
|
4356
4432
|
query: o.query
|
|
4357
|
-
},
|
|
4433
|
+
}, y = `${o.query}::${p.memoryId}::${u}`, s = a === y;
|
|
4358
4434
|
return /* @__PURE__ */ m(
|
|
4359
4435
|
"div",
|
|
4360
4436
|
{
|
|
@@ -4363,9 +4439,9 @@ function mn({
|
|
|
4363
4439
|
flexDirection: "row",
|
|
4364
4440
|
alignItems: "flex-start",
|
|
4365
4441
|
gap: "12px",
|
|
4366
|
-
paddingTop:
|
|
4367
|
-
paddingBottom:
|
|
4368
|
-
borderBottom:
|
|
4442
|
+
paddingTop: u > 0 ? 12 : 0,
|
|
4443
|
+
paddingBottom: u < e.length - 1 ? 12 : 0,
|
|
4444
|
+
borderBottom: u < e.length - 1 ? `1px solid ${i.border}` : void 0,
|
|
4369
4445
|
minWidth: 0
|
|
4370
4446
|
},
|
|
4371
4447
|
children: [
|
|
@@ -4401,8 +4477,8 @@ function mn({
|
|
|
4401
4477
|
whiteSpace: "pre-wrap",
|
|
4402
4478
|
wordBreak: "break-word"
|
|
4403
4479
|
},
|
|
4404
|
-
children:
|
|
4405
|
-
|
|
4480
|
+
children: re(
|
|
4481
|
+
p.chunks
|
|
4406
4482
|
)
|
|
4407
4483
|
}
|
|
4408
4484
|
),
|
|
@@ -4421,20 +4497,20 @@ function mn({
|
|
|
4421
4497
|
]
|
|
4422
4498
|
}
|
|
4423
4499
|
),
|
|
4424
|
-
|
|
4500
|
+
d && /* @__PURE__ */ m(
|
|
4425
4501
|
"button",
|
|
4426
4502
|
{
|
|
4427
4503
|
type: "button",
|
|
4428
|
-
"aria-busy":
|
|
4429
|
-
disabled:
|
|
4504
|
+
"aria-busy": s,
|
|
4505
|
+
disabled: s,
|
|
4430
4506
|
onClick: async () => {
|
|
4431
|
-
|
|
4507
|
+
l(y);
|
|
4432
4508
|
try {
|
|
4433
4509
|
await t(
|
|
4434
|
-
|
|
4510
|
+
b
|
|
4435
4511
|
);
|
|
4436
4512
|
} finally {
|
|
4437
|
-
|
|
4513
|
+
l(null);
|
|
4438
4514
|
}
|
|
4439
4515
|
},
|
|
4440
4516
|
style: {
|
|
@@ -4447,14 +4523,14 @@ function mn({
|
|
|
4447
4523
|
background: i.bgChip,
|
|
4448
4524
|
border: `1px solid ${i.bgChipBorder}`,
|
|
4449
4525
|
borderRadius: 6,
|
|
4450
|
-
cursor:
|
|
4526
|
+
cursor: s ? "wait" : "pointer",
|
|
4451
4527
|
fontFamily: "inherit",
|
|
4452
4528
|
display: "inline-flex",
|
|
4453
4529
|
alignItems: "center",
|
|
4454
4530
|
gap: 8
|
|
4455
4531
|
},
|
|
4456
4532
|
children: [
|
|
4457
|
-
|
|
4533
|
+
s && /* @__PURE__ */ r(
|
|
4458
4534
|
"span",
|
|
4459
4535
|
{
|
|
4460
4536
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -4467,13 +4543,13 @@ function mn({
|
|
|
4467
4543
|
)
|
|
4468
4544
|
]
|
|
4469
4545
|
},
|
|
4470
|
-
`${
|
|
4546
|
+
`${p.memoryId}-${u}`
|
|
4471
4547
|
);
|
|
4472
4548
|
})
|
|
4473
4549
|
}
|
|
4474
4550
|
);
|
|
4475
4551
|
}
|
|
4476
|
-
function
|
|
4552
|
+
function Sn(e) {
|
|
4477
4553
|
const o = [], t = /* @__PURE__ */ new Map();
|
|
4478
4554
|
return e.forEach((n, i) => {
|
|
4479
4555
|
let a = t.get(n.memoryTypeId);
|
|
@@ -4484,7 +4560,7 @@ function gn(e) {
|
|
|
4484
4560
|
}, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
|
|
4485
4561
|
}), o.map((n) => t.get(n));
|
|
4486
4562
|
}
|
|
4487
|
-
function
|
|
4563
|
+
function bn({
|
|
4488
4564
|
group: e,
|
|
4489
4565
|
t: o,
|
|
4490
4566
|
isLatest: t,
|
|
@@ -4492,8 +4568,8 @@ function hn({
|
|
|
4492
4568
|
toggleExpanded: i,
|
|
4493
4569
|
onExploreQueryResultClick: a
|
|
4494
4570
|
}) {
|
|
4495
|
-
const { colors:
|
|
4496
|
-
(
|
|
4571
|
+
const { colors: l } = T(), d = e.items.map((u) => u.item), p = d.some(
|
|
4572
|
+
(u) => u.result == null && u.error == null
|
|
4497
4573
|
);
|
|
4498
4574
|
return /* @__PURE__ */ m(
|
|
4499
4575
|
v.div,
|
|
@@ -4504,10 +4580,10 @@ function hn({
|
|
|
4504
4580
|
style: {
|
|
4505
4581
|
paddingTop: "12px",
|
|
4506
4582
|
paddingBottom: "12px",
|
|
4507
|
-
borderBottom: `1px solid ${
|
|
4583
|
+
borderBottom: `1px solid ${l.border}`,
|
|
4508
4584
|
display: "flex",
|
|
4509
4585
|
flexDirection: "row",
|
|
4510
|
-
alignItems:
|
|
4586
|
+
alignItems: p ? "center" : "flex-start",
|
|
4511
4587
|
gap: "10px",
|
|
4512
4588
|
minWidth: 0
|
|
4513
4589
|
},
|
|
@@ -4521,9 +4597,9 @@ function hn({
|
|
|
4521
4597
|
justifyContent: "center",
|
|
4522
4598
|
flexShrink: 0,
|
|
4523
4599
|
width: 32,
|
|
4524
|
-
...
|
|
4600
|
+
...p ? {} : { paddingTop: 2 }
|
|
4525
4601
|
},
|
|
4526
|
-
children:
|
|
4602
|
+
children: fn(d)
|
|
4527
4603
|
}
|
|
4528
4604
|
),
|
|
4529
4605
|
/* @__PURE__ */ m(
|
|
@@ -4542,16 +4618,16 @@ function hn({
|
|
|
4542
4618
|
{
|
|
4543
4619
|
style: {
|
|
4544
4620
|
fontSize: 12,
|
|
4545
|
-
color:
|
|
4621
|
+
color: l.textTertiary
|
|
4546
4622
|
},
|
|
4547
4623
|
children: k(o.memorySearchExploreQueryTypeLabel, {
|
|
4548
4624
|
name: e.memoryTypeName
|
|
4549
4625
|
})
|
|
4550
4626
|
}
|
|
4551
4627
|
),
|
|
4552
|
-
e.items.map(({ item:
|
|
4628
|
+
e.items.map(({ item: u, flatIndex: g }) => {
|
|
4553
4629
|
var c;
|
|
4554
|
-
const h =
|
|
4630
|
+
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
4631
|
return /* @__PURE__ */ m(
|
|
4556
4632
|
"div",
|
|
4557
4633
|
{
|
|
@@ -4580,19 +4656,19 @@ function hn({
|
|
|
4580
4656
|
style: {
|
|
4581
4657
|
fontSize: 13,
|
|
4582
4658
|
fontWeight: 500,
|
|
4583
|
-
color:
|
|
4659
|
+
color: l.textPrimary,
|
|
4584
4660
|
wordBreak: "break-word",
|
|
4585
4661
|
flex: "1 1 12rem",
|
|
4586
4662
|
minWidth: 0
|
|
4587
4663
|
},
|
|
4588
|
-
children:
|
|
4664
|
+
children: b ? /* @__PURE__ */ r(
|
|
4589
4665
|
C,
|
|
4590
4666
|
{
|
|
4591
|
-
text:
|
|
4667
|
+
text: u.query,
|
|
4592
4668
|
duration: 2.5,
|
|
4593
4669
|
repeat: !0
|
|
4594
4670
|
}
|
|
4595
|
-
) :
|
|
4671
|
+
) : u.query
|
|
4596
4672
|
}
|
|
4597
4673
|
),
|
|
4598
4674
|
/* @__PURE__ */ m(
|
|
@@ -4606,7 +4682,7 @@ function hn({
|
|
|
4606
4682
|
flexShrink: 0
|
|
4607
4683
|
},
|
|
4608
4684
|
children: [
|
|
4609
|
-
/* @__PURE__ */ r(
|
|
4685
|
+
/* @__PURE__ */ r(xn, { item: u, t: o }),
|
|
4610
4686
|
h && /* @__PURE__ */ r(
|
|
4611
4687
|
"button",
|
|
4612
4688
|
{
|
|
@@ -4618,11 +4694,11 @@ function hn({
|
|
|
4618
4694
|
padding: 0,
|
|
4619
4695
|
cursor: "pointer",
|
|
4620
4696
|
fontSize: 12,
|
|
4621
|
-
color:
|
|
4697
|
+
color: l.textSecondary,
|
|
4622
4698
|
textDecoration: "underline",
|
|
4623
4699
|
fontFamily: "inherit"
|
|
4624
4700
|
},
|
|
4625
|
-
children:
|
|
4701
|
+
children: y ? o.memorySearchHideExploreResults : o.memorySearchViewExploreResults
|
|
4626
4702
|
}
|
|
4627
4703
|
)
|
|
4628
4704
|
]
|
|
@@ -4631,18 +4707,18 @@ function hn({
|
|
|
4631
4707
|
]
|
|
4632
4708
|
}
|
|
4633
4709
|
),
|
|
4634
|
-
h &&
|
|
4635
|
-
|
|
4710
|
+
h && y && /* @__PURE__ */ r(
|
|
4711
|
+
kn,
|
|
4636
4712
|
{
|
|
4637
|
-
items:
|
|
4638
|
-
queryRow:
|
|
4713
|
+
items: s,
|
|
4714
|
+
queryRow: u,
|
|
4639
4715
|
onExploreQueryResultClick: a,
|
|
4640
4716
|
t: o
|
|
4641
4717
|
}
|
|
4642
4718
|
)
|
|
4643
4719
|
]
|
|
4644
4720
|
},
|
|
4645
|
-
`${e.memoryTypeId}-${g}-${
|
|
4721
|
+
`${e.memoryTypeId}-${g}-${u.query}`
|
|
4646
4722
|
);
|
|
4647
4723
|
})
|
|
4648
4724
|
]
|
|
@@ -4652,22 +4728,22 @@ function hn({
|
|
|
4652
4728
|
}
|
|
4653
4729
|
);
|
|
4654
4730
|
}
|
|
4655
|
-
const
|
|
4731
|
+
const Tn = ({
|
|
4656
4732
|
data: e,
|
|
4657
4733
|
isLatest: o = !1,
|
|
4658
4734
|
durationSeconds: t,
|
|
4659
4735
|
onExploreQueryResultClick: n,
|
|
4660
4736
|
t: i
|
|
4661
4737
|
}) => {
|
|
4662
|
-
const { colors: a } =
|
|
4738
|
+
const { colors: a } = T(), [l, d] = w(
|
|
4663
4739
|
{}
|
|
4664
|
-
),
|
|
4665
|
-
|
|
4740
|
+
), p = L((g) => {
|
|
4741
|
+
d((h) => ({
|
|
4666
4742
|
...h,
|
|
4667
4743
|
[g]: !h[g]
|
|
4668
4744
|
}));
|
|
4669
|
-
}, []),
|
|
4670
|
-
() =>
|
|
4745
|
+
}, []), u = P(
|
|
4746
|
+
() => Sn(e.queries),
|
|
4671
4747
|
[e.queries]
|
|
4672
4748
|
);
|
|
4673
4749
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
@@ -4678,14 +4754,14 @@ const yn = ({
|
|
|
4678
4754
|
duration: 2.5,
|
|
4679
4755
|
repeat: !0
|
|
4680
4756
|
}
|
|
4681
|
-
) :
|
|
4682
|
-
|
|
4757
|
+
) : u.map((g) => /* @__PURE__ */ r(
|
|
4758
|
+
bn,
|
|
4683
4759
|
{
|
|
4684
4760
|
group: g,
|
|
4685
4761
|
t: i,
|
|
4686
4762
|
isLatest: o,
|
|
4687
|
-
expandedRows:
|
|
4688
|
-
toggleExpanded:
|
|
4763
|
+
expandedRows: l,
|
|
4764
|
+
toggleExpanded: p,
|
|
4689
4765
|
onExploreQueryResultClick: n
|
|
4690
4766
|
},
|
|
4691
4767
|
g.memoryTypeId
|
|
@@ -4703,8 +4779,8 @@ const yn = ({
|
|
|
4703
4779
|
}
|
|
4704
4780
|
)
|
|
4705
4781
|
] });
|
|
4706
|
-
},
|
|
4707
|
-
const { colors: n } =
|
|
4782
|
+
}, vn = ({ data: e, onSearchResultClick: o, t }) => {
|
|
4783
|
+
const { colors: n } = T(), i = e.response.items, a = !!o, [l, d] = w(null);
|
|
4708
4784
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4709
4785
|
/* @__PURE__ */ r(
|
|
4710
4786
|
v.div,
|
|
@@ -4729,30 +4805,30 @@ const yn = ({
|
|
|
4729
4805
|
flexDirection: "column",
|
|
4730
4806
|
gap: 0
|
|
4731
4807
|
},
|
|
4732
|
-
children: i.map((
|
|
4733
|
-
const g =
|
|
4734
|
-
|
|
4808
|
+
children: i.map((p, u) => {
|
|
4809
|
+
const g = p.memoryTitle !== "" ? p.memoryTitle : p.memoryId, h = oe(
|
|
4810
|
+
p.chunks
|
|
4735
4811
|
), x = [
|
|
4736
|
-
|
|
4812
|
+
te(p),
|
|
4737
4813
|
k(t.scoreLabel, {
|
|
4738
|
-
n:
|
|
4814
|
+
n: p.matchingChunkScore.toFixed(2)
|
|
4739
4815
|
}),
|
|
4740
|
-
h.length > 0 ?
|
|
4816
|
+
h.length > 0 ? ne(h, t) : t.pagesNotAvailable
|
|
4741
4817
|
].filter(
|
|
4742
4818
|
(c) => c != null && c !== ""
|
|
4743
|
-
),
|
|
4744
|
-
memoryId:
|
|
4745
|
-
memoryTitle:
|
|
4746
|
-
memoryTypeId:
|
|
4747
|
-
memoryTypeName:
|
|
4819
|
+
), b = {
|
|
4820
|
+
memoryId: p.memoryId,
|
|
4821
|
+
memoryTitle: p.memoryTitle,
|
|
4822
|
+
memoryTypeId: p.memoryTypeId,
|
|
4823
|
+
memoryTypeName: p.memoryTypeName,
|
|
4748
4824
|
pageNumbers: h
|
|
4749
|
-
},
|
|
4825
|
+
}, y = `${p.memoryId}-${u}`, s = l === y;
|
|
4750
4826
|
return /* @__PURE__ */ m(
|
|
4751
4827
|
v.div,
|
|
4752
4828
|
{
|
|
4753
4829
|
initial: { opacity: 0 },
|
|
4754
4830
|
animate: { opacity: 1 },
|
|
4755
|
-
transition: { duration: 0.2, delay:
|
|
4831
|
+
transition: { duration: 0.2, delay: u * 0.04 },
|
|
4756
4832
|
style: {
|
|
4757
4833
|
display: "flex",
|
|
4758
4834
|
flexDirection: "row",
|
|
@@ -4760,7 +4836,7 @@ const yn = ({
|
|
|
4760
4836
|
gap: "12px",
|
|
4761
4837
|
paddingTop: "12px",
|
|
4762
4838
|
paddingBottom: "12px",
|
|
4763
|
-
borderBottom:
|
|
4839
|
+
borderBottom: u < i.length - 1 ? `1px solid ${n.border}` : void 0,
|
|
4764
4840
|
minWidth: 0
|
|
4765
4841
|
},
|
|
4766
4842
|
children: [
|
|
@@ -4796,7 +4872,7 @@ const yn = ({
|
|
|
4796
4872
|
whiteSpace: "pre-wrap",
|
|
4797
4873
|
wordBreak: "break-word"
|
|
4798
4874
|
},
|
|
4799
|
-
children:
|
|
4875
|
+
children: re(p.chunks)
|
|
4800
4876
|
}
|
|
4801
4877
|
),
|
|
4802
4878
|
/* @__PURE__ */ r(
|
|
@@ -4818,14 +4894,14 @@ const yn = ({
|
|
|
4818
4894
|
"button",
|
|
4819
4895
|
{
|
|
4820
4896
|
type: "button",
|
|
4821
|
-
"aria-busy":
|
|
4822
|
-
disabled:
|
|
4897
|
+
"aria-busy": s,
|
|
4898
|
+
disabled: s,
|
|
4823
4899
|
onClick: async () => {
|
|
4824
|
-
|
|
4900
|
+
d(y);
|
|
4825
4901
|
try {
|
|
4826
|
-
await o(
|
|
4902
|
+
await o(b);
|
|
4827
4903
|
} finally {
|
|
4828
|
-
|
|
4904
|
+
d(null);
|
|
4829
4905
|
}
|
|
4830
4906
|
},
|
|
4831
4907
|
style: {
|
|
@@ -4838,14 +4914,14 @@ const yn = ({
|
|
|
4838
4914
|
background: n.bgChip,
|
|
4839
4915
|
border: `1px solid ${n.bgChipBorder}`,
|
|
4840
4916
|
borderRadius: 6,
|
|
4841
|
-
cursor:
|
|
4917
|
+
cursor: s ? "wait" : "pointer",
|
|
4842
4918
|
fontFamily: "inherit",
|
|
4843
4919
|
display: "inline-flex",
|
|
4844
4920
|
alignItems: "center",
|
|
4845
4921
|
gap: 8
|
|
4846
4922
|
},
|
|
4847
4923
|
children: [
|
|
4848
|
-
|
|
4924
|
+
s && /* @__PURE__ */ r(
|
|
4849
4925
|
"span",
|
|
4850
4926
|
{
|
|
4851
4927
|
className: "explore-memory-loader explore-memory-loader--callback",
|
|
@@ -4858,14 +4934,14 @@ const yn = ({
|
|
|
4858
4934
|
)
|
|
4859
4935
|
]
|
|
4860
4936
|
},
|
|
4861
|
-
`${
|
|
4937
|
+
`${p.memoryId}-${u}`
|
|
4862
4938
|
);
|
|
4863
4939
|
})
|
|
4864
4940
|
}
|
|
4865
4941
|
)
|
|
4866
4942
|
] });
|
|
4867
4943
|
}, O = ({ message: e }) => {
|
|
4868
|
-
const { colors: o } =
|
|
4944
|
+
const { colors: o } = T();
|
|
4869
4945
|
return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
|
|
4870
4946
|
v.div,
|
|
4871
4947
|
{
|
|
@@ -4891,7 +4967,7 @@ const yn = ({
|
|
|
4891
4967
|
}
|
|
4892
4968
|
) });
|
|
4893
4969
|
};
|
|
4894
|
-
class
|
|
4970
|
+
class wn extends Ue.Component {
|
|
4895
4971
|
constructor(o) {
|
|
4896
4972
|
super(o), this.state = { hasError: !1 };
|
|
4897
4973
|
}
|
|
@@ -4910,120 +4986,120 @@ class xn extends Ge.Component {
|
|
|
4910
4986
|
return this.state.hasError ? null : this.props.children;
|
|
4911
4987
|
}
|
|
4912
4988
|
}
|
|
4913
|
-
const
|
|
4989
|
+
const Cn = ({
|
|
4914
4990
|
progressViewItems: e,
|
|
4915
4991
|
loading: o,
|
|
4916
4992
|
error: t,
|
|
4917
4993
|
loadingText: n,
|
|
4918
4994
|
t: i,
|
|
4919
4995
|
onMemoryClick: a,
|
|
4920
|
-
onSourceClick:
|
|
4921
|
-
onSearchResultClick:
|
|
4922
|
-
onExploreQueryResultClick:
|
|
4923
|
-
downloadFile:
|
|
4996
|
+
onSourceClick: l,
|
|
4997
|
+
onSearchResultClick: d,
|
|
4998
|
+
onExploreQueryResultClick: p,
|
|
4999
|
+
downloadFile: u
|
|
4924
5000
|
}) => {
|
|
4925
|
-
const { theme: g, colors: h } =
|
|
4926
|
-
|
|
5001
|
+
const { theme: g, colors: h } = T(), x = A(null);
|
|
5002
|
+
H(() => {
|
|
4927
5003
|
x.current && (x.current.scrollTop = x.current.scrollHeight);
|
|
4928
5004
|
}, [e.length]);
|
|
4929
|
-
const
|
|
4930
|
-
const c =
|
|
5005
|
+
const b = (s) => {
|
|
5006
|
+
const c = s.item.data;
|
|
4931
5007
|
if (c.taskType === "StreamingChatCompletion" && c.eventType === "Text")
|
|
4932
5008
|
return /* @__PURE__ */ r(
|
|
4933
|
-
|
|
5009
|
+
N,
|
|
4934
5010
|
{
|
|
4935
5011
|
text: c.text,
|
|
4936
5012
|
onMemoryClick: a
|
|
4937
5013
|
}
|
|
4938
5014
|
);
|
|
4939
5015
|
if (c.taskType === "StructuredChatCompletion" && c.eventType === "Completed")
|
|
4940
|
-
return /* @__PURE__ */ r(
|
|
5016
|
+
return /* @__PURE__ */ r(lr, { data: c });
|
|
4941
5017
|
if (c.taskType === "MemoryChat")
|
|
4942
5018
|
switch (c.eventType) {
|
|
4943
5019
|
case "Text":
|
|
4944
5020
|
return /* @__PURE__ */ r(
|
|
4945
|
-
|
|
5021
|
+
N,
|
|
4946
5022
|
{
|
|
4947
5023
|
text: c.text,
|
|
4948
|
-
onFileDownload:
|
|
5024
|
+
onFileDownload: u,
|
|
4949
5025
|
onMemoryClick: a
|
|
4950
5026
|
}
|
|
4951
5027
|
);
|
|
4952
5028
|
case "Thinking":
|
|
4953
5029
|
return /* @__PURE__ */ r(
|
|
4954
|
-
|
|
5030
|
+
ge,
|
|
4955
5031
|
{
|
|
4956
5032
|
data: c,
|
|
4957
|
-
isLatest:
|
|
4958
|
-
durationSeconds:
|
|
5033
|
+
isLatest: s.isLatest,
|
|
5034
|
+
durationSeconds: s.durationSeconds,
|
|
4959
5035
|
t: i
|
|
4960
5036
|
}
|
|
4961
5037
|
);
|
|
4962
5038
|
case "GenerateReportSetup":
|
|
4963
5039
|
return /* @__PURE__ */ r(
|
|
4964
|
-
|
|
5040
|
+
Gr,
|
|
4965
5041
|
{
|
|
4966
5042
|
data: c,
|
|
4967
|
-
isLatest:
|
|
4968
|
-
durationSeconds:
|
|
5043
|
+
isLatest: s.isLatest,
|
|
5044
|
+
durationSeconds: s.durationSeconds,
|
|
4969
5045
|
t: i
|
|
4970
5046
|
}
|
|
4971
5047
|
);
|
|
4972
5048
|
case "GenerateReportExporting":
|
|
4973
5049
|
return /* @__PURE__ */ r(
|
|
4974
|
-
|
|
5050
|
+
Or,
|
|
4975
5051
|
{
|
|
4976
5052
|
data: c,
|
|
4977
|
-
isLatest:
|
|
4978
|
-
durationSeconds:
|
|
5053
|
+
isLatest: s.isLatest,
|
|
5054
|
+
durationSeconds: s.durationSeconds,
|
|
4979
5055
|
t: i
|
|
4980
5056
|
}
|
|
4981
5057
|
);
|
|
4982
5058
|
case "GenerateReportRunCode":
|
|
4983
5059
|
return /* @__PURE__ */ r(
|
|
4984
|
-
|
|
5060
|
+
_r,
|
|
4985
5061
|
{
|
|
4986
5062
|
data: c,
|
|
4987
|
-
isLatest:
|
|
4988
|
-
durationSeconds:
|
|
5063
|
+
isLatest: s.isLatest,
|
|
5064
|
+
durationSeconds: s.durationSeconds,
|
|
4989
5065
|
t: i
|
|
4990
5066
|
}
|
|
4991
5067
|
);
|
|
4992
5068
|
case "GenerateReportRunCommand":
|
|
4993
5069
|
return /* @__PURE__ */ r(
|
|
4994
|
-
|
|
5070
|
+
qr,
|
|
4995
5071
|
{
|
|
4996
5072
|
data: c,
|
|
4997
|
-
isLatest:
|
|
4998
|
-
durationSeconds:
|
|
5073
|
+
isLatest: s.isLatest,
|
|
5074
|
+
durationSeconds: s.durationSeconds,
|
|
4999
5075
|
t: i
|
|
5000
5076
|
}
|
|
5001
5077
|
);
|
|
5002
5078
|
case "GenerateReportAssembling":
|
|
5003
5079
|
return /* @__PURE__ */ r(
|
|
5004
|
-
|
|
5080
|
+
Ur,
|
|
5005
5081
|
{
|
|
5006
5082
|
data: c,
|
|
5007
|
-
isLatest:
|
|
5008
|
-
durationSeconds:
|
|
5083
|
+
isLatest: s.isLatest,
|
|
5084
|
+
durationSeconds: s.durationSeconds,
|
|
5009
5085
|
t: i
|
|
5010
5086
|
}
|
|
5011
5087
|
);
|
|
5012
5088
|
case "GenerateReportCompleted":
|
|
5013
|
-
return /* @__PURE__ */ r(
|
|
5089
|
+
return /* @__PURE__ */ r(Qr, { data: c, t: i });
|
|
5014
5090
|
case "FindMemories":
|
|
5015
5091
|
return /* @__PURE__ */ r(
|
|
5016
|
-
|
|
5092
|
+
kr,
|
|
5017
5093
|
{
|
|
5018
5094
|
data: c,
|
|
5019
|
-
isLatest:
|
|
5020
|
-
durationSeconds:
|
|
5095
|
+
isLatest: s.isLatest,
|
|
5096
|
+
durationSeconds: s.durationSeconds,
|
|
5021
5097
|
t: i
|
|
5022
5098
|
}
|
|
5023
5099
|
);
|
|
5024
5100
|
case "FindMemoriesResult":
|
|
5025
5101
|
return /* @__PURE__ */ r(
|
|
5026
|
-
|
|
5102
|
+
Sr,
|
|
5027
5103
|
{
|
|
5028
5104
|
data: c,
|
|
5029
5105
|
t: i
|
|
@@ -5031,98 +5107,98 @@ const kn = ({
|
|
|
5031
5107
|
);
|
|
5032
5108
|
case "Search":
|
|
5033
5109
|
return /* @__PURE__ */ r(
|
|
5034
|
-
|
|
5110
|
+
Q,
|
|
5035
5111
|
{
|
|
5036
5112
|
data: c,
|
|
5037
|
-
isLatest:
|
|
5038
|
-
durationSeconds:
|
|
5113
|
+
isLatest: s.isLatest,
|
|
5114
|
+
durationSeconds: s.durationSeconds,
|
|
5039
5115
|
t: i
|
|
5040
5116
|
}
|
|
5041
5117
|
);
|
|
5042
5118
|
case "SearchMemoryChunks":
|
|
5043
5119
|
return /* @__PURE__ */ r(
|
|
5044
|
-
|
|
5120
|
+
xr,
|
|
5045
5121
|
{
|
|
5046
5122
|
data: c,
|
|
5047
|
-
isLatest:
|
|
5048
|
-
durationSeconds:
|
|
5123
|
+
isLatest: s.isLatest,
|
|
5124
|
+
durationSeconds: s.durationSeconds,
|
|
5049
5125
|
t: i,
|
|
5050
|
-
onSearchResultClick:
|
|
5126
|
+
onSearchResultClick: d
|
|
5051
5127
|
}
|
|
5052
5128
|
);
|
|
5053
5129
|
case "FindSources":
|
|
5054
5130
|
return /* @__PURE__ */ r(
|
|
5055
|
-
|
|
5131
|
+
ce,
|
|
5056
5132
|
{
|
|
5057
5133
|
data: c,
|
|
5058
|
-
isLatest:
|
|
5059
|
-
durationSeconds:
|
|
5134
|
+
isLatest: s.isLatest,
|
|
5135
|
+
durationSeconds: s.durationSeconds,
|
|
5060
5136
|
t: i
|
|
5061
5137
|
}
|
|
5062
5138
|
);
|
|
5063
5139
|
case "SourcesResult":
|
|
5064
5140
|
return /* @__PURE__ */ r(
|
|
5065
|
-
|
|
5141
|
+
Me,
|
|
5066
5142
|
{
|
|
5067
5143
|
data: c,
|
|
5068
|
-
onSourceClick:
|
|
5144
|
+
onSourceClick: l,
|
|
5069
5145
|
t: i
|
|
5070
5146
|
}
|
|
5071
5147
|
);
|
|
5072
5148
|
case "ExploreMemories":
|
|
5073
5149
|
return /* @__PURE__ */ r(
|
|
5074
|
-
|
|
5150
|
+
Cr,
|
|
5075
5151
|
{
|
|
5076
5152
|
data: c,
|
|
5077
|
-
completed:
|
|
5078
|
-
isLatest:
|
|
5153
|
+
completed: s.completed,
|
|
5154
|
+
isLatest: s.isLatest,
|
|
5079
5155
|
t: i
|
|
5080
5156
|
}
|
|
5081
5157
|
);
|
|
5082
5158
|
case "ChunkResults":
|
|
5083
5159
|
return /* @__PURE__ */ r(
|
|
5084
|
-
|
|
5160
|
+
ie,
|
|
5085
5161
|
{
|
|
5086
5162
|
data: c,
|
|
5087
|
-
onSearchResultClick:
|
|
5163
|
+
onSearchResultClick: d,
|
|
5088
5164
|
t: i
|
|
5089
5165
|
}
|
|
5090
5166
|
);
|
|
5091
5167
|
case "GoogleSearch":
|
|
5092
5168
|
return /* @__PURE__ */ r(
|
|
5093
|
-
|
|
5169
|
+
Fr,
|
|
5094
5170
|
{
|
|
5095
5171
|
data: c,
|
|
5096
|
-
isLatest:
|
|
5097
|
-
durationSeconds:
|
|
5172
|
+
isLatest: s.isLatest,
|
|
5173
|
+
durationSeconds: s.durationSeconds,
|
|
5098
5174
|
t: i
|
|
5099
5175
|
}
|
|
5100
5176
|
);
|
|
5101
5177
|
case "ScrapeWebsites":
|
|
5102
5178
|
return /* @__PURE__ */ r(
|
|
5103
|
-
|
|
5179
|
+
Hr,
|
|
5104
5180
|
{
|
|
5105
5181
|
data: c,
|
|
5106
|
-
isLatest:
|
|
5107
|
-
durationSeconds:
|
|
5182
|
+
isLatest: s.isLatest,
|
|
5183
|
+
durationSeconds: s.durationSeconds,
|
|
5108
5184
|
t: i
|
|
5109
5185
|
}
|
|
5110
5186
|
);
|
|
5111
5187
|
case "Completed":
|
|
5112
5188
|
return /* @__PURE__ */ r(
|
|
5113
|
-
|
|
5189
|
+
N,
|
|
5114
5190
|
{
|
|
5115
5191
|
text: c.response.textResponse,
|
|
5116
|
-
onFileDownload:
|
|
5192
|
+
onFileDownload: u,
|
|
5117
5193
|
onMemoryClick: a
|
|
5118
5194
|
}
|
|
5119
5195
|
);
|
|
5120
5196
|
default: {
|
|
5121
|
-
const
|
|
5122
|
-
return
|
|
5197
|
+
const f = c;
|
|
5198
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5123
5199
|
"[fency] Unknown MemoryChat eventType (no UI):",
|
|
5124
|
-
|
|
5125
|
-
|
|
5200
|
+
f.eventType,
|
|
5201
|
+
f
|
|
5126
5202
|
), null);
|
|
5127
5203
|
}
|
|
5128
5204
|
}
|
|
@@ -5130,50 +5206,50 @@ const kn = ({
|
|
|
5130
5206
|
switch (c.eventType) {
|
|
5131
5207
|
case "GeneratingQueries":
|
|
5132
5208
|
return /* @__PURE__ */ r(
|
|
5133
|
-
|
|
5209
|
+
yn,
|
|
5134
5210
|
{
|
|
5135
5211
|
data: c,
|
|
5136
|
-
isLatest:
|
|
5137
|
-
durationSeconds:
|
|
5212
|
+
isLatest: s.isLatest,
|
|
5213
|
+
durationSeconds: s.durationSeconds,
|
|
5138
5214
|
t: i
|
|
5139
5215
|
}
|
|
5140
5216
|
);
|
|
5141
5217
|
case "ExploreQueries":
|
|
5142
5218
|
return /* @__PURE__ */ r(
|
|
5143
|
-
|
|
5219
|
+
Tn,
|
|
5144
5220
|
{
|
|
5145
5221
|
data: c,
|
|
5146
|
-
isLatest:
|
|
5147
|
-
durationSeconds:
|
|
5148
|
-
onExploreQueryResultClick:
|
|
5222
|
+
isLatest: s.isLatest,
|
|
5223
|
+
durationSeconds: s.durationSeconds,
|
|
5224
|
+
onExploreQueryResultClick: p,
|
|
5149
5225
|
t: i
|
|
5150
5226
|
}
|
|
5151
5227
|
);
|
|
5152
5228
|
case "SearchMemoryTypes":
|
|
5153
5229
|
return /* @__PURE__ */ r(
|
|
5154
|
-
|
|
5230
|
+
pn,
|
|
5155
5231
|
{
|
|
5156
5232
|
data: c,
|
|
5157
|
-
isLatest:
|
|
5158
|
-
durationSeconds:
|
|
5233
|
+
isLatest: s.isLatest,
|
|
5234
|
+
durationSeconds: s.durationSeconds,
|
|
5159
5235
|
t: i
|
|
5160
5236
|
}
|
|
5161
5237
|
);
|
|
5162
5238
|
case "Completed":
|
|
5163
5239
|
return /* @__PURE__ */ r(
|
|
5164
|
-
|
|
5240
|
+
vn,
|
|
5165
5241
|
{
|
|
5166
5242
|
data: c,
|
|
5167
|
-
onSearchResultClick:
|
|
5243
|
+
onSearchResultClick: d,
|
|
5168
5244
|
t: i
|
|
5169
5245
|
}
|
|
5170
5246
|
);
|
|
5171
5247
|
default: {
|
|
5172
|
-
const
|
|
5173
|
-
return
|
|
5248
|
+
const f = c;
|
|
5249
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5174
5250
|
"[fency] Unknown MemorySearch eventType (no UI):",
|
|
5175
|
-
|
|
5176
|
-
|
|
5251
|
+
f.eventType,
|
|
5252
|
+
f
|
|
5177
5253
|
), null);
|
|
5178
5254
|
}
|
|
5179
5255
|
}
|
|
@@ -5181,136 +5257,128 @@ const kn = ({
|
|
|
5181
5257
|
switch (c.eventType) {
|
|
5182
5258
|
case "Text":
|
|
5183
5259
|
return /* @__PURE__ */ r(
|
|
5184
|
-
|
|
5260
|
+
N,
|
|
5185
5261
|
{
|
|
5186
5262
|
text: c.text,
|
|
5187
|
-
onFileDownload:
|
|
5263
|
+
onFileDownload: u,
|
|
5188
5264
|
onMemoryClick: a
|
|
5189
5265
|
}
|
|
5190
5266
|
);
|
|
5191
5267
|
case "Thinking":
|
|
5192
5268
|
return /* @__PURE__ */ r(
|
|
5193
|
-
|
|
5269
|
+
ge,
|
|
5194
5270
|
{
|
|
5195
5271
|
data: { taskType: "MemoryChat", eventType: "Thinking" },
|
|
5196
|
-
isLatest:
|
|
5197
|
-
durationSeconds:
|
|
5272
|
+
isLatest: s.isLatest,
|
|
5273
|
+
durationSeconds: s.durationSeconds,
|
|
5198
5274
|
t: i
|
|
5199
5275
|
}
|
|
5200
5276
|
);
|
|
5201
5277
|
case "Planning":
|
|
5202
5278
|
return /* @__PURE__ */ r(
|
|
5203
|
-
|
|
5279
|
+
Xr,
|
|
5204
5280
|
{
|
|
5205
5281
|
data: c,
|
|
5206
|
-
|
|
5207
|
-
|
|
5282
|
+
createdAt: s.item.createdAt,
|
|
5283
|
+
timestamp: s.item.timestamp,
|
|
5208
5284
|
t: i,
|
|
5209
5285
|
onMemoryClick: a
|
|
5210
5286
|
}
|
|
5211
5287
|
);
|
|
5212
5288
|
case "SetupSandbox":
|
|
5213
|
-
return
|
|
5214
|
-
Gr,
|
|
5215
|
-
{
|
|
5216
|
-
data: c,
|
|
5217
|
-
isLatest: l.isLatest,
|
|
5218
|
-
durationSeconds: l.durationSeconds,
|
|
5219
|
-
t: i
|
|
5220
|
-
}
|
|
5221
|
-
);
|
|
5289
|
+
return null;
|
|
5222
5290
|
case "ExportingMemories":
|
|
5223
5291
|
return /* @__PURE__ */ r(
|
|
5224
|
-
|
|
5292
|
+
Yr,
|
|
5225
5293
|
{
|
|
5226
5294
|
data: c,
|
|
5227
|
-
isLatest:
|
|
5228
|
-
durationSeconds:
|
|
5295
|
+
isLatest: s.isLatest,
|
|
5296
|
+
durationSeconds: s.durationSeconds,
|
|
5229
5297
|
t: i
|
|
5230
5298
|
}
|
|
5231
5299
|
);
|
|
5232
5300
|
case "FindMemories":
|
|
5233
5301
|
return /* @__PURE__ */ r(
|
|
5234
|
-
|
|
5302
|
+
Jr,
|
|
5235
5303
|
{
|
|
5236
5304
|
data: c,
|
|
5237
|
-
isLatest:
|
|
5238
|
-
durationSeconds:
|
|
5305
|
+
isLatest: s.isLatest,
|
|
5306
|
+
durationSeconds: s.durationSeconds,
|
|
5239
5307
|
t: i
|
|
5240
5308
|
}
|
|
5241
5309
|
);
|
|
5242
5310
|
case "FindMemoriesResult":
|
|
5243
|
-
return /* @__PURE__ */ r(
|
|
5311
|
+
return /* @__PURE__ */ r(Zr, { data: c, t: i });
|
|
5244
5312
|
case "SemanticSearch":
|
|
5245
5313
|
return /* @__PURE__ */ r(
|
|
5246
|
-
|
|
5314
|
+
rn,
|
|
5247
5315
|
{
|
|
5248
5316
|
data: c,
|
|
5249
|
-
isLatest:
|
|
5250
|
-
durationSeconds:
|
|
5317
|
+
isLatest: s.isLatest,
|
|
5318
|
+
durationSeconds: s.durationSeconds,
|
|
5251
5319
|
t: i,
|
|
5252
|
-
onSearchResultClick:
|
|
5320
|
+
onSearchResultClick: d
|
|
5253
5321
|
}
|
|
5254
5322
|
);
|
|
5255
5323
|
case "SemanticSearchForEach":
|
|
5256
5324
|
return /* @__PURE__ */ r(
|
|
5257
|
-
|
|
5325
|
+
tn,
|
|
5258
5326
|
{
|
|
5259
5327
|
data: c,
|
|
5260
|
-
completed:
|
|
5261
|
-
isLatest:
|
|
5328
|
+
completed: s.completed,
|
|
5329
|
+
isLatest: s.isLatest,
|
|
5262
5330
|
t: i
|
|
5263
5331
|
}
|
|
5264
5332
|
);
|
|
5265
5333
|
case "RunCode":
|
|
5266
5334
|
return /* @__PURE__ */ r(
|
|
5267
|
-
|
|
5335
|
+
an,
|
|
5268
5336
|
{
|
|
5269
5337
|
data: c,
|
|
5270
|
-
isLatest:
|
|
5271
|
-
durationSeconds:
|
|
5338
|
+
isLatest: s.isLatest,
|
|
5339
|
+
durationSeconds: s.durationSeconds,
|
|
5272
5340
|
t: i
|
|
5273
5341
|
}
|
|
5274
5342
|
);
|
|
5275
5343
|
case "FindSources":
|
|
5276
5344
|
return /* @__PURE__ */ r(
|
|
5277
|
-
|
|
5345
|
+
ce,
|
|
5278
5346
|
{
|
|
5279
5347
|
data: { taskType: "MemoryChat", eventType: "FindSources" },
|
|
5280
|
-
isLatest:
|
|
5281
|
-
durationSeconds:
|
|
5348
|
+
isLatest: s.isLatest,
|
|
5349
|
+
durationSeconds: s.durationSeconds,
|
|
5282
5350
|
t: i
|
|
5283
5351
|
}
|
|
5284
5352
|
);
|
|
5285
5353
|
case "SourcesResult":
|
|
5286
5354
|
return /* @__PURE__ */ r(
|
|
5287
|
-
|
|
5355
|
+
ln,
|
|
5288
5356
|
{
|
|
5289
5357
|
data: c,
|
|
5290
|
-
onSourceClick:
|
|
5358
|
+
onSourceClick: l,
|
|
5291
5359
|
t: i
|
|
5292
5360
|
}
|
|
5293
5361
|
);
|
|
5294
5362
|
case "Completed":
|
|
5295
5363
|
return /* @__PURE__ */ r(
|
|
5296
|
-
|
|
5364
|
+
N,
|
|
5297
5365
|
{
|
|
5298
5366
|
text: c.response.textResponse,
|
|
5299
|
-
onFileDownload:
|
|
5367
|
+
onFileDownload: u,
|
|
5300
5368
|
onMemoryClick: a
|
|
5301
5369
|
}
|
|
5302
5370
|
);
|
|
5303
5371
|
default: {
|
|
5304
|
-
const
|
|
5305
|
-
return
|
|
5372
|
+
const f = c;
|
|
5373
|
+
return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
|
|
5306
5374
|
"[fency] Unknown ExploreMemories eventType (no UI):",
|
|
5307
|
-
|
|
5308
|
-
|
|
5375
|
+
f.eventType,
|
|
5376
|
+
f
|
|
5309
5377
|
), null);
|
|
5310
5378
|
}
|
|
5311
5379
|
}
|
|
5312
5380
|
return c.taskType === "StreamingChatCompletion" && c.eventType === "Completed" ? /* @__PURE__ */ r(
|
|
5313
|
-
|
|
5381
|
+
N,
|
|
5314
5382
|
{
|
|
5315
5383
|
text: c.response.textResponse,
|
|
5316
5384
|
onMemoryClick: a
|
|
@@ -5329,40 +5397,42 @@ const kn = ({
|
|
|
5329
5397
|
shimmerColor: h.shimmerHighlight
|
|
5330
5398
|
}
|
|
5331
5399
|
) }) : null;
|
|
5332
|
-
const
|
|
5333
|
-
const
|
|
5334
|
-
if (
|
|
5400
|
+
const y = e.filter((s, c) => {
|
|
5401
|
+
const f = s.item.data;
|
|
5402
|
+
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
|
|
5403
|
+
return !1;
|
|
5404
|
+
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
5335
5405
|
return !e.slice(c + 1).some(
|
|
5336
5406
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
|
|
5337
5407
|
);
|
|
5338
|
-
if (
|
|
5408
|
+
if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
|
|
5339
5409
|
return !e.slice(c + 1).some(
|
|
5340
5410
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
|
|
5341
5411
|
);
|
|
5342
|
-
if (
|
|
5412
|
+
if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
|
|
5343
5413
|
return !e.slice(c + 1).some(
|
|
5344
5414
|
(E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
|
|
5345
5415
|
);
|
|
5346
|
-
if (
|
|
5416
|
+
if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
|
|
5347
5417
|
return !e.slice(c + 1).some(
|
|
5348
5418
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
|
|
5349
5419
|
);
|
|
5350
|
-
if (
|
|
5420
|
+
if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
|
|
5351
5421
|
return !e.slice(c + 1).some(
|
|
5352
5422
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
|
|
5353
5423
|
);
|
|
5354
|
-
if (
|
|
5424
|
+
if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
|
|
5355
5425
|
return !e.slice(c + 1).some(
|
|
5356
5426
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
|
|
5357
5427
|
);
|
|
5358
|
-
if (
|
|
5428
|
+
if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
|
|
5359
5429
|
return !e.slice(c + 1).some(
|
|
5360
5430
|
(E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
|
|
5361
5431
|
);
|
|
5362
|
-
if (
|
|
5363
|
-
const
|
|
5432
|
+
if (f.taskType === "ExploreMemories" && (f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
|
|
5433
|
+
const B = f.eventType;
|
|
5364
5434
|
return !e.slice(c + 1).some(
|
|
5365
|
-
(
|
|
5435
|
+
(se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === B
|
|
5366
5436
|
);
|
|
5367
5437
|
}
|
|
5368
5438
|
return !0;
|
|
@@ -5374,10 +5444,10 @@ const kn = ({
|
|
|
5374
5444
|
ref: x,
|
|
5375
5445
|
"data-theme": g,
|
|
5376
5446
|
children: [
|
|
5377
|
-
/* @__PURE__ */ r(
|
|
5447
|
+
/* @__PURE__ */ r(Ve, { children: y.map((s, c) => /* @__PURE__ */ r(
|
|
5378
5448
|
v.div,
|
|
5379
5449
|
{
|
|
5380
|
-
id: `agent-task-progress-item-${
|
|
5450
|
+
id: `agent-task-progress-item-${s.item.progressItemId}`,
|
|
5381
5451
|
initial: { opacity: 0, y: -20 },
|
|
5382
5452
|
animate: { opacity: 1, y: 0 },
|
|
5383
5453
|
transition: {
|
|
@@ -5386,27 +5456,27 @@ const kn = ({
|
|
|
5386
5456
|
ease: "easeOut"
|
|
5387
5457
|
},
|
|
5388
5458
|
children: /* @__PURE__ */ r(
|
|
5389
|
-
|
|
5459
|
+
wn,
|
|
5390
5460
|
{
|
|
5391
|
-
progressItemId:
|
|
5392
|
-
children:
|
|
5461
|
+
progressItemId: s.item.progressItemId,
|
|
5462
|
+
children: b(s)
|
|
5393
5463
|
}
|
|
5394
5464
|
)
|
|
5395
5465
|
},
|
|
5396
|
-
|
|
5466
|
+
s.item.progressItemId
|
|
5397
5467
|
)) }),
|
|
5398
5468
|
t ? /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ r(O, { message: t.message }) }) : null
|
|
5399
5469
|
]
|
|
5400
5470
|
}
|
|
5401
5471
|
);
|
|
5402
|
-
},
|
|
5403
|
-
const { colors: n } =
|
|
5404
|
-
|
|
5472
|
+
}, Mn = ({ taskId: e, label: o, copiedLabel: t }) => {
|
|
5473
|
+
const { colors: n } = T(), [i, a] = w(!1);
|
|
5474
|
+
H(() => {
|
|
5405
5475
|
if (!i) return;
|
|
5406
|
-
const
|
|
5407
|
-
return () => window.clearTimeout(
|
|
5476
|
+
const d = window.setTimeout(() => a(!1), 1500);
|
|
5477
|
+
return () => window.clearTimeout(d);
|
|
5408
5478
|
}, [i]);
|
|
5409
|
-
const
|
|
5479
|
+
const l = L(async () => {
|
|
5410
5480
|
try {
|
|
5411
5481
|
await navigator.clipboard.writeText(e), a(!0);
|
|
5412
5482
|
} catch {
|
|
@@ -5416,7 +5486,7 @@ const kn = ({
|
|
|
5416
5486
|
"button",
|
|
5417
5487
|
{
|
|
5418
5488
|
type: "button",
|
|
5419
|
-
onClick: () => void
|
|
5489
|
+
onClick: () => void l(),
|
|
5420
5490
|
title: o,
|
|
5421
5491
|
"aria-label": o,
|
|
5422
5492
|
style: {
|
|
@@ -5433,18 +5503,18 @@ const kn = ({
|
|
|
5433
5503
|
children: i ? t : o
|
|
5434
5504
|
}
|
|
5435
5505
|
);
|
|
5436
|
-
},
|
|
5506
|
+
}, Dn = ({
|
|
5437
5507
|
agentTask: e,
|
|
5438
5508
|
theme: o = "light",
|
|
5439
5509
|
language: t,
|
|
5440
5510
|
onMemoryClick: n,
|
|
5441
5511
|
onSourceClick: i,
|
|
5442
5512
|
onSearchResultClick: a,
|
|
5443
|
-
onExploreQueryResultClick:
|
|
5513
|
+
onExploreQueryResultClick: l
|
|
5444
5514
|
}) => {
|
|
5445
5515
|
var h;
|
|
5446
|
-
const
|
|
5447
|
-
return /* @__PURE__ */ r(
|
|
5516
|
+
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;
|
|
5517
|
+
return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
|
|
5448
5518
|
g ? /* @__PURE__ */ r(
|
|
5449
5519
|
"div",
|
|
5450
5520
|
{
|
|
@@ -5455,43 +5525,43 @@ const kn = ({
|
|
|
5455
5525
|
zIndex: 1
|
|
5456
5526
|
},
|
|
5457
5527
|
children: /* @__PURE__ */ r(
|
|
5458
|
-
|
|
5528
|
+
Mn,
|
|
5459
5529
|
{
|
|
5460
5530
|
taskId: g,
|
|
5461
|
-
label:
|
|
5462
|
-
copiedLabel:
|
|
5531
|
+
label: u.copyId,
|
|
5532
|
+
copiedLabel: u.copiedId
|
|
5463
5533
|
}
|
|
5464
5534
|
)
|
|
5465
5535
|
}
|
|
5466
5536
|
) : null,
|
|
5467
5537
|
/* @__PURE__ */ r(
|
|
5468
|
-
|
|
5538
|
+
Cn,
|
|
5469
5539
|
{
|
|
5470
|
-
progressViewItems:
|
|
5540
|
+
progressViewItems: d,
|
|
5471
5541
|
loading: e.loading,
|
|
5472
5542
|
error: e.error,
|
|
5473
5543
|
loadingText: e.loadingText,
|
|
5474
|
-
t:
|
|
5544
|
+
t: u,
|
|
5475
5545
|
onMemoryClick: n,
|
|
5476
5546
|
onSourceClick: i,
|
|
5477
5547
|
onSearchResultClick: a,
|
|
5478
|
-
onExploreQueryResultClick:
|
|
5548
|
+
onExploreQueryResultClick: l,
|
|
5479
5549
|
downloadFile: e.downloadFile
|
|
5480
5550
|
}
|
|
5481
5551
|
)
|
|
5482
5552
|
] }) });
|
|
5483
5553
|
};
|
|
5484
5554
|
export {
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5555
|
+
Dn as AgentTaskProgress,
|
|
5556
|
+
ar as AgentTaskThemeProvider,
|
|
5557
|
+
F as Checkmark,
|
|
5558
|
+
Ln as FencyProvider,
|
|
5559
|
+
vn as MemorySearchCompletedResults,
|
|
5560
|
+
Nn as StreamEventManager,
|
|
5561
|
+
q as XMark,
|
|
5562
|
+
ir as darkAgentTaskThemeColors,
|
|
5563
|
+
we as getAgentTaskPrismStyle,
|
|
5564
|
+
Te as lightAgentTaskThemeColors,
|
|
5565
|
+
T as useAgentTaskTheme,
|
|
5566
|
+
An as useAgentTasks
|
|
5497
5567
|
};
|