@fencyai/react 0.1.217 → 0.1.218
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTaskProgressVerbose.d.ts","sourceRoot":"","sources":["../../src/agent-task/AgentTaskProgressVerbose.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG7E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAuCrD,OAAO,KAAK,EACR,uCAAuC,EACvC,2BAA2B,EAC3B,+BAA+B,EAClC,MAAM,+BAA+B,CAAA;AAMtC,MAAM,WAAW,6BAA6B;IAC1C,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;IACrC,0FAA0F;IAC1F,OAAO,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,CAAC,EAAE,6BAA6B,CAAA;IAChC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7E,yBAAyB,CAAC,EAAE,CACxB,OAAO,EAAE,uCAAuC,KAC/C,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,YAAY,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAA;CAC5B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC3C,6BAA6B,
|
|
1
|
+
{"version":3,"file":"AgentTaskProgressVerbose.d.ts","sourceRoot":"","sources":["../../src/agent-task/AgentTaskProgressVerbose.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG7E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAuCrD,OAAO,KAAK,EACR,uCAAuC,EACvC,2BAA2B,EAC3B,+BAA+B,EAClC,MAAM,+BAA+B,CAAA;AAMtC,MAAM,WAAW,6BAA6B;IAC1C,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;IACrC,0FAA0F;IAC1F,OAAO,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,CAAC,EAAE,6BAA6B,CAAA;IAChC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7E,yBAAyB,CAAC,EAAE,CACxB,OAAO,EAAE,uCAAuC,KAC/C,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,YAAY,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAA;CAC5B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC3C,6BAA6B,CAisBhC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExploreProductActionApproval.d.ts","sourceRoot":"","sources":["../../../src/agent-task/data-types/ExploreProductActionApproval.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAA;AAKpE,OAAO,0BAA0B,CAAA;AAEjC,KAAK,YAAY,GAAG,OAAO,CACvB,kBAAkB,EAClB;IAAE,QAAQ,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,yBAAyB,CAAA;CAAE,CACvE,CAAA;AAED,MAAM,WAAW,iCAAiC;IAC9C,IAAI,EAAE,YAAY,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,CAAC,EAAE,6BAA6B,CAAA;CACnC;AAcD,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAC/C,iCAAiC,
|
|
1
|
+
{"version":3,"file":"ExploreProductActionApproval.d.ts","sourceRoot":"","sources":["../../../src/agent-task/data-types/ExploreProductActionApproval.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAA;AAKpE,OAAO,0BAA0B,CAAA;AAEjC,KAAK,YAAY,GAAG,OAAO,CACvB,kBAAkB,EAClB;IAAE,QAAQ,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,yBAAyB,CAAA;CAAE,CACvE,CAAA;AAED,MAAM,WAAW,iCAAiC;IAC9C,IAAI,EAAE,YAAY,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,CAAC,EAAE,6BAA6B,CAAA;CACnC;AAcD,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAC/C,iCAAiC,CAiIpC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionRuntime.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAgentTasks/useActionRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EASH,KAAK,SAAS,EACd,KAAK,4BAA4B,EAGpC,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EACR,qBAAqB,EACrB,wCAAwC,EACxC,eAAe,EAElB,MAAM,6BAA6B,CAAA;AA6BpC,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,iGAAiG;IACjG,kBAAkB,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,IAAI,CAAA;IAChE,qEAAqE;IACrE,YAAY,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,qBAAqB,CAAC,EAAE,MAAM,EAC9B,QAAQ,CAAC,EAAE,YAAY,KACtB,IAAI,CAAA;IACT,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C,CAAA;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,wCAAwC,CAAC,EAAE,wCAAwC,CAAA;IACnF,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE;QACnC,YAAY,EAAE,MAAM,CAAA;QACpB,OAAO,EAAE,MAAM,CAAA;KAClB,KAAK,IAAI,CAAA;IACV,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE;QACzB,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;KACxB,KAAK,IAAI,CAAA;CACb,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"useActionRuntime.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAgentTasks/useActionRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EASH,KAAK,SAAS,EACd,KAAK,4BAA4B,EAGpC,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EACR,qBAAqB,EACrB,wCAAwC,EACxC,eAAe,EAElB,MAAM,6BAA6B,CAAA;AA6BpC,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,iGAAiG;IACjG,kBAAkB,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,IAAI,CAAA;IAChE,qEAAqE;IACrE,YAAY,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,qBAAqB,CAAC,EAAE,MAAM,EAC9B,QAAQ,CAAC,EAAE,YAAY,KACtB,IAAI,CAAA;IACT,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C,CAAA;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,wCAAwC,CAAC,EAAE,wCAAwC,CAAA;IACnF,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE;QACnC,YAAY,EAAE,MAAM,CAAA;QACpB,OAAO,EAAE,MAAM,CAAA;KAClB,KAAK,IAAI,CAAA;IACV,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE;QACzB,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;KACxB,KAAK,IAAI,CAAA;CACb,GAAG,aAAa,CA0ehB"}
|
package/dist/index.js
CHANGED
|
@@ -207,13 +207,13 @@ function Pn(e) {
|
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
const Fn = [0, 200, 400, 800, 1200, 1600];
|
|
210
|
-
function
|
|
210
|
+
function Bn(e) {
|
|
211
211
|
return new Promise((t) => setTimeout(t, e));
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function zn(e) {
|
|
214
214
|
return /never offered|ManualActionNotRequested/i.test(e);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Ln(e) {
|
|
217
217
|
const [t, o] = F([]), r = N(t);
|
|
218
218
|
r.current = t;
|
|
219
219
|
const i = N(/* @__PURE__ */ new Map()), a = N(/* @__PURE__ */ new Map()), l = N(/* @__PURE__ */ new Map()), s = N(new In()), c = N(/* @__PURE__ */ new Set()), d = N(e.actions);
|
|
@@ -250,7 +250,7 @@ function Dn(e) {
|
|
|
250
250
|
}
|
|
251
251
|
const A = a.current.get(S) ?? new Ae(S);
|
|
252
252
|
a.current.set(S, A);
|
|
253
|
-
const w = await he(E.action, E.input), { auto: H, manual: P } =
|
|
253
|
+
const w = await he(E.action, E.input), { auto: H, manual: P } = Dn(v(S).actions), _ = E.action !== ln && !!P[E.action] && !H[E.action];
|
|
254
254
|
await sn(E, {
|
|
255
255
|
auto: H,
|
|
256
256
|
manual: P,
|
|
@@ -259,15 +259,15 @@ function Dn(e) {
|
|
|
259
259
|
refreshContext: v(S).context,
|
|
260
260
|
post: async (J, ne) => {
|
|
261
261
|
_ && (ne.status === Y.ERROR || ne.status === Y.TIMEOUT) && (b.current.add(w), ae(b.current));
|
|
262
|
-
const
|
|
262
|
+
const L = await cn({
|
|
263
263
|
baseUrl: e.baseUrl,
|
|
264
264
|
pk: e.pk,
|
|
265
265
|
autoActionResultToken: T,
|
|
266
266
|
actionCallId: J,
|
|
267
267
|
result: ne
|
|
268
268
|
});
|
|
269
|
-
|
|
270
|
-
`[fency] Failed to post auto action result: ${
|
|
269
|
+
L.type === "error" && console.error(
|
|
270
|
+
`[fency] Failed to post auto action result: ${L.message}`
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
@@ -287,6 +287,7 @@ function Dn(e) {
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
if (E.eventType === "ActionApprovalRequested") {
|
|
290
|
+
if (E.provisional) return;
|
|
290
291
|
const T = S.agentTaskId, A = c.current.has(T);
|
|
291
292
|
o((w) => {
|
|
292
293
|
const H = new Set(w.map((_) => _.actionCallId)), P = E.actions.filter((_) => !H.has(_.actionCallId)).map((_) => ({
|
|
@@ -348,14 +349,14 @@ function Dn(e) {
|
|
|
348
349
|
);
|
|
349
350
|
let A, w = "";
|
|
350
351
|
for (const H of Fn) {
|
|
351
|
-
H > 0 && await
|
|
352
|
+
H > 0 && await Bn(H);
|
|
352
353
|
try {
|
|
353
354
|
w = (await T(S, E)).clientToken, A = void 0;
|
|
354
355
|
break;
|
|
355
356
|
} catch (P) {
|
|
356
357
|
A = P;
|
|
357
358
|
const _ = P instanceof Error ? P.message : String(P);
|
|
358
|
-
if (!
|
|
359
|
+
if (!zn(_))
|
|
359
360
|
throw P;
|
|
360
361
|
}
|
|
361
362
|
}
|
|
@@ -398,7 +399,7 @@ function Dn(e) {
|
|
|
398
399
|
};
|
|
399
400
|
},
|
|
400
401
|
[v]
|
|
401
|
-
),
|
|
402
|
+
), z = $(
|
|
402
403
|
async (S) => {
|
|
403
404
|
var P, _, J, ne;
|
|
404
405
|
if (S.length === 0) return;
|
|
@@ -408,25 +409,25 @@ function Dn(e) {
|
|
|
408
409
|
);
|
|
409
410
|
return;
|
|
410
411
|
}
|
|
411
|
-
const E = new Set(S.map((
|
|
412
|
+
const E = new Set(S.map((L) => L.record.actionCallId));
|
|
412
413
|
let T = !1;
|
|
413
|
-
if (o((
|
|
414
|
+
if (o((L) => L.filter((q) => E.has(q.actionCallId)).some((q) => q.inFlight || q.decision != null) ? (T = !0, L) : L.map(
|
|
414
415
|
(q) => E.has(q.actionCallId) ? { ...q, inFlight: !0 } : q
|
|
415
416
|
)), T) return;
|
|
416
417
|
const A = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
|
|
417
418
|
let H = 0;
|
|
418
|
-
for (const
|
|
419
|
-
const U = await W(
|
|
419
|
+
for (const L of S) {
|
|
420
|
+
const U = await W(L.record, L.approved);
|
|
420
421
|
if (!U.ok) {
|
|
421
|
-
w.add(
|
|
422
|
-
actionCallId:
|
|
422
|
+
w.add(L.record.actionCallId), (P = g.current) == null || P.call(g, {
|
|
423
|
+
actionCallId: L.record.actionCallId,
|
|
423
424
|
message: U.message
|
|
424
425
|
});
|
|
425
426
|
continue;
|
|
426
427
|
}
|
|
427
428
|
s.current.add({
|
|
428
|
-
agentTaskId:
|
|
429
|
-
actionCallId:
|
|
429
|
+
agentTaskId: L.record.turnId,
|
|
430
|
+
actionCallId: L.record.actionCallId,
|
|
430
431
|
status: U.result.status,
|
|
431
432
|
name: U.result.name,
|
|
432
433
|
input: U.result.input,
|
|
@@ -434,32 +435,32 @@ function Dn(e) {
|
|
|
434
435
|
});
|
|
435
436
|
try {
|
|
436
437
|
const q = await R(
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
L.record.turnId,
|
|
439
|
+
L.record.actionCallId
|
|
439
440
|
), ge = await _e({
|
|
440
441
|
baseUrl: e.baseUrl,
|
|
441
442
|
pk: e.pk,
|
|
442
443
|
clientToken: q,
|
|
443
|
-
agentTaskId:
|
|
444
|
-
actionCallId:
|
|
444
|
+
agentTaskId: L.record.turnId,
|
|
445
|
+
actionCallId: L.record.actionCallId,
|
|
445
446
|
result: U.result
|
|
446
447
|
});
|
|
447
|
-
ge.type === "success" ? (s.current.remove(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
),
|
|
451
|
-
actionCallId:
|
|
448
|
+
ge.type === "success" ? (s.current.remove(L.record.actionCallId), A.set(
|
|
449
|
+
L.record.actionCallId,
|
|
450
|
+
L.approved ? "approved" : "cancelled"
|
|
451
|
+
), L.approved && (H += 1)) : (ge.retryable || s.current.remove(L.record.actionCallId), w.add(L.record.actionCallId), (_ = g.current) == null || _.call(g, {
|
|
452
|
+
actionCallId: L.record.actionCallId,
|
|
452
453
|
message: ge.message
|
|
453
454
|
}));
|
|
454
455
|
} catch (q) {
|
|
455
|
-
w.add(
|
|
456
|
-
actionCallId:
|
|
456
|
+
w.add(L.record.actionCallId), (J = g.current) == null || J.call(g, {
|
|
457
|
+
actionCallId: L.record.actionCallId,
|
|
457
458
|
message: q instanceof Error ? q.message : String(q)
|
|
458
459
|
});
|
|
459
460
|
}
|
|
460
461
|
}
|
|
461
462
|
o(
|
|
462
|
-
(
|
|
463
|
+
(L) => L.map((U) => {
|
|
463
464
|
const q = A.get(U.actionCallId);
|
|
464
465
|
return q ? { ...U, inFlight: !1, decision: q } : w.has(U.actionCallId) ? { ...U, inFlight: !1 } : U;
|
|
465
466
|
})
|
|
@@ -469,20 +470,20 @@ function Dn(e) {
|
|
|
469
470
|
}));
|
|
470
471
|
},
|
|
471
472
|
[W, R, e.baseUrl, e.pk]
|
|
472
|
-
),
|
|
473
|
+
), D = $(
|
|
473
474
|
async (S, E) => {
|
|
474
|
-
await
|
|
475
|
+
await z([{ record: S, approved: E }]);
|
|
475
476
|
},
|
|
476
|
-
[
|
|
477
|
+
[z]
|
|
477
478
|
), Q = $(
|
|
478
479
|
async (S, E) => {
|
|
479
480
|
const T = new Set(E), A = r.current.filter((w) => w.turnId === S && w.decision == null).map((w) => ({
|
|
480
481
|
record: w,
|
|
481
482
|
approved: T.has(w.actionCallId)
|
|
482
483
|
}));
|
|
483
|
-
await
|
|
484
|
+
await z(A);
|
|
484
485
|
},
|
|
485
|
-
[
|
|
486
|
+
[z]
|
|
486
487
|
);
|
|
487
488
|
return V(() => {
|
|
488
489
|
b.current = Hn(), C();
|
|
@@ -529,14 +530,14 @@ function Dn(e) {
|
|
|
529
530
|
answerable: S.answerable,
|
|
530
531
|
inFlight: S.inFlight,
|
|
531
532
|
decision: S.decision,
|
|
532
|
-
approve: () =>
|
|
533
|
-
cancel: () =>
|
|
533
|
+
approve: () => D(S, !0),
|
|
534
|
+
cancel: () => D(S, !1),
|
|
534
535
|
submitTurn: (E) => Q(S.turnId, E)
|
|
535
536
|
})),
|
|
536
|
-
[t,
|
|
537
|
+
[t, D, v, Q]
|
|
537
538
|
), handleProgressItem: O, registerTask: u, forgetTask: y };
|
|
538
539
|
}
|
|
539
|
-
function
|
|
540
|
+
function Dn(e) {
|
|
540
541
|
const t = {}, o = {};
|
|
541
542
|
for (const [r, i] of Object.entries(e ?? {}))
|
|
542
543
|
i.autoApprove ? t[r] = i : o[r] = i;
|
|
@@ -607,21 +608,21 @@ const Wr = (e) => {
|
|
|
607
608
|
(C) => {
|
|
608
609
|
if (C)
|
|
609
610
|
return async (R) => {
|
|
610
|
-
const { clientToken: W } = await C(R),
|
|
611
|
+
const { clientToken: W } = await C(R), z = await pn({
|
|
611
612
|
pk: t.fency.publishableKey,
|
|
612
613
|
baseUrl: t.fency.baseUrl,
|
|
613
614
|
clientToken: W,
|
|
614
615
|
agentTaskFileId: R
|
|
615
616
|
});
|
|
616
|
-
if (
|
|
617
|
-
throw new Error(
|
|
618
|
-
const
|
|
619
|
-
|
|
617
|
+
if (z.type === "error")
|
|
618
|
+
throw new Error(z.error.message);
|
|
619
|
+
const D = document.createElement("a");
|
|
620
|
+
D.href = z.downloadLink, D.download = "", D.click();
|
|
620
621
|
};
|
|
621
622
|
},
|
|
622
623
|
[t.fency.baseUrl, t.fency.publishableKey]
|
|
623
624
|
), c = N(null), d = N(!1), p = N(null), g = N(() => {
|
|
624
|
-
}), x =
|
|
625
|
+
}), x = Ln({
|
|
625
626
|
baseUrl: t.fency.baseUrl,
|
|
626
627
|
pk: t.fency.publishableKey,
|
|
627
628
|
actions: e.actions,
|
|
@@ -637,16 +638,16 @@ const Wr = (e) => {
|
|
|
637
638
|
const b = $(
|
|
638
639
|
(C, R) => {
|
|
639
640
|
const W = o.tasks.filter(
|
|
640
|
-
(
|
|
641
|
-
var
|
|
642
|
-
return
|
|
641
|
+
(z) => {
|
|
642
|
+
var D;
|
|
643
|
+
return z.streamId === C && z.loading && ((D = z.confirmedData) == null ? void 0 : D.taskId);
|
|
643
644
|
}
|
|
644
|
-
).map((
|
|
645
|
+
).map((z) => z.confirmedData.taskId);
|
|
645
646
|
r({ type: "STREAM_FAILURE", streamId: C, error: R });
|
|
646
|
-
for (const
|
|
647
|
-
i.current.delete(
|
|
648
|
-
const
|
|
649
|
-
|
|
647
|
+
for (const z of W) {
|
|
648
|
+
i.current.delete(z);
|
|
649
|
+
const D = a.current.get(z);
|
|
650
|
+
D && (a.current.delete(z), D({ type: "error", error: R }));
|
|
650
651
|
}
|
|
651
652
|
},
|
|
652
653
|
[o.tasks]
|
|
@@ -657,17 +658,17 @@ const Wr = (e) => {
|
|
|
657
658
|
const R = C.data;
|
|
658
659
|
if (h.current.handleProgressItem(C), mn(R)) {
|
|
659
660
|
if (R.eventType === "Error") {
|
|
660
|
-
const
|
|
661
|
-
if (!
|
|
661
|
+
const D = gn(R);
|
|
662
|
+
if (!D) return;
|
|
662
663
|
r({
|
|
663
664
|
type: "TASK_ERROR",
|
|
664
665
|
agentTaskId: C.agentTaskId,
|
|
665
|
-
error:
|
|
666
|
+
error: D
|
|
666
667
|
});
|
|
667
668
|
const Q = a.current.get(
|
|
668
669
|
C.agentTaskId
|
|
669
670
|
);
|
|
670
|
-
Q && (a.current.delete(C.agentTaskId), Q({ type: "error", error:
|
|
671
|
+
Q && (a.current.delete(C.agentTaskId), Q({ type: "error", error: D }));
|
|
671
672
|
return;
|
|
672
673
|
}
|
|
673
674
|
r({
|
|
@@ -676,17 +677,17 @@ const Wr = (e) => {
|
|
|
676
677
|
data: R,
|
|
677
678
|
item: hn(R) ? C : void 0
|
|
678
679
|
});
|
|
679
|
-
const
|
|
680
|
+
const z = a.current.get(
|
|
680
681
|
C.agentTaskId
|
|
681
682
|
);
|
|
682
|
-
if (
|
|
683
|
+
if (z) {
|
|
683
684
|
a.current.delete(C.agentTaskId);
|
|
684
|
-
const
|
|
685
|
+
const D = yn(
|
|
685
686
|
C.streamId,
|
|
686
687
|
C.agentTaskId,
|
|
687
688
|
R
|
|
688
689
|
);
|
|
689
|
-
|
|
690
|
+
D && z(D);
|
|
690
691
|
}
|
|
691
692
|
return;
|
|
692
693
|
}
|
|
@@ -717,12 +718,12 @@ const Wr = (e) => {
|
|
|
717
718
|
async (C, R) => {
|
|
718
719
|
var ie, S;
|
|
719
720
|
C.type === "ExploreProduct" && (c.current = C);
|
|
720
|
-
const W = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
721
|
-
if (
|
|
721
|
+
const W = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, z = (R == null ? void 0 : R.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
|
|
722
|
+
if (z === void 0)
|
|
722
723
|
throw new Error(
|
|
723
724
|
"fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
|
|
724
725
|
);
|
|
725
|
-
const
|
|
726
|
+
const D = (R == null ? void 0 : R.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, Q = await u(
|
|
726
727
|
C.type === "ExploreProduct" ? 0 : void 0
|
|
727
728
|
);
|
|
728
729
|
if (Q.type === "success") {
|
|
@@ -740,11 +741,11 @@ const Wr = (e) => {
|
|
|
740
741
|
r({ type: "TASK_PENDING", task: T }), (ie = R == null ? void 0 : R.onTaskRegistered) == null || ie.call(R, {
|
|
741
742
|
...T,
|
|
742
743
|
downloadFile: s(
|
|
743
|
-
|
|
744
|
+
D
|
|
744
745
|
)
|
|
745
746
|
});
|
|
746
747
|
try {
|
|
747
|
-
const { clientToken: A } = await
|
|
748
|
+
const { clientToken: A } = await z(), w = C.type === "ExploreProduct" ? Gn(C, {
|
|
748
749
|
actions: e.actions,
|
|
749
750
|
components: e.components,
|
|
750
751
|
context: e.context
|
|
@@ -774,7 +775,7 @@ const Wr = (e) => {
|
|
|
774
775
|
} : void 0
|
|
775
776
|
);
|
|
776
777
|
const _ = s(
|
|
777
|
-
|
|
778
|
+
D
|
|
778
779
|
);
|
|
779
780
|
return _ && l.current.set(
|
|
780
781
|
P.agentTask.id,
|
|
@@ -854,9 +855,9 @@ const Wr = (e) => {
|
|
|
854
855
|
query: "Continue with the approved actions."
|
|
855
856
|
},
|
|
856
857
|
{
|
|
857
|
-
onTaskRegistered: (
|
|
858
|
-
var
|
|
859
|
-
(
|
|
858
|
+
onTaskRegistered: (z) => {
|
|
859
|
+
var D;
|
|
860
|
+
(D = e.onFollowUpTaskRegistered) == null || D.call(e, z);
|
|
860
861
|
}
|
|
861
862
|
}
|
|
862
863
|
).finally(() => {
|
|
@@ -1813,14 +1814,14 @@ const X = ({
|
|
|
1813
1814
|
[o]
|
|
1814
1815
|
), v = j(() => ({
|
|
1815
1816
|
code(y) {
|
|
1816
|
-
const { children: f, className: O, node: C, ref: R, ...W } = y,
|
|
1817
|
-
return
|
|
1817
|
+
const { children: f, className: O, node: C, ref: R, ...W } = y, z = /language-(\w+)/.exec(O || "");
|
|
1818
|
+
return z ? /* @__PURE__ */ n(
|
|
1818
1819
|
Ue,
|
|
1819
1820
|
{
|
|
1820
1821
|
...W,
|
|
1821
1822
|
PreTag: "div",
|
|
1822
1823
|
children: String(f).replace(/\n$/, ""),
|
|
1823
|
-
language:
|
|
1824
|
+
language: z[1],
|
|
1824
1825
|
style: i
|
|
1825
1826
|
}
|
|
1826
1827
|
) : /* @__PURE__ */ n("code", { ...W, className: O, children: String(f) });
|
|
@@ -2263,7 +2264,7 @@ function ue(e, t) {
|
|
|
2263
2264
|
}
|
|
2264
2265
|
return o.join(", ");
|
|
2265
2266
|
}
|
|
2266
|
-
function
|
|
2267
|
+
function B({
|
|
2267
2268
|
text: e,
|
|
2268
2269
|
duration: t = 2,
|
|
2269
2270
|
delay: o = 0,
|
|
@@ -2341,7 +2342,7 @@ const fe = 5, te = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r, compa
|
|
|
2341
2342
|
initial: { opacity: 0, y: -10 },
|
|
2342
2343
|
animate: { opacity: 1, y: 0 },
|
|
2343
2344
|
transition: { duration: 0.3, delay: 0 },
|
|
2344
|
-
children: t && !o && !g ? /* @__PURE__ */ n(
|
|
2345
|
+
children: t && !o && !g ? /* @__PURE__ */ n(B, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(G, { children: [
|
|
2345
2346
|
/* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: p ? /* @__PURE__ */ m(G, { children: [
|
|
2346
2347
|
r.searchingFor,
|
|
2347
2348
|
/* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
|
|
@@ -2897,7 +2898,7 @@ const ut = ({
|
|
|
2897
2898
|
initial: { opacity: 0, y: -10 },
|
|
2898
2899
|
animate: { opacity: 1, y: 0 },
|
|
2899
2900
|
transition: { duration: 0.3, delay: 0 },
|
|
2900
|
-
children: t && !o && !d ? /* @__PURE__ */ n(
|
|
2901
|
+
children: t && !o && !d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(G, { children: [
|
|
2901
2902
|
/* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: h }),
|
|
2902
2903
|
d && !a && /* @__PURE__ */ m(G, { children: [
|
|
2903
2904
|
" ",
|
|
@@ -3039,7 +3040,7 @@ const ut = ({
|
|
|
3039
3040
|
initial: { opacity: 0, y: -10 },
|
|
3040
3041
|
animate: { opacity: 1, y: 0 },
|
|
3041
3042
|
transition: { duration: 0.3, delay: 0 },
|
|
3042
|
-
children: e && !t ? /* @__PURE__ */ n(
|
|
3043
|
+
children: e && !t ? /* @__PURE__ */ n(B, { text: i, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: r.textSecondary }, children: i })
|
|
3043
3044
|
}
|
|
3044
3045
|
),
|
|
3045
3046
|
t !== void 0 && /* @__PURE__ */ n(
|
|
@@ -3319,7 +3320,7 @@ const xt = ({ data: e, completed: t, t: o }) => /* @__PURE__ */ n("div", { style
|
|
|
3319
3320
|
t: o
|
|
3320
3321
|
},
|
|
3321
3322
|
r.memoryId
|
|
3322
|
-
)) }),
|
|
3323
|
+
)) }), Be = 80;
|
|
3323
3324
|
function kt(e) {
|
|
3324
3325
|
try {
|
|
3325
3326
|
return new URL(e).hostname;
|
|
@@ -3331,7 +3332,7 @@ function St({
|
|
|
3331
3332
|
item: e,
|
|
3332
3333
|
t
|
|
3333
3334
|
}) {
|
|
3334
|
-
const { colors: o } = M(), [r, i] = F(!1), a = e.description ?? "", l = a.length >
|
|
3335
|
+
const { colors: o } = M(), [r, i] = F(!1), a = e.description ?? "", l = a.length > Be, s = a.length === 0 ? void 0 : r || !l ? a : `${a.slice(0, Be)}...`;
|
|
3335
3336
|
return /* @__PURE__ */ m(
|
|
3336
3337
|
"div",
|
|
3337
3338
|
{
|
|
@@ -3435,7 +3436,7 @@ function bt({
|
|
|
3435
3436
|
initial: { opacity: 0, y: -10 },
|
|
3436
3437
|
animate: { opacity: 1, y: 0 },
|
|
3437
3438
|
transition: { duration: 0.3, delay: 0 },
|
|
3438
|
-
children: t && !o ? /* @__PURE__ */ n(
|
|
3439
|
+
children: t && !o ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
3439
3440
|
}
|
|
3440
3441
|
),
|
|
3441
3442
|
o !== void 0 && /* @__PURE__ */ n(
|
|
@@ -3582,7 +3583,7 @@ function Ct(e) {
|
|
|
3582
3583
|
var t;
|
|
3583
3584
|
return e.error != null ? !0 : e.status != null ? !1 : (((t = e.summary) == null ? void 0 : t.length) ?? 0) > 0;
|
|
3584
3585
|
}
|
|
3585
|
-
const
|
|
3586
|
+
const ze = 80, Me = 12, Ie = 1.4, wt = Math.ceil(
|
|
3586
3587
|
Me * Ie
|
|
3587
3588
|
), Rt = Math.ceil(
|
|
3588
3589
|
5 * Me * Ie
|
|
@@ -3671,7 +3672,7 @@ function It({
|
|
|
3671
3672
|
children: nn(e.url)
|
|
3672
3673
|
}
|
|
3673
3674
|
),
|
|
3674
|
-
!a && d != null && /* @__PURE__ */ n("div", { style: { fontSize: 12, color: r.textTertiary, minHeight: 18 }, children: o ? /* @__PURE__ */ n(
|
|
3675
|
+
!a && d != null && /* @__PURE__ */ n("div", { style: { fontSize: 12, color: r.textTertiary, minHeight: 18 }, children: o ? /* @__PURE__ */ n(B, { text: d, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: r.textTertiary }, children: d }) }),
|
|
3675
3676
|
a && /* @__PURE__ */ n(
|
|
3676
3677
|
"div",
|
|
3677
3678
|
{
|
|
@@ -3713,7 +3714,7 @@ function At({
|
|
|
3713
3714
|
item: e,
|
|
3714
3715
|
t
|
|
3715
3716
|
}) {
|
|
3716
|
-
const { colors: o } = M(), [r, i] = F(!1), a = e.error ?? e.summary ?? "", l = e.error != null, s = a.length >
|
|
3717
|
+
const { colors: o } = M(), [r, i] = F(!1), a = e.error ?? e.summary ?? "", l = e.error != null, s = a.length > ze, c = a.length === 0 ? void 0 : r || !s ? a : `${a.slice(0, ze)}...`, d = en(e, t), p = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
|
|
3717
3718
|
return /* @__PURE__ */ m(
|
|
3718
3719
|
I.div,
|
|
3719
3720
|
{
|
|
@@ -3821,7 +3822,7 @@ function At({
|
|
|
3821
3822
|
}
|
|
3822
3823
|
);
|
|
3823
3824
|
}
|
|
3824
|
-
function
|
|
3825
|
+
function Le(e, t, o) {
|
|
3825
3826
|
return /* @__PURE__ */ n(
|
|
3826
3827
|
"div",
|
|
3827
3828
|
{
|
|
@@ -3864,7 +3865,7 @@ function Pt({
|
|
|
3864
3865
|
initial: { opacity: 0, y: -10 },
|
|
3865
3866
|
animate: { opacity: 1, y: 0 },
|
|
3866
3867
|
transition: { duration: 0.3, delay: 0 },
|
|
3867
|
-
children: t && !o ? /* @__PURE__ */ n(
|
|
3868
|
+
children: t && !o ? /* @__PURE__ */ n(B, { text: c, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: c })
|
|
3868
3869
|
}
|
|
3869
3870
|
),
|
|
3870
3871
|
o !== void 0 && /* @__PURE__ */ n(
|
|
@@ -3917,7 +3918,7 @@ function Ft({
|
|
|
3917
3918
|
gap: "6px 12px",
|
|
3918
3919
|
minWidth: 0
|
|
3919
3920
|
},
|
|
3920
|
-
children: t && !g ? /* @__PURE__ */ n(
|
|
3921
|
+
children: t && !g ? /* @__PURE__ */ n(B, { text: b, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n(
|
|
3921
3922
|
"span",
|
|
3922
3923
|
{
|
|
3923
3924
|
style: {
|
|
@@ -3929,7 +3930,7 @@ function Ft({
|
|
|
3929
3930
|
)
|
|
3930
3931
|
}
|
|
3931
3932
|
),
|
|
3932
|
-
|
|
3933
|
+
Le(l, r, (v) => /* @__PURE__ */ n(
|
|
3933
3934
|
It,
|
|
3934
3935
|
{
|
|
3935
3936
|
item: v,
|
|
@@ -3984,10 +3985,10 @@ function Ft({
|
|
|
3984
3985
|
]
|
|
3985
3986
|
}
|
|
3986
3987
|
),
|
|
3987
|
-
i &&
|
|
3988
|
+
i && Le(l, r, (v) => /* @__PURE__ */ n(At, { item: v, t: o }))
|
|
3988
3989
|
] });
|
|
3989
3990
|
}
|
|
3990
|
-
const
|
|
3991
|
+
const Bt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.results === void 0 ? /* @__PURE__ */ n(
|
|
3991
3992
|
Pt,
|
|
3992
3993
|
{
|
|
3993
3994
|
data: e,
|
|
@@ -4002,7 +4003,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4002
4003
|
isLatest: t,
|
|
4003
4004
|
t: r
|
|
4004
4005
|
}
|
|
4005
|
-
),
|
|
4006
|
+
), zt = (e) => {
|
|
4006
4007
|
const { colors: t } = M(), { isLatest: o = !1, durationSeconds: r, t: i } = e, a = i.memoryChatThinking;
|
|
4007
4008
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4008
4009
|
/* @__PURE__ */ n(
|
|
@@ -4017,7 +4018,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4017
4018
|
initial: { opacity: 0, y: -10 },
|
|
4018
4019
|
animate: { opacity: 1, y: 0 },
|
|
4019
4020
|
transition: { duration: 0.3, delay: 0 },
|
|
4020
|
-
children: o && !r ? /* @__PURE__ */ n(
|
|
4021
|
+
children: o && !r ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: t.textSecondary }, children: a })
|
|
4021
4022
|
}
|
|
4022
4023
|
),
|
|
4023
4024
|
r !== void 0 && /* @__PURE__ */ n(
|
|
@@ -4033,7 +4034,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4033
4034
|
}
|
|
4034
4035
|
)
|
|
4035
4036
|
] });
|
|
4036
|
-
},
|
|
4037
|
+
}, Lt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4037
4038
|
const i = `${r.generateReportSetup} '${e.userRequest}'`;
|
|
4038
4039
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
|
|
4039
4040
|
/* @__PURE__ */ n(
|
|
@@ -4049,7 +4050,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4049
4050
|
animate: { opacity: 1, y: 0 },
|
|
4050
4051
|
transition: { duration: 0.3, delay: 0 },
|
|
4051
4052
|
children: t && !o ? /* @__PURE__ */ n(
|
|
4052
|
-
|
|
4053
|
+
B,
|
|
4053
4054
|
{
|
|
4054
4055
|
text: i,
|
|
4055
4056
|
duration: 2.5,
|
|
@@ -4073,7 +4074,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4073
4074
|
}
|
|
4074
4075
|
)
|
|
4075
4076
|
] });
|
|
4076
|
-
},
|
|
4077
|
+
}, Dt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
4077
4078
|
const i = e.fileCount === 1 ? r.generateReportExportingOne : k(r.generateReportExporting, {
|
|
4078
4079
|
n: e.fileCount
|
|
4079
4080
|
});
|
|
@@ -4091,7 +4092,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4091
4092
|
animate: { opacity: 1, y: 0 },
|
|
4092
4093
|
transition: { duration: 0.3, delay: 0 },
|
|
4093
4094
|
children: t && !o ? /* @__PURE__ */ n(
|
|
4094
|
-
|
|
4095
|
+
B,
|
|
4095
4096
|
{
|
|
4096
4097
|
text: i,
|
|
4097
4098
|
duration: 2.5,
|
|
@@ -4133,7 +4134,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4133
4134
|
animate: { opacity: 1, y: 0 },
|
|
4134
4135
|
transition: { duration: 0.3, delay: 0 },
|
|
4135
4136
|
children: t && !o ? /* @__PURE__ */ n(
|
|
4136
|
-
|
|
4137
|
+
B,
|
|
4137
4138
|
{
|
|
4138
4139
|
text: i,
|
|
4139
4140
|
duration: 2.5,
|
|
@@ -4175,7 +4176,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4175
4176
|
animate: { opacity: 1, y: 0 },
|
|
4176
4177
|
transition: { duration: 0.3, delay: 0 },
|
|
4177
4178
|
children: t && !o ? /* @__PURE__ */ n(
|
|
4178
|
-
|
|
4179
|
+
B,
|
|
4179
4180
|
{
|
|
4180
4181
|
text: i,
|
|
4181
4182
|
duration: 2.5,
|
|
@@ -4217,7 +4218,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4217
4218
|
animate: { opacity: 1, y: 0 },
|
|
4218
4219
|
transition: { duration: 0.3, delay: 0 },
|
|
4219
4220
|
children: t && !o ? /* @__PURE__ */ n(
|
|
4220
|
-
|
|
4221
|
+
B,
|
|
4221
4222
|
{
|
|
4222
4223
|
text: i,
|
|
4223
4224
|
duration: 2.5,
|
|
@@ -4262,7 +4263,7 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4262
4263
|
) });
|
|
4263
4264
|
}, pe = 12, me = 1.45, _t = Math.ceil(
|
|
4264
4265
|
pe * me
|
|
4265
|
-
),
|
|
4266
|
+
), De = Math.ceil(
|
|
4266
4267
|
5 * pe * me
|
|
4267
4268
|
), oe = ({
|
|
4268
4269
|
text: e,
|
|
@@ -4311,10 +4312,10 @@ const zt = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => e.result
|
|
|
4311
4312
|
style: {
|
|
4312
4313
|
minHeight: _t,
|
|
4313
4314
|
...t ? {
|
|
4314
|
-
maxHeight:
|
|
4315
|
+
maxHeight: De,
|
|
4315
4316
|
overflowY: "auto"
|
|
4316
4317
|
} : o ? {
|
|
4317
|
-
maxHeight:
|
|
4318
|
+
maxHeight: De,
|
|
4318
4319
|
overflowY: "hidden"
|
|
4319
4320
|
} : {},
|
|
4320
4321
|
height: "auto",
|
|
@@ -4382,7 +4383,7 @@ const Gt = ({
|
|
|
4382
4383
|
children: s ? /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ n("span", { className: "explore-memory-loader" })
|
|
4383
4384
|
}
|
|
4384
4385
|
),
|
|
4385
|
-
h ? /* @__PURE__ */ n(
|
|
4386
|
+
h ? /* @__PURE__ */ n(B, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
|
|
4386
4387
|
]
|
|
4387
4388
|
}
|
|
4388
4389
|
),
|
|
@@ -4458,7 +4459,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4458
4459
|
initial: { opacity: 0, y: -10 },
|
|
4459
4460
|
animate: { opacity: 1, y: 0 },
|
|
4460
4461
|
transition: { duration: 0.3, delay: 0 },
|
|
4461
|
-
children: i ? /* @__PURE__ */ n(
|
|
4462
|
+
children: i ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: r.textSecondary }, children: a })
|
|
4462
4463
|
}
|
|
4463
4464
|
),
|
|
4464
4465
|
t !== void 0 && /* @__PURE__ */ n(
|
|
@@ -4489,7 +4490,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4489
4490
|
initial: { opacity: 0, y: -10 },
|
|
4490
4491
|
animate: { opacity: 1, y: 0 },
|
|
4491
4492
|
transition: { duration: 0.3, delay: 0 },
|
|
4492
|
-
children: t && !o ? /* @__PURE__ */ n(
|
|
4493
|
+
children: t && !o ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
4493
4494
|
}
|
|
4494
4495
|
),
|
|
4495
4496
|
o !== void 0 && /* @__PURE__ */ n(
|
|
@@ -4517,7 +4518,7 @@ const Ut = ({ isLatest: e = !1, durationSeconds: t, t: o }) => {
|
|
|
4517
4518
|
initial: { opacity: 0, y: -10 },
|
|
4518
4519
|
animate: { opacity: 1, y: 0 },
|
|
4519
4520
|
transition: { duration: 0.3, delay: 0 },
|
|
4520
|
-
children: t && !o ? /* @__PURE__ */ n(
|
|
4521
|
+
children: t && !o ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m("span", { style: { color: i.textSecondary }, children: [
|
|
4521
4522
|
r.exploreFindMemoriesPrefix,
|
|
4522
4523
|
/* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
|
|
4523
4524
|
"'",
|
|
@@ -4794,7 +4795,7 @@ const er = ({
|
|
|
4794
4795
|
initial: { opacity: 0, y: -10 },
|
|
4795
4796
|
animate: { opacity: 1, y: 0 },
|
|
4796
4797
|
transition: { duration: 0.3, delay: 0 },
|
|
4797
|
-
children: d ? /* @__PURE__ */ n(
|
|
4798
|
+
children: d ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
4798
4799
|
}
|
|
4799
4800
|
),
|
|
4800
4801
|
se(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
|
|
@@ -4866,7 +4867,7 @@ const nr = ({
|
|
|
4866
4867
|
initial: { opacity: 0, y: -10 },
|
|
4867
4868
|
animate: { opacity: 1, y: 0 },
|
|
4868
4869
|
transition: { duration: 0.3, delay: 0 },
|
|
4869
|
-
children: d ? /* @__PURE__ */ n(
|
|
4870
|
+
children: d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: h })
|
|
4870
4871
|
}
|
|
4871
4872
|
),
|
|
4872
4873
|
ce(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
|
|
@@ -4987,7 +4988,7 @@ const or = ({ data: e, completed: t, durationSeconds: o, t: r }) => {
|
|
|
4987
4988
|
initial: { opacity: 0, y: -10 },
|
|
4988
4989
|
animate: { opacity: 1, y: 0 },
|
|
4989
4990
|
transition: { duration: 0.3 },
|
|
4990
|
-
children: d ? /* @__PURE__ */ n(
|
|
4991
|
+
children: d ? /* @__PURE__ */ n(B, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: a })
|
|
4991
4992
|
}
|
|
4992
4993
|
),
|
|
4993
4994
|
l.map((p) => /* @__PURE__ */ n(
|
|
@@ -5048,7 +5049,7 @@ const ar = ({
|
|
|
5048
5049
|
initial: { opacity: 0, y: -10 },
|
|
5049
5050
|
animate: { opacity: 1, y: 0 },
|
|
5050
5051
|
transition: { duration: 0.3, delay: 0 },
|
|
5051
|
-
children: d ? /* @__PURE__ */ n(
|
|
5052
|
+
children: d ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: h })
|
|
5052
5053
|
}
|
|
5053
5054
|
),
|
|
5054
5055
|
de(e) && /* @__PURE__ */ m("div", { style: { marginTop: 0 }, children: [
|
|
@@ -5140,7 +5141,7 @@ const cr = ({
|
|
|
5140
5141
|
children: g && t ? /* @__PURE__ */ n("div", { className: "explore-memory-loader", "aria-hidden": !0 }) : x ? /* @__PURE__ */ n(ee, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 })
|
|
5141
5142
|
}
|
|
5142
5143
|
),
|
|
5143
|
-
g && t && !o ? /* @__PURE__ */ n(
|
|
5144
|
+
g && t && !o ? /* @__PURE__ */ n(B, { text: h, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: i.textSecondary }, children: h })
|
|
5144
5145
|
]
|
|
5145
5146
|
}
|
|
5146
5147
|
),
|
|
@@ -5208,7 +5209,7 @@ function We(e) {
|
|
|
5208
5209
|
}
|
|
5209
5210
|
}
|
|
5210
5211
|
const dr = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1, t: i }) => {
|
|
5211
|
-
const { colors: a } = M(), [l, s] = F(!1), c = e.actions.map((h) => h.name).join(", "), d = k(i.exploreProductAskingApproval, { names: c }), p = !r && o === void 0, g = e.actions.some((h) => We(h.input) != null), x = j(
|
|
5212
|
+
const { colors: a } = M(), [l, s] = F(!1), c = e.actions.map((h) => h.name).join(", "), d = k(i.exploreProductAskingApproval, { names: c }), p = !!e.provisional || !r && o === void 0 && t, g = !e.provisional && e.actions.some((h) => We(h.input) != null), x = j(
|
|
5212
5213
|
() => e.actions.map((h) => ({
|
|
5213
5214
|
name: h.name,
|
|
5214
5215
|
inputJson: We(h.input)
|
|
@@ -5238,10 +5239,10 @@ const dr = ({ data: e, isLatest: t = !1, durationSeconds: o, completed: r = !1,
|
|
|
5238
5239
|
justifyContent: "center",
|
|
5239
5240
|
flexShrink: 0
|
|
5240
5241
|
},
|
|
5241
|
-
children: p
|
|
5242
|
+
children: p ? /* @__PURE__ */ n("div", { className: "explore-memory-loader", "aria-hidden": !0 }) : /* @__PURE__ */ n(K, { size: 15, borderWidth: 2 })
|
|
5242
5243
|
}
|
|
5243
5244
|
),
|
|
5244
|
-
p
|
|
5245
|
+
p ? /* @__PURE__ */ n(B, { text: d, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ n("span", { style: { color: a.textSecondary }, children: d })
|
|
5245
5246
|
]
|
|
5246
5247
|
}
|
|
5247
5248
|
),
|
|
@@ -5376,7 +5377,7 @@ function $e({ name: e, t }) {
|
|
|
5376
5377
|
children: /* @__PURE__ */ n("div", { className: "explore-memory-loader", "aria-hidden": !0 })
|
|
5377
5378
|
}
|
|
5378
5379
|
),
|
|
5379
|
-
/* @__PURE__ */ n(
|
|
5380
|
+
/* @__PURE__ */ n(B, { text: r, duration: 2.5, repeat: !0 })
|
|
5380
5381
|
]
|
|
5381
5382
|
}
|
|
5382
5383
|
) });
|
|
@@ -5487,7 +5488,7 @@ function gr({
|
|
|
5487
5488
|
flex: 1
|
|
5488
5489
|
},
|
|
5489
5490
|
children: [
|
|
5490
|
-
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children: !i && !a && o ? /* @__PURE__ */ n(
|
|
5491
|
+
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children: !i && !a && o ? /* @__PURE__ */ n(B, { text: l, duration: 2.5, repeat: !0 }) : l }),
|
|
5491
5492
|
i && /* @__PURE__ */ n("span", { style: { fontSize: 12, color: r.textSecondary }, children: e.result.numberOfChunks === 1 ? k(
|
|
5492
5493
|
t.memorySearchTypeResultSummaryOne,
|
|
5493
5494
|
{
|
|
@@ -5520,7 +5521,7 @@ const hr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
|
5520
5521
|
}), l;
|
|
5521
5522
|
}, [e.memoryTypes]);
|
|
5522
5523
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
5523
|
-
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(
|
|
5524
|
+
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(B, { text: r.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, s) => /* @__PURE__ */ n(
|
|
5524
5525
|
gr,
|
|
5525
5526
|
{
|
|
5526
5527
|
item: l,
|
|
@@ -5608,7 +5609,7 @@ function kr({
|
|
|
5608
5609
|
flex: 1
|
|
5609
5610
|
},
|
|
5610
5611
|
children: [
|
|
5611
|
-
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children: p ? /* @__PURE__ */ n(
|
|
5612
|
+
/* @__PURE__ */ n("span", { style: { fontSize: 13, fontWeight: 500, color: r.textPrimary }, children: p ? /* @__PURE__ */ n(B, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
|
|
5612
5613
|
a === 1 && s && !re(e) && /* @__PURE__ */ n(
|
|
5613
5614
|
oe,
|
|
5614
5615
|
{
|
|
@@ -5618,7 +5619,7 @@ function kr({
|
|
|
5618
5619
|
}
|
|
5619
5620
|
),
|
|
5620
5621
|
a === 2 && g && /* @__PURE__ */ n("div", { style: { fontSize: 12 }, children: /* @__PURE__ */ n(
|
|
5621
|
-
|
|
5622
|
+
B,
|
|
5622
5623
|
{
|
|
5623
5624
|
text: t.memorySearchGeneratingQueriesPending,
|
|
5624
5625
|
duration: 2.5,
|
|
@@ -5716,7 +5717,7 @@ const Sr = ({ data: e, isLatest: t = !1, durationSeconds: o, t: r }) => {
|
|
|
5716
5717
|
}), l;
|
|
5717
5718
|
}, [e.memoryTypes]);
|
|
5718
5719
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
5719
|
-
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(
|
|
5720
|
+
t && !o && e.memoryTypes.length === 0 ? /* @__PURE__ */ n(B, { text: r.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, s) => /* @__PURE__ */ n(
|
|
5720
5721
|
kr,
|
|
5721
5722
|
{
|
|
5722
5723
|
item: l,
|
|
@@ -5750,7 +5751,7 @@ function vr({
|
|
|
5750
5751
|
if (e.error != null)
|
|
5751
5752
|
return /* @__PURE__ */ n("span", { style: { fontSize: 12, color: o.textError, whiteSpace: "nowrap" }, children: e.error });
|
|
5752
5753
|
if (e.result == null)
|
|
5753
|
-
return /* @__PURE__ */ n("span", { style: { flexShrink: 0, fontSize: 12 }, children: /* @__PURE__ */ n(
|
|
5754
|
+
return /* @__PURE__ */ n("span", { style: { flexShrink: 0, fontSize: 12 }, children: /* @__PURE__ */ n(B, { text: t.searching, duration: 2.5, repeat: !0 }) });
|
|
5754
5755
|
const r = e.result, i = r.numberOfChunks === 1 ? t.chunkFound : k(t.chunksFound, { n: r.numberOfChunks }), a = k(t.scoreLabel, {
|
|
5755
5756
|
n: r.highestChunkScore.toFixed(2)
|
|
5756
5757
|
});
|
|
@@ -6041,7 +6042,7 @@ function wr({
|
|
|
6041
6042
|
minWidth: 0
|
|
6042
6043
|
},
|
|
6043
6044
|
children: h ? /* @__PURE__ */ n(
|
|
6044
|
-
|
|
6045
|
+
B,
|
|
6045
6046
|
{
|
|
6046
6047
|
text: d.query,
|
|
6047
6048
|
duration: 2.5,
|
|
@@ -6127,7 +6128,7 @@ const Rr = ({
|
|
|
6127
6128
|
);
|
|
6128
6129
|
return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
|
|
6129
6130
|
t && !o && e.queries.length === 0 ? /* @__PURE__ */ n(
|
|
6130
|
-
|
|
6131
|
+
B,
|
|
6131
6132
|
{
|
|
6132
6133
|
text: i.memorySearchExploringQueries,
|
|
6133
6134
|
duration: 2.5,
|
|
@@ -6387,7 +6388,7 @@ const Rr = ({
|
|
|
6387
6388
|
);
|
|
6388
6389
|
case "Thinking":
|
|
6389
6390
|
return /* @__PURE__ */ n(
|
|
6390
|
-
|
|
6391
|
+
zt,
|
|
6391
6392
|
{
|
|
6392
6393
|
data: y,
|
|
6393
6394
|
isLatest: u.isLatest,
|
|
@@ -6397,7 +6398,7 @@ const Rr = ({
|
|
|
6397
6398
|
);
|
|
6398
6399
|
case "GenerateReportSetup":
|
|
6399
6400
|
return /* @__PURE__ */ n(
|
|
6400
|
-
|
|
6401
|
+
Lt,
|
|
6401
6402
|
{
|
|
6402
6403
|
data: y,
|
|
6403
6404
|
isLatest: u.isLatest,
|
|
@@ -6407,7 +6408,7 @@ const Rr = ({
|
|
|
6407
6408
|
);
|
|
6408
6409
|
case "GenerateReportExporting":
|
|
6409
6410
|
return /* @__PURE__ */ n(
|
|
6410
|
-
|
|
6411
|
+
Dt,
|
|
6411
6412
|
{
|
|
6412
6413
|
data: y,
|
|
6413
6414
|
isLatest: u.isLatest,
|
|
@@ -6536,7 +6537,7 @@ const Rr = ({
|
|
|
6536
6537
|
);
|
|
6537
6538
|
case "ScrapeWebsites":
|
|
6538
6539
|
return /* @__PURE__ */ n(
|
|
6539
|
-
|
|
6540
|
+
Bt,
|
|
6540
6541
|
{
|
|
6541
6542
|
data: y,
|
|
6542
6543
|
isLatest: u.isLatest,
|
|
@@ -6840,7 +6841,7 @@ const Rr = ({
|
|
|
6840
6841
|
};
|
|
6841
6842
|
if (e.length === 0)
|
|
6842
6843
|
return o ? /* @__PURE__ */ n("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ n(Z, { message: o.message }) }) : t ? /* @__PURE__ */ n("div", { style: { width: "fit-content", paddingBlock: "16px" }, children: /* @__PURE__ */ n(
|
|
6843
|
-
|
|
6844
|
+
B,
|
|
6844
6845
|
{
|
|
6845
6846
|
text: r ?? i.processingYourTask,
|
|
6846
6847
|
duration: 1.5,
|
|
@@ -6852,7 +6853,7 @@ const Rr = ({
|
|
|
6852
6853
|
) }) : null;
|
|
6853
6854
|
const v = e.filter((u, y) => {
|
|
6854
6855
|
const f = u.item.data;
|
|
6855
|
-
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox" || f.taskType === "ExploreProduct" && f.eventType === "ActionApprovalRequested")
|
|
6856
|
+
if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox" || f.taskType === "ExploreProduct" && f.eventType === "ActionApprovalRequested" && !f.provisional)
|
|
6856
6857
|
return !1;
|
|
6857
6858
|
if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
|
|
6858
6859
|
return !e.slice(y + 1).some(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fencyai/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.218",
|
|
4
4
|
"description": "React components and hooks for the Fency AI platform",
|
|
5
5
|
"author": "staklau <steinaageklaussen@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"docs": "npx -y serve etc/docs"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@fencyai/js": "^0.1.
|
|
38
|
+
"@fencyai/js": "^0.1.218",
|
|
39
39
|
"@microsoft/api-documenter": "^7.30.0",
|
|
40
40
|
"@testing-library/react": "^16.3.2",
|
|
41
41
|
"@types/jest": "^30.0.0",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@fencyai/js": "^0.1.
|
|
55
|
+
"@fencyai/js": "^0.1.218",
|
|
56
56
|
"motion": "^11.15.0 || ^12.0.0",
|
|
57
57
|
"react": ">=16.8.0",
|
|
58
58
|
"react-markdown": "^10.1.0",
|
|
59
59
|
"react-syntax-highlighter": "^16.1.0",
|
|
60
60
|
"remark-gfm": "^4.0.1"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "af15647667489cd708d8836f5c11fb7e965762f3"
|
|
63
63
|
}
|