@fencyai/react 0.1.118 → 0.1.119
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/AgentTaskProgress.d.ts +1 -0
- package/dist/agent-task/data-types/StreamingMemoryTypeChatCompletionSourcesResult.d.ts +1 -0
- package/dist/index.js +299 -290
- package/dist/types/CreateAgentTaskParams.d.ts +7 -0
- package/dist/types/CreateAgentTaskResponse.d.ts +7 -0
- package/dist/types/UseAgentTasksProps.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createAgentTask as q, createFileDownloadLink as J, createStream as V } from "@fencyai/js";
|
|
2
|
-
import { createContext as X, useContext as Q, useState as x, useRef as I, useEffect as w, useCallback as U, useMemo as
|
|
3
|
-
import { jsx as l, jsxs as
|
|
4
|
-
import { useInView as Y, motion as
|
|
5
|
-
import
|
|
2
|
+
import { createContext as X, useContext as Q, useState as x, useRef as I, useEffect as w, useCallback as U, useMemo as G } from "react";
|
|
3
|
+
import { jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
4
|
+
import { useInView as Y, motion as k, AnimatePresence as j } from "motion/react";
|
|
5
|
+
import $ from "react-markdown";
|
|
6
6
|
import { Prism as R } from "react-syntax-highlighter";
|
|
7
|
-
import
|
|
8
|
-
import './assets/index.css';const
|
|
7
|
+
import B from "remark-gfm";
|
|
8
|
+
import './assets/index.css';const W = X(
|
|
9
9
|
void 0
|
|
10
10
|
);
|
|
11
|
-
function
|
|
12
|
-
const e = Q(
|
|
11
|
+
function N() {
|
|
12
|
+
const e = Q(W);
|
|
13
13
|
if (e === void 0)
|
|
14
14
|
throw new Error("useFencyContext must be used within a FencyProvider");
|
|
15
15
|
return e;
|
|
@@ -50,12 +50,12 @@ const Z = (e) => {
|
|
|
50
50
|
createdAt: e.createdAt,
|
|
51
51
|
data: JSON.parse(e.data)
|
|
52
52
|
}), ae = (e) => {
|
|
53
|
-
const t =
|
|
53
|
+
const t = N(), [n, r] = x(null), o = I(`subscriber-${Math.random().toString(36).substr(2, 9)}`);
|
|
54
54
|
return w(() => {
|
|
55
55
|
if (!t.eventManager) return;
|
|
56
56
|
const c = {
|
|
57
|
-
onMessage: (g,
|
|
58
|
-
var d, u,
|
|
57
|
+
onMessage: (g, a) => {
|
|
58
|
+
var d, u, S, y, b, f, h, C, P, A;
|
|
59
59
|
const s = Z(g);
|
|
60
60
|
if (s)
|
|
61
61
|
switch (s.type) {
|
|
@@ -66,13 +66,13 @@ const Z = (e) => {
|
|
|
66
66
|
(u = e == null ? void 0 : e.onChatCompletionStreamCompleted) == null || u.call(e, s);
|
|
67
67
|
break;
|
|
68
68
|
case "StreamTimeout":
|
|
69
|
-
(
|
|
69
|
+
(S = e == null ? void 0 : e.onStreamTimeout) == null || S.call(e, s);
|
|
70
70
|
break;
|
|
71
71
|
case "StreamNotFound":
|
|
72
72
|
(y = e == null ? void 0 : e.onStreamNotFound) == null || y.call(e, s);
|
|
73
73
|
break;
|
|
74
74
|
case "FileUploadCompleted":
|
|
75
|
-
(
|
|
75
|
+
(b = e == null ? void 0 : e.onFileUploadCompleted) == null || b.call(e, s);
|
|
76
76
|
break;
|
|
77
77
|
case "FileTextContentReady":
|
|
78
78
|
(f = e == null ? void 0 : e.onFileTextContentReady) == null || f.call(e, s);
|
|
@@ -81,7 +81,7 @@ const Z = (e) => {
|
|
|
81
81
|
(h = e == null ? void 0 : e.onWebsiteHtmlContentReady) == null || h.call(e, s);
|
|
82
82
|
break;
|
|
83
83
|
case "WebsiteTextContentReady":
|
|
84
|
-
(
|
|
84
|
+
(C = e == null ? void 0 : e.onWebsiteTextContentReady) == null || C.call(e, s);
|
|
85
85
|
break;
|
|
86
86
|
case "FileSearchIndexReady":
|
|
87
87
|
(P = e == null ? void 0 : e.onFileSearchIndexReady) == null || P.call(e, s);
|
|
@@ -92,8 +92,8 @@ const Z = (e) => {
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
onError: (g) => {
|
|
95
|
-
var
|
|
96
|
-
(
|
|
95
|
+
var a;
|
|
96
|
+
(a = e == null ? void 0 : e.onStreamError) == null || a.call(e, {
|
|
97
97
|
streamId: g,
|
|
98
98
|
error: {
|
|
99
99
|
code: "UnknownError",
|
|
@@ -103,7 +103,7 @@ const Z = (e) => {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
return t.eventManager.subscribe(
|
|
106
|
-
|
|
106
|
+
o.current,
|
|
107
107
|
c
|
|
108
108
|
);
|
|
109
109
|
}, [t.eventManager, e]), {
|
|
@@ -126,54 +126,54 @@ const Z = (e) => {
|
|
|
126
126
|
},
|
|
127
127
|
stream: n
|
|
128
128
|
};
|
|
129
|
-
},
|
|
130
|
-
const t =
|
|
131
|
-
onAgentTaskProgressItemUpdated: (
|
|
129
|
+
}, De = (e) => {
|
|
130
|
+
const t = N(), [n, r] = x([]), o = I(/* @__PURE__ */ new Set()), m = I(/* @__PURE__ */ new Map()), { createStream: c } = ae({
|
|
131
|
+
onAgentTaskProgressItemUpdated: (a) => {
|
|
132
132
|
var u;
|
|
133
|
-
if (!
|
|
134
|
-
const s =
|
|
135
|
-
if (s.type === "GenericAgentTaskCompleted" || s.type === "StreamingChatCompletionCompleted" || s.type === "StructuredChatCompletionCompleted") {
|
|
136
|
-
const
|
|
137
|
-
|
|
133
|
+
if (!o.current.has(a.agentTaskId)) return;
|
|
134
|
+
const s = a.data;
|
|
135
|
+
if (s.type === "GenericAgentTaskCompleted" || s.type === "StreamingChatCompletionCompleted" || s.type === "StructuredChatCompletionCompleted" || s.type === "StreamingMemoryTypeChatCompletionCompleted") {
|
|
136
|
+
const S = m.current.get(a.agentTaskId);
|
|
137
|
+
S && (m.current.delete(a.agentTaskId), S(s));
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
-
(u = e.onAgentTaskProgressItemUpdated) == null || u.call(e,
|
|
141
|
-
(
|
|
140
|
+
(u = e.onAgentTaskProgressItemUpdated) == null || u.call(e, a), r(
|
|
141
|
+
(S) => S.map((y) => {
|
|
142
142
|
var h;
|
|
143
|
-
if (((h = y.confirmedData) == null ? void 0 : h.taskId) !==
|
|
143
|
+
if (((h = y.confirmedData) == null ? void 0 : h.taskId) !== a.agentTaskId) return y;
|
|
144
144
|
const f = y.progressItems.some(
|
|
145
|
-
(
|
|
145
|
+
(C) => C.progressItemId === a.progressItemId
|
|
146
146
|
) ? y.progressItems.map(
|
|
147
|
-
(
|
|
148
|
-
) : [...y.progressItems,
|
|
147
|
+
(C) => C.progressItemId === a.progressItemId ? a : C
|
|
148
|
+
) : [...y.progressItems, a];
|
|
149
149
|
return { ...y, progressItems: f };
|
|
150
150
|
})
|
|
151
151
|
);
|
|
152
152
|
},
|
|
153
|
-
onStreamError: (
|
|
153
|
+
onStreamError: (a) => {
|
|
154
154
|
var s;
|
|
155
|
-
(s = e == null ? void 0 : e.onStreamError) == null || s.call(e,
|
|
156
|
-
const u = d.find((
|
|
155
|
+
(s = e == null ? void 0 : e.onStreamError) == null || s.call(e, a), r((d) => {
|
|
156
|
+
const u = d.find((S) => S.streamId === a.streamId);
|
|
157
157
|
return u ? [
|
|
158
|
-
...d.filter((
|
|
158
|
+
...d.filter((S) => S.streamId !== a.streamId),
|
|
159
159
|
{
|
|
160
160
|
...u,
|
|
161
161
|
loading: !1,
|
|
162
|
-
error:
|
|
162
|
+
error: a.error
|
|
163
163
|
}
|
|
164
164
|
] : d;
|
|
165
165
|
});
|
|
166
166
|
},
|
|
167
|
-
onStreamNotFound: (
|
|
167
|
+
onStreamNotFound: (a) => {
|
|
168
168
|
var s;
|
|
169
|
-
(s = e == null ? void 0 : e.onStreamNotFound) == null || s.call(e,
|
|
169
|
+
(s = e == null ? void 0 : e.onStreamNotFound) == null || s.call(e, a);
|
|
170
170
|
},
|
|
171
|
-
onStreamTimeout: (
|
|
171
|
+
onStreamTimeout: (a) => {
|
|
172
172
|
var s;
|
|
173
|
-
(s = e == null ? void 0 : e.onStreamTimeout) == null || s.call(e,
|
|
173
|
+
(s = e == null ? void 0 : e.onStreamTimeout) == null || s.call(e, a);
|
|
174
174
|
}
|
|
175
|
-
}),
|
|
176
|
-
async (
|
|
175
|
+
}), i = U(
|
|
176
|
+
async (a, s) => {
|
|
177
177
|
const d = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, u = await c();
|
|
178
178
|
if (u.type === "success") {
|
|
179
179
|
r([
|
|
@@ -184,26 +184,27 @@ const Z = (e) => {
|
|
|
184
184
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
185
185
|
confirmedData: null,
|
|
186
186
|
error: null,
|
|
187
|
-
params:
|
|
187
|
+
params: a,
|
|
188
188
|
progressItems: [],
|
|
189
189
|
loading: !0,
|
|
190
190
|
doneStreaming: !1,
|
|
191
191
|
loadingText: s == null ? void 0 : s.loadingText
|
|
192
192
|
}
|
|
193
193
|
]);
|
|
194
|
-
const { clientToken:
|
|
194
|
+
const { clientToken: S } = await e.fetchCreateAgentTaskClientToken(a.type), y = await q({
|
|
195
195
|
pk: t.fency.publishableKey,
|
|
196
196
|
baseUrl: t.fency.baseUrl,
|
|
197
|
-
clientToken:
|
|
197
|
+
clientToken: S,
|
|
198
198
|
streamToken: u.stream.token,
|
|
199
199
|
request: {
|
|
200
|
-
genericTask:
|
|
201
|
-
streamingChatCompletionTask:
|
|
202
|
-
structuredChatCompletionTask:
|
|
200
|
+
genericTask: a.type === "genericAgentTask" ? { query: a.query, jsonSchema: a.jsonSchema } : void 0,
|
|
201
|
+
streamingChatCompletionTask: a.type === "streamingChatCompletion" ? { messages: a.messages, model: a.model } : void 0,
|
|
202
|
+
structuredChatCompletionTask: a.type === "structuredChatCompletion" ? { messages: a.messages, jsonSchema: a.jsonSchema, model: a.model } : void 0,
|
|
203
|
+
streamingMemoryTypeChatCompletionTask: a.type === "streamingMemoryTypeChatCompletion" ? { messages: a.messages, model: a.model } : void 0
|
|
203
204
|
}
|
|
204
205
|
});
|
|
205
206
|
if (y.type === "success" && y.agentTask) {
|
|
206
|
-
|
|
207
|
+
o.current.add(
|
|
207
208
|
y.agentTask.id
|
|
208
209
|
), r((f) => [
|
|
209
210
|
...f.filter(
|
|
@@ -216,7 +217,7 @@ const Z = (e) => {
|
|
|
216
217
|
taskId: y.agentTask.id,
|
|
217
218
|
createdAt: y.agentTask.createdAt,
|
|
218
219
|
error: null,
|
|
219
|
-
params:
|
|
220
|
+
params: a,
|
|
220
221
|
progressItems: [],
|
|
221
222
|
doneStreaming: !1,
|
|
222
223
|
loading: !0,
|
|
@@ -227,7 +228,7 @@ const Z = (e) => {
|
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
230
|
]);
|
|
230
|
-
const
|
|
231
|
+
const b = await new Promise(
|
|
231
232
|
(f) => {
|
|
232
233
|
m.current.set(
|
|
233
234
|
y.agentTask.id,
|
|
@@ -239,19 +240,19 @@ const Z = (e) => {
|
|
|
239
240
|
type: "success",
|
|
240
241
|
streamId: u.stream.id,
|
|
241
242
|
agentTaskId: y.agentTask.id,
|
|
242
|
-
response:
|
|
243
|
+
response: b
|
|
243
244
|
};
|
|
244
245
|
} else {
|
|
245
246
|
if (y.type === "error")
|
|
246
|
-
return r((
|
|
247
|
-
...
|
|
247
|
+
return r((b) => [
|
|
248
|
+
...b.filter(
|
|
248
249
|
(f) => f.taskKey !== d
|
|
249
250
|
),
|
|
250
251
|
{
|
|
251
252
|
taskKey: d,
|
|
252
253
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
253
254
|
streamId: u.stream.id,
|
|
254
|
-
params:
|
|
255
|
+
params: a,
|
|
255
256
|
error: y.error,
|
|
256
257
|
progressItems: [],
|
|
257
258
|
loading: !1,
|
|
@@ -264,7 +265,7 @@ const Z = (e) => {
|
|
|
264
265
|
error: y.error
|
|
265
266
|
};
|
|
266
267
|
{
|
|
267
|
-
const
|
|
268
|
+
const b = {
|
|
268
269
|
message: "No response received",
|
|
269
270
|
code: "UnknownError"
|
|
270
271
|
};
|
|
@@ -276,8 +277,8 @@ const Z = (e) => {
|
|
|
276
277
|
taskKey: d,
|
|
277
278
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
278
279
|
streamId: u.stream.id,
|
|
279
|
-
error:
|
|
280
|
-
params:
|
|
280
|
+
error: b,
|
|
281
|
+
params: a,
|
|
281
282
|
progressItems: [],
|
|
282
283
|
loading: !1,
|
|
283
284
|
doneStreaming: !1,
|
|
@@ -286,7 +287,7 @@ const Z = (e) => {
|
|
|
286
287
|
}
|
|
287
288
|
]), {
|
|
288
289
|
type: "error",
|
|
289
|
-
error:
|
|
290
|
+
error: b
|
|
290
291
|
};
|
|
291
292
|
}
|
|
292
293
|
}
|
|
@@ -294,15 +295,15 @@ const Z = (e) => {
|
|
|
294
295
|
return console.error(u.error), u;
|
|
295
296
|
},
|
|
296
297
|
[t, n, c]
|
|
297
|
-
), g =
|
|
298
|
+
), g = G(() => {
|
|
298
299
|
if (n.length !== 0)
|
|
299
|
-
return [...n].sort((
|
|
300
|
+
return [...n].sort((a, s) => new Date(s.triggeredAt).getTime() - new Date(a.triggeredAt).getTime())[0];
|
|
300
301
|
}, [n]);
|
|
301
302
|
return w(() => () => {
|
|
302
|
-
|
|
303
|
+
o.current.clear(), m.current.clear();
|
|
303
304
|
}, []), {
|
|
304
305
|
agentTasks: n,
|
|
305
|
-
createAgentTask:
|
|
306
|
+
createAgentTask: i,
|
|
306
307
|
latest: g
|
|
307
308
|
};
|
|
308
309
|
};
|
|
@@ -313,40 +314,40 @@ async function oe(e, t) {
|
|
|
313
314
|
t(r.value);
|
|
314
315
|
}
|
|
315
316
|
function ie(e) {
|
|
316
|
-
let t, n, r,
|
|
317
|
+
let t, n, r, o = !1;
|
|
317
318
|
return function(c) {
|
|
318
319
|
t === void 0 ? (t = c, n = 0, r = -1) : t = ce(t, c);
|
|
319
|
-
const
|
|
320
|
+
const i = t.length;
|
|
320
321
|
let g = 0;
|
|
321
|
-
for (; n <
|
|
322
|
-
|
|
323
|
-
let
|
|
324
|
-
for (; n <
|
|
322
|
+
for (; n < i; ) {
|
|
323
|
+
o && (t[n] === 10 && (g = ++n), o = !1);
|
|
324
|
+
let a = -1;
|
|
325
|
+
for (; n < i && a === -1; ++n)
|
|
325
326
|
switch (t[n]) {
|
|
326
327
|
case 58:
|
|
327
328
|
r === -1 && (r = n - g);
|
|
328
329
|
break;
|
|
329
330
|
case 13:
|
|
330
|
-
|
|
331
|
+
o = !0;
|
|
331
332
|
case 10:
|
|
332
|
-
|
|
333
|
+
a = n;
|
|
333
334
|
break;
|
|
334
335
|
}
|
|
335
|
-
if (
|
|
336
|
+
if (a === -1)
|
|
336
337
|
break;
|
|
337
|
-
e(t.subarray(g,
|
|
338
|
+
e(t.subarray(g, a), r), g = n, r = -1;
|
|
338
339
|
}
|
|
339
|
-
g ===
|
|
340
|
+
g === i ? t = void 0 : g !== 0 && (t = t.subarray(g), n -= g);
|
|
340
341
|
};
|
|
341
342
|
}
|
|
342
343
|
function se(e, t, n) {
|
|
343
|
-
let r =
|
|
344
|
-
const
|
|
345
|
-
return function(c,
|
|
344
|
+
let r = z();
|
|
345
|
+
const o = new TextDecoder();
|
|
346
|
+
return function(c, i) {
|
|
346
347
|
if (c.length === 0)
|
|
347
|
-
n == null || n(r), r =
|
|
348
|
-
else if (
|
|
349
|
-
const g =
|
|
348
|
+
n == null || n(r), r = z();
|
|
349
|
+
else if (i > 0) {
|
|
350
|
+
const g = o.decode(c.subarray(0, i)), a = i + (c[i + 1] === 32 ? 2 : 1), s = o.decode(c.subarray(a));
|
|
350
351
|
switch (g) {
|
|
351
352
|
case "data":
|
|
352
353
|
r.data = r.data ? r.data + `
|
|
@@ -370,7 +371,7 @@ function ce(e, t) {
|
|
|
370
371
|
const n = new Uint8Array(e.length + t.length);
|
|
371
372
|
return n.set(e), n.set(t, e.length), n;
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function z() {
|
|
374
375
|
return {
|
|
375
376
|
data: "",
|
|
376
377
|
event: "",
|
|
@@ -382,46 +383,46 @@ var le = function(e, t) {
|
|
|
382
383
|
var n = {};
|
|
383
384
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
384
385
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
385
|
-
for (var
|
|
386
|
-
t.indexOf(r[
|
|
386
|
+
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
387
|
+
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
387
388
|
return n;
|
|
388
389
|
};
|
|
389
|
-
const D = "text/event-stream", de = 1e3,
|
|
390
|
+
const D = "text/event-stream", de = 1e3, L = "last-event-id";
|
|
390
391
|
function H(e, t) {
|
|
391
|
-
var { signal: n, headers: r, onopen:
|
|
392
|
+
var { signal: n, headers: r, onopen: o, onmessage: m, onclose: c, onerror: i, openWhenHidden: g, fetch: a } = t, s = le(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
392
393
|
return new Promise((d, u) => {
|
|
393
|
-
const
|
|
394
|
-
|
|
394
|
+
const S = Object.assign({}, r);
|
|
395
|
+
S.accept || (S.accept = D);
|
|
395
396
|
let y;
|
|
396
|
-
function
|
|
397
|
+
function b() {
|
|
397
398
|
y.abort(), document.hidden || E();
|
|
398
399
|
}
|
|
399
|
-
g || document.addEventListener("visibilitychange",
|
|
400
|
+
g || document.addEventListener("visibilitychange", b);
|
|
400
401
|
let f = de, h = 0;
|
|
401
|
-
function
|
|
402
|
-
document.removeEventListener("visibilitychange",
|
|
402
|
+
function C() {
|
|
403
|
+
document.removeEventListener("visibilitychange", b), window.clearTimeout(h), y.abort();
|
|
403
404
|
}
|
|
404
405
|
n == null || n.addEventListener("abort", () => {
|
|
405
|
-
|
|
406
|
+
C(), d();
|
|
406
407
|
});
|
|
407
|
-
const P =
|
|
408
|
+
const P = a ?? window.fetch, A = o ?? ue;
|
|
408
409
|
async function E() {
|
|
409
410
|
var F;
|
|
410
411
|
y = new AbortController();
|
|
411
412
|
try {
|
|
412
|
-
const p = await P(e, Object.assign(Object.assign({}, s), { headers:
|
|
413
|
+
const p = await P(e, Object.assign(Object.assign({}, s), { headers: S, signal: y.signal }));
|
|
413
414
|
await A(p), await oe(p.body, ie(se((v) => {
|
|
414
|
-
v ?
|
|
415
|
+
v ? S[L] = v : delete S[L];
|
|
415
416
|
}, (v) => {
|
|
416
417
|
f = v;
|
|
417
|
-
}, m))), c == null || c(),
|
|
418
|
+
}, m))), c == null || c(), C(), d();
|
|
418
419
|
} catch (p) {
|
|
419
420
|
if (!y.signal.aborted)
|
|
420
421
|
try {
|
|
421
|
-
const v = (F =
|
|
422
|
+
const v = (F = i == null ? void 0 : i(p)) !== null && F !== void 0 ? F : f;
|
|
422
423
|
window.clearTimeout(h), h = window.setTimeout(E, v);
|
|
423
424
|
} catch (v) {
|
|
424
|
-
|
|
425
|
+
C(), u(v);
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
428
|
}
|
|
@@ -433,7 +434,7 @@ function ue(e) {
|
|
|
433
434
|
if (!(t != null && t.startsWith(D)))
|
|
434
435
|
throw new Error(`Expected content-type to be ${D}, Actual: ${t}`);
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
+
function Ue(e) {
|
|
437
438
|
const [t, n] = x(null);
|
|
438
439
|
return w(() => {
|
|
439
440
|
if (!t)
|
|
@@ -442,18 +443,18 @@ function De(e) {
|
|
|
442
443
|
return H(t, {
|
|
443
444
|
headers: e == null ? void 0 : e.headers,
|
|
444
445
|
signal: r.signal,
|
|
445
|
-
async onopen(
|
|
446
|
-
if (!
|
|
447
|
-
throw new Error(`Client error ${
|
|
446
|
+
async onopen(o) {
|
|
447
|
+
if (!o.ok && o.status >= 400 && o.status < 500 && o.status !== 429)
|
|
448
|
+
throw new Error(`Client error ${o.status}`);
|
|
448
449
|
},
|
|
449
|
-
onmessage(
|
|
450
|
-
|
|
450
|
+
onmessage(o) {
|
|
451
|
+
o.data && (e == null || e.onMessage({
|
|
451
452
|
url: t,
|
|
452
|
-
data: K(
|
|
453
|
+
data: K(o.data)
|
|
453
454
|
}));
|
|
454
455
|
},
|
|
455
|
-
onerror(
|
|
456
|
-
throw console.error("EventSource error:",
|
|
456
|
+
onerror(o) {
|
|
457
|
+
throw console.error("EventSource error:", o), e == null || e.onError(t), n(null), o;
|
|
457
458
|
},
|
|
458
459
|
onclose() {
|
|
459
460
|
}
|
|
@@ -471,13 +472,13 @@ function K(e) {
|
|
|
471
472
|
n[r] = t.charCodeAt(r);
|
|
472
473
|
return new TextDecoder("utf-8").decode(n);
|
|
473
474
|
}
|
|
474
|
-
function
|
|
475
|
+
function $e(e, t) {
|
|
475
476
|
const [n, r] = x(
|
|
476
477
|
null
|
|
477
|
-
), [
|
|
478
|
+
), [o, m] = x(
|
|
478
479
|
null
|
|
479
|
-
), c =
|
|
480
|
-
const u = await d.fetchTokens(), { fetchTokens:
|
|
480
|
+
), c = N(), i = async (d) => {
|
|
481
|
+
const u = await d.fetchTokens(), { fetchTokens: S, nextPageToken: y, previousPageToken: b, ...f } = d, h = await e({
|
|
481
482
|
pk: c.fency.publishableKey,
|
|
482
483
|
clientToken: u.clientToken,
|
|
483
484
|
streamToken: u.streamToken,
|
|
@@ -486,7 +487,7 @@ function Ue(e, t) {
|
|
|
486
487
|
limit: (t == null ? void 0 : t.pageSize) ?? 50,
|
|
487
488
|
pagination: {
|
|
488
489
|
nextPageToken: y,
|
|
489
|
-
previousPageToken:
|
|
490
|
+
previousPageToken: b
|
|
490
491
|
}
|
|
491
492
|
},
|
|
492
493
|
baseUrl: c.fency.baseUrl
|
|
@@ -509,7 +510,7 @@ function Ue(e, t) {
|
|
|
509
510
|
};
|
|
510
511
|
return {
|
|
511
512
|
fetchFirstPage: async (d) => {
|
|
512
|
-
const u = await
|
|
513
|
+
const u = await i({
|
|
513
514
|
...d,
|
|
514
515
|
nextPageToken: void 0,
|
|
515
516
|
previousPageToken: void 0
|
|
@@ -517,7 +518,7 @@ function Ue(e, t) {
|
|
|
517
518
|
return u.type === "success" && (m(u.page), r(d)), u;
|
|
518
519
|
},
|
|
519
520
|
fetchNextPage: async (d) => {
|
|
520
|
-
if (
|
|
521
|
+
if (o == null)
|
|
521
522
|
return {
|
|
522
523
|
type: "error",
|
|
523
524
|
error: {
|
|
@@ -525,7 +526,7 @@ function Ue(e, t) {
|
|
|
525
526
|
message: "No current page"
|
|
526
527
|
}
|
|
527
528
|
};
|
|
528
|
-
if (
|
|
529
|
+
if (o.pagination.nextPageToken == null)
|
|
529
530
|
return {
|
|
530
531
|
type: "error",
|
|
531
532
|
error: {
|
|
@@ -533,15 +534,15 @@ function Ue(e, t) {
|
|
|
533
534
|
message: "No next page"
|
|
534
535
|
}
|
|
535
536
|
};
|
|
536
|
-
const u = await
|
|
537
|
+
const u = await i({
|
|
537
538
|
...d,
|
|
538
|
-
nextPageToken:
|
|
539
|
+
nextPageToken: o.pagination.nextPageToken,
|
|
539
540
|
previousPageToken: void 0
|
|
540
541
|
});
|
|
541
542
|
return u.type === "success" && (m(u.page), r(d)), u;
|
|
542
543
|
},
|
|
543
544
|
fetchPreviousPage: async (d) => {
|
|
544
|
-
if (
|
|
545
|
+
if (o == null)
|
|
545
546
|
return {
|
|
546
547
|
type: "error",
|
|
547
548
|
error: {
|
|
@@ -549,7 +550,7 @@ function Ue(e, t) {
|
|
|
549
550
|
message: "No current page"
|
|
550
551
|
}
|
|
551
552
|
};
|
|
552
|
-
if (
|
|
553
|
+
if (o.pagination.previousPageToken == null)
|
|
553
554
|
return {
|
|
554
555
|
type: "error",
|
|
555
556
|
error: {
|
|
@@ -557,10 +558,10 @@ function Ue(e, t) {
|
|
|
557
558
|
message: "No previous page"
|
|
558
559
|
}
|
|
559
560
|
};
|
|
560
|
-
const u = await
|
|
561
|
+
const u = await i({
|
|
561
562
|
...d,
|
|
562
563
|
nextPageToken: void 0,
|
|
563
|
-
previousPageToken:
|
|
564
|
+
previousPageToken: o.pagination.previousPageToken
|
|
564
565
|
});
|
|
565
566
|
return u.type === "success" && (m(u.page), r(d)), u;
|
|
566
567
|
},
|
|
@@ -570,46 +571,46 @@ function Ue(e, t) {
|
|
|
570
571
|
code: "NO_CURRENT_PAGE",
|
|
571
572
|
message: "No current page, please call fetchFirstPage first."
|
|
572
573
|
}
|
|
573
|
-
} :
|
|
574
|
-
currentPage:
|
|
574
|
+
} : i(n),
|
|
575
|
+
currentPage: o
|
|
575
576
|
};
|
|
576
577
|
}
|
|
577
578
|
function me(e) {
|
|
578
579
|
return e.progressItems.map((t, n) => {
|
|
579
|
-
const r = e.progressItems[n + 1],
|
|
580
|
+
const r = e.progressItems[n + 1], o = r != null;
|
|
580
581
|
let m;
|
|
581
582
|
if (r != null && r.createdAt) {
|
|
582
|
-
const c = new Date(t.createdAt).getTime(),
|
|
583
|
-
m = Math.round((
|
|
583
|
+
const c = new Date(t.createdAt).getTime(), i = new Date(r.createdAt).getTime();
|
|
584
|
+
m = Math.round((i - c) / 1e3);
|
|
584
585
|
}
|
|
585
586
|
return {
|
|
586
587
|
item: t,
|
|
587
|
-
completed:
|
|
588
|
+
completed: o,
|
|
588
589
|
isLatest: n === e.progressItems.length - 1,
|
|
589
590
|
durationSeconds: m
|
|
590
591
|
};
|
|
591
592
|
});
|
|
592
593
|
}
|
|
593
|
-
function
|
|
594
|
+
function M({
|
|
594
595
|
text: e,
|
|
595
596
|
duration: t = 2,
|
|
596
597
|
delay: n = 0,
|
|
597
598
|
repeat: r = !0,
|
|
598
|
-
repeatDelay:
|
|
599
|
+
repeatDelay: o = 0.5,
|
|
599
600
|
className: m,
|
|
600
601
|
startOnView: c = !1,
|
|
601
|
-
once:
|
|
602
|
+
once: i = !1,
|
|
602
603
|
inViewMargin: g,
|
|
603
|
-
spread:
|
|
604
|
+
spread: a = 2,
|
|
604
605
|
color: s = "#999",
|
|
605
606
|
shimmerColor: d = "#000",
|
|
606
607
|
direction: u = "fromBottom"
|
|
607
608
|
}) {
|
|
608
|
-
const
|
|
609
|
+
const S = I(null), y = Y(S, { once: i, margin: g }), b = G(() => e.length * a, [e, a]), f = !c || y, h = u === "fromBottom" ? "100% center" : "-100% center", C = u === "fromBottom" ? "0% center" : "200% center";
|
|
609
610
|
return /* @__PURE__ */ l(
|
|
610
|
-
|
|
611
|
+
k.span,
|
|
611
612
|
{
|
|
612
|
-
ref:
|
|
613
|
+
ref: S,
|
|
613
614
|
className: m,
|
|
614
615
|
style: {
|
|
615
616
|
position: "relative",
|
|
@@ -620,7 +621,7 @@ function N({
|
|
|
620
621
|
color: "transparent",
|
|
621
622
|
WebkitTextFillColor: "transparent",
|
|
622
623
|
backgroundRepeat: "no-repeat, padding-box",
|
|
623
|
-
"--spread": `${
|
|
624
|
+
"--spread": `${b}px`,
|
|
624
625
|
"--base-color": s,
|
|
625
626
|
"--shimmer-color": d,
|
|
626
627
|
"--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
|
|
@@ -631,7 +632,7 @@ function N({
|
|
|
631
632
|
opacity: 0
|
|
632
633
|
},
|
|
633
634
|
animate: f ? {
|
|
634
|
-
backgroundPosition:
|
|
635
|
+
backgroundPosition: C,
|
|
635
636
|
opacity: 1
|
|
636
637
|
} : {},
|
|
637
638
|
transition: {
|
|
@@ -639,7 +640,7 @@ function N({
|
|
|
639
640
|
repeat: r ? 1 / 0 : 0,
|
|
640
641
|
duration: t,
|
|
641
642
|
delay: n,
|
|
642
|
-
repeatDelay:
|
|
643
|
+
repeatDelay: o,
|
|
643
644
|
ease: "linear"
|
|
644
645
|
},
|
|
645
646
|
opacity: {
|
|
@@ -686,8 +687,8 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
686
687
|
const t = e[e.length - 1];
|
|
687
688
|
if (!t) return null;
|
|
688
689
|
const n = ge(t);
|
|
689
|
-
return /* @__PURE__ */ l("div", { className: "simple-mode-container", children: /* @__PURE__ */ l(
|
|
690
|
-
|
|
690
|
+
return /* @__PURE__ */ l("div", { className: "simple-mode-container", children: /* @__PURE__ */ l(j, { mode: "wait", children: /* @__PURE__ */ l(
|
|
691
|
+
k.div,
|
|
691
692
|
{
|
|
692
693
|
initial: { opacity: 0, y: 10 },
|
|
693
694
|
animate: { opacity: 1, y: 0 },
|
|
@@ -701,7 +702,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
701
702
|
children: n
|
|
702
703
|
}
|
|
703
704
|
) : /* @__PURE__ */ l(
|
|
704
|
-
|
|
705
|
+
M,
|
|
705
706
|
{
|
|
706
707
|
text: n,
|
|
707
708
|
className: "simple-mode-title",
|
|
@@ -718,9 +719,9 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
718
719
|
data: e,
|
|
719
720
|
isLatest: t = !1,
|
|
720
721
|
durationSeconds: n
|
|
721
|
-
}) => /* @__PURE__ */
|
|
722
|
+
}) => /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
722
723
|
/* @__PURE__ */ l(
|
|
723
|
-
|
|
724
|
+
k.div,
|
|
724
725
|
{
|
|
725
726
|
style: {
|
|
726
727
|
display: "flex",
|
|
@@ -732,7 +733,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
732
733
|
animate: { opacity: 1, y: 0 },
|
|
733
734
|
transition: { duration: 0.3, delay: 0 },
|
|
734
735
|
children: t && !n ? /* @__PURE__ */ l(
|
|
735
|
-
|
|
736
|
+
M,
|
|
736
737
|
{
|
|
737
738
|
text: e.title,
|
|
738
739
|
duration: 2.5,
|
|
@@ -743,7 +744,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
743
744
|
) : /* @__PURE__ */ l("span", { style: { color: "#666" }, children: e.title })
|
|
744
745
|
}
|
|
745
746
|
),
|
|
746
|
-
n !== void 0 && /* @__PURE__ */
|
|
747
|
+
n !== void 0 && /* @__PURE__ */ T(
|
|
747
748
|
"div",
|
|
748
749
|
{
|
|
749
750
|
style: {
|
|
@@ -916,55 +917,55 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
916
917
|
fetchClientToken: n,
|
|
917
918
|
durationSeconds: r
|
|
918
919
|
}) => {
|
|
919
|
-
const { fency:
|
|
920
|
+
const { fency: o } = N(), m = U(
|
|
920
921
|
async (c) => {
|
|
921
922
|
try {
|
|
922
|
-
const { clientToken:
|
|
923
|
-
pk:
|
|
924
|
-
baseUrl:
|
|
925
|
-
clientToken:
|
|
923
|
+
const { clientToken: i } = await n(), g = await J({
|
|
924
|
+
pk: o.publishableKey,
|
|
925
|
+
baseUrl: o.baseUrl,
|
|
926
|
+
clientToken: i,
|
|
926
927
|
streamToken: t,
|
|
927
928
|
request: { fileId: c }
|
|
928
929
|
});
|
|
929
930
|
g.type === "success" && window.open(g.downloadLink, "_blank");
|
|
930
|
-
} catch (
|
|
931
|
-
console.error("Failed to download file:",
|
|
931
|
+
} catch (i) {
|
|
932
|
+
console.error("Failed to download file:", i);
|
|
932
933
|
}
|
|
933
934
|
},
|
|
934
|
-
[
|
|
935
|
+
[o, t, n]
|
|
935
936
|
);
|
|
936
|
-
return /* @__PURE__ */
|
|
937
|
+
return /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
937
938
|
/* @__PURE__ */ l(
|
|
938
|
-
|
|
939
|
+
k.div,
|
|
939
940
|
{
|
|
940
941
|
className: "fency-markdown-body-raw",
|
|
941
942
|
initial: { opacity: 0, y: -10 },
|
|
942
943
|
animate: { opacity: 1, y: 0 },
|
|
943
944
|
transition: { duration: 0.3, delay: 0 },
|
|
944
945
|
children: /* @__PURE__ */ l(
|
|
945
|
-
|
|
946
|
+
$,
|
|
946
947
|
{
|
|
947
|
-
remarkPlugins: [
|
|
948
|
+
remarkPlugins: [B],
|
|
948
949
|
components: {
|
|
949
950
|
code(c) {
|
|
950
|
-
const { children:
|
|
951
|
+
const { children: i, className: g, node: a, ref: s, ...d } = c, u = /language-(\w+)/.exec(g || "");
|
|
951
952
|
return u ? /* @__PURE__ */ l(
|
|
952
953
|
R,
|
|
953
954
|
{
|
|
954
955
|
...d,
|
|
955
956
|
PreTag: "div",
|
|
956
|
-
children: String(
|
|
957
|
+
children: String(i).replace(/\n$/, ""),
|
|
957
958
|
language: u[1],
|
|
958
959
|
style: O
|
|
959
960
|
}
|
|
960
|
-
) : /* @__PURE__ */ l("code", { ...d, className: g, children: String(
|
|
961
|
+
) : /* @__PURE__ */ l("code", { ...d, className: g, children: String(i) });
|
|
961
962
|
},
|
|
962
963
|
a(c) {
|
|
963
|
-
const { children:
|
|
964
|
+
const { children: i, href: g, ...a } = c;
|
|
964
965
|
return /* @__PURE__ */ l(
|
|
965
966
|
"a",
|
|
966
967
|
{
|
|
967
|
-
...
|
|
968
|
+
...a,
|
|
968
969
|
href: g,
|
|
969
970
|
onClick: (s) => {
|
|
970
971
|
if (!g) return;
|
|
@@ -973,7 +974,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
973
974
|
);
|
|
974
975
|
d && (s.preventDefault(), m(d[1]));
|
|
975
976
|
},
|
|
976
|
-
children:
|
|
977
|
+
children: i
|
|
977
978
|
}
|
|
978
979
|
);
|
|
979
980
|
}
|
|
@@ -983,7 +984,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
983
984
|
)
|
|
984
985
|
}
|
|
985
986
|
),
|
|
986
|
-
r !== void 0 && /* @__PURE__ */
|
|
987
|
+
r !== void 0 && /* @__PURE__ */ T(
|
|
987
988
|
"div",
|
|
988
989
|
{
|
|
989
990
|
style: {
|
|
@@ -1000,25 +1001,25 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1000
1001
|
}
|
|
1001
1002
|
)
|
|
1002
1003
|
] });
|
|
1003
|
-
},
|
|
1004
|
+
}, Se = ({
|
|
1004
1005
|
data: e,
|
|
1005
1006
|
completed: t,
|
|
1006
1007
|
isLatest: n = !1,
|
|
1007
1008
|
durationSeconds: r
|
|
1008
1009
|
}) => {
|
|
1009
|
-
const
|
|
1010
|
+
const o = I(null);
|
|
1010
1011
|
return w(() => {
|
|
1011
|
-
|
|
1012
|
-
}, [e.reasoning, t]), /* @__PURE__ */
|
|
1012
|
+
o.current && !t && (o.current.scrollTop = o.current.scrollHeight);
|
|
1013
|
+
}, [e.reasoning, t]), /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
1013
1014
|
/* @__PURE__ */ l(
|
|
1014
|
-
|
|
1015
|
+
k.h3,
|
|
1015
1016
|
{
|
|
1016
1017
|
style: { marginBottom: "10px", color: "#666" },
|
|
1017
1018
|
initial: { opacity: 0, y: -10 },
|
|
1018
1019
|
animate: { opacity: 1, y: 0 },
|
|
1019
1020
|
transition: { duration: 0.3, delay: 0 },
|
|
1020
1021
|
children: n && !r ? /* @__PURE__ */ l(
|
|
1021
|
-
|
|
1022
|
+
M,
|
|
1022
1023
|
{
|
|
1023
1024
|
text: e.title,
|
|
1024
1025
|
duration: 2.5,
|
|
@@ -1030,9 +1031,9 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1030
1031
|
}
|
|
1031
1032
|
),
|
|
1032
1033
|
/* @__PURE__ */ l(
|
|
1033
|
-
|
|
1034
|
+
k.div,
|
|
1034
1035
|
{
|
|
1035
|
-
ref:
|
|
1036
|
+
ref: o,
|
|
1036
1037
|
style: {
|
|
1037
1038
|
maxHeight: "100px",
|
|
1038
1039
|
overflowY: "auto",
|
|
@@ -1046,12 +1047,12 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1046
1047
|
animate: { opacity: 0.5, y: 0 },
|
|
1047
1048
|
transition: { duration: 0.3, delay: 0.1 },
|
|
1048
1049
|
children: /* @__PURE__ */ l("div", { className: "fency-markdown-body-raw", children: /* @__PURE__ */ l(
|
|
1049
|
-
|
|
1050
|
+
$,
|
|
1050
1051
|
{
|
|
1051
|
-
remarkPlugins: [
|
|
1052
|
+
remarkPlugins: [B],
|
|
1052
1053
|
components: {
|
|
1053
1054
|
code(m) {
|
|
1054
|
-
const { children: c, className:
|
|
1055
|
+
const { children: c, className: i, node: g, ref: a, ...s } = m, d = /language-(\w+)/.exec(i || "");
|
|
1055
1056
|
return d ? /* @__PURE__ */ l(
|
|
1056
1057
|
R,
|
|
1057
1058
|
{
|
|
@@ -1061,7 +1062,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1061
1062
|
language: d[1],
|
|
1062
1063
|
style: O
|
|
1063
1064
|
}
|
|
1064
|
-
) : /* @__PURE__ */ l("code", { ...s, className:
|
|
1065
|
+
) : /* @__PURE__ */ l("code", { ...s, className: i, children: String(c) });
|
|
1065
1066
|
}
|
|
1066
1067
|
},
|
|
1067
1068
|
children: e.reasoning
|
|
@@ -1069,7 +1070,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1069
1070
|
) })
|
|
1070
1071
|
}
|
|
1071
1072
|
),
|
|
1072
|
-
r !== void 0 && /* @__PURE__ */
|
|
1073
|
+
r !== void 0 && /* @__PURE__ */ T(
|
|
1073
1074
|
"div",
|
|
1074
1075
|
{
|
|
1075
1076
|
style: {
|
|
@@ -1086,29 +1087,29 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1086
1087
|
}
|
|
1087
1088
|
)
|
|
1088
1089
|
] });
|
|
1089
|
-
},
|
|
1090
|
+
}, _ = ({
|
|
1090
1091
|
text: e
|
|
1091
1092
|
}) => /* @__PURE__ */ l("div", { style: { padding: "16px" }, children: /* @__PURE__ */ l(
|
|
1092
|
-
|
|
1093
|
+
k.div,
|
|
1093
1094
|
{
|
|
1094
1095
|
className: "fency-markdown-body-raw",
|
|
1095
1096
|
initial: { opacity: 0, y: -10 },
|
|
1096
1097
|
animate: { opacity: 1, y: 0 },
|
|
1097
1098
|
transition: { duration: 0.3, delay: 0 },
|
|
1098
1099
|
children: /* @__PURE__ */ l(
|
|
1099
|
-
|
|
1100
|
+
$,
|
|
1100
1101
|
{
|
|
1101
|
-
remarkPlugins: [
|
|
1102
|
+
remarkPlugins: [B],
|
|
1102
1103
|
components: {
|
|
1103
1104
|
code(t) {
|
|
1104
|
-
const { children: n, className: r, node:
|
|
1105
|
-
return
|
|
1105
|
+
const { children: n, className: r, node: o, ref: m, ...c } = t, i = /language-(\w+)/.exec(r || "");
|
|
1106
|
+
return i ? /* @__PURE__ */ l(
|
|
1106
1107
|
R,
|
|
1107
1108
|
{
|
|
1108
1109
|
...c,
|
|
1109
1110
|
PreTag: "div",
|
|
1110
1111
|
children: String(n).replace(/\n$/, ""),
|
|
1111
|
-
language:
|
|
1112
|
+
language: i[1],
|
|
1112
1113
|
style: O
|
|
1113
1114
|
}
|
|
1114
1115
|
) : /* @__PURE__ */ l("code", { ...c, className: r, children: String(n) });
|
|
@@ -1118,10 +1119,10 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1118
1119
|
}
|
|
1119
1120
|
)
|
|
1120
1121
|
}
|
|
1121
|
-
) }),
|
|
1122
|
+
) }), be = ({ data: e }) => {
|
|
1122
1123
|
const t = JSON.stringify(e.json, null, 2);
|
|
1123
1124
|
return /* @__PURE__ */ l("div", { id: "structured-chat-completion-response", children: /* @__PURE__ */ l(
|
|
1124
|
-
|
|
1125
|
+
k.div,
|
|
1125
1126
|
{
|
|
1126
1127
|
initial: { opacity: 0, y: -10 },
|
|
1127
1128
|
animate: { opacity: 1, y: 0 },
|
|
@@ -1129,11 +1130,11 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1129
1130
|
children: /* @__PURE__ */ l(R, { language: "json", style: O, PreTag: "div", children: t })
|
|
1130
1131
|
}
|
|
1131
1132
|
) });
|
|
1132
|
-
},
|
|
1133
|
+
}, Ce = ({ data: e, isLatest: t = !1, durationSeconds: n }) => {
|
|
1133
1134
|
const r = `Searching: ${e.queryDescription}`;
|
|
1134
|
-
return /* @__PURE__ */
|
|
1135
|
+
return /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
1135
1136
|
/* @__PURE__ */ l(
|
|
1136
|
-
|
|
1137
|
+
k.div,
|
|
1137
1138
|
{
|
|
1138
1139
|
style: {
|
|
1139
1140
|
display: "flex",
|
|
@@ -1145,7 +1146,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1145
1146
|
animate: { opacity: 1, y: 0 },
|
|
1146
1147
|
transition: { duration: 0.3, delay: 0 },
|
|
1147
1148
|
children: t && !n ? /* @__PURE__ */ l(
|
|
1148
|
-
|
|
1149
|
+
M,
|
|
1149
1150
|
{
|
|
1150
1151
|
text: r,
|
|
1151
1152
|
duration: 2.5,
|
|
@@ -1156,7 +1157,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1156
1157
|
) : /* @__PURE__ */ l("span", { style: { color: "#666" }, children: r })
|
|
1157
1158
|
}
|
|
1158
1159
|
),
|
|
1159
|
-
n !== void 0 && /* @__PURE__ */
|
|
1160
|
+
n !== void 0 && /* @__PURE__ */ T(
|
|
1160
1161
|
"div",
|
|
1161
1162
|
{
|
|
1162
1163
|
style: {
|
|
@@ -1173,11 +1174,11 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1173
1174
|
}
|
|
1174
1175
|
)
|
|
1175
1176
|
] });
|
|
1176
|
-
},
|
|
1177
|
+
}, ke = ({ isLatest: e = !1, durationSeconds: t }) => {
|
|
1177
1178
|
const n = "Finding sources...";
|
|
1178
|
-
return /* @__PURE__ */
|
|
1179
|
+
return /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
1179
1180
|
/* @__PURE__ */ l(
|
|
1180
|
-
|
|
1181
|
+
k.div,
|
|
1181
1182
|
{
|
|
1182
1183
|
style: {
|
|
1183
1184
|
display: "flex",
|
|
@@ -1189,7 +1190,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1189
1190
|
animate: { opacity: 1, y: 0 },
|
|
1190
1191
|
transition: { duration: 0.3, delay: 0 },
|
|
1191
1192
|
children: e && !t ? /* @__PURE__ */ l(
|
|
1192
|
-
|
|
1193
|
+
M,
|
|
1193
1194
|
{
|
|
1194
1195
|
text: n,
|
|
1195
1196
|
duration: 2.5,
|
|
@@ -1200,7 +1201,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1200
1201
|
) : /* @__PURE__ */ l("span", { style: { color: "#666" }, children: n })
|
|
1201
1202
|
}
|
|
1202
1203
|
),
|
|
1203
|
-
t !== void 0 && /* @__PURE__ */
|
|
1204
|
+
t !== void 0 && /* @__PURE__ */ T(
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
1207
|
style: {
|
|
@@ -1217,9 +1218,9 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
)
|
|
1219
1220
|
] });
|
|
1220
|
-
}, Te = ({ data: e, onSourceClick: t }) => /* @__PURE__ */
|
|
1221
|
+
}, Te = ({ data: e, onSourceClick: t }) => /* @__PURE__ */ T("div", { style: { padding: "16px" }, children: [
|
|
1221
1222
|
/* @__PURE__ */ l(
|
|
1222
|
-
|
|
1223
|
+
k.div,
|
|
1223
1224
|
{
|
|
1224
1225
|
style: { color: "#666", marginBottom: "10px", fontSize: "14px" },
|
|
1225
1226
|
initial: { opacity: 0, y: -10 },
|
|
@@ -1228,8 +1229,8 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1228
1229
|
children: "Sources"
|
|
1229
1230
|
}
|
|
1230
1231
|
),
|
|
1231
|
-
/* @__PURE__ */ l("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.map((n, r) => /* @__PURE__ */ l(
|
|
1232
|
-
|
|
1232
|
+
/* @__PURE__ */ l("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ l("span", { style: { fontSize: "13px", color: "#888" }, children: "No sources" }) : e.sources.map((n, r) => /* @__PURE__ */ l(
|
|
1233
|
+
xe,
|
|
1233
1234
|
{
|
|
1234
1235
|
source: n,
|
|
1235
1236
|
index: r,
|
|
@@ -1237,17 +1238,26 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1237
1238
|
},
|
|
1238
1239
|
n.memoryId
|
|
1239
1240
|
)) })
|
|
1240
|
-
] })
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1241
|
+
] });
|
|
1242
|
+
function ve(e, t) {
|
|
1243
|
+
if (t.length === 0) return e;
|
|
1244
|
+
if (t.length === 1) return `${e} page ${t[0]}`;
|
|
1245
|
+
if (t.length === 2)
|
|
1246
|
+
return `${e} pages ${t[0]} and ${t[1]}`;
|
|
1247
|
+
const n = t[t.length - 1], r = t.slice(0, -1).join(", ");
|
|
1248
|
+
return `${e} pages ${r} and ${n}`;
|
|
1249
|
+
}
|
|
1250
|
+
const xe = ({ source: e, index: t, onSourceClick: n }) => {
|
|
1251
|
+
const [r, o] = x(!1), m = !!n, c = ve(e.memoryTitle, e.pageNumbers);
|
|
1252
|
+
return /* @__PURE__ */ l(
|
|
1253
|
+
k.div,
|
|
1244
1254
|
{
|
|
1245
1255
|
initial: { opacity: 0, scale: 0.9 },
|
|
1246
1256
|
animate: { opacity: 1, scale: 1 },
|
|
1247
1257
|
transition: { duration: 0.25, delay: t * 0.05 },
|
|
1248
1258
|
onClick: m ? () => n(e.memoryId) : void 0,
|
|
1249
|
-
onMouseEnter: m ? () =>
|
|
1250
|
-
onMouseLeave: m ? () =>
|
|
1259
|
+
onMouseEnter: m ? () => o(!0) : void 0,
|
|
1260
|
+
onMouseLeave: m ? () => o(!1) : void 0,
|
|
1251
1261
|
style: {
|
|
1252
1262
|
display: "inline-flex",
|
|
1253
1263
|
flexDirection: "column",
|
|
@@ -1260,79 +1270,76 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1260
1270
|
transition: "background-color 0.15s ease",
|
|
1261
1271
|
userSelect: "none"
|
|
1262
1272
|
},
|
|
1263
|
-
children:
|
|
1264
|
-
/* @__PURE__ */ l("span", { style: { fontSize: "13px", fontWeight: 500, color: "#333" }, children: e.memoryId }),
|
|
1265
|
-
e.pageNumbers.length > 0 && /* @__PURE__ */ l("span", { style: { fontSize: "11px", color: "#888" }, children: e.pageNumbers.length === 1 ? `p. ${e.pageNumbers[0]}` : `pp. ${e.pageNumbers.join(", ")}` })
|
|
1266
|
-
]
|
|
1273
|
+
children: /* @__PURE__ */ l("span", { style: { fontSize: "13px", fontWeight: 500, color: "#333" }, children: c })
|
|
1267
1274
|
}
|
|
1268
1275
|
);
|
|
1269
|
-
},
|
|
1276
|
+
}, we = ({ progressViewItems: e, streamToken: t, fetchClientToken: n, loadingText: r, onSourceClick: o }) => {
|
|
1270
1277
|
const m = I(null);
|
|
1271
1278
|
w(() => {
|
|
1272
1279
|
m.current && (m.current.scrollTop = m.current.scrollHeight);
|
|
1273
1280
|
}, [e.length]);
|
|
1274
|
-
const c = (
|
|
1275
|
-
switch (
|
|
1281
|
+
const c = (i) => {
|
|
1282
|
+
switch (i.item.data.type) {
|
|
1276
1283
|
case "GenericAgentTaskExecution":
|
|
1277
1284
|
return /* @__PURE__ */ l(
|
|
1278
1285
|
fe,
|
|
1279
1286
|
{
|
|
1280
|
-
data:
|
|
1281
|
-
completed:
|
|
1282
|
-
isLatest:
|
|
1283
|
-
durationSeconds:
|
|
1287
|
+
data: i.item.data,
|
|
1288
|
+
completed: i.completed,
|
|
1289
|
+
isLatest: i.isLatest,
|
|
1290
|
+
durationSeconds: i.durationSeconds
|
|
1284
1291
|
}
|
|
1285
1292
|
);
|
|
1286
1293
|
case "GenericAgentTaskReasoning":
|
|
1287
1294
|
return /* @__PURE__ */ l(
|
|
1288
|
-
|
|
1295
|
+
Se,
|
|
1289
1296
|
{
|
|
1290
|
-
data:
|
|
1291
|
-
completed:
|
|
1292
|
-
isLatest:
|
|
1293
|
-
durationSeconds:
|
|
1297
|
+
data: i.item.data,
|
|
1298
|
+
completed: i.completed,
|
|
1299
|
+
isLatest: i.isLatest,
|
|
1300
|
+
durationSeconds: i.durationSeconds
|
|
1294
1301
|
}
|
|
1295
1302
|
);
|
|
1296
1303
|
case "GenericAgentTaskFinalResponse":
|
|
1297
1304
|
return /* @__PURE__ */ l(
|
|
1298
1305
|
he,
|
|
1299
1306
|
{
|
|
1300
|
-
data:
|
|
1307
|
+
data: i.item.data,
|
|
1301
1308
|
streamToken: t,
|
|
1302
1309
|
fetchClientToken: n,
|
|
1303
|
-
durationSeconds:
|
|
1310
|
+
durationSeconds: i.durationSeconds
|
|
1304
1311
|
}
|
|
1305
1312
|
);
|
|
1306
1313
|
case "StreamingChatCompletionText":
|
|
1307
|
-
return /* @__PURE__ */ l(
|
|
1314
|
+
return /* @__PURE__ */ l(_, { text: i.item.data.text });
|
|
1308
1315
|
case "StructuredChatCompletionJson":
|
|
1309
|
-
return /* @__PURE__ */ l(
|
|
1316
|
+
return /* @__PURE__ */ l(be, { data: i.item.data });
|
|
1310
1317
|
case "StreamingMemoryTypeChatCompletionText":
|
|
1311
|
-
return /* @__PURE__ */ l(
|
|
1318
|
+
return /* @__PURE__ */ l(_, { text: i.item.data.text });
|
|
1312
1319
|
case "StreamingMemoryTypeChatCompletionSearch":
|
|
1313
1320
|
return /* @__PURE__ */ l(
|
|
1314
|
-
|
|
1321
|
+
Ce,
|
|
1315
1322
|
{
|
|
1316
|
-
data:
|
|
1317
|
-
isLatest:
|
|
1318
|
-
durationSeconds:
|
|
1323
|
+
data: i.item.data,
|
|
1324
|
+
isLatest: i.isLatest,
|
|
1325
|
+
durationSeconds: i.durationSeconds
|
|
1319
1326
|
}
|
|
1320
1327
|
);
|
|
1321
1328
|
case "StreamingMemoryTypeChatCompletionFindSources":
|
|
1322
1329
|
return /* @__PURE__ */ l(
|
|
1323
|
-
|
|
1330
|
+
ke,
|
|
1324
1331
|
{
|
|
1325
|
-
data:
|
|
1326
|
-
isLatest:
|
|
1327
|
-
durationSeconds:
|
|
1332
|
+
data: i.item.data,
|
|
1333
|
+
isLatest: i.isLatest,
|
|
1334
|
+
durationSeconds: i.durationSeconds
|
|
1328
1335
|
}
|
|
1329
1336
|
);
|
|
1330
1337
|
case "StreamingMemoryTypeChatCompletionSourcesResult":
|
|
1331
1338
|
return /* @__PURE__ */ l(
|
|
1332
1339
|
Te,
|
|
1333
1340
|
{
|
|
1334
|
-
data:
|
|
1335
|
-
onSourceClick:
|
|
1341
|
+
data: i.item.data,
|
|
1342
|
+
onSourceClick: o
|
|
1336
1343
|
}
|
|
1337
1344
|
);
|
|
1338
1345
|
default:
|
|
@@ -1340,7 +1347,7 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1340
1347
|
}
|
|
1341
1348
|
};
|
|
1342
1349
|
return e.length === 0 ? /* @__PURE__ */ l("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ l(
|
|
1343
|
-
|
|
1350
|
+
M,
|
|
1344
1351
|
{
|
|
1345
1352
|
text: r ?? "Processing your task...",
|
|
1346
1353
|
duration: 1.5,
|
|
@@ -1349,10 +1356,10 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1349
1356
|
color: "#999",
|
|
1350
1357
|
shimmerColor: "#000"
|
|
1351
1358
|
}
|
|
1352
|
-
) }) : /* @__PURE__ */ l("div", { id: "agent-task-progress-verbose", ref: m, children: /* @__PURE__ */ l(
|
|
1353
|
-
|
|
1359
|
+
) }) : /* @__PURE__ */ l("div", { id: "agent-task-progress-verbose", ref: m, children: /* @__PURE__ */ l(j, { children: e.map((i, g) => /* @__PURE__ */ l(
|
|
1360
|
+
k.div,
|
|
1354
1361
|
{
|
|
1355
|
-
id: `agent-task-progress-item-${
|
|
1362
|
+
id: `agent-task-progress-item-${i.item.progressItemId}`,
|
|
1356
1363
|
initial: { opacity: 0, y: -20 },
|
|
1357
1364
|
animate: { opacity: 1, y: 0 },
|
|
1358
1365
|
transition: {
|
|
@@ -1360,28 +1367,30 @@ const ye = ({ progressViewItems: e }) => {
|
|
|
1360
1367
|
delay: g * 0.1,
|
|
1361
1368
|
ease: "easeOut"
|
|
1362
1369
|
},
|
|
1363
|
-
children: c(
|
|
1370
|
+
children: c(i)
|
|
1364
1371
|
},
|
|
1365
|
-
|
|
1372
|
+
i.item.progressItemId
|
|
1366
1373
|
)) }) });
|
|
1367
1374
|
}, Be = ({
|
|
1368
1375
|
agentTask: e,
|
|
1369
1376
|
mode: t = "verbose",
|
|
1370
1377
|
streamToken: n,
|
|
1371
|
-
fetchClientToken: r
|
|
1378
|
+
fetchClientToken: r,
|
|
1379
|
+
onSourceClick: o
|
|
1372
1380
|
}) => {
|
|
1373
|
-
const
|
|
1374
|
-
return t === "simple" ? /* @__PURE__ */ l(ye, { progressViewItems:
|
|
1375
|
-
|
|
1381
|
+
const m = me(e);
|
|
1382
|
+
return t === "simple" ? /* @__PURE__ */ l(ye, { progressViewItems: m }) : /* @__PURE__ */ l(
|
|
1383
|
+
we,
|
|
1376
1384
|
{
|
|
1377
|
-
progressViewItems:
|
|
1385
|
+
progressViewItems: m,
|
|
1378
1386
|
streamToken: n,
|
|
1379
1387
|
fetchClientToken: r,
|
|
1380
|
-
loadingText: e.loadingText
|
|
1388
|
+
loadingText: e.loadingText,
|
|
1389
|
+
onSourceClick: o
|
|
1381
1390
|
}
|
|
1382
1391
|
);
|
|
1383
1392
|
};
|
|
1384
|
-
class
|
|
1393
|
+
class Ae {
|
|
1385
1394
|
constructor(t) {
|
|
1386
1395
|
this.eventSources = /* @__PURE__ */ new Map(), this.subscribers = /* @__PURE__ */ new Map(), this.fency = t;
|
|
1387
1396
|
}
|
|
@@ -1391,22 +1400,22 @@ class we {
|
|
|
1391
1400
|
*/
|
|
1392
1401
|
updateStreams(t) {
|
|
1393
1402
|
t.forEach((r) => {
|
|
1394
|
-
const
|
|
1395
|
-
this.eventSources.has(
|
|
1403
|
+
const o = r.stream.id;
|
|
1404
|
+
this.eventSources.has(o) || this.connectStream(r);
|
|
1396
1405
|
});
|
|
1397
1406
|
const n = new Set(t.map((r) => r.stream.id));
|
|
1398
|
-
this.eventSources.forEach((r,
|
|
1399
|
-
n.has(
|
|
1407
|
+
this.eventSources.forEach((r, o) => {
|
|
1408
|
+
n.has(o) || (r.abort(), this.eventSources.delete(o));
|
|
1400
1409
|
});
|
|
1401
1410
|
}
|
|
1402
1411
|
connectStream(t) {
|
|
1403
1412
|
const n = t.stream.id, r = new AbortController();
|
|
1404
1413
|
this.eventSources.set(n, r);
|
|
1405
|
-
const
|
|
1414
|
+
const o = `${this.fency.baseUrl}/sse/streams/${n}`, m = {
|
|
1406
1415
|
"X-Fency-Publishable-Key": this.fency.publishableKey,
|
|
1407
1416
|
"X-Fency-Stream-Token": t.stream.token
|
|
1408
1417
|
};
|
|
1409
|
-
H(
|
|
1418
|
+
H(o, {
|
|
1410
1419
|
headers: m,
|
|
1411
1420
|
signal: r.signal,
|
|
1412
1421
|
async onopen(c) {
|
|
@@ -1415,8 +1424,8 @@ class we {
|
|
|
1415
1424
|
},
|
|
1416
1425
|
onmessage: (c) => {
|
|
1417
1426
|
if (c.data) {
|
|
1418
|
-
const
|
|
1419
|
-
this.broadcast(
|
|
1427
|
+
const i = K(c.data);
|
|
1428
|
+
this.broadcast(i, n);
|
|
1420
1429
|
}
|
|
1421
1430
|
},
|
|
1422
1431
|
onerror: (c) => {
|
|
@@ -1452,35 +1461,35 @@ class we {
|
|
|
1452
1461
|
this.eventSources.forEach((t) => t.abort()), this.eventSources.clear(), this.subscribers.clear();
|
|
1453
1462
|
}
|
|
1454
1463
|
}
|
|
1455
|
-
const
|
|
1464
|
+
const Ie = 12e4, Pe = (e) => {
|
|
1456
1465
|
const t = Date.now();
|
|
1457
|
-
return e.filter((n) => t - n.createdAt <
|
|
1466
|
+
return e.filter((n) => t - n.createdAt < Ie);
|
|
1458
1467
|
};
|
|
1459
1468
|
function ze({ fency: e, fetchCreateStreamClientToken: t, children: n }) {
|
|
1460
|
-
const [r,
|
|
1469
|
+
const [r, o] = x(
|
|
1461
1470
|
null
|
|
1462
|
-
), [m, c] = x(!0), [
|
|
1471
|
+
), [m, c] = x(!0), [i, g] = x(null), [a, s] = x([]), d = I(null), u = I(null);
|
|
1463
1472
|
w(() => {
|
|
1464
1473
|
e.then((f) => {
|
|
1465
|
-
|
|
1474
|
+
o(f), c(!1);
|
|
1466
1475
|
}).catch((f) => {
|
|
1467
1476
|
g(f), c(!1);
|
|
1468
1477
|
});
|
|
1469
1478
|
}, [e]), w(() => {
|
|
1470
|
-
r && !u.current && (u.current = new
|
|
1479
|
+
r && !u.current && (u.current = new Ae(r));
|
|
1471
1480
|
}, [r]), w(() => {
|
|
1472
|
-
u.current && u.current.updateStreams(
|
|
1473
|
-
}, [
|
|
1481
|
+
u.current && u.current.updateStreams(a);
|
|
1482
|
+
}, [a]), w(() => () => {
|
|
1474
1483
|
var f;
|
|
1475
1484
|
(f = u.current) == null || f.cleanup();
|
|
1476
1485
|
}, []);
|
|
1477
|
-
const
|
|
1486
|
+
const S = U(
|
|
1478
1487
|
async (f = 3e4) => {
|
|
1479
1488
|
if (d.current)
|
|
1480
1489
|
return d.current;
|
|
1481
|
-
const h = Date.now(),
|
|
1482
|
-
if (
|
|
1483
|
-
return
|
|
1490
|
+
const h = Date.now(), C = a.length > 0 ? a[a.length - 1] : null;
|
|
1491
|
+
if (C && h - C.createdAt < f)
|
|
1492
|
+
return C.stream;
|
|
1484
1493
|
const P = (async () => {
|
|
1485
1494
|
if (!r)
|
|
1486
1495
|
throw new Error("Fency instance not initialized");
|
|
@@ -1496,50 +1505,50 @@ function ze({ fency: e, fetchCreateStreamClientToken: t, children: n }) {
|
|
|
1496
1505
|
};
|
|
1497
1506
|
return s((p) => {
|
|
1498
1507
|
const v = [...p, F];
|
|
1499
|
-
return
|
|
1508
|
+
return Pe(v);
|
|
1500
1509
|
}), d.current = null, E.stream;
|
|
1501
1510
|
} else
|
|
1502
1511
|
throw d.current = null, new Error("Failed to create stream");
|
|
1503
1512
|
})();
|
|
1504
1513
|
return d.current = P, P;
|
|
1505
1514
|
},
|
|
1506
|
-
[r,
|
|
1515
|
+
[r, a]
|
|
1507
1516
|
);
|
|
1508
|
-
if (
|
|
1509
|
-
return /* @__PURE__ */
|
|
1517
|
+
if (i)
|
|
1518
|
+
return /* @__PURE__ */ T("div", { children: [
|
|
1510
1519
|
"Fency error: ",
|
|
1511
|
-
|
|
1520
|
+
i.message
|
|
1512
1521
|
] });
|
|
1513
1522
|
if (!r)
|
|
1514
1523
|
return null;
|
|
1515
|
-
const y =
|
|
1524
|
+
const y = a.length > 0 ? a[a.length - 1] : null, b = {
|
|
1516
1525
|
fency: r,
|
|
1517
1526
|
loading: m,
|
|
1518
|
-
error:
|
|
1519
|
-
activeStreams:
|
|
1527
|
+
error: i,
|
|
1528
|
+
activeStreams: a,
|
|
1520
1529
|
latestStream: y,
|
|
1521
1530
|
eventManager: u.current,
|
|
1522
|
-
getOrCreateStream:
|
|
1531
|
+
getOrCreateStream: S
|
|
1523
1532
|
};
|
|
1524
|
-
return /* @__PURE__ */ l(
|
|
1533
|
+
return /* @__PURE__ */ l(W.Provider, { value: b, children: n });
|
|
1525
1534
|
}
|
|
1526
1535
|
export {
|
|
1527
1536
|
Be as AgentTaskProgress,
|
|
1528
1537
|
ye as AgentTaskProgressSimple,
|
|
1529
|
-
|
|
1538
|
+
we as AgentTaskProgressVerbose,
|
|
1530
1539
|
ze as FencyProvider,
|
|
1531
1540
|
fe as GenericAgentTaskExecution,
|
|
1532
1541
|
he as GenericAgentTaskFinalResponse,
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1542
|
+
Se as GenericAgentTaskReasoning,
|
|
1543
|
+
M as ShimmeringText,
|
|
1544
|
+
_ as StreamingChatCompletionText,
|
|
1545
|
+
ke as StreamingMemoryTypeChatCompletionFindSources,
|
|
1546
|
+
Ce as StreamingMemoryTypeChatCompletionSearch,
|
|
1538
1547
|
Te as StreamingMemoryTypeChatCompletionSourcesResult,
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1548
|
+
be as StructuredChatCompletionJson,
|
|
1549
|
+
De as useAgentTasks,
|
|
1550
|
+
N as useFencyContext,
|
|
1551
|
+
Ue as useFencyEventSource,
|
|
1552
|
+
$e as usePaginatedQuery,
|
|
1544
1553
|
ae as useStream
|
|
1545
1554
|
};
|