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