@fencyai/react 0.1.120 → 0.1.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -3
- package/dist/index.js +545 -802
- package/dist/types/CreateAgentTaskParams.d.ts +0 -4
- package/dist/types/CreateAgentTaskResponse.d.ts +0 -3
- package/dist/types/UseAgentTasksProps.d.ts +1 -1
- package/package.json +4 -4
- package/dist/agent-task/data-types/GenericAgentTaskExecution.d.ts +0 -12
- package/dist/agent-task/data-types/GenericAgentTaskFinalResponse.d.ts +0 -14
- package/dist/agent-task/data-types/GenericAgentTaskReasoning.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { createAgentTask as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { useInView as
|
|
5
|
-
import
|
|
6
|
-
import { Prism as
|
|
7
|
-
import
|
|
8
|
-
import './assets/index.css';const
|
|
1
|
+
import { createAgentTask as G, createStream as J } from "@fencyai/js";
|
|
2
|
+
import { createContext as V, useContext as q, useState as C, useRef as A, useEffect as E, useCallback as W, useMemo as B } from "react";
|
|
3
|
+
import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
4
|
+
import { useInView as X, motion as v, AnimatePresence as L } from "motion/react";
|
|
5
|
+
import Q from "react-markdown";
|
|
6
|
+
import { Prism as $ } from "react-syntax-highlighter";
|
|
7
|
+
import Y from "remark-gfm";
|
|
8
|
+
import './assets/index.css';const _ = V(
|
|
9
9
|
void 0
|
|
10
10
|
);
|
|
11
11
|
function N() {
|
|
12
|
-
const e =
|
|
12
|
+
const e = q(_);
|
|
13
13
|
if (e === void 0)
|
|
14
14
|
throw new Error("useFencyContext must be used within a FencyProvider");
|
|
15
15
|
return e;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Z = (e) => {
|
|
18
18
|
try {
|
|
19
19
|
const t = JSON.parse(e);
|
|
20
|
-
return
|
|
20
|
+
return ee(t);
|
|
21
21
|
} catch (t) {
|
|
22
22
|
return console.error("Error parsing message:", t), null;
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, ee = (e) => {
|
|
25
25
|
if (!(typeof e == "object" && e !== null && "type" in e && "streamId" in e && "timestamp" in e))
|
|
26
26
|
return null;
|
|
27
27
|
switch (e.type) {
|
|
28
28
|
case "StreamTimeout":
|
|
29
|
-
return
|
|
29
|
+
return te(e);
|
|
30
30
|
case "StreamNotFound":
|
|
31
|
-
return
|
|
31
|
+
return ne(e);
|
|
32
32
|
case "AgentTaskProgressItemUpdated":
|
|
33
|
-
return
|
|
33
|
+
return re(e);
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
|
-
},
|
|
36
|
+
}, te = (e) => ({
|
|
37
37
|
type: "StreamTimeout",
|
|
38
38
|
streamId: e.streamId,
|
|
39
39
|
timestamp: e.timestamp
|
|
40
|
-
}),
|
|
40
|
+
}), ne = (e) => ({
|
|
41
41
|
type: "StreamNotFound",
|
|
42
42
|
streamId: e.streamId,
|
|
43
43
|
timestamp: e.timestamp
|
|
44
|
-
}),
|
|
44
|
+
}), re = (e) => ({
|
|
45
45
|
type: "AgentTaskProgressItemUpdated",
|
|
46
46
|
streamId: e.streamId,
|
|
47
47
|
agentTaskId: e.agentTaskId,
|
|
@@ -49,52 +49,52 @@ const te = (e) => {
|
|
|
49
49
|
timestamp: e.timestamp,
|
|
50
50
|
createdAt: e.createdAt,
|
|
51
51
|
data: JSON.parse(e.data)
|
|
52
|
-
}),
|
|
53
|
-
const t = N(), [
|
|
54
|
-
return
|
|
52
|
+
}), ae = (e) => {
|
|
53
|
+
const t = N(), [r, n] = C(null), o = A(`subscriber-${Math.random().toString(36).substr(2, 9)}`);
|
|
54
|
+
return E(() => {
|
|
55
55
|
if (!t.eventManager) return;
|
|
56
|
-
const
|
|
57
|
-
onMessage: (
|
|
58
|
-
var
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
switch (
|
|
56
|
+
const s = {
|
|
57
|
+
onMessage: (d, a) => {
|
|
58
|
+
var g, u, S, y, T, f, h, b, I, w;
|
|
59
|
+
const i = Z(d);
|
|
60
|
+
if (i)
|
|
61
|
+
switch (i.type) {
|
|
62
62
|
case "NewChatCompletionStreamChunk":
|
|
63
|
-
(
|
|
63
|
+
(g = e == null ? void 0 : e.onNewChatCompletionStreamChunk) == null || g.call(e, i);
|
|
64
64
|
break;
|
|
65
65
|
case "ChatCompletionStreamCompleted":
|
|
66
|
-
(
|
|
66
|
+
(u = e == null ? void 0 : e.onChatCompletionStreamCompleted) == null || u.call(e, i);
|
|
67
67
|
break;
|
|
68
68
|
case "StreamTimeout":
|
|
69
|
-
(
|
|
69
|
+
(S = e == null ? void 0 : e.onStreamTimeout) == null || S.call(e, i);
|
|
70
70
|
break;
|
|
71
71
|
case "StreamNotFound":
|
|
72
|
-
(y = e == null ? void 0 : e.onStreamNotFound) == null || y.call(e,
|
|
72
|
+
(y = e == null ? void 0 : e.onStreamNotFound) == null || y.call(e, i);
|
|
73
73
|
break;
|
|
74
74
|
case "FileUploadCompleted":
|
|
75
|
-
(
|
|
75
|
+
(T = e == null ? void 0 : e.onFileUploadCompleted) == null || T.call(e, i);
|
|
76
76
|
break;
|
|
77
77
|
case "FileTextContentReady":
|
|
78
|
-
(f = e == null ? void 0 : e.onFileTextContentReady) == null || f.call(e,
|
|
78
|
+
(f = e == null ? void 0 : e.onFileTextContentReady) == null || f.call(e, i);
|
|
79
79
|
break;
|
|
80
80
|
case "WebsiteHtmlContentReady":
|
|
81
|
-
(h = e == null ? void 0 : e.onWebsiteHtmlContentReady) == null || h.call(e,
|
|
81
|
+
(h = e == null ? void 0 : e.onWebsiteHtmlContentReady) == null || h.call(e, i);
|
|
82
82
|
break;
|
|
83
83
|
case "WebsiteTextContentReady":
|
|
84
|
-
(
|
|
84
|
+
(b = e == null ? void 0 : e.onWebsiteTextContentReady) == null || b.call(e, i);
|
|
85
85
|
break;
|
|
86
86
|
case "FileSearchIndexReady":
|
|
87
|
-
(
|
|
87
|
+
(I = e == null ? void 0 : e.onFileSearchIndexReady) == null || I.call(e, i);
|
|
88
88
|
break;
|
|
89
89
|
case "AgentTaskProgressItemUpdated":
|
|
90
|
-
(w = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || w.call(e,
|
|
90
|
+
(w = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || w.call(e, i);
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
onError: (
|
|
94
|
+
onError: (d) => {
|
|
95
95
|
var a;
|
|
96
96
|
(a = e == null ? void 0 : e.onStreamError) == null || a.call(e, {
|
|
97
|
-
streamId:
|
|
97
|
+
streamId: d,
|
|
98
98
|
error: {
|
|
99
99
|
code: "UnknownError",
|
|
100
100
|
message: "Unknown error in useStream"
|
|
@@ -104,83 +104,86 @@ const te = (e) => {
|
|
|
104
104
|
};
|
|
105
105
|
return t.eventManager.subscribe(
|
|
106
106
|
o.current,
|
|
107
|
-
|
|
107
|
+
s
|
|
108
108
|
);
|
|
109
109
|
}, [t.eventManager, e]), {
|
|
110
110
|
createStream: async () => {
|
|
111
111
|
try {
|
|
112
|
-
const
|
|
113
|
-
return
|
|
112
|
+
const s = await t.getOrCreateStream(3e4);
|
|
113
|
+
return n(s), {
|
|
114
114
|
type: "success",
|
|
115
|
-
stream:
|
|
115
|
+
stream: s
|
|
116
116
|
};
|
|
117
|
-
} catch (
|
|
117
|
+
} catch (s) {
|
|
118
118
|
return {
|
|
119
119
|
type: "error",
|
|
120
120
|
error: {
|
|
121
121
|
code: "UnknownError",
|
|
122
|
-
message:
|
|
122
|
+
message: s instanceof Error ? s.message : "Failed to create stream"
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
stream:
|
|
127
|
+
stream: r
|
|
128
128
|
};
|
|
129
|
-
},
|
|
130
|
-
const t = N(), [
|
|
129
|
+
}, Oe = (e) => {
|
|
130
|
+
const t = N(), [r, n] = C([]), o = A(/* @__PURE__ */ new Set()), m = A(/* @__PURE__ */ new Map()), { createStream: s } = ae({
|
|
131
131
|
onAgentTaskProgressItemUpdated: (a) => {
|
|
132
|
-
var
|
|
132
|
+
var u;
|
|
133
133
|
if (!o.current.has(a.agentTaskId)) return;
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
const
|
|
137
|
-
|
|
134
|
+
const i = a.data;
|
|
135
|
+
if (i.taskType === "StreamingChatCompletion" && i.eventType === "Completed" || i.taskType === "StructuredChatCompletion" && i.eventType === "Completed" || i.taskType === "StreamingMemoryTypeChatCompletion" && i.eventType === "Completed") {
|
|
136
|
+
const S = m.current.get(
|
|
137
|
+
a.agentTaskId
|
|
138
|
+
);
|
|
139
|
+
S && (m.current.delete(a.agentTaskId), S(i));
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
|
-
(
|
|
141
|
-
(
|
|
142
|
+
(u = e.onAgentTaskProgressItemUpdated) == null || u.call(e, a), n(
|
|
143
|
+
(S) => S.map((y) => {
|
|
142
144
|
var h;
|
|
143
|
-
if (((h = y.confirmedData) == null ? void 0 : h.taskId) !== a.agentTaskId)
|
|
145
|
+
if (((h = y.confirmedData) == null ? void 0 : h.taskId) !== a.agentTaskId)
|
|
146
|
+
return y;
|
|
144
147
|
const f = y.progressItems.some(
|
|
145
|
-
(
|
|
148
|
+
(b) => b.progressItemId === a.progressItemId
|
|
146
149
|
) ? y.progressItems.map(
|
|
147
|
-
(
|
|
150
|
+
(b) => b.progressItemId === a.progressItemId ? a : b
|
|
148
151
|
) : [...y.progressItems, a];
|
|
149
152
|
return { ...y, progressItems: f };
|
|
150
153
|
})
|
|
151
154
|
);
|
|
152
155
|
},
|
|
153
156
|
onStreamError: (a) => {
|
|
154
|
-
var
|
|
155
|
-
(
|
|
156
|
-
const
|
|
157
|
-
return
|
|
158
|
-
...
|
|
157
|
+
var i;
|
|
158
|
+
(i = e == null ? void 0 : e.onStreamError) == null || i.call(e, a), n((g) => {
|
|
159
|
+
const u = g.find((S) => S.streamId === a.streamId);
|
|
160
|
+
return u ? [
|
|
161
|
+
...g.filter((S) => S.streamId !== a.streamId),
|
|
159
162
|
{
|
|
160
|
-
...
|
|
163
|
+
...u,
|
|
161
164
|
loading: !1,
|
|
162
165
|
error: a.error
|
|
163
166
|
}
|
|
164
|
-
] :
|
|
167
|
+
] : g;
|
|
165
168
|
});
|
|
166
169
|
},
|
|
167
170
|
onStreamNotFound: (a) => {
|
|
168
|
-
var
|
|
169
|
-
(
|
|
171
|
+
var i;
|
|
172
|
+
(i = e == null ? void 0 : e.onStreamNotFound) == null || i.call(e, a);
|
|
170
173
|
},
|
|
171
174
|
onStreamTimeout: (a) => {
|
|
172
|
-
var
|
|
173
|
-
(
|
|
175
|
+
var i;
|
|
176
|
+
(i = e == null ? void 0 : e.onStreamTimeout) == null || i.call(e, a);
|
|
174
177
|
}
|
|
175
|
-
}),
|
|
176
|
-
async (a,
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
...
|
|
178
|
+
}), l = W(
|
|
179
|
+
async (a, i) => {
|
|
180
|
+
const g = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, u = await s();
|
|
181
|
+
if (u.type === "success") {
|
|
182
|
+
n([
|
|
183
|
+
...r,
|
|
181
184
|
{
|
|
182
|
-
taskKey:
|
|
183
|
-
streamId:
|
|
185
|
+
taskKey: g,
|
|
186
|
+
streamId: u.stream.id,
|
|
184
187
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
185
188
|
confirmedData: null,
|
|
186
189
|
error: null,
|
|
@@ -188,31 +191,38 @@ const te = (e) => {
|
|
|
188
191
|
progressItems: [],
|
|
189
192
|
loading: !0,
|
|
190
193
|
doneStreaming: !1,
|
|
191
|
-
loadingText:
|
|
194
|
+
loadingText: i == null ? void 0 : i.loadingText
|
|
192
195
|
}
|
|
193
196
|
]);
|
|
194
|
-
const { clientToken:
|
|
197
|
+
const { clientToken: S } = await e.fetchCreateAgentTaskClientToken(a.type), y = await G({
|
|
195
198
|
pk: t.fency.publishableKey,
|
|
196
199
|
baseUrl: t.fency.baseUrl,
|
|
197
|
-
clientToken:
|
|
198
|
-
streamToken:
|
|
200
|
+
clientToken: S,
|
|
201
|
+
streamToken: u.stream.token,
|
|
199
202
|
request: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
streamingChatCompletionTask: a.type === "streamingChatCompletion" ? {
|
|
204
|
+
messages: a.messages,
|
|
205
|
+
model: a.model
|
|
206
|
+
} : void 0,
|
|
207
|
+
structuredChatCompletionTask: a.type === "structuredChatCompletion" ? {
|
|
208
|
+
messages: a.messages,
|
|
209
|
+
jsonSchema: a.jsonSchema,
|
|
210
|
+
model: a.model
|
|
211
|
+
} : void 0,
|
|
212
|
+
streamingMemoryTypeChatCompletionTask: a.type === "streamingMemoryTypeChatCompletion" ? {
|
|
213
|
+
messages: a.messages,
|
|
214
|
+
model: a.model
|
|
215
|
+
} : void 0
|
|
204
216
|
}
|
|
205
217
|
});
|
|
206
218
|
if (y.type === "success" && y.agentTask) {
|
|
207
219
|
o.current.add(
|
|
208
220
|
y.agentTask.id
|
|
209
|
-
),
|
|
210
|
-
...f.filter(
|
|
211
|
-
(h) => h.taskKey !== u
|
|
212
|
-
),
|
|
221
|
+
), n((f) => [
|
|
222
|
+
...f.filter((h) => h.taskKey !== g),
|
|
213
223
|
{
|
|
214
|
-
taskKey:
|
|
215
|
-
streamId:
|
|
224
|
+
taskKey: g,
|
|
225
|
+
streamId: u.stream.id,
|
|
216
226
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
217
227
|
taskId: y.agentTask.id,
|
|
218
228
|
createdAt: y.agentTask.createdAt,
|
|
@@ -221,43 +231,39 @@ const te = (e) => {
|
|
|
221
231
|
progressItems: [],
|
|
222
232
|
doneStreaming: !1,
|
|
223
233
|
loading: !0,
|
|
224
|
-
loadingText:
|
|
234
|
+
loadingText: i == null ? void 0 : i.loadingText,
|
|
225
235
|
confirmedData: {
|
|
226
236
|
taskId: y.agentTask.id,
|
|
227
237
|
createdAt: y.agentTask.createdAt
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
240
|
]);
|
|
231
|
-
const
|
|
232
|
-
(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
);
|
|
241
|
+
const T = await new Promise((f) => {
|
|
242
|
+
m.current.set(
|
|
243
|
+
y.agentTask.id,
|
|
244
|
+
f
|
|
245
|
+
);
|
|
246
|
+
});
|
|
239
247
|
return {
|
|
240
248
|
type: "success",
|
|
241
|
-
streamId:
|
|
249
|
+
streamId: u.stream.id,
|
|
242
250
|
agentTaskId: y.agentTask.id,
|
|
243
|
-
response:
|
|
251
|
+
response: T
|
|
244
252
|
};
|
|
245
253
|
} else {
|
|
246
254
|
if (y.type === "error")
|
|
247
|
-
return
|
|
248
|
-
...
|
|
249
|
-
(f) => f.taskKey !== u
|
|
250
|
-
),
|
|
255
|
+
return n((T) => [
|
|
256
|
+
...T.filter((f) => f.taskKey !== g),
|
|
251
257
|
{
|
|
252
|
-
taskKey:
|
|
258
|
+
taskKey: g,
|
|
253
259
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
254
|
-
streamId:
|
|
260
|
+
streamId: u.stream.id,
|
|
255
261
|
params: a,
|
|
256
262
|
error: y.error,
|
|
257
263
|
progressItems: [],
|
|
258
264
|
loading: !1,
|
|
259
265
|
doneStreaming: !1,
|
|
260
|
-
loadingText:
|
|
266
|
+
loadingText: i == null ? void 0 : i.loadingText,
|
|
261
267
|
confirmedData: null
|
|
262
268
|
}
|
|
263
269
|
]), {
|
|
@@ -265,113 +271,111 @@ const te = (e) => {
|
|
|
265
271
|
error: y.error
|
|
266
272
|
};
|
|
267
273
|
{
|
|
268
|
-
const
|
|
274
|
+
const T = {
|
|
269
275
|
message: "No response received",
|
|
270
276
|
code: "UnknownError"
|
|
271
277
|
};
|
|
272
|
-
return
|
|
273
|
-
...f.filter(
|
|
274
|
-
(h) => h.taskKey !== u
|
|
275
|
-
),
|
|
278
|
+
return n((f) => [
|
|
279
|
+
...f.filter((h) => h.taskKey !== g),
|
|
276
280
|
{
|
|
277
|
-
taskKey:
|
|
281
|
+
taskKey: g,
|
|
278
282
|
triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
279
|
-
streamId:
|
|
280
|
-
error:
|
|
283
|
+
streamId: u.stream.id,
|
|
284
|
+
error: T,
|
|
281
285
|
params: a,
|
|
282
286
|
progressItems: [],
|
|
283
287
|
loading: !1,
|
|
284
288
|
doneStreaming: !1,
|
|
285
|
-
loadingText:
|
|
289
|
+
loadingText: i == null ? void 0 : i.loadingText,
|
|
286
290
|
confirmedData: null
|
|
287
291
|
}
|
|
288
292
|
]), {
|
|
289
293
|
type: "error",
|
|
290
|
-
error:
|
|
294
|
+
error: T
|
|
291
295
|
};
|
|
292
296
|
}
|
|
293
297
|
}
|
|
294
298
|
} else
|
|
295
|
-
return console.error(
|
|
299
|
+
return console.error(u.error), u;
|
|
296
300
|
},
|
|
297
|
-
[t,
|
|
298
|
-
),
|
|
299
|
-
if (
|
|
300
|
-
return [...
|
|
301
|
-
}, [
|
|
302
|
-
return
|
|
303
|
-
o.current.clear(),
|
|
301
|
+
[t, r, s]
|
|
302
|
+
), d = B(() => {
|
|
303
|
+
if (r.length !== 0)
|
|
304
|
+
return [...r].sort((a, i) => new Date(i.triggeredAt).getTime() - new Date(a.triggeredAt).getTime())[0];
|
|
305
|
+
}, [r]);
|
|
306
|
+
return E(() => () => {
|
|
307
|
+
o.current.clear(), m.current.clear();
|
|
304
308
|
}, []), {
|
|
305
|
-
agentTasks:
|
|
306
|
-
createAgentTask:
|
|
307
|
-
latest:
|
|
309
|
+
agentTasks: r,
|
|
310
|
+
createAgentTask: l,
|
|
311
|
+
latest: d
|
|
308
312
|
};
|
|
309
313
|
};
|
|
310
|
-
async function
|
|
311
|
-
const
|
|
312
|
-
let
|
|
313
|
-
for (; !(
|
|
314
|
-
t(
|
|
314
|
+
async function oe(e, t) {
|
|
315
|
+
const r = e.getReader();
|
|
316
|
+
let n;
|
|
317
|
+
for (; !(n = await r.read()).done; )
|
|
318
|
+
t(n.value);
|
|
315
319
|
}
|
|
316
|
-
function
|
|
317
|
-
let t,
|
|
318
|
-
return function(
|
|
319
|
-
t === void 0 ? (t =
|
|
320
|
-
const
|
|
321
|
-
let
|
|
322
|
-
for (;
|
|
323
|
-
o && (t[
|
|
320
|
+
function ie(e) {
|
|
321
|
+
let t, r, n, o = !1;
|
|
322
|
+
return function(s) {
|
|
323
|
+
t === void 0 ? (t = s, r = 0, n = -1) : t = ce(t, s);
|
|
324
|
+
const l = t.length;
|
|
325
|
+
let d = 0;
|
|
326
|
+
for (; r < l; ) {
|
|
327
|
+
o && (t[r] === 10 && (d = ++r), o = !1);
|
|
324
328
|
let a = -1;
|
|
325
|
-
for (;
|
|
326
|
-
switch (t[
|
|
329
|
+
for (; r < l && a === -1; ++r)
|
|
330
|
+
switch (t[r]) {
|
|
327
331
|
case 58:
|
|
328
|
-
|
|
332
|
+
n === -1 && (n = r - d);
|
|
329
333
|
break;
|
|
330
334
|
case 13:
|
|
331
335
|
o = !0;
|
|
332
336
|
case 10:
|
|
333
|
-
a =
|
|
337
|
+
a = r;
|
|
334
338
|
break;
|
|
335
339
|
}
|
|
336
340
|
if (a === -1)
|
|
337
341
|
break;
|
|
338
|
-
e(t.subarray(
|
|
342
|
+
e(t.subarray(d, a), n), d = r, n = -1;
|
|
339
343
|
}
|
|
340
|
-
|
|
344
|
+
d === l ? t = void 0 : d !== 0 && (t = t.subarray(d), r -= d);
|
|
341
345
|
};
|
|
342
346
|
}
|
|
343
|
-
function
|
|
344
|
-
let
|
|
347
|
+
function se(e, t, r) {
|
|
348
|
+
let n = O();
|
|
345
349
|
const o = new TextDecoder();
|
|
346
|
-
return function(
|
|
347
|
-
if (
|
|
348
|
-
|
|
349
|
-
else if (
|
|
350
|
-
const
|
|
351
|
-
switch (
|
|
350
|
+
return function(s, l) {
|
|
351
|
+
if (s.length === 0)
|
|
352
|
+
r == null || r(n), n = O();
|
|
353
|
+
else if (l > 0) {
|
|
354
|
+
const d = o.decode(s.subarray(0, l)), a = l + (s[l + 1] === 32 ? 2 : 1), i = o.decode(s.subarray(a));
|
|
355
|
+
switch (d) {
|
|
352
356
|
case "data":
|
|
353
|
-
|
|
354
|
-
` +
|
|
357
|
+
n.data = n.data ? n.data + `
|
|
358
|
+
` + i : i;
|
|
355
359
|
break;
|
|
356
360
|
case "event":
|
|
357
|
-
|
|
361
|
+
n.event = i;
|
|
358
362
|
break;
|
|
359
363
|
case "id":
|
|
360
|
-
e(
|
|
364
|
+
e(n.id = i);
|
|
361
365
|
break;
|
|
362
366
|
case "retry":
|
|
363
|
-
const
|
|
364
|
-
isNaN(
|
|
367
|
+
const g = parseInt(i, 10);
|
|
368
|
+
isNaN(g) || t(n.retry = g);
|
|
365
369
|
break;
|
|
366
370
|
}
|
|
367
371
|
}
|
|
368
372
|
};
|
|
369
373
|
}
|
|
370
|
-
function
|
|
371
|
-
const
|
|
372
|
-
return
|
|
374
|
+
function ce(e, t) {
|
|
375
|
+
const r = new Uint8Array(e.length + t.length);
|
|
376
|
+
return r.set(e), r.set(t, e.length), r;
|
|
373
377
|
}
|
|
374
|
-
function
|
|
378
|
+
function O() {
|
|
375
379
|
return {
|
|
376
380
|
data: "",
|
|
377
381
|
event: "",
|
|
@@ -379,70 +383,70 @@ function $() {
|
|
|
379
383
|
retry: void 0
|
|
380
384
|
};
|
|
381
385
|
}
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
for (var
|
|
386
|
+
var le = function(e, t) {
|
|
387
|
+
var r = {};
|
|
388
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
385
389
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
386
|
-
for (var o = 0,
|
|
387
|
-
t.indexOf(
|
|
388
|
-
return
|
|
390
|
+
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
391
|
+
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
392
|
+
return r;
|
|
389
393
|
};
|
|
390
|
-
const
|
|
391
|
-
function
|
|
392
|
-
var { signal:
|
|
393
|
-
return new Promise((
|
|
394
|
-
const
|
|
395
|
-
|
|
394
|
+
const F = "text/event-stream", de = 1e3, D = "last-event-id";
|
|
395
|
+
function j(e, t) {
|
|
396
|
+
var { signal: r, headers: n, onopen: o, onmessage: m, onclose: s, onerror: l, openWhenHidden: d, fetch: a } = t, i = le(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
397
|
+
return new Promise((g, u) => {
|
|
398
|
+
const S = Object.assign({}, n);
|
|
399
|
+
S.accept || (S.accept = F);
|
|
396
400
|
let y;
|
|
397
|
-
function
|
|
398
|
-
y.abort(), document.hidden ||
|
|
401
|
+
function T() {
|
|
402
|
+
y.abort(), document.hidden || p();
|
|
399
403
|
}
|
|
400
|
-
|
|
401
|
-
let f =
|
|
402
|
-
function
|
|
403
|
-
document.removeEventListener("visibilitychange",
|
|
404
|
+
d || document.addEventListener("visibilitychange", T);
|
|
405
|
+
let f = de, h = 0;
|
|
406
|
+
function b() {
|
|
407
|
+
document.removeEventListener("visibilitychange", T), window.clearTimeout(h), y.abort();
|
|
404
408
|
}
|
|
405
|
-
|
|
406
|
-
|
|
409
|
+
r == null || r.addEventListener("abort", () => {
|
|
410
|
+
b(), g();
|
|
407
411
|
});
|
|
408
|
-
const
|
|
409
|
-
async function
|
|
410
|
-
var
|
|
412
|
+
const I = a ?? window.fetch, w = o ?? ue;
|
|
413
|
+
async function p() {
|
|
414
|
+
var M;
|
|
411
415
|
y = new AbortController();
|
|
412
416
|
try {
|
|
413
|
-
const P = await
|
|
414
|
-
await w(P), await
|
|
415
|
-
|
|
416
|
-
}, (
|
|
417
|
-
f =
|
|
418
|
-
},
|
|
417
|
+
const P = await I(e, Object.assign(Object.assign({}, i), { headers: S, signal: y.signal }));
|
|
418
|
+
await w(P), await oe(P.body, ie(se((k) => {
|
|
419
|
+
k ? S[D] = k : delete S[D];
|
|
420
|
+
}, (k) => {
|
|
421
|
+
f = k;
|
|
422
|
+
}, m))), s == null || s(), b(), g();
|
|
419
423
|
} catch (P) {
|
|
420
424
|
if (!y.signal.aborted)
|
|
421
425
|
try {
|
|
422
|
-
const
|
|
423
|
-
window.clearTimeout(h), h = window.setTimeout(
|
|
424
|
-
} catch (
|
|
425
|
-
|
|
426
|
+
const k = (M = l == null ? void 0 : l(P)) !== null && M !== void 0 ? M : f;
|
|
427
|
+
window.clearTimeout(h), h = window.setTimeout(p, k);
|
|
428
|
+
} catch (k) {
|
|
429
|
+
b(), u(k);
|
|
426
430
|
}
|
|
427
431
|
}
|
|
428
432
|
}
|
|
429
|
-
|
|
433
|
+
p();
|
|
430
434
|
});
|
|
431
435
|
}
|
|
432
|
-
function
|
|
436
|
+
function ue(e) {
|
|
433
437
|
const t = e.headers.get("content-type");
|
|
434
|
-
if (!(t != null && t.startsWith(
|
|
435
|
-
throw new Error(`Expected content-type to be ${
|
|
438
|
+
if (!(t != null && t.startsWith(F)))
|
|
439
|
+
throw new Error(`Expected content-type to be ${F}, Actual: ${t}`);
|
|
436
440
|
}
|
|
437
|
-
function
|
|
438
|
-
const [t,
|
|
439
|
-
return
|
|
441
|
+
function De(e) {
|
|
442
|
+
const [t, r] = C(null);
|
|
443
|
+
return E(() => {
|
|
440
444
|
if (!t)
|
|
441
445
|
return;
|
|
442
|
-
const
|
|
443
|
-
return
|
|
446
|
+
const n = new AbortController();
|
|
447
|
+
return j(t, {
|
|
444
448
|
headers: e == null ? void 0 : e.headers,
|
|
445
|
-
signal:
|
|
449
|
+
signal: n.signal,
|
|
446
450
|
async onopen(o) {
|
|
447
451
|
if (!o.ok && o.status >= 400 && o.status < 500 && o.status !== 429)
|
|
448
452
|
throw new Error(`Client error ${o.status}`);
|
|
@@ -450,47 +454,47 @@ function _e(e) {
|
|
|
450
454
|
onmessage(o) {
|
|
451
455
|
o.data && (e == null || e.onMessage({
|
|
452
456
|
url: t,
|
|
453
|
-
data:
|
|
457
|
+
data: H(o.data)
|
|
454
458
|
}));
|
|
455
459
|
},
|
|
456
460
|
onerror(o) {
|
|
457
|
-
throw console.error("EventSource error:", o), e == null || e.onError(t),
|
|
461
|
+
throw console.error("EventSource error:", o), e == null || e.onError(t), r(null), o;
|
|
458
462
|
},
|
|
459
463
|
onclose() {
|
|
460
464
|
}
|
|
461
465
|
}), () => {
|
|
462
|
-
|
|
466
|
+
n.abort();
|
|
463
467
|
};
|
|
464
468
|
}, [t, e == null ? void 0 : e.headers]), {
|
|
465
|
-
setSourceUrl:
|
|
469
|
+
setSourceUrl: r,
|
|
466
470
|
sourceUrl: t
|
|
467
471
|
};
|
|
468
472
|
}
|
|
469
|
-
function
|
|
470
|
-
const t = atob(e),
|
|
471
|
-
for (let
|
|
472
|
-
n
|
|
473
|
-
return new TextDecoder("utf-8").decode(
|
|
473
|
+
function H(e) {
|
|
474
|
+
const t = atob(e), r = new Uint8Array(t.length);
|
|
475
|
+
for (let n = 0; n < t.length; n++)
|
|
476
|
+
r[n] = t.charCodeAt(n);
|
|
477
|
+
return new TextDecoder("utf-8").decode(r);
|
|
474
478
|
}
|
|
475
|
-
function
|
|
476
|
-
const [
|
|
479
|
+
function Ue(e, t) {
|
|
480
|
+
const [r, n] = C(
|
|
477
481
|
null
|
|
478
|
-
), [o,
|
|
482
|
+
), [o, m] = C(
|
|
479
483
|
null
|
|
480
|
-
),
|
|
481
|
-
const
|
|
482
|
-
pk:
|
|
483
|
-
clientToken:
|
|
484
|
-
streamToken:
|
|
484
|
+
), s = N(), l = async (g) => {
|
|
485
|
+
const u = await g.fetchTokens(), { fetchTokens: S, nextPageToken: y, previousPageToken: T, ...f } = g, h = await e({
|
|
486
|
+
pk: s.fency.publishableKey,
|
|
487
|
+
clientToken: u.clientToken,
|
|
488
|
+
streamToken: u.streamToken,
|
|
485
489
|
request: {
|
|
486
490
|
...f,
|
|
487
491
|
limit: (t == null ? void 0 : t.pageSize) ?? 50,
|
|
488
492
|
pagination: {
|
|
489
493
|
nextPageToken: y,
|
|
490
|
-
previousPageToken:
|
|
494
|
+
previousPageToken: T
|
|
491
495
|
}
|
|
492
496
|
},
|
|
493
|
-
baseUrl:
|
|
497
|
+
baseUrl: s.fency.baseUrl
|
|
494
498
|
});
|
|
495
499
|
return h.type === "success" && h.items && h.pagination ? {
|
|
496
500
|
type: "success",
|
|
@@ -509,15 +513,15 @@ function je(e, t) {
|
|
|
509
513
|
};
|
|
510
514
|
};
|
|
511
515
|
return {
|
|
512
|
-
fetchFirstPage: async (
|
|
513
|
-
const
|
|
514
|
-
...
|
|
516
|
+
fetchFirstPage: async (g) => {
|
|
517
|
+
const u = await l({
|
|
518
|
+
...g,
|
|
515
519
|
nextPageToken: void 0,
|
|
516
520
|
previousPageToken: void 0
|
|
517
521
|
});
|
|
518
|
-
return
|
|
522
|
+
return u.type === "success" && (m(u.page), n(g)), u;
|
|
519
523
|
},
|
|
520
|
-
fetchNextPage: async (
|
|
524
|
+
fetchNextPage: async (g) => {
|
|
521
525
|
if (o == null)
|
|
522
526
|
return {
|
|
523
527
|
type: "error",
|
|
@@ -534,14 +538,14 @@ function je(e, t) {
|
|
|
534
538
|
message: "No next page"
|
|
535
539
|
}
|
|
536
540
|
};
|
|
537
|
-
const
|
|
538
|
-
...
|
|
541
|
+
const u = await l({
|
|
542
|
+
...g,
|
|
539
543
|
nextPageToken: o.pagination.nextPageToken,
|
|
540
544
|
previousPageToken: void 0
|
|
541
545
|
});
|
|
542
|
-
return
|
|
546
|
+
return u.type === "success" && (m(u.page), n(g)), u;
|
|
543
547
|
},
|
|
544
|
-
fetchPreviousPage: async (
|
|
548
|
+
fetchPreviousPage: async (g) => {
|
|
545
549
|
if (o == null)
|
|
546
550
|
return {
|
|
547
551
|
type: "error",
|
|
@@ -558,60 +562,60 @@ function je(e, t) {
|
|
|
558
562
|
message: "No previous page"
|
|
559
563
|
}
|
|
560
564
|
};
|
|
561
|
-
const
|
|
562
|
-
...
|
|
565
|
+
const u = await l({
|
|
566
|
+
...g,
|
|
563
567
|
nextPageToken: void 0,
|
|
564
568
|
previousPageToken: o.pagination.previousPageToken
|
|
565
569
|
});
|
|
566
|
-
return
|
|
570
|
+
return u.type === "success" && (m(u.page), n(g)), u;
|
|
567
571
|
},
|
|
568
|
-
refetchCurrentPage: async () =>
|
|
572
|
+
refetchCurrentPage: async () => r == null ? {
|
|
569
573
|
type: "error",
|
|
570
574
|
error: {
|
|
571
575
|
code: "NO_CURRENT_PAGE",
|
|
572
576
|
message: "No current page, please call fetchFirstPage first."
|
|
573
577
|
}
|
|
574
|
-
} :
|
|
578
|
+
} : l(r),
|
|
575
579
|
currentPage: o
|
|
576
580
|
};
|
|
577
581
|
}
|
|
578
|
-
function
|
|
579
|
-
return e.progressItems.map((t,
|
|
580
|
-
const
|
|
581
|
-
let
|
|
582
|
-
if (
|
|
583
|
-
const
|
|
584
|
-
|
|
582
|
+
function me(e) {
|
|
583
|
+
return e.progressItems.map((t, r) => {
|
|
584
|
+
const n = e.progressItems[r + 1], o = n != null;
|
|
585
|
+
let m;
|
|
586
|
+
if (n != null && n.createdAt) {
|
|
587
|
+
const s = new Date(t.createdAt).getTime(), l = new Date(n.createdAt).getTime();
|
|
588
|
+
m = Math.round((l - s) / 1e3);
|
|
585
589
|
}
|
|
586
590
|
return {
|
|
587
591
|
item: t,
|
|
588
592
|
completed: o,
|
|
589
|
-
isLatest:
|
|
590
|
-
durationSeconds:
|
|
593
|
+
isLatest: r === e.progressItems.length - 1,
|
|
594
|
+
durationSeconds: m
|
|
591
595
|
};
|
|
592
596
|
});
|
|
593
597
|
}
|
|
594
|
-
function
|
|
598
|
+
function R({
|
|
595
599
|
text: e,
|
|
596
600
|
duration: t = 2,
|
|
597
|
-
delay:
|
|
598
|
-
repeat:
|
|
601
|
+
delay: r = 0,
|
|
602
|
+
repeat: n = !0,
|
|
599
603
|
repeatDelay: o = 0.5,
|
|
600
|
-
className:
|
|
601
|
-
startOnView:
|
|
602
|
-
once:
|
|
603
|
-
inViewMargin:
|
|
604
|
+
className: m,
|
|
605
|
+
startOnView: s = !1,
|
|
606
|
+
once: l = !1,
|
|
607
|
+
inViewMargin: d,
|
|
604
608
|
spread: a = 2,
|
|
605
|
-
color:
|
|
606
|
-
shimmerColor:
|
|
607
|
-
direction:
|
|
609
|
+
color: i = "#999",
|
|
610
|
+
shimmerColor: g = "#000",
|
|
611
|
+
direction: u = "fromBottom"
|
|
608
612
|
}) {
|
|
609
|
-
const
|
|
610
|
-
return /* @__PURE__ */
|
|
613
|
+
const S = A(null), y = X(S, { once: l, margin: d }), T = B(() => e.length * a, [e, a]), f = !s || y, h = u === "fromBottom" ? "100% center" : "-100% center", b = u === "fromBottom" ? "0% center" : "200% center";
|
|
614
|
+
return /* @__PURE__ */ c(
|
|
611
615
|
v.span,
|
|
612
616
|
{
|
|
613
|
-
ref:
|
|
614
|
-
className:
|
|
617
|
+
ref: S,
|
|
618
|
+
className: m,
|
|
615
619
|
style: {
|
|
616
620
|
position: "relative",
|
|
617
621
|
display: "inline-block",
|
|
@@ -621,9 +625,9 @@ function M({
|
|
|
621
625
|
color: "transparent",
|
|
622
626
|
WebkitTextFillColor: "transparent",
|
|
623
627
|
backgroundRepeat: "no-repeat, padding-box",
|
|
624
|
-
"--spread": `${
|
|
625
|
-
"--base-color":
|
|
626
|
-
"--shimmer-color":
|
|
628
|
+
"--spread": `${T}px`,
|
|
629
|
+
"--base-color": i,
|
|
630
|
+
"--shimmer-color": g,
|
|
627
631
|
"--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
|
|
628
632
|
backgroundImage: "var(--shimmer-bg), linear-gradient(var(--base-color), var(--base-color))"
|
|
629
633
|
},
|
|
@@ -632,38 +636,28 @@ function M({
|
|
|
632
636
|
opacity: 0
|
|
633
637
|
},
|
|
634
638
|
animate: f ? {
|
|
635
|
-
backgroundPosition:
|
|
639
|
+
backgroundPosition: b,
|
|
636
640
|
opacity: 1
|
|
637
641
|
} : {},
|
|
638
642
|
transition: {
|
|
639
643
|
backgroundPosition: {
|
|
640
|
-
repeat:
|
|
644
|
+
repeat: n ? 1 / 0 : 0,
|
|
641
645
|
duration: t,
|
|
642
|
-
delay:
|
|
646
|
+
delay: r,
|
|
643
647
|
repeatDelay: o,
|
|
644
648
|
ease: "linear"
|
|
645
649
|
},
|
|
646
650
|
opacity: {
|
|
647
651
|
duration: 0.3,
|
|
648
|
-
delay:
|
|
652
|
+
delay: r
|
|
649
653
|
}
|
|
650
654
|
},
|
|
651
655
|
children: e
|
|
652
656
|
}
|
|
653
657
|
);
|
|
654
658
|
}
|
|
655
|
-
function
|
|
659
|
+
function ge(e) {
|
|
656
660
|
const t = e.item.data;
|
|
657
|
-
if (t.taskType === "GenericAgentTask")
|
|
658
|
-
switch (t.eventType) {
|
|
659
|
-
case "Execution":
|
|
660
|
-
case "Reasoning":
|
|
661
|
-
return t.title;
|
|
662
|
-
case "FinalResponse":
|
|
663
|
-
return "Generating answer...";
|
|
664
|
-
case "Completed":
|
|
665
|
-
return "Completed";
|
|
666
|
-
}
|
|
667
661
|
if (t.taskType === "StreamingChatCompletion") {
|
|
668
662
|
if (t.eventType === "Text") return "Streaming...";
|
|
669
663
|
if (t.eventType === "Completed") return "Completed";
|
|
@@ -693,28 +687,28 @@ function fe(e) {
|
|
|
693
687
|
}
|
|
694
688
|
return "Processing...";
|
|
695
689
|
}
|
|
696
|
-
const
|
|
690
|
+
const ye = ({ progressViewItems: e }) => {
|
|
697
691
|
const t = e[e.length - 1];
|
|
698
692
|
if (!t) return null;
|
|
699
|
-
const
|
|
700
|
-
return /* @__PURE__ */
|
|
693
|
+
const r = ge(t);
|
|
694
|
+
return /* @__PURE__ */ c("div", { className: "simple-mode-container", children: /* @__PURE__ */ c(L, { mode: "wait", children: /* @__PURE__ */ c(
|
|
701
695
|
v.div,
|
|
702
696
|
{
|
|
703
697
|
initial: { opacity: 0, y: 10 },
|
|
704
698
|
animate: { opacity: 1, y: 0 },
|
|
705
699
|
exit: { opacity: 0, y: -10 },
|
|
706
700
|
transition: { duration: 0.3 },
|
|
707
|
-
children: t.completed ? /* @__PURE__ */
|
|
701
|
+
children: t.completed ? /* @__PURE__ */ c(
|
|
708
702
|
"div",
|
|
709
703
|
{
|
|
710
704
|
className: "simple-mode-title",
|
|
711
705
|
style: { color: "#666" },
|
|
712
|
-
children:
|
|
706
|
+
children: r
|
|
713
707
|
}
|
|
714
|
-
) : /* @__PURE__ */
|
|
715
|
-
|
|
708
|
+
) : /* @__PURE__ */ c(
|
|
709
|
+
R,
|
|
716
710
|
{
|
|
717
|
-
text:
|
|
711
|
+
text: r,
|
|
718
712
|
className: "simple-mode-title",
|
|
719
713
|
duration: 2.5,
|
|
720
714
|
repeat: !0,
|
|
@@ -725,52 +719,7 @@ const he = ({ progressViewItems: e }) => {
|
|
|
725
719
|
},
|
|
726
720
|
t.item.progressItemId
|
|
727
721
|
) }) });
|
|
728
|
-
},
|
|
729
|
-
data: e,
|
|
730
|
-
isLatest: t = !1,
|
|
731
|
-
durationSeconds: n
|
|
732
|
-
}) => /* @__PURE__ */ b("div", { style: { padding: "16px" }, children: [
|
|
733
|
-
/* @__PURE__ */ i(
|
|
734
|
-
v.div,
|
|
735
|
-
{
|
|
736
|
-
style: {
|
|
737
|
-
display: "flex",
|
|
738
|
-
alignItems: "center",
|
|
739
|
-
gap: "10px",
|
|
740
|
-
color: "#666"
|
|
741
|
-
},
|
|
742
|
-
initial: { opacity: 0, y: -10 },
|
|
743
|
-
animate: { opacity: 1, y: 0 },
|
|
744
|
-
transition: { duration: 0.3, delay: 0 },
|
|
745
|
-
children: t && !n ? /* @__PURE__ */ i(
|
|
746
|
-
M,
|
|
747
|
-
{
|
|
748
|
-
text: e.title,
|
|
749
|
-
duration: 2.5,
|
|
750
|
-
repeat: !0,
|
|
751
|
-
color: "#999",
|
|
752
|
-
shimmerColor: "#000"
|
|
753
|
-
}
|
|
754
|
-
) : /* @__PURE__ */ i("span", { style: { color: "#666" }, children: e.title })
|
|
755
|
-
}
|
|
756
|
-
),
|
|
757
|
-
n !== void 0 && /* @__PURE__ */ b(
|
|
758
|
-
"div",
|
|
759
|
-
{
|
|
760
|
-
style: {
|
|
761
|
-
fontSize: "12px",
|
|
762
|
-
color: "#999",
|
|
763
|
-
marginTop: "4px",
|
|
764
|
-
fontStyle: "italic"
|
|
765
|
-
},
|
|
766
|
-
children: [
|
|
767
|
-
"Took ",
|
|
768
|
-
n,
|
|
769
|
-
" seconds"
|
|
770
|
-
]
|
|
771
|
-
}
|
|
772
|
-
)
|
|
773
|
-
] }), D = {
|
|
722
|
+
}, K = {
|
|
774
723
|
'code[class*="language-"]': {
|
|
775
724
|
color: "#f8f8f2",
|
|
776
725
|
background: "none",
|
|
@@ -921,229 +870,53 @@ const he = ({ progressViewItems: e }) => {
|
|
|
921
870
|
italic: {
|
|
922
871
|
fontStyle: "italic"
|
|
923
872
|
}
|
|
924
|
-
},
|
|
925
|
-
data: e,
|
|
926
|
-
streamToken: t,
|
|
927
|
-
fetchClientToken: n,
|
|
928
|
-
durationSeconds: r
|
|
929
|
-
}) => {
|
|
930
|
-
const { fency: o } = N(), g = U(
|
|
931
|
-
async (d) => {
|
|
932
|
-
try {
|
|
933
|
-
const { clientToken: s } = await n(), c = await V({
|
|
934
|
-
pk: o.publishableKey,
|
|
935
|
-
baseUrl: o.baseUrl,
|
|
936
|
-
clientToken: s,
|
|
937
|
-
streamToken: t,
|
|
938
|
-
request: { fileId: d }
|
|
939
|
-
});
|
|
940
|
-
c.type === "success" && window.open(c.downloadLink, "_blank");
|
|
941
|
-
} catch (s) {
|
|
942
|
-
console.error("Failed to download file:", s);
|
|
943
|
-
}
|
|
944
|
-
},
|
|
945
|
-
[o, t, n]
|
|
946
|
-
);
|
|
947
|
-
return /* @__PURE__ */ b("div", { style: { padding: "16px" }, children: [
|
|
948
|
-
/* @__PURE__ */ i(
|
|
949
|
-
v.div,
|
|
950
|
-
{
|
|
951
|
-
className: "fency-markdown-body-raw",
|
|
952
|
-
initial: { opacity: 0, y: -10 },
|
|
953
|
-
animate: { opacity: 1, y: 0 },
|
|
954
|
-
transition: { duration: 0.3, delay: 0 },
|
|
955
|
-
children: /* @__PURE__ */ i(
|
|
956
|
-
z,
|
|
957
|
-
{
|
|
958
|
-
remarkPlugins: [L],
|
|
959
|
-
components: {
|
|
960
|
-
code(d) {
|
|
961
|
-
const { children: s, className: c, node: a, ref: l, ...u } = d, m = /language-(\w+)/.exec(c || "");
|
|
962
|
-
return m ? /* @__PURE__ */ i(
|
|
963
|
-
F,
|
|
964
|
-
{
|
|
965
|
-
...u,
|
|
966
|
-
PreTag: "div",
|
|
967
|
-
children: String(s).replace(/\n$/, ""),
|
|
968
|
-
language: m[1],
|
|
969
|
-
style: D
|
|
970
|
-
}
|
|
971
|
-
) : /* @__PURE__ */ i("code", { ...u, className: c, children: String(s) });
|
|
972
|
-
},
|
|
973
|
-
a(d) {
|
|
974
|
-
const { children: s, href: c, ...a } = d;
|
|
975
|
-
return /* @__PURE__ */ i(
|
|
976
|
-
"a",
|
|
977
|
-
{
|
|
978
|
-
...a,
|
|
979
|
-
href: c,
|
|
980
|
-
onClick: (l) => {
|
|
981
|
-
if (!c) return;
|
|
982
|
-
const u = c.match(
|
|
983
|
-
/\/files\/(fil_[a-zA-Z0-9]+)\/download/
|
|
984
|
-
);
|
|
985
|
-
u && (l.preventDefault(), g(u[1]));
|
|
986
|
-
},
|
|
987
|
-
children: s
|
|
988
|
-
}
|
|
989
|
-
);
|
|
990
|
-
}
|
|
991
|
-
},
|
|
992
|
-
children: e.response
|
|
993
|
-
}
|
|
994
|
-
)
|
|
995
|
-
}
|
|
996
|
-
),
|
|
997
|
-
r !== void 0 && /* @__PURE__ */ b(
|
|
998
|
-
"div",
|
|
999
|
-
{
|
|
1000
|
-
style: {
|
|
1001
|
-
fontSize: "12px",
|
|
1002
|
-
color: "#999",
|
|
1003
|
-
marginTop: "8px",
|
|
1004
|
-
fontStyle: "italic"
|
|
1005
|
-
},
|
|
1006
|
-
children: [
|
|
1007
|
-
"Thought for ",
|
|
1008
|
-
r,
|
|
1009
|
-
" seconds"
|
|
1010
|
-
]
|
|
1011
|
-
}
|
|
1012
|
-
)
|
|
1013
|
-
] });
|
|
1014
|
-
}, ke = ({
|
|
1015
|
-
data: e,
|
|
1016
|
-
completed: t,
|
|
1017
|
-
isLatest: n = !1,
|
|
1018
|
-
durationSeconds: r
|
|
1019
|
-
}) => {
|
|
1020
|
-
const o = E(null);
|
|
1021
|
-
return p(() => {
|
|
1022
|
-
o.current && !t && (o.current.scrollTop = o.current.scrollHeight);
|
|
1023
|
-
}, [e.reasoning, t]), /* @__PURE__ */ b("div", { style: { padding: "16px" }, children: [
|
|
1024
|
-
/* @__PURE__ */ i(
|
|
1025
|
-
v.h3,
|
|
1026
|
-
{
|
|
1027
|
-
style: { marginBottom: "10px", color: "#666" },
|
|
1028
|
-
initial: { opacity: 0, y: -10 },
|
|
1029
|
-
animate: { opacity: 1, y: 0 },
|
|
1030
|
-
transition: { duration: 0.3, delay: 0 },
|
|
1031
|
-
children: n && !r ? /* @__PURE__ */ i(
|
|
1032
|
-
M,
|
|
1033
|
-
{
|
|
1034
|
-
text: e.title,
|
|
1035
|
-
duration: 2.5,
|
|
1036
|
-
repeat: !0,
|
|
1037
|
-
color: "#999",
|
|
1038
|
-
shimmerColor: "#000"
|
|
1039
|
-
}
|
|
1040
|
-
) : e.title
|
|
1041
|
-
}
|
|
1042
|
-
),
|
|
1043
|
-
/* @__PURE__ */ i(
|
|
1044
|
-
v.div,
|
|
1045
|
-
{
|
|
1046
|
-
ref: o,
|
|
1047
|
-
style: {
|
|
1048
|
-
maxHeight: "100px",
|
|
1049
|
-
overflowY: "auto",
|
|
1050
|
-
border: "1px solid #e0e0e0",
|
|
1051
|
-
borderRadius: "8px",
|
|
1052
|
-
padding: "12px",
|
|
1053
|
-
opacity: 0.5,
|
|
1054
|
-
backgroundColor: "#f9f9f9"
|
|
1055
|
-
},
|
|
1056
|
-
initial: { opacity: 0, y: -10 },
|
|
1057
|
-
animate: { opacity: 0.5, y: 0 },
|
|
1058
|
-
transition: { duration: 0.3, delay: 0.1 },
|
|
1059
|
-
children: /* @__PURE__ */ i("div", { className: "fency-markdown-body-raw", children: /* @__PURE__ */ i(
|
|
1060
|
-
z,
|
|
1061
|
-
{
|
|
1062
|
-
remarkPlugins: [L],
|
|
1063
|
-
components: {
|
|
1064
|
-
code(g) {
|
|
1065
|
-
const { children: d, className: s, node: c, ref: a, ...l } = g, u = /language-(\w+)/.exec(s || "");
|
|
1066
|
-
return u ? /* @__PURE__ */ i(
|
|
1067
|
-
F,
|
|
1068
|
-
{
|
|
1069
|
-
...l,
|
|
1070
|
-
PreTag: "div",
|
|
1071
|
-
children: String(d).replace(/\n$/, ""),
|
|
1072
|
-
language: u[1],
|
|
1073
|
-
style: D
|
|
1074
|
-
}
|
|
1075
|
-
) : /* @__PURE__ */ i("code", { ...l, className: s, children: String(d) });
|
|
1076
|
-
}
|
|
1077
|
-
},
|
|
1078
|
-
children: e.reasoning
|
|
1079
|
-
}
|
|
1080
|
-
) })
|
|
1081
|
-
}
|
|
1082
|
-
),
|
|
1083
|
-
r !== void 0 && /* @__PURE__ */ b(
|
|
1084
|
-
"div",
|
|
1085
|
-
{
|
|
1086
|
-
style: {
|
|
1087
|
-
fontSize: "12px",
|
|
1088
|
-
color: "#999",
|
|
1089
|
-
marginTop: "8px",
|
|
1090
|
-
fontStyle: "italic"
|
|
1091
|
-
},
|
|
1092
|
-
children: [
|
|
1093
|
-
"Thought for ",
|
|
1094
|
-
r,
|
|
1095
|
-
" seconds"
|
|
1096
|
-
]
|
|
1097
|
-
}
|
|
1098
|
-
)
|
|
1099
|
-
] });
|
|
1100
|
-
}, B = ({
|
|
873
|
+
}, U = ({
|
|
1101
874
|
text: e
|
|
1102
|
-
}) => /* @__PURE__ */
|
|
875
|
+
}) => /* @__PURE__ */ c("div", { style: { padding: "16px" }, children: /* @__PURE__ */ c(
|
|
1103
876
|
v.div,
|
|
1104
877
|
{
|
|
1105
878
|
className: "fency-markdown-body-raw",
|
|
1106
879
|
initial: { opacity: 0, y: -10 },
|
|
1107
880
|
animate: { opacity: 1, y: 0 },
|
|
1108
881
|
transition: { duration: 0.3, delay: 0 },
|
|
1109
|
-
children: /* @__PURE__ */
|
|
1110
|
-
|
|
882
|
+
children: /* @__PURE__ */ c(
|
|
883
|
+
Q,
|
|
1111
884
|
{
|
|
1112
|
-
remarkPlugins: [
|
|
885
|
+
remarkPlugins: [Y],
|
|
1113
886
|
components: {
|
|
1114
887
|
code(t) {
|
|
1115
|
-
const { children:
|
|
1116
|
-
return
|
|
1117
|
-
|
|
888
|
+
const { children: r, className: n, node: o, ref: m, ...s } = t, l = /language-(\w+)/.exec(n || "");
|
|
889
|
+
return l ? /* @__PURE__ */ c(
|
|
890
|
+
$,
|
|
1118
891
|
{
|
|
1119
|
-
...
|
|
892
|
+
...s,
|
|
1120
893
|
PreTag: "div",
|
|
1121
|
-
children: String(
|
|
1122
|
-
language:
|
|
1123
|
-
style:
|
|
894
|
+
children: String(r).replace(/\n$/, ""),
|
|
895
|
+
language: l[1],
|
|
896
|
+
style: K
|
|
1124
897
|
}
|
|
1125
|
-
) : /* @__PURE__ */
|
|
898
|
+
) : /* @__PURE__ */ c("code", { ...s, className: n, children: String(r) });
|
|
1126
899
|
}
|
|
1127
900
|
},
|
|
1128
901
|
children: e
|
|
1129
902
|
}
|
|
1130
903
|
)
|
|
1131
904
|
}
|
|
1132
|
-
) }),
|
|
905
|
+
) }), fe = ({ data: e }) => {
|
|
1133
906
|
const t = JSON.stringify(e.json, null, 2);
|
|
1134
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ c("div", { id: "structured-chat-completion-response", children: /* @__PURE__ */ c(
|
|
1135
908
|
v.div,
|
|
1136
909
|
{
|
|
1137
910
|
initial: { opacity: 0, y: -10 },
|
|
1138
911
|
animate: { opacity: 1, y: 0 },
|
|
1139
912
|
transition: { duration: 0.3, delay: 0 },
|
|
1140
|
-
children: /* @__PURE__ */
|
|
913
|
+
children: /* @__PURE__ */ c($, { language: "json", style: K, PreTag: "div", children: t })
|
|
1141
914
|
}
|
|
1142
915
|
) });
|
|
1143
|
-
},
|
|
1144
|
-
const
|
|
1145
|
-
return /* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
916
|
+
}, he = ({ data: e, isLatest: t = !1, durationSeconds: r }) => {
|
|
917
|
+
const n = `Searching: ${e.queryDescription}`;
|
|
918
|
+
return /* @__PURE__ */ x("div", { style: { padding: "16px" }, children: [
|
|
919
|
+
/* @__PURE__ */ c(
|
|
1147
920
|
v.div,
|
|
1148
921
|
{
|
|
1149
922
|
style: {
|
|
@@ -1155,19 +928,19 @@ const he = ({ progressViewItems: e }) => {
|
|
|
1155
928
|
initial: { opacity: 0, y: -10 },
|
|
1156
929
|
animate: { opacity: 1, y: 0 },
|
|
1157
930
|
transition: { duration: 0.3, delay: 0 },
|
|
1158
|
-
children: t && !
|
|
1159
|
-
|
|
931
|
+
children: t && !r ? /* @__PURE__ */ c(
|
|
932
|
+
R,
|
|
1160
933
|
{
|
|
1161
|
-
text:
|
|
934
|
+
text: n,
|
|
1162
935
|
duration: 2.5,
|
|
1163
936
|
repeat: !0,
|
|
1164
937
|
color: "#999",
|
|
1165
938
|
shimmerColor: "#000"
|
|
1166
939
|
}
|
|
1167
|
-
) : /* @__PURE__ */
|
|
940
|
+
) : /* @__PURE__ */ c("span", { style: { color: "#666" }, children: n })
|
|
1168
941
|
}
|
|
1169
942
|
),
|
|
1170
|
-
|
|
943
|
+
r !== void 0 && /* @__PURE__ */ x(
|
|
1171
944
|
"div",
|
|
1172
945
|
{
|
|
1173
946
|
style: {
|
|
@@ -1178,16 +951,16 @@ const he = ({ progressViewItems: e }) => {
|
|
|
1178
951
|
},
|
|
1179
952
|
children: [
|
|
1180
953
|
"Took ",
|
|
1181
|
-
|
|
954
|
+
r,
|
|
1182
955
|
" seconds"
|
|
1183
956
|
]
|
|
1184
957
|
}
|
|
1185
958
|
)
|
|
1186
959
|
] });
|
|
1187
|
-
},
|
|
1188
|
-
const
|
|
1189
|
-
return /* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
960
|
+
}, Se = ({ isLatest: e = !1, durationSeconds: t }) => {
|
|
961
|
+
const r = "Adding sources...";
|
|
962
|
+
return /* @__PURE__ */ x("div", { style: { padding: "16px" }, children: [
|
|
963
|
+
/* @__PURE__ */ c(
|
|
1191
964
|
v.div,
|
|
1192
965
|
{
|
|
1193
966
|
style: {
|
|
@@ -1199,19 +972,19 @@ const he = ({ progressViewItems: e }) => {
|
|
|
1199
972
|
initial: { opacity: 0, y: -10 },
|
|
1200
973
|
animate: { opacity: 1, y: 0 },
|
|
1201
974
|
transition: { duration: 0.3, delay: 0 },
|
|
1202
|
-
children: e && !t ? /* @__PURE__ */
|
|
1203
|
-
|
|
975
|
+
children: e && !t ? /* @__PURE__ */ c(
|
|
976
|
+
R,
|
|
1204
977
|
{
|
|
1205
|
-
text:
|
|
978
|
+
text: r,
|
|
1206
979
|
duration: 2.5,
|
|
1207
980
|
repeat: !0,
|
|
1208
981
|
color: "#999",
|
|
1209
982
|
shimmerColor: "#000"
|
|
1210
983
|
}
|
|
1211
|
-
) : /* @__PURE__ */
|
|
984
|
+
) : /* @__PURE__ */ c("span", { style: { color: "#666" }, children: r })
|
|
1212
985
|
}
|
|
1213
986
|
),
|
|
1214
|
-
t !== void 0 && /* @__PURE__ */
|
|
987
|
+
t !== void 0 && /* @__PURE__ */ x(
|
|
1215
988
|
"div",
|
|
1216
989
|
{
|
|
1217
990
|
style: {
|
|
@@ -1228,120 +1001,122 @@ const he = ({ progressViewItems: e }) => {
|
|
|
1228
1001
|
}
|
|
1229
1002
|
)
|
|
1230
1003
|
] });
|
|
1231
|
-
},
|
|
1232
|
-
/* @__PURE__ */
|
|
1004
|
+
}, Te = ({ data: e, onSourceClick: t }) => /* @__PURE__ */ x("div", { style: { padding: "16px" }, children: [
|
|
1005
|
+
/* @__PURE__ */ c(
|
|
1233
1006
|
v.div,
|
|
1234
1007
|
{
|
|
1235
|
-
style: {
|
|
1008
|
+
style: {
|
|
1009
|
+
marginBottom: "10px",
|
|
1010
|
+
fontSize: "11px",
|
|
1011
|
+
fontWeight: 500,
|
|
1012
|
+
letterSpacing: "0.05em",
|
|
1013
|
+
textTransform: "uppercase",
|
|
1014
|
+
color: "#999"
|
|
1015
|
+
},
|
|
1236
1016
|
initial: { opacity: 0, y: -10 },
|
|
1237
1017
|
animate: { opacity: 1, y: 0 },
|
|
1238
1018
|
transition: { duration: 0.3, delay: 0 },
|
|
1239
1019
|
children: "Sources"
|
|
1240
1020
|
}
|
|
1241
1021
|
),
|
|
1242
|
-
/* @__PURE__ */
|
|
1243
|
-
|
|
1022
|
+
/* @__PURE__ */ c("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ c("span", { style: { fontSize: "13px", color: "#888" }, children: "No sources" }) : e.sources.map((r, n) => /* @__PURE__ */ c(
|
|
1023
|
+
Ce,
|
|
1244
1024
|
{
|
|
1245
|
-
source:
|
|
1246
|
-
index:
|
|
1025
|
+
source: r,
|
|
1026
|
+
index: n,
|
|
1247
1027
|
onSourceClick: t
|
|
1248
1028
|
},
|
|
1249
|
-
|
|
1029
|
+
r.memoryId
|
|
1250
1030
|
)) })
|
|
1251
1031
|
] });
|
|
1252
|
-
function
|
|
1253
|
-
if (
|
|
1254
|
-
if (
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1257
|
-
const
|
|
1258
|
-
return
|
|
1032
|
+
function be(e) {
|
|
1033
|
+
if (e.length === 0) return "";
|
|
1034
|
+
if (e.length === 1) return `page ${e[0]}`;
|
|
1035
|
+
if (e.length === 2)
|
|
1036
|
+
return `pages ${e[0]} and ${e[1]}`;
|
|
1037
|
+
const t = e[e.length - 1];
|
|
1038
|
+
return `pages ${e.slice(0, -1).join(", ")} and ${t}`;
|
|
1259
1039
|
}
|
|
1260
|
-
const
|
|
1261
|
-
const [
|
|
1262
|
-
return /* @__PURE__ */
|
|
1040
|
+
const Ce = ({ source: e, index: t, onSourceClick: r }) => {
|
|
1041
|
+
const [n, o] = C(!1), m = !!r, s = e.pageNumbers ?? [], l = be(s);
|
|
1042
|
+
return /* @__PURE__ */ x(
|
|
1263
1043
|
v.div,
|
|
1264
1044
|
{
|
|
1265
1045
|
initial: { opacity: 0, scale: 0.9 },
|
|
1266
1046
|
animate: { opacity: 1, scale: 1 },
|
|
1267
1047
|
transition: { duration: 0.25, delay: t * 0.05 },
|
|
1268
|
-
onClick:
|
|
1269
|
-
onMouseEnter:
|
|
1270
|
-
onMouseLeave:
|
|
1048
|
+
onClick: m ? () => r(e.memoryId) : void 0,
|
|
1049
|
+
onMouseEnter: m ? () => o(!0) : void 0,
|
|
1050
|
+
onMouseLeave: m ? () => o(!1) : void 0,
|
|
1271
1051
|
style: {
|
|
1272
1052
|
display: "inline-flex",
|
|
1273
1053
|
flexDirection: "column",
|
|
1274
1054
|
gap: "4px",
|
|
1275
1055
|
padding: "8px 12px",
|
|
1276
|
-
borderRadius: "
|
|
1056
|
+
borderRadius: "6px",
|
|
1277
1057
|
border: "1px solid #e0e0e0",
|
|
1278
|
-
backgroundColor:
|
|
1279
|
-
cursor:
|
|
1058
|
+
backgroundColor: n ? "#f5f5f5" : "transparent",
|
|
1059
|
+
cursor: m ? "pointer" : "default",
|
|
1280
1060
|
transition: "background-color 0.15s ease",
|
|
1281
1061
|
userSelect: "none"
|
|
1282
1062
|
},
|
|
1283
|
-
children:
|
|
1063
|
+
children: [
|
|
1064
|
+
/* @__PURE__ */ c("span", { style: { fontSize: "13px", fontWeight: 500, color: "#333" }, children: e.memoryTitle }),
|
|
1065
|
+
l && /* @__PURE__ */ c("span", { style: { fontSize: "12px", color: "#666" }, children: l })
|
|
1066
|
+
]
|
|
1284
1067
|
}
|
|
1285
1068
|
);
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1069
|
+
};
|
|
1070
|
+
function ke({
|
|
1071
|
+
eventType: e,
|
|
1072
|
+
completed: t
|
|
1073
|
+
}) {
|
|
1074
|
+
return e === "ExploreMemoryError" ? /* @__PURE__ */ c("span", { style: { color: "#c62828", fontSize: 14, fontWeight: 600 }, children: "✗" }) : e === "ExploreMemoryResult" ? /* @__PURE__ */ c("span", { style: { color: "#999", fontSize: 14, fontWeight: 600 }, children: "✓" }) : e === "ExploreMemoryStart" && t ? /* @__PURE__ */ c("span", { style: { color: "#999", fontSize: 14, fontWeight: 600 }, children: "✓" }) : null;
|
|
1289
1075
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
/* @__PURE__ */
|
|
1076
|
+
const z = 80, ve = ({ data: e, completed: t, isLatest: r = !1 }) => {
|
|
1077
|
+
const [n, o] = C(!1), m = e.eventType === "ExploreMemoryResult" ? e.result : void 0, s = m != null && m.length > z, l = m != null ? n || !s ? m : `${m.slice(0, z)}...` : void 0, d = s;
|
|
1078
|
+
if (e.eventType === "ExploreMemoryStart" && !t) {
|
|
1079
|
+
const i = `Exploring ${e.memoryTitle}...`;
|
|
1080
|
+
return /* @__PURE__ */ c(
|
|
1295
1081
|
"div",
|
|
1296
1082
|
{
|
|
1297
1083
|
style: {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1084
|
+
padding: "16px",
|
|
1085
|
+
display: "flex",
|
|
1086
|
+
alignItems: "center"
|
|
1087
|
+
},
|
|
1088
|
+
children: r ? /* @__PURE__ */ c(
|
|
1089
|
+
R,
|
|
1090
|
+
{
|
|
1091
|
+
text: i,
|
|
1092
|
+
duration: 2.5,
|
|
1093
|
+
repeat: !0,
|
|
1094
|
+
color: "#999",
|
|
1095
|
+
shimmerColor: "#000"
|
|
1096
|
+
}
|
|
1097
|
+
) : /* @__PURE__ */ c("span", { style: { fontSize: 13, color: "#999" }, children: i })
|
|
1305
1098
|
}
|
|
1306
|
-
)
|
|
1307
|
-
|
|
1308
|
-
}
|
|
1309
|
-
function Ie({
|
|
1310
|
-
eventType: e,
|
|
1311
|
-
completed: t
|
|
1312
|
-
}) {
|
|
1313
|
-
return e === "ExploreMemoryError" ? /* @__PURE__ */ i("span", { style: { color: "#c62828", fontSize: 14, fontWeight: 600 }, children: "✗" }) : e === "ExploreMemoryResult" ? /* @__PURE__ */ i("span", { style: { color: "#2e7d32", fontSize: 14, fontWeight: 600 }, children: "✓" }) : e === "ExploreMemoryStart" ? t ? /* @__PURE__ */ i("span", { style: { color: "#2e7d32", fontSize: 14, fontWeight: 600 }, children: "✓" }) : /* @__PURE__ */ i(Ae, {}) : null;
|
|
1314
|
-
}
|
|
1315
|
-
const _ = 80, Pe = ({ data: e, completed: t }) => {
|
|
1316
|
-
const [n, r] = C(!1), o = e.eventType === "ExploreMemoryResult" ? e.result : void 0, g = o != null && o.length > _, d = o != null ? n || !g ? o : `${o.slice(0, _)}...` : void 0, s = g;
|
|
1317
|
-
return /* @__PURE__ */ i("div", { style: { padding: "16px" }, children: /* @__PURE__ */ b(
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
return /* @__PURE__ */ c("div", { style: { padding: "16px" }, children: /* @__PURE__ */ x(
|
|
1318
1102
|
v.div,
|
|
1319
1103
|
{
|
|
1320
|
-
initial: { opacity: 0
|
|
1321
|
-
animate: { opacity: 1
|
|
1322
|
-
transition: { duration: 0.25
|
|
1323
|
-
onClick:
|
|
1104
|
+
initial: { opacity: 0 },
|
|
1105
|
+
animate: { opacity: 1 },
|
|
1106
|
+
transition: { duration: 0.25 },
|
|
1107
|
+
onClick: d ? () => o((i) => !i) : void 0,
|
|
1324
1108
|
style: {
|
|
1325
|
-
|
|
1109
|
+
paddingBottom: "12px",
|
|
1110
|
+
borderBottom: "1px solid #eee",
|
|
1111
|
+
display: "flex",
|
|
1326
1112
|
flexDirection: "row",
|
|
1327
1113
|
alignItems: "flex-start",
|
|
1328
1114
|
gap: "10px",
|
|
1329
|
-
padding: "8px 12px",
|
|
1330
|
-
borderRadius: "8px",
|
|
1331
|
-
border: "1px solid #e0e0e0",
|
|
1332
|
-
backgroundColor: "#f9f9f9",
|
|
1333
1115
|
minWidth: 0,
|
|
1334
|
-
cursor:
|
|
1335
|
-
transition: "background-color 0.15s ease"
|
|
1116
|
+
cursor: d ? "pointer" : "default"
|
|
1336
1117
|
},
|
|
1337
|
-
onMouseEnter: s ? (c) => {
|
|
1338
|
-
c.currentTarget.style.backgroundColor = "#f0f0f0";
|
|
1339
|
-
} : void 0,
|
|
1340
|
-
onMouseLeave: s ? (c) => {
|
|
1341
|
-
c.currentTarget.style.backgroundColor = "#f9f9f9";
|
|
1342
|
-
} : void 0,
|
|
1343
1118
|
children: [
|
|
1344
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ c(
|
|
1345
1120
|
"div",
|
|
1346
1121
|
{
|
|
1347
1122
|
style: {
|
|
@@ -1351,10 +1126,10 @@ const _ = 80, Pe = ({ data: e, completed: t }) => {
|
|
|
1351
1126
|
flexShrink: 0,
|
|
1352
1127
|
width: 20
|
|
1353
1128
|
},
|
|
1354
|
-
children: /* @__PURE__ */
|
|
1129
|
+
children: /* @__PURE__ */ c(ke, { eventType: e.eventType, completed: t })
|
|
1355
1130
|
}
|
|
1356
1131
|
),
|
|
1357
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ x(
|
|
1358
1133
|
"div",
|
|
1359
1134
|
{
|
|
1360
1135
|
style: {
|
|
@@ -1364,8 +1139,8 @@ const _ = 80, Pe = ({ data: e, completed: t }) => {
|
|
|
1364
1139
|
minWidth: 0
|
|
1365
1140
|
},
|
|
1366
1141
|
children: [
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
|
|
1142
|
+
/* @__PURE__ */ c("span", { style: { fontSize: 13, fontWeight: 500, color: "#333" }, children: e.memoryTitle }),
|
|
1143
|
+
l != null && /* @__PURE__ */ c(
|
|
1369
1144
|
"span",
|
|
1370
1145
|
{
|
|
1371
1146
|
style: {
|
|
@@ -1374,10 +1149,10 @@ const _ = 80, Pe = ({ data: e, completed: t }) => {
|
|
|
1374
1149
|
lineHeight: 1.4,
|
|
1375
1150
|
whiteSpace: n ? "pre-wrap" : void 0
|
|
1376
1151
|
},
|
|
1377
|
-
children:
|
|
1152
|
+
children: l
|
|
1378
1153
|
}
|
|
1379
1154
|
),
|
|
1380
|
-
|
|
1155
|
+
d && /* @__PURE__ */ c(
|
|
1381
1156
|
"span",
|
|
1382
1157
|
{
|
|
1383
1158
|
style: {
|
|
@@ -1394,143 +1169,114 @@ const _ = 80, Pe = ({ data: e, completed: t }) => {
|
|
|
1394
1169
|
]
|
|
1395
1170
|
}
|
|
1396
1171
|
) });
|
|
1397
|
-
},
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1172
|
+
}, xe = ({
|
|
1173
|
+
progressViewItems: e,
|
|
1174
|
+
streamToken: t,
|
|
1175
|
+
fetchClientToken: r,
|
|
1176
|
+
loadingText: n,
|
|
1177
|
+
onSourceClick: o
|
|
1178
|
+
}) => {
|
|
1179
|
+
const m = A(null);
|
|
1180
|
+
E(() => {
|
|
1181
|
+
m.current && (m.current.scrollTop = m.current.scrollHeight);
|
|
1401
1182
|
}, [e.length]);
|
|
1402
|
-
const
|
|
1403
|
-
const
|
|
1404
|
-
if (
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
data: c,
|
|
1411
|
-
completed: s.completed,
|
|
1412
|
-
isLatest: s.isLatest,
|
|
1413
|
-
durationSeconds: s.durationSeconds
|
|
1414
|
-
}
|
|
1415
|
-
);
|
|
1416
|
-
case "Reasoning":
|
|
1417
|
-
return /* @__PURE__ */ i(
|
|
1418
|
-
ke,
|
|
1419
|
-
{
|
|
1420
|
-
data: c,
|
|
1421
|
-
completed: s.completed,
|
|
1422
|
-
isLatest: s.isLatest,
|
|
1423
|
-
durationSeconds: s.durationSeconds
|
|
1424
|
-
}
|
|
1425
|
-
);
|
|
1426
|
-
case "FinalResponse":
|
|
1427
|
-
return /* @__PURE__ */ i(
|
|
1428
|
-
Se,
|
|
1429
|
-
{
|
|
1430
|
-
data: c,
|
|
1431
|
-
streamToken: t,
|
|
1432
|
-
fetchClientToken: n,
|
|
1433
|
-
durationSeconds: s.durationSeconds
|
|
1434
|
-
}
|
|
1435
|
-
);
|
|
1436
|
-
case "Completed":
|
|
1437
|
-
return null;
|
|
1438
|
-
}
|
|
1439
|
-
if (c.taskType === "StreamingChatCompletion" && c.eventType === "Text")
|
|
1440
|
-
return /* @__PURE__ */ i(B, { text: c.text });
|
|
1441
|
-
if (c.taskType === "StructuredChatCompletion" && c.eventType === "Json")
|
|
1442
|
-
return /* @__PURE__ */ i(be, { data: c });
|
|
1443
|
-
if (c.taskType === "StreamingMemoryTypeChatCompletion")
|
|
1444
|
-
switch (c.eventType) {
|
|
1183
|
+
const s = (l) => {
|
|
1184
|
+
const d = l.item.data;
|
|
1185
|
+
if (d.taskType === "StreamingChatCompletion" && d.eventType === "Text")
|
|
1186
|
+
return /* @__PURE__ */ c(U, { text: d.text });
|
|
1187
|
+
if (d.taskType === "StructuredChatCompletion" && d.eventType === "Json")
|
|
1188
|
+
return /* @__PURE__ */ c(fe, { data: d });
|
|
1189
|
+
if (d.taskType === "StreamingMemoryTypeChatCompletion")
|
|
1190
|
+
switch (d.eventType) {
|
|
1445
1191
|
case "Text":
|
|
1446
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ c(U, { text: d.text });
|
|
1447
1193
|
case "Search":
|
|
1448
|
-
return /* @__PURE__ */
|
|
1449
|
-
|
|
1194
|
+
return /* @__PURE__ */ c(
|
|
1195
|
+
he,
|
|
1450
1196
|
{
|
|
1451
|
-
data:
|
|
1452
|
-
isLatest:
|
|
1453
|
-
durationSeconds:
|
|
1197
|
+
data: d,
|
|
1198
|
+
isLatest: l.isLatest,
|
|
1199
|
+
durationSeconds: l.durationSeconds
|
|
1454
1200
|
}
|
|
1455
1201
|
);
|
|
1456
1202
|
case "FindSources":
|
|
1457
|
-
return /* @__PURE__ */
|
|
1458
|
-
|
|
1203
|
+
return /* @__PURE__ */ c(
|
|
1204
|
+
Se,
|
|
1459
1205
|
{
|
|
1460
|
-
data:
|
|
1461
|
-
isLatest:
|
|
1462
|
-
durationSeconds:
|
|
1206
|
+
data: d,
|
|
1207
|
+
isLatest: l.isLatest,
|
|
1208
|
+
durationSeconds: l.durationSeconds
|
|
1463
1209
|
}
|
|
1464
1210
|
);
|
|
1465
1211
|
case "SourcesResult":
|
|
1466
|
-
return /* @__PURE__ */
|
|
1467
|
-
|
|
1212
|
+
return /* @__PURE__ */ c(
|
|
1213
|
+
Te,
|
|
1468
1214
|
{
|
|
1469
|
-
data:
|
|
1215
|
+
data: d,
|
|
1470
1216
|
onSourceClick: o
|
|
1471
1217
|
}
|
|
1472
1218
|
);
|
|
1473
1219
|
case "ExploreMemoryStart":
|
|
1474
1220
|
case "ExploreMemoryResult":
|
|
1475
1221
|
case "ExploreMemoryError":
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
-
|
|
1222
|
+
return /* @__PURE__ */ c(
|
|
1223
|
+
ve,
|
|
1478
1224
|
{
|
|
1479
|
-
data:
|
|
1480
|
-
completed:
|
|
1481
|
-
isLatest:
|
|
1225
|
+
data: d,
|
|
1226
|
+
completed: l.completed,
|
|
1227
|
+
isLatest: l.isLatest
|
|
1482
1228
|
}
|
|
1483
1229
|
);
|
|
1484
1230
|
case "Completed":
|
|
1485
1231
|
return null;
|
|
1486
1232
|
}
|
|
1487
|
-
return
|
|
1233
|
+
return d.taskType === "StreamingChatCompletion" && d.eventType === "Completed" || d.taskType === "StructuredChatCompletion" && d.eventType === "Completed", null;
|
|
1488
1234
|
};
|
|
1489
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1490
|
-
|
|
1235
|
+
return e.length === 0 ? /* @__PURE__ */ c("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ c(
|
|
1236
|
+
R,
|
|
1491
1237
|
{
|
|
1492
|
-
text:
|
|
1238
|
+
text: n ?? "Processing your task...",
|
|
1493
1239
|
duration: 1.5,
|
|
1494
1240
|
repeat: !0,
|
|
1495
1241
|
repeatDelay: 0,
|
|
1496
1242
|
color: "#999",
|
|
1497
1243
|
shimmerColor: "#000"
|
|
1498
1244
|
}
|
|
1499
|
-
) }) : /* @__PURE__ */
|
|
1245
|
+
) }) : /* @__PURE__ */ c("div", { id: "agent-task-progress-verbose", ref: m, children: /* @__PURE__ */ c(L, { children: e.map((l, d) => /* @__PURE__ */ c(
|
|
1500
1246
|
v.div,
|
|
1501
1247
|
{
|
|
1502
|
-
id: `agent-task-progress-item-${
|
|
1248
|
+
id: `agent-task-progress-item-${l.item.progressItemId}`,
|
|
1503
1249
|
initial: { opacity: 0, y: -20 },
|
|
1504
1250
|
animate: { opacity: 1, y: 0 },
|
|
1505
1251
|
transition: {
|
|
1506
1252
|
duration: 0.4,
|
|
1507
|
-
delay:
|
|
1253
|
+
delay: d * 0.1,
|
|
1508
1254
|
ease: "easeOut"
|
|
1509
1255
|
},
|
|
1510
|
-
children:
|
|
1256
|
+
children: s(l)
|
|
1511
1257
|
},
|
|
1512
|
-
|
|
1258
|
+
l.item.progressItemId
|
|
1513
1259
|
)) }) });
|
|
1514
|
-
},
|
|
1260
|
+
}, ze = ({
|
|
1515
1261
|
agentTask: e,
|
|
1516
1262
|
mode: t = "verbose",
|
|
1517
|
-
streamToken:
|
|
1518
|
-
fetchClientToken:
|
|
1263
|
+
streamToken: r,
|
|
1264
|
+
fetchClientToken: n,
|
|
1519
1265
|
onSourceClick: o
|
|
1520
1266
|
}) => {
|
|
1521
|
-
const
|
|
1522
|
-
return t === "simple" ? /* @__PURE__ */
|
|
1523
|
-
|
|
1267
|
+
const m = me(e);
|
|
1268
|
+
return t === "simple" ? /* @__PURE__ */ c(ye, { progressViewItems: m }) : /* @__PURE__ */ c(
|
|
1269
|
+
xe,
|
|
1524
1270
|
{
|
|
1525
|
-
progressViewItems:
|
|
1526
|
-
streamToken:
|
|
1527
|
-
fetchClientToken:
|
|
1271
|
+
progressViewItems: m,
|
|
1272
|
+
streamToken: r,
|
|
1273
|
+
fetchClientToken: n,
|
|
1528
1274
|
loadingText: e.loadingText,
|
|
1529
1275
|
onSourceClick: o
|
|
1530
1276
|
}
|
|
1531
1277
|
);
|
|
1532
1278
|
};
|
|
1533
|
-
class
|
|
1279
|
+
class we {
|
|
1534
1280
|
constructor(t) {
|
|
1535
1281
|
this.eventSources = /* @__PURE__ */ new Map(), this.subscribers = /* @__PURE__ */ new Map(), this.fency = t;
|
|
1536
1282
|
}
|
|
@@ -1539,37 +1285,37 @@ class Re {
|
|
|
1539
1285
|
* Creates new connections and removes old ones.
|
|
1540
1286
|
*/
|
|
1541
1287
|
updateStreams(t) {
|
|
1542
|
-
t.forEach((
|
|
1543
|
-
const o =
|
|
1544
|
-
this.eventSources.has(o) || this.connectStream(
|
|
1288
|
+
t.forEach((n) => {
|
|
1289
|
+
const o = n.stream.id;
|
|
1290
|
+
this.eventSources.has(o) || this.connectStream(n);
|
|
1545
1291
|
});
|
|
1546
|
-
const
|
|
1547
|
-
this.eventSources.forEach((
|
|
1548
|
-
|
|
1292
|
+
const r = new Set(t.map((n) => n.stream.id));
|
|
1293
|
+
this.eventSources.forEach((n, o) => {
|
|
1294
|
+
r.has(o) || (n.abort(), this.eventSources.delete(o));
|
|
1549
1295
|
});
|
|
1550
1296
|
}
|
|
1551
1297
|
connectStream(t) {
|
|
1552
|
-
const
|
|
1553
|
-
this.eventSources.set(
|
|
1554
|
-
const o = `${this.fency.baseUrl}/sse/streams/${
|
|
1298
|
+
const r = t.stream.id, n = new AbortController();
|
|
1299
|
+
this.eventSources.set(r, n);
|
|
1300
|
+
const o = `${this.fency.baseUrl}/sse/streams/${r}`, m = {
|
|
1555
1301
|
"X-Fency-Publishable-Key": this.fency.publishableKey,
|
|
1556
1302
|
"X-Fency-Stream-Token": t.stream.token
|
|
1557
1303
|
};
|
|
1558
|
-
|
|
1559
|
-
headers:
|
|
1560
|
-
signal:
|
|
1561
|
-
async onopen(
|
|
1562
|
-
if (!
|
|
1563
|
-
throw new Error(`Client error ${
|
|
1304
|
+
j(o, {
|
|
1305
|
+
headers: m,
|
|
1306
|
+
signal: n.signal,
|
|
1307
|
+
async onopen(s) {
|
|
1308
|
+
if (!s.ok && s.status >= 400 && s.status < 500 && s.status !== 429)
|
|
1309
|
+
throw new Error(`Client error ${s.status}`);
|
|
1564
1310
|
},
|
|
1565
|
-
onmessage: (
|
|
1566
|
-
if (
|
|
1567
|
-
const
|
|
1568
|
-
this.broadcast(
|
|
1311
|
+
onmessage: (s) => {
|
|
1312
|
+
if (s.data) {
|
|
1313
|
+
const l = H(s.data);
|
|
1314
|
+
this.broadcast(l, r);
|
|
1569
1315
|
}
|
|
1570
1316
|
},
|
|
1571
|
-
onerror: (
|
|
1572
|
-
throw console.error("EventSource error for stream",
|
|
1317
|
+
onerror: (s) => {
|
|
1318
|
+
throw console.error("EventSource error for stream", r, ":", s), this.broadcastError(r), s;
|
|
1573
1319
|
},
|
|
1574
1320
|
onclose() {
|
|
1575
1321
|
}
|
|
@@ -1579,19 +1325,19 @@ class Re {
|
|
|
1579
1325
|
* Subscribe to events from all active streams.
|
|
1580
1326
|
* Returns an unsubscribe function.
|
|
1581
1327
|
*/
|
|
1582
|
-
subscribe(t,
|
|
1583
|
-
return this.subscribers.set(t,
|
|
1328
|
+
subscribe(t, r) {
|
|
1329
|
+
return this.subscribers.set(t, r), () => {
|
|
1584
1330
|
this.subscribers.delete(t);
|
|
1585
1331
|
};
|
|
1586
1332
|
}
|
|
1587
|
-
broadcast(t,
|
|
1588
|
-
this.subscribers.forEach((
|
|
1589
|
-
|
|
1333
|
+
broadcast(t, r) {
|
|
1334
|
+
this.subscribers.forEach((n) => {
|
|
1335
|
+
n.onMessage(t, r);
|
|
1590
1336
|
});
|
|
1591
1337
|
}
|
|
1592
1338
|
broadcastError(t) {
|
|
1593
|
-
this.subscribers.forEach((
|
|
1594
|
-
|
|
1339
|
+
this.subscribers.forEach((r) => {
|
|
1340
|
+
r.onError(t);
|
|
1595
1341
|
});
|
|
1596
1342
|
}
|
|
1597
1343
|
/**
|
|
@@ -1601,95 +1347,92 @@ class Re {
|
|
|
1601
1347
|
this.eventSources.forEach((t) => t.abort()), this.eventSources.clear(), this.subscribers.clear();
|
|
1602
1348
|
}
|
|
1603
1349
|
}
|
|
1604
|
-
const
|
|
1350
|
+
const Ee = 12e4, Ie = (e) => {
|
|
1605
1351
|
const t = Date.now();
|
|
1606
|
-
return e.filter((
|
|
1352
|
+
return e.filter((r) => t - r.createdAt < Ee);
|
|
1607
1353
|
};
|
|
1608
|
-
function
|
|
1609
|
-
const [
|
|
1354
|
+
function We({ fency: e, fetchCreateStreamClientToken: t, children: r }) {
|
|
1355
|
+
const [n, o] = C(
|
|
1610
1356
|
null
|
|
1611
|
-
), [
|
|
1612
|
-
|
|
1357
|
+
), [m, s] = C(!0), [l, d] = C(null), [a, i] = C([]), g = A(null), u = A(null);
|
|
1358
|
+
E(() => {
|
|
1613
1359
|
e.then((f) => {
|
|
1614
|
-
o(f),
|
|
1360
|
+
o(f), s(!1);
|
|
1615
1361
|
}).catch((f) => {
|
|
1616
|
-
|
|
1362
|
+
d(f), s(!1);
|
|
1617
1363
|
});
|
|
1618
|
-
}, [e]),
|
|
1619
|
-
|
|
1620
|
-
}, [
|
|
1621
|
-
|
|
1622
|
-
}, [a]),
|
|
1364
|
+
}, [e]), E(() => {
|
|
1365
|
+
n && !u.current && (u.current = new we(n));
|
|
1366
|
+
}, [n]), E(() => {
|
|
1367
|
+
u.current && u.current.updateStreams(a);
|
|
1368
|
+
}, [a]), E(() => () => {
|
|
1623
1369
|
var f;
|
|
1624
|
-
(f =
|
|
1370
|
+
(f = u.current) == null || f.cleanup();
|
|
1625
1371
|
}, []);
|
|
1626
|
-
const
|
|
1372
|
+
const S = W(
|
|
1627
1373
|
async (f = 3e4) => {
|
|
1628
|
-
if (
|
|
1629
|
-
return
|
|
1630
|
-
const h = Date.now(),
|
|
1631
|
-
if (
|
|
1632
|
-
return
|
|
1633
|
-
const
|
|
1634
|
-
if (!
|
|
1374
|
+
if (g.current)
|
|
1375
|
+
return g.current;
|
|
1376
|
+
const h = Date.now(), b = a.length > 0 ? a[a.length - 1] : null;
|
|
1377
|
+
if (b && h - b.createdAt < f)
|
|
1378
|
+
return b.stream;
|
|
1379
|
+
const I = (async () => {
|
|
1380
|
+
if (!n)
|
|
1635
1381
|
throw new Error("Fency instance not initialized");
|
|
1636
|
-
const w = await t(),
|
|
1637
|
-
pk:
|
|
1638
|
-
baseUrl:
|
|
1382
|
+
const w = await t(), p = await J({
|
|
1383
|
+
pk: n.publishableKey,
|
|
1384
|
+
baseUrl: n.baseUrl,
|
|
1639
1385
|
clientToken: (w == null ? void 0 : w.clientToken) ?? ""
|
|
1640
1386
|
});
|
|
1641
|
-
if (
|
|
1642
|
-
const
|
|
1643
|
-
stream:
|
|
1387
|
+
if (p.type === "success") {
|
|
1388
|
+
const M = {
|
|
1389
|
+
stream: p.stream,
|
|
1644
1390
|
createdAt: Date.now()
|
|
1645
1391
|
};
|
|
1646
|
-
return
|
|
1647
|
-
const
|
|
1648
|
-
return
|
|
1649
|
-
}),
|
|
1392
|
+
return i((P) => {
|
|
1393
|
+
const k = [...P, M];
|
|
1394
|
+
return Ie(k);
|
|
1395
|
+
}), g.current = null, p.stream;
|
|
1650
1396
|
} else
|
|
1651
|
-
throw
|
|
1397
|
+
throw g.current = null, new Error("Failed to create stream");
|
|
1652
1398
|
})();
|
|
1653
|
-
return
|
|
1399
|
+
return g.current = I, I;
|
|
1654
1400
|
},
|
|
1655
|
-
[
|
|
1401
|
+
[n, a]
|
|
1656
1402
|
);
|
|
1657
|
-
if (
|
|
1658
|
-
return /* @__PURE__ */
|
|
1403
|
+
if (l)
|
|
1404
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
1659
1405
|
"Fency error: ",
|
|
1660
|
-
|
|
1406
|
+
l.message
|
|
1661
1407
|
] });
|
|
1662
|
-
if (!
|
|
1408
|
+
if (!n)
|
|
1663
1409
|
return null;
|
|
1664
|
-
const y = a.length > 0 ? a[a.length - 1] : null,
|
|
1665
|
-
fency:
|
|
1666
|
-
loading:
|
|
1667
|
-
error:
|
|
1410
|
+
const y = a.length > 0 ? a[a.length - 1] : null, T = {
|
|
1411
|
+
fency: n,
|
|
1412
|
+
loading: m,
|
|
1413
|
+
error: l,
|
|
1668
1414
|
activeStreams: a,
|
|
1669
1415
|
latestStream: y,
|
|
1670
|
-
eventManager:
|
|
1671
|
-
getOrCreateStream:
|
|
1416
|
+
eventManager: u.current,
|
|
1417
|
+
getOrCreateStream: S
|
|
1672
1418
|
};
|
|
1673
|
-
return /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ c(_.Provider, { value: T, children: r });
|
|
1674
1420
|
}
|
|
1675
1421
|
export {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
xe as StreamingMemoryTypeChatCompletionSourcesResult,
|
|
1689
|
-
be as StructuredChatCompletionJson,
|
|
1690
|
-
Be as useAgentTasks,
|
|
1422
|
+
ze as AgentTaskProgress,
|
|
1423
|
+
ye as AgentTaskProgressSimple,
|
|
1424
|
+
xe as AgentTaskProgressVerbose,
|
|
1425
|
+
We as FencyProvider,
|
|
1426
|
+
R as ShimmeringText,
|
|
1427
|
+
U as StreamingChatCompletionText,
|
|
1428
|
+
ve as StreamingMemoryTypeChatCompletionExploreMemory,
|
|
1429
|
+
Se as StreamingMemoryTypeChatCompletionFindSources,
|
|
1430
|
+
he as StreamingMemoryTypeChatCompletionSearch,
|
|
1431
|
+
Te as StreamingMemoryTypeChatCompletionSourcesResult,
|
|
1432
|
+
fe as StructuredChatCompletionJson,
|
|
1433
|
+
Oe as useAgentTasks,
|
|
1691
1434
|
N as useFencyContext,
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1435
|
+
De as useFencyEventSource,
|
|
1436
|
+
Ue as usePaginatedQuery,
|
|
1437
|
+
ae as useStream
|
|
1695
1438
|
};
|