@arbor-education/agent-view-frontend 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.js +589 -580
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as o, jsx as n, Fragment as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as o, jsx as n, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _e, useState as f, useLayoutEffect as He, useEffect as K, useMemo as W, useCallback as x } from "react";
|
|
3
3
|
import J from "classnames";
|
|
4
|
-
import { Heading as
|
|
5
|
-
import { CHAT_RESPONSE_TYPE_AGENT as
|
|
4
|
+
import { Heading as fe, Icon as P, Dot as _t, Modal as se, Button as Z, Tabs as Ye, SelectDropdown as Ut, TextInput as $t, Combobox as rt, Card as Ht } from "@arbor-education/design-system.components";
|
|
5
|
+
import { CHAT_RESPONSE_TYPE_AGENT as ft, CHAT_RESPONSE_TYPE_ERROR as Bt, ChatPanel as Ft, CHAT_RESPONSE_TYPE_USER as zt, CHAT_RESPONSE_TYPE_INFO as Gt } from "@arbor-education/ask-arbor-chat-panel";
|
|
6
6
|
const T = {
|
|
7
7
|
"generating-a-response": "generating-a-response",
|
|
8
8
|
hitl: "hitl",
|
|
@@ -22,15 +22,15 @@ const T = {
|
|
|
22
22
|
agent: "agent",
|
|
23
23
|
user: "user",
|
|
24
24
|
system: "system"
|
|
25
|
-
},
|
|
25
|
+
}, pe = {
|
|
26
26
|
MIS_RECORD: "MIS_RECORD",
|
|
27
27
|
FILE: "FILE",
|
|
28
28
|
WORKFLOW: "WORKFLOW",
|
|
29
29
|
LINK: "LINK"
|
|
30
|
-
},
|
|
30
|
+
}, it = {
|
|
31
31
|
cancelled: "cancelled",
|
|
32
32
|
archived: "archived"
|
|
33
|
-
},
|
|
33
|
+
}, Xe = {
|
|
34
34
|
in_progress: "in_progress",
|
|
35
35
|
requires_attention: "requires_attention",
|
|
36
36
|
available: "available"
|
|
@@ -55,7 +55,7 @@ const T = {
|
|
|
55
55
|
icon: "sparkles",
|
|
56
56
|
color: "var(--color-brand-600)"
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, Ue = {
|
|
59
59
|
[T["generating-a-response"]]: {
|
|
60
60
|
status: T["generating-a-response"],
|
|
61
61
|
title: "Active",
|
|
@@ -93,28 +93,28 @@ const T = {
|
|
|
93
93
|
color: Q.failed.color
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, qt = [
|
|
97
97
|
T["generating-a-response"],
|
|
98
98
|
T.hitl
|
|
99
|
-
],
|
|
99
|
+
], Kt = [
|
|
100
100
|
T.complete,
|
|
101
101
|
T.failed
|
|
102
|
-
],
|
|
102
|
+
], Wt = "m4", Jt = "1", vt = "msg-opening", Me = "Unable to load agent tasks. Please try again.", Vt = "Unable to load the resources for this agent", wt = "Unable to load the timeline for this agent", jt = "Something went wrong. Please try again.", yt = "Unable to load agents. Please try again.", ue = "Loading tasks…", ot = "Loading agents…", Yt = "Task", Xt = {
|
|
103
103
|
[B.briefing]: "Briefing",
|
|
104
104
|
[B.running]: "Working",
|
|
105
105
|
[B.stopped]: "Stopped",
|
|
106
106
|
[B.complete]: "Complete"
|
|
107
|
-
},
|
|
107
|
+
}, Qt = [
|
|
108
108
|
T["generating-a-response"],
|
|
109
109
|
T.hitl,
|
|
110
110
|
T.complete,
|
|
111
111
|
T.failed
|
|
112
|
-
],
|
|
112
|
+
], Zt = {
|
|
113
113
|
[T["generating-a-response"]]: "Agents currently working on tasks for you.",
|
|
114
114
|
[T.hitl]: "Agents that need your input before they can continue.",
|
|
115
115
|
[T.complete]: "Agents that have finished their work.",
|
|
116
116
|
[T.failed]: "Agents that failed or were stopped."
|
|
117
|
-
},
|
|
117
|
+
}, en = () => /* @__PURE__ */ o(
|
|
118
118
|
"svg",
|
|
119
119
|
{
|
|
120
120
|
className: "agent-view__empty-illustration",
|
|
@@ -230,33 +230,33 @@ const T = {
|
|
|
230
230
|
/* @__PURE__ */ n("circle", { cx: "256", cy: "160", r: "4", fill: "var(--color-semantic-destructive-500)" })
|
|
231
231
|
]
|
|
232
232
|
}
|
|
233
|
-
),
|
|
234
|
-
const e =
|
|
233
|
+
), tn = ({ status: t }) => {
|
|
234
|
+
const e = Ue[t];
|
|
235
235
|
return e.statusIcon ? /* @__PURE__ */ n(
|
|
236
|
-
|
|
236
|
+
P,
|
|
237
237
|
{
|
|
238
238
|
name: e.statusIcon.name,
|
|
239
239
|
size: 16,
|
|
240
240
|
color: e.statusIcon.color,
|
|
241
241
|
screenReaderText: e.title
|
|
242
242
|
}
|
|
243
|
-
) : /* @__PURE__ */ n(
|
|
244
|
-
},
|
|
243
|
+
) : /* @__PURE__ */ n(_t, { colour: e.dotColour, label: e.title });
|
|
244
|
+
}, nn = () => /* @__PURE__ */ o(
|
|
245
245
|
"section",
|
|
246
246
|
{
|
|
247
247
|
className: "agent-view__empty",
|
|
248
248
|
"aria-label": "About the agents board",
|
|
249
249
|
children: [
|
|
250
250
|
/* @__PURE__ */ o("div", { className: "agent-view__empty-content", children: [
|
|
251
|
-
/* @__PURE__ */ n(
|
|
251
|
+
/* @__PURE__ */ n(fe, { level: 4, children: "Your agents board" }),
|
|
252
252
|
/* @__PURE__ */ n("p", { className: "agent-view__empty-lead", children: "When you start an agent, it appears here so you can track progress at a glance. Agents move between columns as their status changes." }),
|
|
253
|
-
/* @__PURE__ */ n("ul", { className: "agent-view__empty-columns", children:
|
|
254
|
-
const e =
|
|
253
|
+
/* @__PURE__ */ n("ul", { className: "agent-view__empty-columns", children: Qt.map((t) => {
|
|
254
|
+
const e = Ue[t];
|
|
255
255
|
return /* @__PURE__ */ o("li", { className: "agent-view__empty-column", children: [
|
|
256
|
-
/* @__PURE__ */ n("span", { className: "agent-view__empty-column-indicator", children: /* @__PURE__ */ n(
|
|
256
|
+
/* @__PURE__ */ n("span", { className: "agent-view__empty-column-indicator", children: /* @__PURE__ */ n(tn, { status: t }) }),
|
|
257
257
|
/* @__PURE__ */ o("span", { className: "agent-view__empty-column-text", children: [
|
|
258
258
|
/* @__PURE__ */ n("span", { className: "agent-view__empty-column-title", children: e.title }),
|
|
259
|
-
/* @__PURE__ */ n("span", { className: "agent-view__empty-column-description", children:
|
|
259
|
+
/* @__PURE__ */ n("span", { className: "agent-view__empty-column-description", children: Zt[t] })
|
|
260
260
|
] })
|
|
261
261
|
] }, t);
|
|
262
262
|
}) }),
|
|
@@ -266,35 +266,35 @@ const T = {
|
|
|
266
266
|
" above to begin."
|
|
267
267
|
] })
|
|
268
268
|
] }),
|
|
269
|
-
/* @__PURE__ */ n("div", { className: "agent-view__empty-visual", children: /* @__PURE__ */ n(
|
|
269
|
+
/* @__PURE__ */ n("div", { className: "agent-view__empty-visual", children: /* @__PURE__ */ n(en, {}) })
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
|
-
),
|
|
272
|
+
), an = (t, e) => ({
|
|
273
273
|
...t,
|
|
274
274
|
...e.length > 0 ? { children: e } : {}
|
|
275
|
-
}),
|
|
275
|
+
}), Nt = (t) => {
|
|
276
276
|
const e = [], a = [];
|
|
277
277
|
for (const s of t) {
|
|
278
|
-
const r = s.children ?
|
|
278
|
+
const r = s.children ? Nt(s.children) : { needsInput: [], tasks: [] };
|
|
279
279
|
if (e.push(...r.needsInput), s.status === F.hitl) {
|
|
280
280
|
e.push({ ...s, children: void 0 });
|
|
281
281
|
continue;
|
|
282
282
|
}
|
|
283
|
-
a.push(
|
|
283
|
+
a.push(an(s, r.tasks));
|
|
284
284
|
}
|
|
285
285
|
return { needsInput: e, tasks: a };
|
|
286
|
-
},
|
|
286
|
+
}, sn = (t) => t.map((e, a) => ({ item: e, index: a })).sort((e, a) => {
|
|
287
287
|
const s = e.item.status === F.hitl, r = a.item.status === F.hitl;
|
|
288
288
|
return s !== r ? s ? -1 : 1 : e.index - a.index;
|
|
289
|
-
}).map(({ item: e }) => e),
|
|
289
|
+
}).map(({ item: e }) => e), Qe = 2, rn = (t) => {
|
|
290
290
|
if (!t)
|
|
291
291
|
return { canScrollUp: !1, canScrollDown: !1 };
|
|
292
292
|
const e = t.scrollHeight - t.clientHeight;
|
|
293
|
-
return e <=
|
|
294
|
-
canScrollUp: t.scrollTop >
|
|
295
|
-
canScrollDown: t.scrollTop < e -
|
|
293
|
+
return e <= Qe ? { canScrollUp: !1, canScrollDown: !1 } : {
|
|
294
|
+
canScrollUp: t.scrollTop > Qe,
|
|
295
|
+
canScrollDown: t.scrollTop < e - Qe
|
|
296
296
|
};
|
|
297
|
-
},
|
|
297
|
+
}, on = (t, e) => {
|
|
298
298
|
if (!t || !e)
|
|
299
299
|
return null;
|
|
300
300
|
const a = t.getBoundingClientRect(), s = e.getBoundingClientRect();
|
|
@@ -304,7 +304,7 @@ const T = {
|
|
|
304
304
|
width: s.width,
|
|
305
305
|
height: s.height
|
|
306
306
|
};
|
|
307
|
-
},
|
|
307
|
+
}, Be = ({
|
|
308
308
|
children: t,
|
|
309
309
|
className: e,
|
|
310
310
|
contentClassName: a,
|
|
@@ -312,22 +312,22 @@ const T = {
|
|
|
312
312
|
style: r,
|
|
313
313
|
"aria-label": l
|
|
314
314
|
}) => {
|
|
315
|
-
const i =
|
|
315
|
+
const i = _e(null), d = _e(null), [c, p] = f(!1), [_, g] = f(!1), [v, b] = f(null), w = () => {
|
|
316
316
|
var y;
|
|
317
317
|
return s ? ((y = i.current) == null ? void 0 : y.querySelector(s)) ?? null : d.current;
|
|
318
318
|
}, R = () => {
|
|
319
|
-
const y =
|
|
319
|
+
const y = w(), N = rn(y);
|
|
320
320
|
if (p(
|
|
321
321
|
(u) => u === N.canScrollUp ? u : N.canScrollUp
|
|
322
322
|
), g(
|
|
323
323
|
(u) => u === N.canScrollDown ? u : N.canScrollDown
|
|
324
324
|
), s) {
|
|
325
|
-
const u =
|
|
325
|
+
const u = on(i.current, y);
|
|
326
326
|
b((I) => (I == null ? void 0 : I.top) === (u == null ? void 0 : u.top) && (I == null ? void 0 : I.left) === (u == null ? void 0 : u.left) && (I == null ? void 0 : I.width) === (u == null ? void 0 : u.width) && (I == null ? void 0 : I.height) === (u == null ? void 0 : u.height) ? I : u);
|
|
327
327
|
} else
|
|
328
328
|
b((u) => u === null ? u : null);
|
|
329
329
|
};
|
|
330
|
-
|
|
330
|
+
He(() => {
|
|
331
331
|
R();
|
|
332
332
|
}), K(() => {
|
|
333
333
|
const y = i.current;
|
|
@@ -336,20 +336,20 @@ const T = {
|
|
|
336
336
|
let N = null, u = null;
|
|
337
337
|
const I = () => {
|
|
338
338
|
N == null || N.removeEventListener("scroll", R), u == null || u.disconnect(), u = null, N = null;
|
|
339
|
-
}, $ = (
|
|
340
|
-
if (
|
|
339
|
+
}, $ = (U) => {
|
|
340
|
+
if (U === N) {
|
|
341
341
|
R();
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
if (I(), N =
|
|
344
|
+
if (I(), N = U, !N) {
|
|
345
345
|
R();
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
N.addEventListener("scroll", R, { passive: !0 }), u = new ResizeObserver(() => R()), u.observe(N), N.firstElementChild instanceof HTMLElement && u.observe(N.firstElementChild), R();
|
|
349
349
|
};
|
|
350
|
-
$(
|
|
350
|
+
$(w());
|
|
351
351
|
const A = new MutationObserver(() => {
|
|
352
|
-
$(
|
|
352
|
+
$(w());
|
|
353
353
|
});
|
|
354
354
|
return A.observe(y, {
|
|
355
355
|
childList: !0,
|
|
@@ -360,7 +360,7 @@ const T = {
|
|
|
360
360
|
};
|
|
361
361
|
}, [s]);
|
|
362
362
|
const C = (y) => {
|
|
363
|
-
const N =
|
|
363
|
+
const N = w();
|
|
364
364
|
if (!N)
|
|
365
365
|
return;
|
|
366
366
|
const u = Math.max(N.clientHeight * 0.75, 120);
|
|
@@ -368,8 +368,8 @@ const T = {
|
|
|
368
368
|
top: y === "up" ? -u : u,
|
|
369
369
|
behavior: "smooth"
|
|
370
370
|
});
|
|
371
|
-
},
|
|
372
|
-
c && /* @__PURE__ */ o(
|
|
371
|
+
}, M = /* @__PURE__ */ o(ge, { children: [
|
|
372
|
+
c && /* @__PURE__ */ o(ge, { children: [
|
|
373
373
|
/* @__PURE__ */ n("div", { className: "scrollable-region__fade scrollable-region__fade--top", "aria-hidden": "true" }),
|
|
374
374
|
/* @__PURE__ */ n(
|
|
375
375
|
"button",
|
|
@@ -378,11 +378,11 @@ const T = {
|
|
|
378
378
|
className: "scrollable-region__edge scrollable-region__edge--top",
|
|
379
379
|
"aria-label": "Scroll up",
|
|
380
380
|
onClick: () => C("up"),
|
|
381
|
-
children: /* @__PURE__ */ n(
|
|
381
|
+
children: /* @__PURE__ */ n(P, { name: "chevron-up", size: 16, color: "currentColor" })
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
] }),
|
|
385
|
-
|
|
385
|
+
_ && /* @__PURE__ */ o(ge, { children: [
|
|
386
386
|
/* @__PURE__ */ n(
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
@@ -397,7 +397,7 @@ const T = {
|
|
|
397
397
|
className: "scrollable-region__edge scrollable-region__edge--bottom",
|
|
398
398
|
"aria-label": "Scroll down",
|
|
399
399
|
onClick: () => C("down"),
|
|
400
|
-
children: /* @__PURE__ */ n(
|
|
400
|
+
children: /* @__PURE__ */ n(P, { name: "chevron-down", size: 16, color: "currentColor" })
|
|
401
401
|
}
|
|
402
402
|
)
|
|
403
403
|
] })
|
|
@@ -409,23 +409,23 @@ const T = {
|
|
|
409
409
|
className: J("scrollable-region", e),
|
|
410
410
|
style: r,
|
|
411
411
|
"aria-label": l,
|
|
412
|
-
children: s ? /* @__PURE__ */ o(
|
|
412
|
+
children: s ? /* @__PURE__ */ o(ge, { children: [
|
|
413
413
|
t,
|
|
414
|
-
|
|
414
|
+
v && (c || _) && /* @__PURE__ */ n(
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
417
|
className: "scrollable-region__overlay",
|
|
418
418
|
style: {
|
|
419
|
-
top:
|
|
420
|
-
left:
|
|
421
|
-
width:
|
|
422
|
-
height:
|
|
419
|
+
top: v.top,
|
|
420
|
+
left: v.left,
|
|
421
|
+
width: v.width,
|
|
422
|
+
height: v.height
|
|
423
423
|
},
|
|
424
|
-
children:
|
|
424
|
+
children: M
|
|
425
425
|
}
|
|
426
426
|
)
|
|
427
|
-
] }) : /* @__PURE__ */ o(
|
|
428
|
-
|
|
427
|
+
] }) : /* @__PURE__ */ o(ge, { children: [
|
|
428
|
+
M,
|
|
429
429
|
/* @__PURE__ */ n(
|
|
430
430
|
"div",
|
|
431
431
|
{
|
|
@@ -437,18 +437,18 @@ const T = {
|
|
|
437
437
|
] })
|
|
438
438
|
}
|
|
439
439
|
);
|
|
440
|
-
},
|
|
440
|
+
}, ln = 48, cn = ({
|
|
441
441
|
checklist: t
|
|
442
442
|
}) => {
|
|
443
|
-
const e =
|
|
444
|
-
return
|
|
443
|
+
const e = _e(null), a = _e(!1);
|
|
444
|
+
return He(() => {
|
|
445
445
|
const s = e.current;
|
|
446
446
|
if (!s)
|
|
447
447
|
return;
|
|
448
448
|
const r = s.scrollHeight - s.scrollTop - s.clientHeight;
|
|
449
|
-
(!a.current || r <=
|
|
449
|
+
(!a.current || r <= ln) && (s.scrollTop = s.scrollHeight, a.current = !0);
|
|
450
450
|
}, [t]), t.length === 0 ? /* @__PURE__ */ n("p", { className: "agent-view__progress-empty", children: "No tasks to display." }) : /* @__PURE__ */ n(
|
|
451
|
-
|
|
451
|
+
Be,
|
|
452
452
|
{
|
|
453
453
|
className: "agent-view__progress-scroll",
|
|
454
454
|
scrollSelector: ".agent-view__progress-list",
|
|
@@ -458,7 +458,7 @@ const T = {
|
|
|
458
458
|
ref: e,
|
|
459
459
|
className: "agent-view__progress-list",
|
|
460
460
|
"aria-label": "Agent tasks",
|
|
461
|
-
children:
|
|
461
|
+
children: sn(t).map((s) => {
|
|
462
462
|
const r = Q[s.status];
|
|
463
463
|
return /* @__PURE__ */ o(
|
|
464
464
|
"li",
|
|
@@ -469,7 +469,7 @@ const T = {
|
|
|
469
469
|
),
|
|
470
470
|
children: [
|
|
471
471
|
/* @__PURE__ */ n(
|
|
472
|
-
|
|
472
|
+
P,
|
|
473
473
|
{
|
|
474
474
|
name: r.icon,
|
|
475
475
|
size: 16,
|
|
@@ -496,7 +496,7 @@ const T = {
|
|
|
496
496
|
)
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
|
-
},
|
|
499
|
+
}, dn = ({
|
|
500
500
|
prompts: t,
|
|
501
501
|
classNamePrefix: e = "agent-workspace",
|
|
502
502
|
onSelect: a
|
|
@@ -510,7 +510,7 @@ const T = {
|
|
|
510
510
|
},
|
|
511
511
|
s
|
|
512
512
|
)) });
|
|
513
|
-
class
|
|
513
|
+
class gn {
|
|
514
514
|
constructor(e, a) {
|
|
515
515
|
this.connector = e, this.canSend = a.canSend, this.onTurn = a.onTurn, this.onAwaitingChange = a.onAwaitingChange;
|
|
516
516
|
}
|
|
@@ -542,14 +542,14 @@ class ln {
|
|
|
542
542
|
return this.onTurn(r), {
|
|
543
543
|
id: r.message.id,
|
|
544
544
|
text: r.message.text,
|
|
545
|
-
type:
|
|
545
|
+
type: ft,
|
|
546
546
|
...r.message.followUpPrompts ? { followUpPrompts: r.message.followUpPrompts } : {}
|
|
547
547
|
};
|
|
548
548
|
} catch {
|
|
549
549
|
return {
|
|
550
550
|
id: `error-${Date.now()}`,
|
|
551
|
-
text:
|
|
552
|
-
type:
|
|
551
|
+
text: jt,
|
|
552
|
+
type: Bt
|
|
553
553
|
};
|
|
554
554
|
} finally {
|
|
555
555
|
(s = this.onAwaitingChange) == null || s.call(this, !1);
|
|
@@ -567,7 +567,7 @@ class ln {
|
|
|
567
567
|
return !1;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const hn = ({
|
|
571
571
|
connector: t,
|
|
572
572
|
phase: e,
|
|
573
573
|
chatHistory: a,
|
|
@@ -578,16 +578,16 @@ const cn = ({
|
|
|
578
578
|
onTurn: d,
|
|
579
579
|
onAwaitingChange: c,
|
|
580
580
|
onClarificationPrompt: p,
|
|
581
|
-
onDismissClarification:
|
|
581
|
+
onDismissClarification: _
|
|
582
582
|
}) => {
|
|
583
583
|
const g = W(
|
|
584
|
-
() => new
|
|
584
|
+
() => new gn(t, {
|
|
585
585
|
canSend: () => e === B.running,
|
|
586
586
|
onTurn: d,
|
|
587
587
|
onAwaitingChange: c
|
|
588
588
|
}),
|
|
589
589
|
[t, e, d, c]
|
|
590
|
-
),
|
|
590
|
+
), v = e !== B.running, b = e === B.running;
|
|
591
591
|
return /* @__PURE__ */ o("section", { className: "agent-workspace__chat-body", "aria-label": "Chat", children: [
|
|
592
592
|
l && /* @__PURE__ */ o(
|
|
593
593
|
"div",
|
|
@@ -598,7 +598,7 @@ const cn = ({
|
|
|
598
598
|
children: [
|
|
599
599
|
/* @__PURE__ */ n("p", { className: "agent-workspace__clarification-text", children: l.text }),
|
|
600
600
|
l.followUpPrompts && /* @__PURE__ */ n(
|
|
601
|
-
|
|
601
|
+
dn,
|
|
602
602
|
{
|
|
603
603
|
prompts: l.followUpPrompts,
|
|
604
604
|
onSelect: p
|
|
@@ -609,20 +609,20 @@ const cn = ({
|
|
|
609
609
|
{
|
|
610
610
|
type: "button",
|
|
611
611
|
className: "agent-workspace__clarification-dismiss",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: _,
|
|
613
613
|
children: "Dismiss"
|
|
614
614
|
}
|
|
615
615
|
)
|
|
616
616
|
]
|
|
617
617
|
}
|
|
618
618
|
),
|
|
619
|
-
/* @__PURE__ */ n("div", { className: "agent-workspace__ask-arbor", children: /* @__PURE__ */ n(
|
|
620
|
-
|
|
619
|
+
/* @__PURE__ */ n("div", { className: "agent-workspace__ask-arbor", children: /* @__PURE__ */ n(Be, { scrollSelector: ".chat-panel-message-list", children: /* @__PURE__ */ n(
|
|
620
|
+
Ft,
|
|
621
621
|
{
|
|
622
622
|
connector: g,
|
|
623
623
|
chatHistory: a,
|
|
624
624
|
startQuery: r,
|
|
625
|
-
lockConversation:
|
|
625
|
+
lockConversation: v,
|
|
626
626
|
enableUpload: i,
|
|
627
627
|
speechEnabled: b,
|
|
628
628
|
speechLanguage: "en-GB",
|
|
@@ -636,15 +636,15 @@ const cn = ({
|
|
|
636
636
|
s
|
|
637
637
|
) }) }),
|
|
638
638
|
e === B.stopped && /* @__PURE__ */ o("div", { className: "agent-workspace__notice", role: "status", children: [
|
|
639
|
-
/* @__PURE__ */ n(
|
|
639
|
+
/* @__PURE__ */ n(P, { name: "circle-alert", size: 16, color: "var(--color-semantic-warning-600)" }),
|
|
640
640
|
/* @__PURE__ */ n("span", { children: "You stopped the agent. Its progress is saved in the checklist on the left." })
|
|
641
641
|
] }),
|
|
642
642
|
e === B.complete && /* @__PURE__ */ o("div", { className: "agent-workspace__notice", role: "status", children: [
|
|
643
|
-
/* @__PURE__ */ n(
|
|
643
|
+
/* @__PURE__ */ n(P, { name: "party-popper", size: 16, color: "var(--color-semantic-success-600)" }),
|
|
644
644
|
/* @__PURE__ */ n("span", { children: "The agent has finished." })
|
|
645
645
|
] })
|
|
646
646
|
] });
|
|
647
|
-
},
|
|
647
|
+
}, kt = ({
|
|
648
648
|
item: t,
|
|
649
649
|
depth: e,
|
|
650
650
|
canRequestInput: a,
|
|
@@ -652,7 +652,7 @@ const cn = ({
|
|
|
652
652
|
}) => {
|
|
653
653
|
const r = Q[t.status], l = t.status.replace(/_/g, "-"), i = t.status === F.hitl && a && s, d = /* @__PURE__ */ o("div", { className: "agent-workspace__task-row", children: [
|
|
654
654
|
/* @__PURE__ */ n(
|
|
655
|
-
|
|
655
|
+
P,
|
|
656
656
|
{
|
|
657
657
|
name: r.icon,
|
|
658
658
|
size: 16,
|
|
@@ -683,7 +683,7 @@ const cn = ({
|
|
|
683
683
|
}
|
|
684
684
|
) : d,
|
|
685
685
|
t.children && t.children.length > 0 && /* @__PURE__ */ n("ul", { className: "agent-workspace__task-children", children: t.children.map((c) => /* @__PURE__ */ n(
|
|
686
|
-
|
|
686
|
+
kt,
|
|
687
687
|
{
|
|
688
688
|
item: c,
|
|
689
689
|
depth: e + 1,
|
|
@@ -695,13 +695,13 @@ const cn = ({
|
|
|
695
695
|
]
|
|
696
696
|
}
|
|
697
697
|
);
|
|
698
|
-
},
|
|
698
|
+
}, lt = ({
|
|
699
699
|
items: t,
|
|
700
700
|
ariaLabel: e,
|
|
701
701
|
canRequestInput: a,
|
|
702
702
|
onAttentionItemClick: s
|
|
703
703
|
}) => /* @__PURE__ */ n("ul", { className: "agent-workspace__task-list", "aria-label": e, children: t.map((r) => /* @__PURE__ */ n(
|
|
704
|
-
|
|
704
|
+
kt,
|
|
705
705
|
{
|
|
706
706
|
item: r,
|
|
707
707
|
depth: 0,
|
|
@@ -709,7 +709,7 @@ const cn = ({
|
|
|
709
709
|
onAttentionItemClick: s
|
|
710
710
|
},
|
|
711
711
|
r.task
|
|
712
|
-
)) }),
|
|
712
|
+
)) }), pn = ({
|
|
713
713
|
checklist: t,
|
|
714
714
|
isLoading: e,
|
|
715
715
|
error: a,
|
|
@@ -718,7 +718,7 @@ const cn = ({
|
|
|
718
718
|
onAttentionItemClick: l
|
|
719
719
|
}) => {
|
|
720
720
|
const i = W(
|
|
721
|
-
() => t ?
|
|
721
|
+
() => t ? Nt(t) : null,
|
|
722
722
|
[t]
|
|
723
723
|
);
|
|
724
724
|
return /* @__PURE__ */ o(
|
|
@@ -727,27 +727,27 @@ const cn = ({
|
|
|
727
727
|
className: "agent-workspace__panel agent-workspace__panel--checklist",
|
|
728
728
|
"aria-label": "Checklist",
|
|
729
729
|
children: [
|
|
730
|
-
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-header", children: /* @__PURE__ */ n(
|
|
731
|
-
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-body", "aria-live": "polite", children: /* @__PURE__ */ o(
|
|
730
|
+
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-header", children: /* @__PURE__ */ n(fe, { level: 4, children: "Checklist" }) }),
|
|
731
|
+
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-body", "aria-live": "polite", children: /* @__PURE__ */ o(Be, { children: [
|
|
732
732
|
e && /* @__PURE__ */ o("div", { className: "agent-workspace__loading", children: [
|
|
733
733
|
/* @__PURE__ */ n(
|
|
734
|
-
|
|
734
|
+
P,
|
|
735
735
|
{
|
|
736
736
|
name: "loader",
|
|
737
737
|
size: 16,
|
|
738
738
|
color: "var(--color-brand-600)",
|
|
739
739
|
className: "agent-workspace__task-icon--spinning",
|
|
740
|
-
screenReaderText:
|
|
740
|
+
screenReaderText: ue
|
|
741
741
|
}
|
|
742
742
|
),
|
|
743
|
-
/* @__PURE__ */ n("span", { children:
|
|
743
|
+
/* @__PURE__ */ n("span", { children: ue })
|
|
744
744
|
] }),
|
|
745
745
|
!e && a && /* @__PURE__ */ n("p", { className: "agent-workspace__error", role: "alert", children: a }),
|
|
746
|
-
!e && !a && i && /* @__PURE__ */ o(
|
|
746
|
+
!e && !a && i && /* @__PURE__ */ o(ge, { children: [
|
|
747
747
|
i.needsInput.length > 0 && /* @__PURE__ */ o("div", { className: "agent-workspace__task-group", children: [
|
|
748
748
|
/* @__PURE__ */ n("p", { className: "agent-workspace__task-group-label", children: "Needs your input" }),
|
|
749
749
|
/* @__PURE__ */ n(
|
|
750
|
-
|
|
750
|
+
lt,
|
|
751
751
|
{
|
|
752
752
|
items: i.needsInput,
|
|
753
753
|
ariaLabel: "Tasks needing your input",
|
|
@@ -765,7 +765,7 @@ const cn = ({
|
|
|
765
765
|
children: [
|
|
766
766
|
i.needsInput.length > 0 && /* @__PURE__ */ n("p", { className: "agent-workspace__task-group-label", children: "Other tasks" }),
|
|
767
767
|
/* @__PURE__ */ n(
|
|
768
|
-
|
|
768
|
+
lt,
|
|
769
769
|
{
|
|
770
770
|
items: i.tasks,
|
|
771
771
|
ariaLabel: "Agent tasks",
|
|
@@ -782,28 +782,28 @@ const cn = ({
|
|
|
782
782
|
]
|
|
783
783
|
}
|
|
784
784
|
);
|
|
785
|
-
},
|
|
786
|
-
[
|
|
785
|
+
}, un = {
|
|
786
|
+
[pe.MIS_RECORD]: {
|
|
787
787
|
icon: "table",
|
|
788
788
|
label: "Arbor MIS",
|
|
789
789
|
color: "var(--color-brand-600)"
|
|
790
790
|
},
|
|
791
|
-
[
|
|
791
|
+
[pe.FILE]: {
|
|
792
792
|
icon: "file",
|
|
793
793
|
label: "File",
|
|
794
794
|
color: "var(--color-semantic-caution-800)"
|
|
795
795
|
},
|
|
796
|
-
[
|
|
796
|
+
[pe.WORKFLOW]: {
|
|
797
797
|
icon: "list-tree",
|
|
798
798
|
label: "Workflow",
|
|
799
799
|
color: "var(--color-semantic-warning-700)"
|
|
800
800
|
},
|
|
801
|
-
[
|
|
801
|
+
[pe.LINK]: {
|
|
802
802
|
icon: "link",
|
|
803
803
|
label: "Link",
|
|
804
804
|
color: "var(--color-semantic-info-700)"
|
|
805
805
|
}
|
|
806
|
-
},
|
|
806
|
+
}, mn = ({
|
|
807
807
|
resources: t,
|
|
808
808
|
isLoading: e = !1,
|
|
809
809
|
error: a = null
|
|
@@ -814,13 +814,13 @@ const cn = ({
|
|
|
814
814
|
"aria-label": "Resources",
|
|
815
815
|
children: [
|
|
816
816
|
/* @__PURE__ */ o("div", { className: "agent-workspace__panel-header", children: [
|
|
817
|
-
/* @__PURE__ */ n(
|
|
817
|
+
/* @__PURE__ */ n(fe, { level: 4, children: "Resources" }),
|
|
818
818
|
/* @__PURE__ */ n("span", { className: "agent-workspace__panel-count", children: t.length })
|
|
819
819
|
] }),
|
|
820
|
-
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-body", "aria-live": "polite", children: /* @__PURE__ */ o(
|
|
820
|
+
/* @__PURE__ */ n("div", { className: "agent-workspace__panel-body", "aria-live": "polite", children: /* @__PURE__ */ o(Be, { children: [
|
|
821
821
|
e && /* @__PURE__ */ o("div", { className: "agent-workspace__loading", children: [
|
|
822
822
|
/* @__PURE__ */ n(
|
|
823
|
-
|
|
823
|
+
P,
|
|
824
824
|
{
|
|
825
825
|
name: "loader",
|
|
826
826
|
size: 16,
|
|
@@ -833,7 +833,7 @@ const cn = ({
|
|
|
833
833
|
] }),
|
|
834
834
|
!e && a && /* @__PURE__ */ n("p", { className: "agent-workspace__error", role: "alert", children: a }),
|
|
835
835
|
!e && !a && t.length > 0 && /* @__PURE__ */ n("ul", { className: "agent-workspace__resource-list", "aria-label": "Agent resources", children: t.map((s) => {
|
|
836
|
-
const r =
|
|
836
|
+
const r = un[s.type];
|
|
837
837
|
return /* @__PURE__ */ n(
|
|
838
838
|
"li",
|
|
839
839
|
{
|
|
@@ -851,7 +851,7 @@ const cn = ({
|
|
|
851
851
|
{
|
|
852
852
|
className: `agent-workspace__resource-icon agent-workspace__resource-icon--${s.type.toLowerCase()}`,
|
|
853
853
|
children: /* @__PURE__ */ n(
|
|
854
|
-
|
|
854
|
+
P,
|
|
855
855
|
{
|
|
856
856
|
name: r.icon,
|
|
857
857
|
size: 16,
|
|
@@ -875,7 +875,7 @@ const cn = ({
|
|
|
875
875
|
s.description && /* @__PURE__ */ n("span", { className: "agent-workspace__resource-description", children: s.description })
|
|
876
876
|
] }),
|
|
877
877
|
/* @__PURE__ */ n(
|
|
878
|
-
|
|
878
|
+
P,
|
|
879
879
|
{
|
|
880
880
|
name: "external-link",
|
|
881
881
|
size: 12,
|
|
@@ -895,30 +895,30 @@ const cn = ({
|
|
|
895
895
|
] }) })
|
|
896
896
|
]
|
|
897
897
|
}
|
|
898
|
-
),
|
|
898
|
+
), $e = (t) => {
|
|
899
899
|
const e = Date.parse(t);
|
|
900
900
|
return Number.isFinite(e) ? e : 0;
|
|
901
|
-
},
|
|
901
|
+
}, _n = new Intl.DateTimeFormat("en-GB", {
|
|
902
902
|
day: "numeric",
|
|
903
903
|
month: "long",
|
|
904
904
|
year: "numeric",
|
|
905
905
|
hour: "numeric",
|
|
906
906
|
minute: "2-digit"
|
|
907
|
-
}),
|
|
907
|
+
}), Ze = (t) => {
|
|
908
908
|
const e = new Date(t);
|
|
909
|
-
return Number.isFinite(e.getTime()) ?
|
|
910
|
-
},
|
|
909
|
+
return Number.isFinite(e.getTime()) ? _n.format(e) : t;
|
|
910
|
+
}, xe = (t) => t.replace(
|
|
911
911
|
/[A-Za-z0-9]+(?:[_-][A-Za-z0-9]+)+/g,
|
|
912
912
|
(e) => e.split(/[_-]/).map((a) => a.charAt(0).toUpperCase() + a.slice(1).toLowerCase()).join(" ")
|
|
913
|
-
),
|
|
913
|
+
), Ee = (t, e) => e <= 1 ? 0 : t / (e - 1) * 100, At = (t) => Math.max(t, 0) + 2, fn = (t) => t + 1, vn = (t, e) => {
|
|
914
914
|
if (e.length === 0)
|
|
915
915
|
return 50;
|
|
916
|
-
const a =
|
|
916
|
+
const a = At(e.length), s = Ee(1, a), r = Ee(e.length, a), l = e.map((_) => $e(_.timestamp)), i = Math.min(...l), d = Math.max(...l);
|
|
917
917
|
if (d <= i)
|
|
918
918
|
return s;
|
|
919
|
-
const c = (
|
|
919
|
+
const c = ($e(t.timestamp) - i) / (d - i), p = Math.min(1, Math.max(0, c));
|
|
920
920
|
return s + p * (r - s);
|
|
921
|
-
},
|
|
921
|
+
}, wn = 8, yn = 20, Nn = (t, e = wn, a = yn) => {
|
|
922
922
|
const s = /* @__PURE__ */ new Map();
|
|
923
923
|
if (t.length === 0)
|
|
924
924
|
return s;
|
|
@@ -931,31 +931,31 @@ const cn = ({
|
|
|
931
931
|
}
|
|
932
932
|
for (const i of l) {
|
|
933
933
|
const d = [...i].sort(
|
|
934
|
-
(p,
|
|
934
|
+
(p, _) => p.timestampMs - _.timestampMs || p.id.localeCompare(_.id)
|
|
935
935
|
), c = (d.length - 1) / 2;
|
|
936
|
-
d.forEach((p,
|
|
937
|
-
s.set(p.id, (
|
|
936
|
+
d.forEach((p, _) => {
|
|
937
|
+
s.set(p.id, (_ - c) * a);
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
return s;
|
|
941
|
-
},
|
|
941
|
+
}, De = (t, e = 0) => ({
|
|
942
942
|
left: `calc(${t / 100} * (100% - var(--agent-timeline-node-size)) + (var(--agent-timeline-node-size) / 2) + ${e}px)`,
|
|
943
943
|
transform: "translateX(-50%)"
|
|
944
|
-
}),
|
|
944
|
+
}), kn = (t) => t.type !== "message-sent", An = ({
|
|
945
945
|
timeline: t,
|
|
946
946
|
isLoading: e,
|
|
947
947
|
error: a,
|
|
948
948
|
onOpenChatSession: s
|
|
949
949
|
}) => {
|
|
950
|
-
const r = ((t == null ? void 0 : t.actionLog) ?? []).filter(
|
|
951
|
-
id: `action-${g.timestamp}-${
|
|
952
|
-
leftPercent:
|
|
953
|
-
timestampMs:
|
|
950
|
+
const r = ((t == null ? void 0 : t.actionLog) ?? []).filter(kn), l = (t == null ? void 0 : t.chatSessions) ?? [], i = !e && !a && r.length === 0 && l.length === 0, d = At(r.length), c = r.map((g, v) => ({
|
|
951
|
+
id: `action-${g.timestamp}-${v}`,
|
|
952
|
+
leftPercent: Ee(fn(v), d),
|
|
953
|
+
timestampMs: $e(g.timestamp)
|
|
954
954
|
})), p = l.map((g) => ({
|
|
955
955
|
id: g.sessionId,
|
|
956
|
-
leftPercent:
|
|
957
|
-
timestampMs:
|
|
958
|
-
})),
|
|
956
|
+
leftPercent: vn(g, r),
|
|
957
|
+
timestampMs: $e(g.timestamp)
|
|
958
|
+
})), _ = Nn([
|
|
959
959
|
...c,
|
|
960
960
|
...p
|
|
961
961
|
]);
|
|
@@ -966,7 +966,7 @@ const cn = ({
|
|
|
966
966
|
"aria-label": "Agent timeline",
|
|
967
967
|
children: [
|
|
968
968
|
e && /* @__PURE__ */ n("p", { className: "agent-workspace__timeline-status", role: "status", children: "Loading timeline…" }),
|
|
969
|
-
a && /* @__PURE__ */ n("p", { className: "agent-workspace__timeline-status", role: "alert", children: a ||
|
|
969
|
+
a && /* @__PURE__ */ n("p", { className: "agent-workspace__timeline-status", role: "alert", children: a || wt }),
|
|
970
970
|
i && /* @__PURE__ */ n("p", { className: "agent-workspace__timeline-status", role: "status", children: "No timeline activity yet." }),
|
|
971
971
|
!e && !a && !i && /* @__PURE__ */ o("div", { className: "agent-timeline", children: [
|
|
972
972
|
/* @__PURE__ */ n("div", { className: "agent-timeline__track", "aria-hidden": "true" }),
|
|
@@ -974,44 +974,44 @@ const cn = ({
|
|
|
974
974
|
"div",
|
|
975
975
|
{
|
|
976
976
|
className: "agent-timeline__station agent-timeline__station--terminus",
|
|
977
|
-
style:
|
|
977
|
+
style: De(Ee(0, d)),
|
|
978
978
|
children: [
|
|
979
979
|
/* @__PURE__ */ n(
|
|
980
980
|
"span",
|
|
981
981
|
{
|
|
982
982
|
className: "agent-timeline__station-node agent-timeline__station-node--terminus",
|
|
983
983
|
"aria-hidden": "true",
|
|
984
|
-
children: /* @__PURE__ */ n(
|
|
984
|
+
children: /* @__PURE__ */ n(P, { name: "arrow-right-from-line", size: 16, color: "currentColor" })
|
|
985
985
|
}
|
|
986
986
|
),
|
|
987
987
|
/* @__PURE__ */ n("span", { className: "agent-timeline__terminus-label", children: "Start" })
|
|
988
988
|
]
|
|
989
989
|
}
|
|
990
990
|
),
|
|
991
|
-
r.map((g,
|
|
992
|
-
const b = `action-${g.timestamp}-${
|
|
991
|
+
r.map((g, v) => {
|
|
992
|
+
const b = `action-${g.timestamp}-${v}`, w = c[v].leftPercent, R = g.type === "checklist-updated", C = g.type === "status-transition", M = R ? "checklist" : C ? "status" : "note";
|
|
993
993
|
return /* @__PURE__ */ o(
|
|
994
994
|
"div",
|
|
995
995
|
{
|
|
996
|
-
className: `agent-timeline__station agent-timeline__station--${
|
|
997
|
-
style:
|
|
996
|
+
className: `agent-timeline__station agent-timeline__station--${M}`,
|
|
997
|
+
style: De(w, _.get(b) ?? 0),
|
|
998
998
|
children: [
|
|
999
999
|
/* @__PURE__ */ o(
|
|
1000
1000
|
"button",
|
|
1001
1001
|
{
|
|
1002
1002
|
type: "button",
|
|
1003
|
-
className: `agent-timeline__station-node agent-timeline__station-node--${
|
|
1004
|
-
"aria-label": `${
|
|
1003
|
+
className: `agent-timeline__station-node agent-timeline__station-node--${M}`,
|
|
1004
|
+
"aria-label": `${xe(g.type)}: ${xe(g.entry)}`,
|
|
1005
1005
|
children: [
|
|
1006
|
-
R && /* @__PURE__ */ n(
|
|
1007
|
-
C && /* @__PURE__ */ n(
|
|
1006
|
+
R && /* @__PURE__ */ n(P, { name: "check-solid", size: 16, color: "currentColor" }),
|
|
1007
|
+
C && /* @__PURE__ */ n(P, { name: "iteration-ccw", size: 16, color: "currentColor" })
|
|
1008
1008
|
]
|
|
1009
1009
|
}
|
|
1010
1010
|
),
|
|
1011
1011
|
/* @__PURE__ */ o("div", { className: "agent-timeline__pill", role: "tooltip", children: [
|
|
1012
|
-
/* @__PURE__ */ n("strong", { className: "agent-timeline__pill-type", children:
|
|
1013
|
-
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children:
|
|
1014
|
-
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children:
|
|
1012
|
+
/* @__PURE__ */ n("strong", { className: "agent-timeline__pill-type", children: xe(g.type) }),
|
|
1013
|
+
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children: xe(g.entry) }),
|
|
1014
|
+
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children: Ze(g.timestamp) })
|
|
1015
1015
|
] })
|
|
1016
1016
|
]
|
|
1017
1017
|
},
|
|
@@ -1022,29 +1022,29 @@ const cn = ({
|
|
|
1022
1022
|
"div",
|
|
1023
1023
|
{
|
|
1024
1024
|
className: "agent-timeline__station agent-timeline__station--terminus",
|
|
1025
|
-
style:
|
|
1025
|
+
style: De(Ee(d - 1, d)),
|
|
1026
1026
|
children: [
|
|
1027
1027
|
/* @__PURE__ */ n(
|
|
1028
1028
|
"span",
|
|
1029
1029
|
{
|
|
1030
1030
|
className: "agent-timeline__station-node agent-timeline__station-node--terminus",
|
|
1031
1031
|
"aria-hidden": "true",
|
|
1032
|
-
children: /* @__PURE__ */ n(
|
|
1032
|
+
children: /* @__PURE__ */ n(P, { name: "flag", size: 16, color: "currentColor" })
|
|
1033
1033
|
}
|
|
1034
1034
|
),
|
|
1035
1035
|
/* @__PURE__ */ n("span", { className: "agent-timeline__terminus-label", children: "Finish" })
|
|
1036
1036
|
]
|
|
1037
1037
|
}
|
|
1038
1038
|
),
|
|
1039
|
-
l.map((g,
|
|
1040
|
-
const b = p[
|
|
1039
|
+
l.map((g, v) => {
|
|
1040
|
+
const b = p[v].leftPercent;
|
|
1041
1041
|
return /* @__PURE__ */ o(
|
|
1042
1042
|
"div",
|
|
1043
1043
|
{
|
|
1044
1044
|
className: "agent-timeline__chat-station",
|
|
1045
|
-
style:
|
|
1045
|
+
style: De(
|
|
1046
1046
|
b,
|
|
1047
|
-
|
|
1047
|
+
_.get(g.sessionId) ?? 0
|
|
1048
1048
|
),
|
|
1049
1049
|
children: [
|
|
1050
1050
|
/* @__PURE__ */ n(
|
|
@@ -1052,14 +1052,14 @@ const cn = ({
|
|
|
1052
1052
|
{
|
|
1053
1053
|
type: "button",
|
|
1054
1054
|
className: "agent-timeline__chat-node",
|
|
1055
|
-
"aria-label": `Open chat session from ${
|
|
1055
|
+
"aria-label": `Open chat session from ${Ze(g.timestamp)}`,
|
|
1056
1056
|
onClick: () => s(g.sessionId),
|
|
1057
|
-
children: /* @__PURE__ */ n(
|
|
1057
|
+
children: /* @__PURE__ */ n(P, { name: "sparkles", size: 16, color: "currentColor" })
|
|
1058
1058
|
}
|
|
1059
1059
|
),
|
|
1060
1060
|
/* @__PURE__ */ o("div", { className: "agent-timeline__pill", role: "tooltip", children: [
|
|
1061
1061
|
/* @__PURE__ */ n("strong", { className: "agent-timeline__pill-type", children: "Chat session" }),
|
|
1062
|
-
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children:
|
|
1062
|
+
/* @__PURE__ */ n("span", { className: "agent-timeline__pill-entry", children: Ze(g.timestamp) })
|
|
1063
1063
|
] })
|
|
1064
1064
|
]
|
|
1065
1065
|
},
|
|
@@ -1070,30 +1070,30 @@ const cn = ({
|
|
|
1070
1070
|
]
|
|
1071
1071
|
}
|
|
1072
1072
|
);
|
|
1073
|
-
},
|
|
1073
|
+
}, Sn = [
|
|
1074
1074
|
"I'll get the details and come back to you",
|
|
1075
1075
|
"Skip this for now"
|
|
1076
|
-
],
|
|
1076
|
+
], bn = (t) => {
|
|
1077
1077
|
var a;
|
|
1078
1078
|
const e = (a = t.prompt) != null && a.trim() ? t.prompt.trim() : `I need a bit more from you on "${t.task}". ${t.description} What can you tell me?`;
|
|
1079
1079
|
return {
|
|
1080
1080
|
id: `clarification-${Date.now()}`,
|
|
1081
1081
|
author: ne.agent,
|
|
1082
1082
|
text: e,
|
|
1083
|
-
followUpPrompts: t.clarificationPrompts ??
|
|
1083
|
+
followUpPrompts: t.clarificationPrompts ?? Sn
|
|
1084
1084
|
};
|
|
1085
|
-
},
|
|
1085
|
+
}, he = (t) => ({
|
|
1086
1086
|
id: t.id,
|
|
1087
1087
|
text: t.text,
|
|
1088
|
-
type: t.author === ne.user ?
|
|
1088
|
+
type: t.author === ne.user ? zt : t.author === ne.system ? Gt : ft,
|
|
1089
1089
|
...t.followUpPrompts ? { followUpPrompts: t.followUpPrompts } : {}
|
|
1090
1090
|
});
|
|
1091
|
-
class
|
|
1091
|
+
class Te extends Error {
|
|
1092
1092
|
constructor(e, a, s) {
|
|
1093
1093
|
super(s ?? `Agent service request failed (${e})`), this.name = "AgentServiceError", this.status = e, this.detail = a;
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
|
-
const
|
|
1096
|
+
const Cn = "/api/v1", G = {
|
|
1097
1097
|
agentDefinitions: "/agent-definitions",
|
|
1098
1098
|
agents: "/agents",
|
|
1099
1099
|
conversations: "/conversations",
|
|
@@ -1102,22 +1102,22 @@ const An = "/api/v1", G = {
|
|
|
1102
1102
|
}, q = {
|
|
1103
1103
|
GET: "GET",
|
|
1104
1104
|
POST: "POST"
|
|
1105
|
-
},
|
|
1105
|
+
}, Tn = {
|
|
1106
1106
|
error: "error"
|
|
1107
|
-
},
|
|
1107
|
+
}, En = {
|
|
1108
1108
|
user: "user"
|
|
1109
|
-
},
|
|
1109
|
+
}, me = {
|
|
1110
1110
|
acceptJson: "application/json",
|
|
1111
1111
|
acceptEventStream: "text/event-stream",
|
|
1112
1112
|
contentTypeJson: "application/json",
|
|
1113
1113
|
arborApplicationUrl: "X-Arbor-Application-Url"
|
|
1114
|
-
},
|
|
1115
|
-
class
|
|
1114
|
+
}, Rn = /:invocationId\b/g, In = (t) => t.trim().replace(/^Bearer\s+/i, ""), On = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
|
|
1115
|
+
class nt {
|
|
1116
1116
|
constructor(e) {
|
|
1117
1117
|
var s;
|
|
1118
|
-
this.baseUrl =
|
|
1118
|
+
this.baseUrl = On(e.baseUrl ?? "");
|
|
1119
1119
|
const a = (s = e.token) == null ? void 0 : s.trim();
|
|
1120
|
-
this.token = a ?
|
|
1120
|
+
this.token = a ? In(a) : void 0, this.customHeaders = e.headers, this.urls = e.urls ?? {}, this.fetchImpl = e.fetch ?? globalThis.fetch.bind(globalThis);
|
|
1121
1121
|
}
|
|
1122
1122
|
// Replaces the extra headers merged into every subsequent request,
|
|
1123
1123
|
// without recreating the client (e.g. an application-URL header that
|
|
@@ -1266,18 +1266,18 @@ class Ze {
|
|
|
1266
1266
|
headers: {
|
|
1267
1267
|
...this.customHeaders,
|
|
1268
1268
|
...this.authHeaders(),
|
|
1269
|
-
Accept:
|
|
1269
|
+
Accept: me.acceptEventStream,
|
|
1270
1270
|
// Let the browser set the multipart boundary when uploading.
|
|
1271
|
-
...r ? {} : { "Content-Type":
|
|
1271
|
+
...r ? {} : { "Content-Type": me.contentTypeJson }
|
|
1272
1272
|
},
|
|
1273
|
-
body: r ?
|
|
1273
|
+
body: r ? Pn(a, s.uploadFiles ?? []) : JSON.stringify(a),
|
|
1274
1274
|
signal: s.signal
|
|
1275
1275
|
}
|
|
1276
1276
|
);
|
|
1277
1277
|
if (!l.ok)
|
|
1278
1278
|
throw await this.toError(l);
|
|
1279
1279
|
if (!l.body)
|
|
1280
|
-
throw new
|
|
1280
|
+
throw new Te(
|
|
1281
1281
|
l.status,
|
|
1282
1282
|
null,
|
|
1283
1283
|
"Chat response contained no stream body"
|
|
@@ -1289,14 +1289,14 @@ class Ze {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
// Builds a URL from the base url + shared API prefix + route.
|
|
1291
1291
|
apiUrl(e) {
|
|
1292
|
-
return `${this.baseUrl}${
|
|
1292
|
+
return `${this.baseUrl}${Cn}${e}`;
|
|
1293
1293
|
}
|
|
1294
1294
|
// Resolves the URL for an operation, preferring a per-operation override
|
|
1295
1295
|
// (with `:invocationId` substituted) and falling back to the base url.
|
|
1296
1296
|
resolveUrl(e, a, s) {
|
|
1297
1297
|
const r = this.urls[e];
|
|
1298
1298
|
return r ? s ? r.replace(
|
|
1299
|
-
|
|
1299
|
+
Rn,
|
|
1300
1300
|
encodeURIComponent(s)
|
|
1301
1301
|
) : r : this.apiUrl(a);
|
|
1302
1302
|
}
|
|
@@ -1308,8 +1308,8 @@ class Ze {
|
|
|
1308
1308
|
headers: {
|
|
1309
1309
|
...this.customHeaders,
|
|
1310
1310
|
...this.authHeaders(),
|
|
1311
|
-
Accept:
|
|
1312
|
-
...s === void 0 ? {} : { "Content-Type":
|
|
1311
|
+
Accept: me.acceptJson,
|
|
1312
|
+
...s === void 0 ? {} : { "Content-Type": me.contentTypeJson }
|
|
1313
1313
|
},
|
|
1314
1314
|
...s === void 0 ? {} : { body: JSON.stringify(s) }
|
|
1315
1315
|
}
|
|
@@ -1325,7 +1325,7 @@ class Ze {
|
|
|
1325
1325
|
a = await e.json();
|
|
1326
1326
|
} catch {
|
|
1327
1327
|
}
|
|
1328
|
-
return new
|
|
1328
|
+
return new Te(
|
|
1329
1329
|
e.status,
|
|
1330
1330
|
a,
|
|
1331
1331
|
`Agent service request failed (${e.status} ${e.statusText})`
|
|
@@ -1335,18 +1335,18 @@ class Ze {
|
|
|
1335
1335
|
const s = e.getReader(), r = new TextDecoder();
|
|
1336
1336
|
let l = "", i;
|
|
1337
1337
|
const d = (c) => {
|
|
1338
|
-
const { event: p, data:
|
|
1339
|
-
if (
|
|
1338
|
+
const { event: p, data: _ } = Ln(c);
|
|
1339
|
+
if (_ === null)
|
|
1340
1340
|
return;
|
|
1341
|
-
if (p ===
|
|
1342
|
-
const
|
|
1343
|
-
throw new
|
|
1341
|
+
if (p === Tn.error) {
|
|
1342
|
+
const v = ct(_);
|
|
1343
|
+
throw new Te(
|
|
1344
1344
|
502,
|
|
1345
|
-
|
|
1346
|
-
(
|
|
1345
|
+
v,
|
|
1346
|
+
(v == null ? void 0 : v.message) ?? "Chat stream error"
|
|
1347
1347
|
);
|
|
1348
1348
|
}
|
|
1349
|
-
const g =
|
|
1349
|
+
const g = ct(_);
|
|
1350
1350
|
g && (i = g, a == null || a(g));
|
|
1351
1351
|
};
|
|
1352
1352
|
for (; ; ) {
|
|
@@ -1354,15 +1354,15 @@ class Ze {
|
|
|
1354
1354
|
if (c)
|
|
1355
1355
|
break;
|
|
1356
1356
|
l += r.decode(p, { stream: !0 });
|
|
1357
|
-
const
|
|
1357
|
+
const _ = l.split(`
|
|
1358
1358
|
|
|
1359
1359
|
`);
|
|
1360
|
-
l =
|
|
1361
|
-
for (const g of
|
|
1360
|
+
l = _.pop() ?? "";
|
|
1361
|
+
for (const g of _)
|
|
1362
1362
|
d(g);
|
|
1363
1363
|
}
|
|
1364
1364
|
if (l.trim() && d(l), !i)
|
|
1365
|
-
throw new
|
|
1365
|
+
throw new Te(
|
|
1366
1366
|
502,
|
|
1367
1367
|
null,
|
|
1368
1368
|
"Chat stream ended without any events"
|
|
@@ -1370,7 +1370,7 @@ class Ze {
|
|
|
1370
1370
|
return i;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
const
|
|
1373
|
+
const Ln = (t) => {
|
|
1374
1374
|
let e = null;
|
|
1375
1375
|
const a = [];
|
|
1376
1376
|
for (const s of t.split(`
|
|
@@ -1383,25 +1383,25 @@ const Rn = (t) => {
|
|
|
1383
1383
|
data: a.length > 0 ? a.join(`
|
|
1384
1384
|
`) : null
|
|
1385
1385
|
};
|
|
1386
|
-
},
|
|
1386
|
+
}, ct = (t) => {
|
|
1387
1387
|
try {
|
|
1388
1388
|
return JSON.parse(t);
|
|
1389
1389
|
} catch {
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
1392
|
};
|
|
1393
|
-
function
|
|
1393
|
+
function Pn(t, e) {
|
|
1394
1394
|
const a = new FormData();
|
|
1395
1395
|
a.append("body", JSON.stringify(t));
|
|
1396
1396
|
for (const s of e)
|
|
1397
1397
|
a.append("files", s, s.name);
|
|
1398
1398
|
return a;
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const xn = (t) => {
|
|
1401
1401
|
switch (t) {
|
|
1402
|
-
case
|
|
1402
|
+
case it.cancelled:
|
|
1403
1403
|
return T.failed;
|
|
1404
|
-
case
|
|
1404
|
+
case it.archived:
|
|
1405
1405
|
return T.complete;
|
|
1406
1406
|
case T.hitl:
|
|
1407
1407
|
case T.complete:
|
|
@@ -1411,12 +1411,12 @@ const On = (t) => {
|
|
|
1411
1411
|
default:
|
|
1412
1412
|
return T["generating-a-response"];
|
|
1413
1413
|
}
|
|
1414
|
-
},
|
|
1414
|
+
}, Dn = (t) => {
|
|
1415
1415
|
switch (t) {
|
|
1416
|
-
case
|
|
1416
|
+
case Xe.requires_attention:
|
|
1417
1417
|
return F.hitl;
|
|
1418
|
-
case
|
|
1419
|
-
case
|
|
1418
|
+
case Xe.in_progress:
|
|
1419
|
+
case Xe.available:
|
|
1420
1420
|
return F["generating-a-response"];
|
|
1421
1421
|
case F.failed:
|
|
1422
1422
|
case F.complete:
|
|
@@ -1426,21 +1426,21 @@ const On = (t) => {
|
|
|
1426
1426
|
default:
|
|
1427
1427
|
return F["generating-a-response"];
|
|
1428
1428
|
}
|
|
1429
|
-
},
|
|
1429
|
+
}, St = (t) => ({
|
|
1430
1430
|
ref: t.name,
|
|
1431
1431
|
display_name: t.display_name,
|
|
1432
1432
|
agent_intent: t.agent_intent ?? "",
|
|
1433
1433
|
description: t.description
|
|
1434
|
-
}),
|
|
1434
|
+
}), fa = (t) => ({
|
|
1435
1435
|
id: t.id,
|
|
1436
1436
|
name: t.name,
|
|
1437
1437
|
...t.has_run_before ? { hasRunBefore: t.has_run_before } : {}
|
|
1438
|
-
}),
|
|
1438
|
+
}), Mn = new Set(Object.values(pe)), Un = (t) => t && Mn.has(t) ? t : pe.LINK, $n = (t) => ({
|
|
1439
1439
|
uri: t.uri ?? "",
|
|
1440
|
-
type:
|
|
1440
|
+
type: Un(t.type),
|
|
1441
1441
|
name: t.name ?? "",
|
|
1442
1442
|
description: t.description ?? ""
|
|
1443
|
-
}),
|
|
1443
|
+
}), bt = (t) => (Array.isArray(t) ? t : t.resources ?? []).map($n), Hn = (t) => ({
|
|
1444
1444
|
actionLog: (t.action_log ?? []).map((e) => ({
|
|
1445
1445
|
timestamp: e.timestamp,
|
|
1446
1446
|
type: e.type,
|
|
@@ -1451,7 +1451,7 @@ const On = (t) => {
|
|
|
1451
1451
|
sessionId: e.session_id,
|
|
1452
1452
|
timestamp: e.timestamp
|
|
1453
1453
|
}))
|
|
1454
|
-
}),
|
|
1454
|
+
}), dt = (t) => {
|
|
1455
1455
|
var a;
|
|
1456
1456
|
const e = t.invocation_id ?? t.id;
|
|
1457
1457
|
return {
|
|
@@ -1463,73 +1463,73 @@ const On = (t) => {
|
|
|
1463
1463
|
application_id: t.application_id,
|
|
1464
1464
|
...t.application_name ? { application_name: t.application_name } : {},
|
|
1465
1465
|
created_by: t.created_by,
|
|
1466
|
-
status:
|
|
1466
|
+
status: xn(t.status),
|
|
1467
1467
|
context_ref: t.context_ref ?? null,
|
|
1468
1468
|
checklist_ref: t.checklist_ref ?? null
|
|
1469
1469
|
};
|
|
1470
|
-
},
|
|
1470
|
+
}, Ct = (t) => {
|
|
1471
1471
|
var e;
|
|
1472
1472
|
return {
|
|
1473
|
-
task: t.task ?? t.name ?? t.label ??
|
|
1474
|
-
status:
|
|
1473
|
+
task: t.task ?? t.name ?? t.label ?? Yt,
|
|
1474
|
+
status: Dn(t.status),
|
|
1475
1475
|
description: t.description ?? "",
|
|
1476
1476
|
...t.prompt ? { prompt: t.prompt } : {},
|
|
1477
1477
|
...(e = t.follow_up_prompts) != null && e.length ? { clarificationPrompts: t.follow_up_prompts } : {}
|
|
1478
1478
|
};
|
|
1479
|
-
},
|
|
1479
|
+
}, Bn = (t) => Array.isArray(t) ? t : t.checklist_items ?? t.checklist ?? t.items ?? [], Tt = (t, e, a) => {
|
|
1480
1480
|
var l;
|
|
1481
|
-
const s = !Array.isArray(e) && (e.opening_message || (l = e.opening_follow_up_prompts) != null && l.length) ? e : a, r = s ?
|
|
1481
|
+
const s = !Array.isArray(e) && (e.opening_message || (l = e.opening_follow_up_prompts) != null && l.length) ? e : a, r = s ? Fe(s) : void 0;
|
|
1482
1482
|
return {
|
|
1483
1483
|
invocation_id: t,
|
|
1484
|
-
checklist:
|
|
1484
|
+
checklist: Bn(e).map(Ct),
|
|
1485
1485
|
...r ? { openingMessage: r } : {}
|
|
1486
1486
|
};
|
|
1487
|
-
},
|
|
1488
|
-
const a =
|
|
1487
|
+
}, Fn = (t, e) => {
|
|
1488
|
+
const a = Fe(e);
|
|
1489
1489
|
return {
|
|
1490
1490
|
invocation_id: e.invocation_id ?? t,
|
|
1491
|
-
checklist: (e.checklist_items ?? []).map(
|
|
1491
|
+
checklist: (e.checklist_items ?? []).map(Ct),
|
|
1492
1492
|
...a ? { openingMessage: a } : {}
|
|
1493
1493
|
};
|
|
1494
|
-
},
|
|
1494
|
+
}, Fe = (t) => {
|
|
1495
1495
|
var a, s;
|
|
1496
1496
|
const e = (a = t.opening_message) == null ? void 0 : a.trim();
|
|
1497
1497
|
if (e)
|
|
1498
1498
|
return {
|
|
1499
|
-
id:
|
|
1499
|
+
id: vt,
|
|
1500
1500
|
author: ne.agent,
|
|
1501
1501
|
text: e,
|
|
1502
1502
|
...(s = t.opening_follow_up_prompts) != null && s.length ? { followUpPrompts: t.opening_follow_up_prompts } : {}
|
|
1503
1503
|
};
|
|
1504
|
-
},
|
|
1504
|
+
}, zn = (t) => t.filter(
|
|
1505
1505
|
(e) => (e.role === "user" || e.role === "assistant") && typeof e.content == "string" && e.content.length > 0 && e.message_type !== "tool_request"
|
|
1506
1506
|
).map((e) => ({
|
|
1507
1507
|
id: e.message_id,
|
|
1508
1508
|
author: e.role === "user" ? ne.user : ne.agent,
|
|
1509
1509
|
text: e.content
|
|
1510
|
-
})),
|
|
1511
|
-
id:
|
|
1510
|
+
})), Gn = {
|
|
1511
|
+
id: vt,
|
|
1512
1512
|
author: ne.agent,
|
|
1513
1513
|
text: "Type a question or upload a file. You can ask it how it's progressing, or send an instruction and it'll act on it."
|
|
1514
1514
|
};
|
|
1515
|
-
let
|
|
1516
|
-
const
|
|
1515
|
+
let gt = 0;
|
|
1516
|
+
const qn = (t) => (gt += 1, `${t}-${Date.now()}-${gt}`), Kn = (t) => {
|
|
1517
1517
|
const e = t.destination ? ` to ${t.destination}` : "";
|
|
1518
1518
|
return `Let's get started on ${t.tripName.trim() || t.destination.trim() || "this task"}${e}. What will you do first?`;
|
|
1519
1519
|
};
|
|
1520
|
-
class
|
|
1520
|
+
class Wn {
|
|
1521
1521
|
constructor(e, a, s = {}) {
|
|
1522
|
-
this.seededChecklist = [], this.client = e, this.agentId = a, this.chatId = s.chatId ?? a, this.opening = s.openingMessage ??
|
|
1522
|
+
this.seededChecklist = [], this.client = e, this.agentId = a, this.chatId = s.chatId ?? a, this.opening = s.openingMessage ?? Gn, this.model = s.model;
|
|
1523
1523
|
}
|
|
1524
1524
|
openingMessage() {
|
|
1525
1525
|
return this.opening;
|
|
1526
1526
|
}
|
|
1527
1527
|
async bootstrapConversation() {
|
|
1528
|
-
const e = await this.client.getConversation(this.chatId), a =
|
|
1528
|
+
const e = await this.client.getConversation(this.chatId), a = zn(e.messages);
|
|
1529
1529
|
return a.length === 0 ? [this.opening] : a;
|
|
1530
1530
|
}
|
|
1531
1531
|
async start(e) {
|
|
1532
|
-
return { ...await this.exchange(
|
|
1532
|
+
return { ...await this.exchange(Kn(e)), phase: B.running };
|
|
1533
1533
|
}
|
|
1534
1534
|
sendMessage(e, a) {
|
|
1535
1535
|
return this.exchange(e, a);
|
|
@@ -1541,7 +1541,7 @@ class Gn {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
async exchange(e, a) {
|
|
1543
1543
|
var i;
|
|
1544
|
-
const s = [{ role:
|
|
1544
|
+
const s = [{ role: En.user, content: e }], r = await this.client.chat(
|
|
1545
1545
|
this.agentId,
|
|
1546
1546
|
{
|
|
1547
1547
|
messages: s,
|
|
@@ -1555,39 +1555,39 @@ class Gn {
|
|
|
1555
1555
|
},
|
|
1556
1556
|
...a && a.length > 0 ? [{ uploadFiles: a }] : []
|
|
1557
1557
|
), l = {
|
|
1558
|
-
id: r.event_id ||
|
|
1558
|
+
id: r.event_id || qn("msg-agent"),
|
|
1559
1559
|
author: ne.agent,
|
|
1560
1560
|
text: r.message.content,
|
|
1561
1561
|
...(i = r.follow_up_prompts) != null && i.length ? { followUpPrompts: r.follow_up_prompts } : {}
|
|
1562
1562
|
};
|
|
1563
1563
|
try {
|
|
1564
|
-
const d = await this.client.getAgent(this.agentId), { checklist: c } =
|
|
1564
|
+
const d = await this.client.getAgent(this.agentId), { checklist: c } = Fn(this.agentId, d);
|
|
1565
1565
|
return this.seededChecklist = c, { message: l, checklist: c };
|
|
1566
1566
|
} catch {
|
|
1567
1567
|
return { message: l, ...this.seededChecklist.length ? { checklist: this.seededChecklist } : {} };
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
|
-
const
|
|
1571
|
+
const Et = (t, e) => (a) => {
|
|
1572
1572
|
var s, r;
|
|
1573
|
-
return new
|
|
1573
|
+
return new Wn(t, a.invocation_id, {
|
|
1574
1574
|
model: e == null ? void 0 : e.model,
|
|
1575
1575
|
chatId: ((s = e == null ? void 0 : e.resolveChatId) == null ? void 0 : s.call(e, a)) ?? (e == null ? void 0 : e.chatId) ?? a.invocation_id,
|
|
1576
1576
|
openingMessage: ((r = e == null ? void 0 : e.resolveOpeningMessage) == null ? void 0 : r.call(e, a)) ?? (e == null ? void 0 : e.openingMessage)
|
|
1577
1577
|
});
|
|
1578
|
-
},
|
|
1578
|
+
}, Rt = (t) => t instanceof Te ? t.message : t instanceof TypeError ? "Network error while contacting the agent service." : t instanceof Error && t.message ? t.message : yt, Jn = (t) => {
|
|
1579
1579
|
const e = {};
|
|
1580
1580
|
for (const a of t) {
|
|
1581
|
-
const s =
|
|
1581
|
+
const s = Fe(a);
|
|
1582
1582
|
if (!s)
|
|
1583
1583
|
continue;
|
|
1584
1584
|
const r = a.invocation_id ?? a.id;
|
|
1585
1585
|
e[r] = s, e[a.id] = s;
|
|
1586
1586
|
}
|
|
1587
1587
|
return e;
|
|
1588
|
-
},
|
|
1589
|
-
const { jwt: e, headers: a, urls: s } = t, r = JSON.stringify(a ?? {}), l =
|
|
1590
|
-
() => new
|
|
1588
|
+
}, Vn = (t) => JSON.stringify(t), et = (t, e) => JSON.stringify(t) === JSON.stringify(e), jn = (t) => {
|
|
1589
|
+
const { jwt: e, headers: a, urls: s } = t, r = JSON.stringify(a ?? {}), l = Vn(s), i = W(
|
|
1590
|
+
() => new nt({
|
|
1591
1591
|
token: e,
|
|
1592
1592
|
headers: a,
|
|
1593
1593
|
urls: s
|
|
@@ -1595,27 +1595,27 @@ const St = (t, e) => (a) => {
|
|
|
1595
1595
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- keyed on serialised config to keep a stable client.
|
|
1596
1596
|
[e, l]
|
|
1597
1597
|
);
|
|
1598
|
-
|
|
1598
|
+
He(() => {
|
|
1599
1599
|
i.setHeaders(a);
|
|
1600
1600
|
}, [i, r]);
|
|
1601
|
-
const [d, c] = f([]), [p,
|
|
1601
|
+
const [d, c] = f([]), [p, _] = f(
|
|
1602
1602
|
[]
|
|
1603
|
-
), [g,
|
|
1603
|
+
), [g, v] = f({}), [b, w] = f("loading"), [R, C] = f(null), [M, y] = f(0), N = x(
|
|
1604
1604
|
(O, E) => {
|
|
1605
|
-
const H = O.map(
|
|
1605
|
+
const H = O.map(dt), V = E.map(St), Y = Jn(O);
|
|
1606
1606
|
c(
|
|
1607
|
-
(
|
|
1608
|
-
), m(
|
|
1609
|
-
(x) => Xe(x, V) ? x : V
|
|
1607
|
+
(D) => et(D, H) ? D : H
|
|
1610
1608
|
), _(
|
|
1611
|
-
(
|
|
1612
|
-
), v(
|
|
1609
|
+
(D) => et(D, V) ? D : V
|
|
1610
|
+
), v(
|
|
1611
|
+
(D) => et(D, Y) ? D : Y
|
|
1612
|
+
), w("idle"), C(null);
|
|
1613
1613
|
},
|
|
1614
1614
|
[]
|
|
1615
1615
|
);
|
|
1616
1616
|
K(() => {
|
|
1617
1617
|
let O = !1;
|
|
1618
|
-
return
|
|
1618
|
+
return w("loading"), C(null), (async () => {
|
|
1619
1619
|
try {
|
|
1620
1620
|
const [E, H] = await Promise.all([
|
|
1621
1621
|
i.listAgents(),
|
|
@@ -1627,15 +1627,15 @@ const St = (t, e) => (a) => {
|
|
|
1627
1627
|
} catch (E) {
|
|
1628
1628
|
if (O)
|
|
1629
1629
|
return;
|
|
1630
|
-
c([]),
|
|
1630
|
+
c([]), _([]), v({}), w("error"), C(Rt(E));
|
|
1631
1631
|
}
|
|
1632
1632
|
})(), () => {
|
|
1633
1633
|
O = !0;
|
|
1634
1634
|
};
|
|
1635
|
-
}, [N, i,
|
|
1636
|
-
const u =
|
|
1635
|
+
}, [N, i, M]);
|
|
1636
|
+
const u = x(() => {
|
|
1637
1637
|
y((O) => O + 1);
|
|
1638
|
-
}, []), I =
|
|
1638
|
+
}, []), I = x(async () => {
|
|
1639
1639
|
try {
|
|
1640
1640
|
const [O, E] = await Promise.all([
|
|
1641
1641
|
i.listAgents(),
|
|
@@ -1644,42 +1644,42 @@ const St = (t, e) => (a) => {
|
|
|
1644
1644
|
N(O, E);
|
|
1645
1645
|
} catch {
|
|
1646
1646
|
}
|
|
1647
|
-
}, [N, i]), $ =
|
|
1647
|
+
}, [N, i]), $ = x(
|
|
1648
1648
|
async (O) => {
|
|
1649
1649
|
const [E, H] = await Promise.all([
|
|
1650
1650
|
i.getAgentChecklist(O),
|
|
1651
1651
|
i.getAgent(O).catch(() => null)
|
|
1652
1652
|
]);
|
|
1653
|
-
return
|
|
1653
|
+
return Tt(
|
|
1654
1654
|
O,
|
|
1655
1655
|
E,
|
|
1656
1656
|
H ?? void 0
|
|
1657
1657
|
);
|
|
1658
1658
|
},
|
|
1659
1659
|
[i]
|
|
1660
|
-
), A =
|
|
1660
|
+
), A = x(
|
|
1661
1661
|
async (O) => {
|
|
1662
1662
|
const E = await i.getAgentResources(O);
|
|
1663
|
-
return
|
|
1663
|
+
return bt(E);
|
|
1664
1664
|
},
|
|
1665
1665
|
[i]
|
|
1666
|
-
),
|
|
1666
|
+
), U = x(
|
|
1667
1667
|
async ({
|
|
1668
1668
|
definition: O,
|
|
1669
1669
|
invocationName: E
|
|
1670
1670
|
}) => {
|
|
1671
1671
|
const H = await i.createAgent(O.ref, {
|
|
1672
1672
|
invocationName: E
|
|
1673
|
-
}), V = await i.getAgent(H.id), Y =
|
|
1674
|
-
return c((j) => [Y, ...j]),
|
|
1673
|
+
}), V = await i.getAgent(H.id), Y = dt(V), D = Fe(V);
|
|
1674
|
+
return c((j) => [Y, ...j]), D && v((j) => ({
|
|
1675
1675
|
...j,
|
|
1676
|
-
[Y.invocation_id]:
|
|
1677
|
-
[Y.id]:
|
|
1676
|
+
[Y.invocation_id]: D,
|
|
1677
|
+
[Y.id]: D
|
|
1678
1678
|
})), Y;
|
|
1679
1679
|
},
|
|
1680
1680
|
[i]
|
|
1681
1681
|
), ee = W(
|
|
1682
|
-
() =>
|
|
1682
|
+
() => Et(i, {
|
|
1683
1683
|
resolveOpeningMessage: (O) => g[O.invocation_id] ?? g[O.id]
|
|
1684
1684
|
}),
|
|
1685
1685
|
[i, g]
|
|
@@ -1693,12 +1693,12 @@ const St = (t, e) => (a) => {
|
|
|
1693
1693
|
refresh: I,
|
|
1694
1694
|
fetchAgentChecklist: $,
|
|
1695
1695
|
fetchAgentResources: A,
|
|
1696
|
-
createAgent:
|
|
1696
|
+
createAgent: U,
|
|
1697
1697
|
chatConnector: ee
|
|
1698
1698
|
};
|
|
1699
|
-
},
|
|
1700
|
-
const { agent: e, jwt: a, headers: s, urls: r, chatId: l } = t, i = JSON.stringify(s ?? {}), d =
|
|
1701
|
-
() => new
|
|
1699
|
+
}, Yn = (t) => JSON.stringify(t), Xn = (t) => {
|
|
1700
|
+
const { agent: e, jwt: a, headers: s, urls: r, chatId: l } = t, i = JSON.stringify(s ?? {}), d = Yn(r), c = W(
|
|
1701
|
+
() => new nt({
|
|
1702
1702
|
token: a,
|
|
1703
1703
|
headers: s,
|
|
1704
1704
|
urls: {
|
|
@@ -1713,38 +1713,38 @@ const St = (t, e) => (a) => {
|
|
|
1713
1713
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- keyed on serialised config to keep a stable client.
|
|
1714
1714
|
[a, d]
|
|
1715
1715
|
);
|
|
1716
|
-
|
|
1716
|
+
He(() => {
|
|
1717
1717
|
c.setHeaders(s);
|
|
1718
1718
|
}, [c, i]);
|
|
1719
|
-
const p =
|
|
1719
|
+
const p = x(
|
|
1720
1720
|
async (b) => {
|
|
1721
|
-
const [
|
|
1721
|
+
const [w, R] = await Promise.all([
|
|
1722
1722
|
c.getAgentChecklist(b),
|
|
1723
1723
|
c.getAgent(b).catch(() => null)
|
|
1724
1724
|
]);
|
|
1725
|
-
return
|
|
1725
|
+
return Tt(
|
|
1726
1726
|
b,
|
|
1727
|
-
|
|
1727
|
+
w,
|
|
1728
1728
|
R ?? void 0
|
|
1729
1729
|
);
|
|
1730
1730
|
},
|
|
1731
1731
|
[c]
|
|
1732
|
-
),
|
|
1732
|
+
), _ = x(
|
|
1733
1733
|
async (b) => {
|
|
1734
|
-
const
|
|
1735
|
-
return
|
|
1734
|
+
const w = await c.getAgentResources(b);
|
|
1735
|
+
return bt(w);
|
|
1736
1736
|
},
|
|
1737
1737
|
[c]
|
|
1738
|
-
), g =
|
|
1738
|
+
), g = x(
|
|
1739
1739
|
async (b) => {
|
|
1740
|
-
const
|
|
1741
|
-
return
|
|
1740
|
+
const w = await c.getAgentTimeline(b);
|
|
1741
|
+
return Hn(w);
|
|
1742
1742
|
},
|
|
1743
1743
|
[c]
|
|
1744
1744
|
);
|
|
1745
1745
|
return {
|
|
1746
1746
|
connector: W(
|
|
1747
|
-
() =>
|
|
1747
|
+
() => Et(c, {
|
|
1748
1748
|
chatId: l ?? e.invocation_id
|
|
1749
1749
|
})(e),
|
|
1750
1750
|
// Key on invocation/chat ids so a new Agent object reference does not rebuild the connector.
|
|
@@ -1752,13 +1752,13 @@ const St = (t, e) => (a) => {
|
|
|
1752
1752
|
[c, e.invocation_id, l]
|
|
1753
1753
|
),
|
|
1754
1754
|
fetchAgentChecklist: p,
|
|
1755
|
-
fetchAgentResources:
|
|
1755
|
+
fetchAgentResources: _,
|
|
1756
1756
|
fetchAgentTimeline: g
|
|
1757
1757
|
};
|
|
1758
|
-
},
|
|
1758
|
+
}, Qn = 3e4, Zn = (t, e) => {
|
|
1759
1759
|
const a = t.hasRunBefore ? e || "This trip" : t.tripName.trim() || "A new trip", s = t.destination ? ` to ${t.destination}` : "", r = t.hasRunBefore ? " It has run before." : "";
|
|
1760
1760
|
return `${a}${s}.${r}`.trim();
|
|
1761
|
-
},
|
|
1761
|
+
}, ea = (t) => {
|
|
1762
1762
|
switch (t) {
|
|
1763
1763
|
case T.failed:
|
|
1764
1764
|
return B.stopped;
|
|
@@ -1767,12 +1767,12 @@ const St = (t, e) => (a) => {
|
|
|
1767
1767
|
default:
|
|
1768
1768
|
return B.running;
|
|
1769
1769
|
}
|
|
1770
|
-
},
|
|
1771
|
-
e([
|
|
1772
|
-
},
|
|
1770
|
+
}, ht = (t, e) => {
|
|
1771
|
+
e([he(t)]);
|
|
1772
|
+
}, ta = (t, e) => t.length === e.length && t.every((a, s) => {
|
|
1773
1773
|
const r = e[s];
|
|
1774
1774
|
return r !== void 0 && a.id === r.id && a.text === r.text;
|
|
1775
|
-
}),
|
|
1775
|
+
}), na = ({
|
|
1776
1776
|
agent: t,
|
|
1777
1777
|
invocationId: e,
|
|
1778
1778
|
open: a,
|
|
@@ -1783,179 +1783,188 @@ const St = (t, e) => (a) => {
|
|
|
1783
1783
|
agentChecklistUrl: d,
|
|
1784
1784
|
agentResourcesUrl: c,
|
|
1785
1785
|
agentTimelineUrl: p,
|
|
1786
|
-
agentChatUrl:
|
|
1786
|
+
agentChatUrl: _,
|
|
1787
1787
|
agentConversationUrl: g,
|
|
1788
|
-
chatId:
|
|
1788
|
+
chatId: v,
|
|
1789
1789
|
enableUpload: b,
|
|
1790
|
-
initialBrief:
|
|
1790
|
+
initialBrief: w,
|
|
1791
1791
|
initialPhase: R,
|
|
1792
1792
|
initialChecklist: C
|
|
1793
1793
|
}) => {
|
|
1794
|
-
const [
|
|
1794
|
+
const [M, y] = f(v ?? e), [N, u] = f("chat"), [I, $] = f(!1), { connector: A, fetchAgentChecklist: U, fetchAgentResources: ee, fetchAgentTimeline: O } = Xn({
|
|
1795
1795
|
agent: { ...t, invocation_id: e },
|
|
1796
1796
|
jwt: r,
|
|
1797
1797
|
headers: l,
|
|
1798
|
-
chatId:
|
|
1798
|
+
chatId: M,
|
|
1799
1799
|
urls: {
|
|
1800
1800
|
agentUrl: i,
|
|
1801
1801
|
agentChecklistUrl: d,
|
|
1802
1802
|
agentResourcesUrl: c,
|
|
1803
1803
|
agentTimelineUrl: p,
|
|
1804
|
-
agentChatUrl:
|
|
1804
|
+
agentChatUrl: _,
|
|
1805
1805
|
agentConversationUrl: g
|
|
1806
1806
|
}
|
|
1807
|
-
}), E =
|
|
1808
|
-
R ?? (
|
|
1809
|
-
), [Y,
|
|
1807
|
+
}), E = _e(A), [H, V] = f(
|
|
1808
|
+
R ?? (w ? B.running : ea(t.status))
|
|
1809
|
+
), [Y, D] = f([]), [j, re] = f(0), [ze, ve] = f(), [ce, we] = f(null), [de, Ge] = f([]), [Re, ae] = f(!1), [Ie, ye] = f(null), [ie, Oe] = f(null), [qe, Ne] = f(!1), [Ke, ke] = f(null), [We, Ae] = f(C ?? null), [Je, Se] = f(!1), [Le, h] = f(null), [S, k] = f(!1), [z, oe] = f(!1), [te, le] = f(!1), be = _e(S);
|
|
1810
1810
|
K(() => {
|
|
1811
1811
|
E.current = A;
|
|
1812
1812
|
}, [A]), K(() => {
|
|
1813
|
-
|
|
1813
|
+
be.current = S;
|
|
1814
1814
|
}, [S]), K(() => {
|
|
1815
|
-
y(
|
|
1816
|
-
}, [e,
|
|
1817
|
-
if (!a ||
|
|
1815
|
+
y(v ?? e), u("chat"), $(!1), D([]), re((m) => m + 1);
|
|
1816
|
+
}, [e, v]), K(() => {
|
|
1817
|
+
if (!a || w)
|
|
1818
1818
|
return;
|
|
1819
|
-
const
|
|
1820
|
-
if (!
|
|
1821
|
-
|
|
1819
|
+
const m = E.current.bootstrapConversation;
|
|
1820
|
+
if (!m) {
|
|
1821
|
+
ht(E.current.openingMessage(), D);
|
|
1822
1822
|
return;
|
|
1823
1823
|
}
|
|
1824
|
-
let
|
|
1824
|
+
let L = !1;
|
|
1825
1825
|
return k(!0), (async () => {
|
|
1826
1826
|
try {
|
|
1827
|
-
const X = await
|
|
1828
|
-
if (
|
|
1827
|
+
const X = await m.call(E.current);
|
|
1828
|
+
if (L)
|
|
1829
1829
|
return;
|
|
1830
|
-
|
|
1830
|
+
D(X.map(he));
|
|
1831
1831
|
} catch {
|
|
1832
|
-
|
|
1832
|
+
L || ht(E.current.openingMessage(), D);
|
|
1833
1833
|
} finally {
|
|
1834
|
-
|
|
1834
|
+
L || k(!1);
|
|
1835
1835
|
}
|
|
1836
1836
|
})(), () => {
|
|
1837
|
-
|
|
1837
|
+
L = !0;
|
|
1838
1838
|
};
|
|
1839
|
-
}, [a,
|
|
1840
|
-
if (!a ||
|
|
1839
|
+
}, [a, w, e, M]), K(() => {
|
|
1840
|
+
if (!a || w)
|
|
1841
1841
|
return;
|
|
1842
|
-
const
|
|
1843
|
-
const
|
|
1844
|
-
|
|
1842
|
+
const m = window.setInterval(() => {
|
|
1843
|
+
const L = E.current.bootstrapConversation;
|
|
1844
|
+
L && (async () => {
|
|
1845
1845
|
try {
|
|
1846
|
-
const X = await
|
|
1847
|
-
if (
|
|
1846
|
+
const X = await L.call(E.current);
|
|
1847
|
+
if (be.current)
|
|
1848
1848
|
return;
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
(
|
|
1849
|
+
const Ce = X.map(he);
|
|
1850
|
+
D(
|
|
1851
|
+
(st) => ta(st, Ce) ? st : Ce
|
|
1852
1852
|
);
|
|
1853
1853
|
} catch {
|
|
1854
1854
|
}
|
|
1855
1855
|
})();
|
|
1856
|
-
},
|
|
1856
|
+
}, Qn);
|
|
1857
1857
|
return () => {
|
|
1858
|
-
window.clearInterval(
|
|
1858
|
+
window.clearInterval(m);
|
|
1859
1859
|
};
|
|
1860
|
-
}, [a,
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1860
|
+
}, [a, w, e, M]);
|
|
1861
|
+
const Ot = x((m) => {
|
|
1862
|
+
m.checklist && Ae(m.checklist), m.phase && V(m.phase);
|
|
1863
1863
|
}, []);
|
|
1864
1864
|
K(() => {
|
|
1865
|
-
var
|
|
1866
|
-
!a ||
|
|
1867
|
-
}, [a,
|
|
1868
|
-
if (!a ||
|
|
1865
|
+
var m, L;
|
|
1866
|
+
!a || w || C && C.length > 0 && ((L = (m = E.current).seedChecklist) == null || L.call(m, C));
|
|
1867
|
+
}, [a, w, C]), K(() => {
|
|
1868
|
+
if (!a || w)
|
|
1869
1869
|
return;
|
|
1870
|
-
let
|
|
1871
|
-
return
|
|
1872
|
-
var
|
|
1870
|
+
let m = !1;
|
|
1871
|
+
return Se(!(C != null && C.length)), h(null), (async () => {
|
|
1872
|
+
var L, X;
|
|
1873
1873
|
try {
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1874
|
+
const Ce = await U(e);
|
|
1875
|
+
if (m)
|
|
1876
1876
|
return;
|
|
1877
|
-
C != null && C.length || (
|
|
1877
|
+
C != null && C.length || (Ae(Ce.checklist), (X = (L = E.current).seedChecklist) == null || X.call(L, Ce.checklist));
|
|
1878
1878
|
} catch {
|
|
1879
|
-
!
|
|
1879
|
+
!m && !(C != null && C.length) && h(Me);
|
|
1880
1880
|
} finally {
|
|
1881
|
-
|
|
1881
|
+
m || Se(!1);
|
|
1882
1882
|
}
|
|
1883
1883
|
})(), () => {
|
|
1884
|
-
|
|
1884
|
+
m = !0;
|
|
1885
1885
|
};
|
|
1886
|
-
}, [a, e,
|
|
1886
|
+
}, [a, e, w, C, U]), K(() => {
|
|
1887
1887
|
if (!a || !c)
|
|
1888
1888
|
return;
|
|
1889
|
-
let
|
|
1890
|
-
return ae(!0),
|
|
1889
|
+
let m = !1;
|
|
1890
|
+
return ae(!0), ye(null), (async () => {
|
|
1891
1891
|
try {
|
|
1892
|
-
const
|
|
1893
|
-
|
|
1892
|
+
const L = await ee(e);
|
|
1893
|
+
m || Ge(L);
|
|
1894
1894
|
} catch {
|
|
1895
|
-
|
|
1895
|
+
m || ye(Vt);
|
|
1896
1896
|
} finally {
|
|
1897
|
-
|
|
1897
|
+
m || ae(!1);
|
|
1898
1898
|
}
|
|
1899
1899
|
})(), () => {
|
|
1900
|
-
|
|
1900
|
+
m = !0;
|
|
1901
1901
|
};
|
|
1902
1902
|
}, [a, e, c, ee]), K(() => {
|
|
1903
1903
|
if (!a || !p)
|
|
1904
1904
|
return;
|
|
1905
|
-
let
|
|
1906
|
-
return
|
|
1905
|
+
let m = !1;
|
|
1906
|
+
return Ne(!0), ke(null), (async () => {
|
|
1907
1907
|
try {
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1908
|
+
const L = await O(e);
|
|
1909
|
+
m || Oe(L);
|
|
1910
1910
|
} catch {
|
|
1911
|
-
|
|
1911
|
+
m || ke(wt);
|
|
1912
1912
|
} finally {
|
|
1913
|
-
|
|
1913
|
+
m || Ne(!1);
|
|
1914
1914
|
}
|
|
1915
1915
|
})(), () => {
|
|
1916
|
-
|
|
1916
|
+
m = !0;
|
|
1917
1917
|
};
|
|
1918
1918
|
}, [a, e, p, O]), K(() => {
|
|
1919
|
-
if (!a || !
|
|
1919
|
+
if (!a || !w)
|
|
1920
1920
|
return;
|
|
1921
|
-
let
|
|
1922
|
-
const
|
|
1921
|
+
let m = !1;
|
|
1922
|
+
const L = {
|
|
1923
1923
|
id: `user-brief-${Date.now()}`,
|
|
1924
1924
|
author: ne.user,
|
|
1925
|
-
text:
|
|
1925
|
+
text: Zn(w, t.invocation_name)
|
|
1926
1926
|
};
|
|
1927
1927
|
return (async () => {
|
|
1928
|
-
const X = await E.current.start(
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
]), X.checklist &&
|
|
1928
|
+
const X = await E.current.start(w);
|
|
1929
|
+
m || (D([
|
|
1930
|
+
he(E.current.openingMessage()),
|
|
1931
|
+
he(L),
|
|
1932
|
+
he(X.message)
|
|
1933
|
+
]), X.checklist && Ae(X.checklist), V(X.phase ?? B.running));
|
|
1934
1934
|
})(), () => {
|
|
1935
|
-
|
|
1935
|
+
m = !0;
|
|
1936
1936
|
};
|
|
1937
|
-
}, [a,
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1940
|
-
}, []),
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
u("chat"), $(!1), y(
|
|
1944
|
-
}, [
|
|
1945
|
-
|
|
1946
|
-
|
|
1937
|
+
}, [a, w, t.invocation_name, e]);
|
|
1938
|
+
const Lt = x((m) => {
|
|
1939
|
+
we(bn(m));
|
|
1940
|
+
}, []), Ve = v ?? e, Pe = ie == null ? void 0 : ie.chatSessions, at = Pe != null && Pe.length ? Pe.reduce(
|
|
1941
|
+
(m, L) => Date.parse(L.timestamp) < Date.parse(m.timestamp) ? L : m
|
|
1942
|
+
).sessionId : void 0, je = x(() => {
|
|
1943
|
+
u("chat"), $(!1), M !== Ve && (y(Ve), D([]), re((m) => m + 1));
|
|
1944
|
+
}, [M, Ve]), Pt = x(
|
|
1945
|
+
(m) => {
|
|
1946
|
+
if (m === at) {
|
|
1947
|
+
je();
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1950
|
+
y(m), $(!0), u("chat"), D([]), re((L) => L + 1);
|
|
1951
|
+
},
|
|
1952
|
+
[at, je]
|
|
1953
|
+
), xt = x((m) => {
|
|
1954
|
+
we(null), ve(m), re((L) => L + 1);
|
|
1955
|
+
}, []), Dt = x(async () => {
|
|
1947
1956
|
await E.current.stop(), V(B.stopped);
|
|
1948
|
-
}, []),
|
|
1957
|
+
}, []), Mt = We;
|
|
1949
1958
|
return /* @__PURE__ */ o(se, { open: a, closeHandler: s, hideCloseButton: !0, className: "agent-workspace", children: [
|
|
1950
1959
|
/* @__PURE__ */ o(se.Header, { className: "agent-workspace__header", children: [
|
|
1951
1960
|
/* @__PURE__ */ o("div", { className: "agent-workspace__header-title", children: [
|
|
1952
|
-
/* @__PURE__ */ n("span", { className: "agent-workspace__header-avatar", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1961
|
+
/* @__PURE__ */ n("span", { className: "agent-workspace__header-avatar", "aria-hidden": "true", children: /* @__PURE__ */ n(P, { name: "ask-arbor", size: 24 }) }),
|
|
1953
1962
|
/* @__PURE__ */ n(se.Title, { children: t.invocation_name }),
|
|
1954
1963
|
/* @__PURE__ */ n(
|
|
1955
1964
|
"span",
|
|
1956
1965
|
{
|
|
1957
1966
|
className: J("agent-workspace__phase", `agent-workspace__phase--${H}`),
|
|
1958
|
-
children:
|
|
1967
|
+
children: Xt[H]
|
|
1959
1968
|
}
|
|
1960
1969
|
)
|
|
1961
1970
|
] }),
|
|
@@ -1968,7 +1977,7 @@ const St = (t, e) => (a) => {
|
|
|
1968
1977
|
iconLeftName: "clipboard-list",
|
|
1969
1978
|
iconLeftScreenReaderText: "Toggle checklist",
|
|
1970
1979
|
"aria-pressed": !z,
|
|
1971
|
-
onClick: () =>
|
|
1980
|
+
onClick: () => oe((m) => !m),
|
|
1972
1981
|
children: "Checklist"
|
|
1973
1982
|
}
|
|
1974
1983
|
),
|
|
@@ -1980,7 +1989,7 @@ const St = (t, e) => (a) => {
|
|
|
1980
1989
|
iconLeftName: "files",
|
|
1981
1990
|
iconLeftScreenReaderText: "Toggle resources",
|
|
1982
1991
|
"aria-pressed": !te,
|
|
1983
|
-
onClick: () =>
|
|
1992
|
+
onClick: () => le((m) => !m),
|
|
1984
1993
|
children: "Resources"
|
|
1985
1994
|
}
|
|
1986
1995
|
),
|
|
@@ -2015,7 +2024,7 @@ const St = (t, e) => (a) => {
|
|
|
2015
2024
|
"aria-label": "Agent",
|
|
2016
2025
|
children: [
|
|
2017
2026
|
/* @__PURE__ */ o("div", { className: "agent-workspace__panel-header", children: [
|
|
2018
|
-
/* @__PURE__ */ n(
|
|
2027
|
+
/* @__PURE__ */ n(fe, { level: 4, children: "Agent" }),
|
|
2019
2028
|
H === B.running && /* @__PURE__ */ n(
|
|
2020
2029
|
Z,
|
|
2021
2030
|
{
|
|
@@ -2024,14 +2033,14 @@ const St = (t, e) => (a) => {
|
|
|
2024
2033
|
size: "S",
|
|
2025
2034
|
iconLeftName: "circle-x",
|
|
2026
2035
|
iconLeftScreenReaderText: "Stop",
|
|
2027
|
-
onClick: () => void
|
|
2036
|
+
onClick: () => void Dt(),
|
|
2028
2037
|
children: "Stop agent"
|
|
2029
2038
|
}
|
|
2030
2039
|
)
|
|
2031
2040
|
] }),
|
|
2032
|
-
p && /* @__PURE__ */ o(
|
|
2041
|
+
p && /* @__PURE__ */ o(Ye, { className: "agent-workspace__center-tabs", "aria-label": "Center panel", children: [
|
|
2033
2042
|
/* @__PURE__ */ n(
|
|
2034
|
-
|
|
2043
|
+
Ye.Item,
|
|
2035
2044
|
{
|
|
2036
2045
|
active: N === "chat",
|
|
2037
2046
|
tabElementProps: {
|
|
@@ -2042,7 +2051,7 @@ const St = (t, e) => (a) => {
|
|
|
2042
2051
|
}
|
|
2043
2052
|
),
|
|
2044
2053
|
/* @__PURE__ */ n(
|
|
2045
|
-
|
|
2054
|
+
Ye.Item,
|
|
2046
2055
|
{
|
|
2047
2056
|
active: N === "timeline",
|
|
2048
2057
|
tabElementProps: {
|
|
@@ -2060,17 +2069,17 @@ const St = (t, e) => (a) => {
|
|
|
2060
2069
|
size: "S",
|
|
2061
2070
|
iconLeftName: "arrow-left",
|
|
2062
2071
|
iconLeftScreenReaderText: "Back to main chat",
|
|
2063
|
-
onClick:
|
|
2072
|
+
onClick: je,
|
|
2064
2073
|
children: "Back to main chat"
|
|
2065
2074
|
}
|
|
2066
2075
|
) }),
|
|
2067
2076
|
p && N === "timeline" && /* @__PURE__ */ n(
|
|
2068
|
-
|
|
2077
|
+
An,
|
|
2069
2078
|
{
|
|
2070
|
-
timeline:
|
|
2071
|
-
isLoading:
|
|
2072
|
-
error:
|
|
2073
|
-
onOpenChatSession:
|
|
2079
|
+
timeline: ie,
|
|
2080
|
+
isLoading: qe,
|
|
2081
|
+
error: Ke,
|
|
2082
|
+
onOpenChatSession: Pt
|
|
2074
2083
|
}
|
|
2075
2084
|
),
|
|
2076
2085
|
/* @__PURE__ */ n(
|
|
@@ -2079,19 +2088,19 @@ const St = (t, e) => (a) => {
|
|
|
2079
2088
|
className: "agent-workspace__chat-keep-alive",
|
|
2080
2089
|
hidden: !!p && N !== "chat",
|
|
2081
2090
|
children: /* @__PURE__ */ n(
|
|
2082
|
-
|
|
2091
|
+
hn,
|
|
2083
2092
|
{
|
|
2084
2093
|
connector: A,
|
|
2085
2094
|
phase: H,
|
|
2086
2095
|
chatHistory: Y,
|
|
2087
2096
|
chatSessionKey: j,
|
|
2088
|
-
startQuery:
|
|
2089
|
-
clarificationMessage:
|
|
2097
|
+
startQuery: ze,
|
|
2098
|
+
clarificationMessage: ce,
|
|
2090
2099
|
enableUpload: b,
|
|
2091
|
-
onTurn:
|
|
2100
|
+
onTurn: Ot,
|
|
2092
2101
|
onAwaitingChange: k,
|
|
2093
|
-
onClarificationPrompt:
|
|
2094
|
-
onDismissClarification: () =>
|
|
2102
|
+
onClarificationPrompt: xt,
|
|
2103
|
+
onDismissClarification: () => we(null)
|
|
2095
2104
|
}
|
|
2096
2105
|
)
|
|
2097
2106
|
}
|
|
@@ -2100,29 +2109,29 @@ const St = (t, e) => (a) => {
|
|
|
2100
2109
|
}
|
|
2101
2110
|
),
|
|
2102
2111
|
!z && /* @__PURE__ */ n(
|
|
2103
|
-
|
|
2112
|
+
pn,
|
|
2104
2113
|
{
|
|
2105
|
-
checklist:
|
|
2106
|
-
isLoading:
|
|
2114
|
+
checklist: Mt,
|
|
2115
|
+
isLoading: Je,
|
|
2107
2116
|
error: Le,
|
|
2108
2117
|
phase: H,
|
|
2109
2118
|
canRequestInput: H === B.running && !S,
|
|
2110
|
-
onAttentionItemClick:
|
|
2119
|
+
onAttentionItemClick: Lt
|
|
2111
2120
|
}
|
|
2112
2121
|
),
|
|
2113
2122
|
!te && /* @__PURE__ */ n(
|
|
2114
|
-
|
|
2123
|
+
mn,
|
|
2115
2124
|
{
|
|
2116
|
-
resources:
|
|
2117
|
-
isLoading:
|
|
2118
|
-
error:
|
|
2125
|
+
resources: de,
|
|
2126
|
+
isLoading: Re,
|
|
2127
|
+
error: Ie
|
|
2119
2128
|
}
|
|
2120
2129
|
)
|
|
2121
2130
|
]
|
|
2122
2131
|
}
|
|
2123
2132
|
)
|
|
2124
2133
|
] });
|
|
2125
|
-
},
|
|
2134
|
+
}, aa = "Unable to load agent definitions. Please try again.", sa = "Unable to start the agent.", pt = "Loading agents…", It = ({
|
|
2126
2135
|
open: t,
|
|
2127
2136
|
onClose: e,
|
|
2128
2137
|
onStart: a,
|
|
@@ -2132,53 +2141,53 @@ const St = (t, e) => (a) => {
|
|
|
2132
2141
|
onRetryDefinitions: i,
|
|
2133
2142
|
embedded: d = !1
|
|
2134
2143
|
}) => {
|
|
2135
|
-
const c = s[0], [p,
|
|
2144
|
+
const c = s[0], [p, _] = f(c), [g, v] = f(""), [b, w] = f(!1), [R, C] = f(null), M = [...s].sort((A, U) => A.display_name.localeCompare(U.display_name)).map((A) => ({
|
|
2136
2145
|
value: A.ref,
|
|
2137
|
-
label: A.
|
|
2146
|
+
label: A.display_name
|
|
2138
2147
|
}));
|
|
2139
2148
|
K(() => {
|
|
2140
|
-
t && (
|
|
2149
|
+
t && (_(c), v(""), w(!1), C(null));
|
|
2141
2150
|
}, [t, c]);
|
|
2142
|
-
const y = p !== void 0 && g.trim().length > 0, N =
|
|
2151
|
+
const y = p !== void 0 && g.trim().length > 0, N = x(
|
|
2143
2152
|
(A) => {
|
|
2144
|
-
const
|
|
2145
|
-
|
|
2153
|
+
const U = s.find((ee) => ee.ref === A[0]);
|
|
2154
|
+
U && _(U);
|
|
2146
2155
|
},
|
|
2147
2156
|
[s]
|
|
2148
|
-
), u =
|
|
2157
|
+
), u = x(async () => {
|
|
2149
2158
|
if (!(!p || !y || b)) {
|
|
2150
|
-
|
|
2159
|
+
w(!0), C(null);
|
|
2151
2160
|
try {
|
|
2152
2161
|
await a({ definition: p, invocationName: g.trim() });
|
|
2153
2162
|
} catch (A) {
|
|
2154
|
-
C(A instanceof Error ? A.message :
|
|
2163
|
+
C(A instanceof Error ? A.message : sa);
|
|
2155
2164
|
} finally {
|
|
2156
|
-
|
|
2165
|
+
w(!1);
|
|
2157
2166
|
}
|
|
2158
2167
|
}
|
|
2159
2168
|
}, [y, p, g, b, a]);
|
|
2160
2169
|
if (r === "idle" && s.length === 0 || !t)
|
|
2161
2170
|
return null;
|
|
2162
2171
|
const I = /* @__PURE__ */ o("div", { className: "new-agent__header-title", children: [
|
|
2163
|
-
/* @__PURE__ */ n("span", { className: "new-agent__header-avatar", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
2172
|
+
/* @__PURE__ */ n("span", { className: "new-agent__header-avatar", "aria-hidden": "true", children: /* @__PURE__ */ n(P, { name: "ask-arbor", size: 24 }) }),
|
|
2164
2173
|
d ? /* @__PURE__ */ n("h2", { className: "new-agent__title", children: "Start an agent" }) : /* @__PURE__ */ n(se.Title, { children: "Start an agent" })
|
|
2165
2174
|
] });
|
|
2166
2175
|
let $;
|
|
2167
2176
|
return r === "loading" ? $ = /* @__PURE__ */ o("div", { className: "new-agent__state", "aria-live": "polite", children: [
|
|
2168
2177
|
/* @__PURE__ */ n(
|
|
2169
|
-
|
|
2178
|
+
P,
|
|
2170
2179
|
{
|
|
2171
2180
|
name: "loader",
|
|
2172
2181
|
size: 24,
|
|
2173
2182
|
color: "var(--color-brand-600)",
|
|
2174
2183
|
className: "new-agent__spinner",
|
|
2175
|
-
screenReaderText:
|
|
2184
|
+
screenReaderText: pt
|
|
2176
2185
|
}
|
|
2177
2186
|
),
|
|
2178
|
-
/* @__PURE__ */ n("p", { className: "new-agent__state-message", children:
|
|
2187
|
+
/* @__PURE__ */ n("p", { className: "new-agent__state-message", children: pt })
|
|
2179
2188
|
] }) : r === "error" ? $ = /* @__PURE__ */ o("div", { className: "new-agent__state new-agent__state--error", role: "alert", children: [
|
|
2180
|
-
/* @__PURE__ */ n(
|
|
2181
|
-
/* @__PURE__ */ n("p", { className: "new-agent__state-message", children: l ??
|
|
2189
|
+
/* @__PURE__ */ n(P, { name: "triangle-alert", size: 24, color: "var(--color-semantic-destructive-600)" }),
|
|
2190
|
+
/* @__PURE__ */ n("p", { className: "new-agent__state-message", children: l ?? aa }),
|
|
2182
2191
|
i ? /* @__PURE__ */ n(Z, { variant: "secondary", size: "S", onClick: i, children: "Try again" }) : null
|
|
2183
2192
|
] }) : p ? $ = /* @__PURE__ */ o(
|
|
2184
2193
|
"form",
|
|
@@ -2192,11 +2201,11 @@ const St = (t, e) => (a) => {
|
|
|
2192
2201
|
/* @__PURE__ */ o("div", { className: "new-agent__type-field", children: [
|
|
2193
2202
|
/* @__PURE__ */ n("label", { className: "new-agent__type-label", htmlFor: "new-agent-type", children: "What would you like your agent to do?" }),
|
|
2194
2203
|
/* @__PURE__ */ n(
|
|
2195
|
-
|
|
2204
|
+
Ut,
|
|
2196
2205
|
{
|
|
2197
2206
|
id: "new-agent-type",
|
|
2198
|
-
placeholder: "Choose an
|
|
2199
|
-
options:
|
|
2207
|
+
placeholder: "Choose an agent",
|
|
2208
|
+
options: M,
|
|
2200
2209
|
selectedValues: [p.ref],
|
|
2201
2210
|
onSelectionChange: N
|
|
2202
2211
|
}
|
|
@@ -2206,12 +2215,12 @@ const St = (t, e) => (a) => {
|
|
|
2206
2215
|
/* @__PURE__ */ o("div", { className: "new-agent__type-field", children: [
|
|
2207
2216
|
/* @__PURE__ */ n("label", { className: "new-agent__type-label", htmlFor: "new-agent-invocation-name", children: "Name" }),
|
|
2208
2217
|
/* @__PURE__ */ n(
|
|
2209
|
-
|
|
2218
|
+
$t,
|
|
2210
2219
|
{
|
|
2211
2220
|
id: "new-agent-invocation-name",
|
|
2212
2221
|
value: g,
|
|
2213
2222
|
placeholder: "What would you like to call your agent?",
|
|
2214
|
-
onChange: (A) =>
|
|
2223
|
+
onChange: (A) => v(A.target.value)
|
|
2215
2224
|
}
|
|
2216
2225
|
)
|
|
2217
2226
|
] }),
|
|
@@ -2236,9 +2245,9 @@ const St = (t, e) => (a) => {
|
|
|
2236
2245
|
/* @__PURE__ */ n(se.Header, { className: "new-agent__header", children: I }),
|
|
2237
2246
|
/* @__PURE__ */ n(se.Body, { className: "new-agent__body", children: $ })
|
|
2238
2247
|
] });
|
|
2239
|
-
},
|
|
2248
|
+
}, ut = (t) => {
|
|
2240
2249
|
window.location.assign(t);
|
|
2241
|
-
},
|
|
2250
|
+
}, ra = ({
|
|
2242
2251
|
open: t,
|
|
2243
2252
|
authToken: e,
|
|
2244
2253
|
headers: a,
|
|
@@ -2250,8 +2259,8 @@ const St = (t, e) => (a) => {
|
|
|
2250
2259
|
onStart: c,
|
|
2251
2260
|
embedded: p = !1
|
|
2252
2261
|
}) => {
|
|
2253
|
-
const
|
|
2254
|
-
() => new
|
|
2262
|
+
const _ = JSON.stringify(a ?? {}), g = W(
|
|
2263
|
+
() => new nt({
|
|
2255
2264
|
token: e,
|
|
2256
2265
|
headers: a,
|
|
2257
2266
|
urls: {
|
|
@@ -2260,54 +2269,54 @@ const St = (t, e) => (a) => {
|
|
|
2260
2269
|
}
|
|
2261
2270
|
}),
|
|
2262
2271
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- keyed on serialised config to keep a stable client.
|
|
2263
|
-
[e, s, r,
|
|
2264
|
-
), [
|
|
2272
|
+
[e, s, r, _]
|
|
2273
|
+
), [v, b] = f([]), [w, R] = f("loading"), [C, M] = f(null), [y, N] = f(0);
|
|
2265
2274
|
K(() => {
|
|
2266
2275
|
if (!t)
|
|
2267
2276
|
return;
|
|
2268
2277
|
let A = !1;
|
|
2269
|
-
return R("loading"),
|
|
2278
|
+
return R("loading"), M(null), (async () => {
|
|
2270
2279
|
try {
|
|
2271
|
-
const
|
|
2280
|
+
const U = await g.listAgentDefinitions();
|
|
2272
2281
|
if (A)
|
|
2273
2282
|
return;
|
|
2274
|
-
b(
|
|
2275
|
-
} catch (
|
|
2283
|
+
b(U.map(St)), R("idle");
|
|
2284
|
+
} catch (U) {
|
|
2276
2285
|
if (A)
|
|
2277
2286
|
return;
|
|
2278
|
-
b([]),
|
|
2287
|
+
b([]), M(Rt(U)), R("error");
|
|
2279
2288
|
}
|
|
2280
2289
|
})(), () => {
|
|
2281
2290
|
A = !0;
|
|
2282
2291
|
};
|
|
2283
2292
|
}, [g, t, y]);
|
|
2284
|
-
const u =
|
|
2285
|
-
d == null || d(), l &&
|
|
2286
|
-
}, [l, d]), I =
|
|
2293
|
+
const u = x(() => {
|
|
2294
|
+
d == null || d(), l && ut(l);
|
|
2295
|
+
}, [l, d]), I = x(
|
|
2287
2296
|
async (A) => {
|
|
2288
2297
|
await g.createAgent(A.definition.ref, {
|
|
2289
2298
|
invocationName: A.invocationName
|
|
2290
|
-
}), c == null || c(A), i &&
|
|
2299
|
+
}), c == null || c(A), i && ut(i);
|
|
2291
2300
|
},
|
|
2292
2301
|
[g, c, i]
|
|
2293
|
-
), $ =
|
|
2302
|
+
), $ = x(() => {
|
|
2294
2303
|
N((A) => A + 1);
|
|
2295
2304
|
}, []);
|
|
2296
2305
|
return /* @__PURE__ */ n(
|
|
2297
|
-
|
|
2306
|
+
It,
|
|
2298
2307
|
{
|
|
2299
2308
|
open: t,
|
|
2300
2309
|
onClose: u,
|
|
2301
2310
|
onStart: I,
|
|
2302
|
-
agentDefinitions:
|
|
2303
|
-
definitionsState:
|
|
2311
|
+
agentDefinitions: v,
|
|
2312
|
+
definitionsState: w,
|
|
2304
2313
|
definitionsError: C,
|
|
2305
2314
|
onRetryDefinitions: $,
|
|
2306
2315
|
embedded: p
|
|
2307
2316
|
}
|
|
2308
2317
|
);
|
|
2309
|
-
},
|
|
2310
|
-
|
|
2318
|
+
}, ia = (t) => "agentDefinitionsUrl" in t, oa = (t) => ia(t) ? /* @__PURE__ */ n(ra, { ...t }) : /* @__PURE__ */ n(It, { ...t }), la = (t) => t !== void 0 && t.some((e) => e.status === F.hitl), ca = (t, e) => la(e) ? T.hitl : t.status, da = ({ column: t, label: e }) => t.statusIcon ? /* @__PURE__ */ n("span", { className: "agent-view__status-indicator", children: /* @__PURE__ */ n(
|
|
2319
|
+
P,
|
|
2311
2320
|
{
|
|
2312
2321
|
name: t.statusIcon.name,
|
|
2313
2322
|
size: 16,
|
|
@@ -2323,9 +2332,9 @@ const St = (t, e) => (a) => {
|
|
|
2323
2332
|
className: J("agent-view__dot", {
|
|
2324
2333
|
[`agent-view__dot--${t.dotModifier}`]: t.dotModifier
|
|
2325
2334
|
}),
|
|
2326
|
-
children: /* @__PURE__ */ n(
|
|
2335
|
+
children: /* @__PURE__ */ n(_t, { colour: t.dotColour, label: e })
|
|
2327
2336
|
}
|
|
2328
|
-
),
|
|
2337
|
+
), ga = ({
|
|
2329
2338
|
agent: t,
|
|
2330
2339
|
agentName: e,
|
|
2331
2340
|
column: a,
|
|
@@ -2336,30 +2345,30 @@ const St = (t, e) => (a) => {
|
|
|
2336
2345
|
onToggle: d,
|
|
2337
2346
|
onViewAgent: c
|
|
2338
2347
|
}) => {
|
|
2339
|
-
const { id: p, invocation_name:
|
|
2348
|
+
const { id: p, invocation_name: _ } = t, g = `agent-card-${p}-header`, v = `agent-card-${p}-progress`;
|
|
2340
2349
|
return /* @__PURE__ */ n(
|
|
2341
2350
|
"li",
|
|
2342
2351
|
{
|
|
2343
2352
|
className: J("agent-view__card", {
|
|
2344
2353
|
"agent-view__card--expanded": s
|
|
2345
2354
|
}),
|
|
2346
|
-
children: /* @__PURE__ */ o(
|
|
2355
|
+
children: /* @__PURE__ */ o(Ht, { spacing: "dense", children: [
|
|
2347
2356
|
/* @__PURE__ */ n(
|
|
2348
2357
|
"button",
|
|
2349
2358
|
{
|
|
2350
2359
|
type: "button",
|
|
2351
2360
|
className: "agent-view__card-toggle",
|
|
2352
2361
|
"aria-expanded": s,
|
|
2353
|
-
"aria-controls":
|
|
2354
|
-
"aria-label":
|
|
2362
|
+
"aria-controls": v,
|
|
2363
|
+
"aria-label": _,
|
|
2355
2364
|
id: g,
|
|
2356
2365
|
onClick: () => d(p),
|
|
2357
2366
|
children: /* @__PURE__ */ o("div", { className: "agent-view__card-content", children: [
|
|
2358
|
-
/* @__PURE__ */ n(
|
|
2359
|
-
/* @__PURE__ */ n("span", { className: "agent-view__card-invocation-name", children:
|
|
2367
|
+
/* @__PURE__ */ n(da, { column: a }),
|
|
2368
|
+
/* @__PURE__ */ n("span", { className: "agent-view__card-invocation-name", children: _ }),
|
|
2360
2369
|
/* @__PURE__ */ n("span", { className: "agent-view__card-agent-name", children: e }),
|
|
2361
2370
|
/* @__PURE__ */ n(
|
|
2362
|
-
|
|
2371
|
+
P,
|
|
2363
2372
|
{
|
|
2364
2373
|
name: s ? "chevron-up" : "chevron-down",
|
|
2365
2374
|
size: 16,
|
|
@@ -2372,37 +2381,37 @@ const St = (t, e) => (a) => {
|
|
|
2372
2381
|
s && /* @__PURE__ */ o(
|
|
2373
2382
|
"div",
|
|
2374
2383
|
{
|
|
2375
|
-
id:
|
|
2384
|
+
id: v,
|
|
2376
2385
|
"aria-labelledby": g,
|
|
2377
2386
|
className: "agent-view__card-progress",
|
|
2378
2387
|
children: [
|
|
2379
2388
|
r && /* @__PURE__ */ o("div", { className: "agent-view__progress-loading", "aria-live": "polite", children: [
|
|
2380
2389
|
/* @__PURE__ */ n(
|
|
2381
|
-
|
|
2390
|
+
P,
|
|
2382
2391
|
{
|
|
2383
2392
|
name: "loader",
|
|
2384
2393
|
size: 16,
|
|
2385
2394
|
color: "var(--color-brand-600)",
|
|
2386
2395
|
className: "agent-view__progress-icon--spinning",
|
|
2387
|
-
screenReaderText:
|
|
2396
|
+
screenReaderText: ue
|
|
2388
2397
|
}
|
|
2389
2398
|
),
|
|
2390
|
-
/* @__PURE__ */ n("span", { children:
|
|
2399
|
+
/* @__PURE__ */ n("span", { children: ue })
|
|
2391
2400
|
] }),
|
|
2392
2401
|
!r && i && /* @__PURE__ */ n("p", { className: "agent-view__progress-error", role: "alert", children: i }),
|
|
2393
|
-
!r && !i && l !== null && /* @__PURE__ */ n(
|
|
2402
|
+
!r && !i && l !== null && /* @__PURE__ */ n(cn, { checklist: l }),
|
|
2394
2403
|
!r && !i && l === null && /* @__PURE__ */ o("div", { className: "agent-view__progress-loading", "aria-live": "polite", children: [
|
|
2395
2404
|
/* @__PURE__ */ n(
|
|
2396
|
-
|
|
2405
|
+
P,
|
|
2397
2406
|
{
|
|
2398
2407
|
name: "loader",
|
|
2399
2408
|
size: 16,
|
|
2400
2409
|
color: "var(--color-brand-600)",
|
|
2401
2410
|
className: "agent-view__progress-icon--spinning",
|
|
2402
|
-
screenReaderText:
|
|
2411
|
+
screenReaderText: ue
|
|
2403
2412
|
}
|
|
2404
2413
|
),
|
|
2405
|
-
/* @__PURE__ */ n("span", { children:
|
|
2414
|
+
/* @__PURE__ */ n("span", { children: ue })
|
|
2406
2415
|
] }),
|
|
2407
2416
|
/* @__PURE__ */ n("div", { className: "agent-view__card-actions", children: /* @__PURE__ */ n(
|
|
2408
2417
|
Z,
|
|
@@ -2419,7 +2428,7 @@ const St = (t, e) => (a) => {
|
|
|
2419
2428
|
] })
|
|
2420
2429
|
}
|
|
2421
2430
|
);
|
|
2422
|
-
},
|
|
2431
|
+
}, mt = ({
|
|
2423
2432
|
column: t,
|
|
2424
2433
|
agents: e,
|
|
2425
2434
|
expandedAgentId: a,
|
|
@@ -2439,27 +2448,27 @@ const St = (t, e) => (a) => {
|
|
|
2439
2448
|
"aria-label": t.title,
|
|
2440
2449
|
children: [
|
|
2441
2450
|
/* @__PURE__ */ o("div", { className: "agent-view__column-header", children: [
|
|
2442
|
-
/* @__PURE__ */ n(
|
|
2451
|
+
/* @__PURE__ */ n(fe, { level: 4, children: t.title }),
|
|
2443
2452
|
/* @__PURE__ */ n("span", { className: "agent-view__column-count", children: e.length })
|
|
2444
2453
|
] }),
|
|
2445
|
-
/* @__PURE__ */ n("ul", { className: "agent-view__card-list", children: e.map((
|
|
2446
|
-
|
|
2454
|
+
/* @__PURE__ */ n("ul", { className: "agent-view__card-list", children: e.map((_) => /* @__PURE__ */ n(
|
|
2455
|
+
ga,
|
|
2447
2456
|
{
|
|
2448
|
-
agent:
|
|
2449
|
-
agentName:
|
|
2457
|
+
agent: _,
|
|
2458
|
+
agentName: tt(_, i),
|
|
2450
2459
|
column: t,
|
|
2451
|
-
isExpanded: a ===
|
|
2452
|
-
isLoading: s ===
|
|
2453
|
-
checklist: r[
|
|
2454
|
-
error: l[
|
|
2460
|
+
isExpanded: a === _.id,
|
|
2461
|
+
isLoading: s === _.id,
|
|
2462
|
+
checklist: r[_.invocation_id] ?? null,
|
|
2463
|
+
error: l[_.id] ?? null,
|
|
2455
2464
|
onToggle: d,
|
|
2456
2465
|
onViewAgent: c
|
|
2457
2466
|
},
|
|
2458
|
-
|
|
2467
|
+
_.id
|
|
2459
2468
|
)) })
|
|
2460
2469
|
]
|
|
2461
2470
|
}
|
|
2462
|
-
),
|
|
2471
|
+
), tt = (t, e) => e.get(t.agent_definition_ref) ?? t.agent_definition_ref.replace(/_/g, " "), va = ({
|
|
2463
2472
|
jwt: t,
|
|
2464
2473
|
headers: e,
|
|
2465
2474
|
agentDefinitionsUrl: a,
|
|
@@ -2470,9 +2479,9 @@ const St = (t, e) => (a) => {
|
|
|
2470
2479
|
agentTimelineUrl: d,
|
|
2471
2480
|
agentChatUrl: c,
|
|
2472
2481
|
agentConversationUrl: p,
|
|
2473
|
-
enableUpload:
|
|
2482
|
+
enableUpload: _,
|
|
2474
2483
|
showHeader: g = !1,
|
|
2475
|
-
institutions:
|
|
2484
|
+
institutions: v
|
|
2476
2485
|
}) => {
|
|
2477
2486
|
var Le;
|
|
2478
2487
|
const b = W(
|
|
@@ -2496,11 +2505,11 @@ const St = (t, e) => (a) => {
|
|
|
2496
2505
|
c,
|
|
2497
2506
|
p
|
|
2498
2507
|
]
|
|
2499
|
-
), [
|
|
2500
|
-
(h) => h.applicationId ===
|
|
2501
|
-
)) == null ? void 0 : Le.applicationUrl : void 0,
|
|
2508
|
+
), [w, R] = f(null), C = w ? (Le = v == null ? void 0 : v.find(
|
|
2509
|
+
(h) => h.applicationId === w.application_id
|
|
2510
|
+
)) == null ? void 0 : Le.applicationUrl : void 0, M = W(() => {
|
|
2502
2511
|
const h = { ...e ?? {} };
|
|
2503
|
-
return C ? h[
|
|
2512
|
+
return C ? h[me.arborApplicationUrl] = C : delete h[me.arborApplicationUrl], h;
|
|
2504
2513
|
}, [e, C]), {
|
|
2505
2514
|
agents: y,
|
|
2506
2515
|
agentDefinitions: N,
|
|
@@ -2508,11 +2517,11 @@ const St = (t, e) => (a) => {
|
|
|
2508
2517
|
loadError: I,
|
|
2509
2518
|
reload: $,
|
|
2510
2519
|
refresh: A,
|
|
2511
|
-
fetchAgentChecklist:
|
|
2520
|
+
fetchAgentChecklist: U,
|
|
2512
2521
|
createAgent: ee
|
|
2513
|
-
} =
|
|
2522
|
+
} = jn({ jwt: t, headers: M, urls: b }), [O, E] = f(!1), [H, V] = f(null), [Y, D] = f(null), [j, re] = f({}), [ze, ve] = f({}), [ce, we] = f([]), [de, Ge] = f([]), Re = W(() => {
|
|
2514
2523
|
const h = new Set(y.map((k) => k.application_id)), S = new Map(
|
|
2515
|
-
(
|
|
2524
|
+
(v ?? []).map((k) => [k.applicationId, k.name])
|
|
2516
2525
|
);
|
|
2517
2526
|
return [...h].sort(
|
|
2518
2527
|
(k, z) => (S.get(k) ?? k).localeCompare(S.get(z) ?? z)
|
|
@@ -2520,15 +2529,15 @@ const St = (t, e) => (a) => {
|
|
|
2520
2529
|
value: k,
|
|
2521
2530
|
label: S.get(k) ?? k
|
|
2522
2531
|
}));
|
|
2523
|
-
}, [y,
|
|
2532
|
+
}, [y, v]), ae = W(
|
|
2524
2533
|
() => new Map(N.map((h) => [h.ref, h.display_name])),
|
|
2525
2534
|
[N]
|
|
2526
|
-
),
|
|
2527
|
-
y.map((S) =>
|
|
2535
|
+
), Ie = W(() => [...new Set(
|
|
2536
|
+
y.map((S) => tt(S, ae))
|
|
2528
2537
|
)].sort((S, k) => S.localeCompare(k)).map((S) => ({
|
|
2529
2538
|
value: S,
|
|
2530
2539
|
label: S
|
|
2531
|
-
})), [y, ae]),
|
|
2540
|
+
})), [y, ae]), ye = W(() => y.filter((h) => !(ce.length > 0 && !ce.includes(h.application_id) || de.length > 0 && !de.includes(tt(h, ae)))), [y, ae, de, ce]), ie = Re.length > 1, Oe = Ie.length > 1, qe = ie || Oe;
|
|
2532
2541
|
K(() => {
|
|
2533
2542
|
const h = window.setInterval(() => {
|
|
2534
2543
|
A();
|
|
@@ -2543,7 +2552,7 @@ const St = (t, e) => (a) => {
|
|
|
2543
2552
|
return (async () => {
|
|
2544
2553
|
const S = await Promise.allSettled(
|
|
2545
2554
|
y.map(async (k) => {
|
|
2546
|
-
const z = await
|
|
2555
|
+
const z = await U(k.invocation_id);
|
|
2547
2556
|
return {
|
|
2548
2557
|
agentId: k.id,
|
|
2549
2558
|
invocationId: k.invocation_id,
|
|
@@ -2553,91 +2562,91 @@ const St = (t, e) => (a) => {
|
|
|
2553
2562
|
);
|
|
2554
2563
|
h || (re((k) => {
|
|
2555
2564
|
const z = { ...k };
|
|
2556
|
-
let
|
|
2565
|
+
let oe = !1;
|
|
2557
2566
|
for (const te of S) {
|
|
2558
2567
|
if (te.status !== "fulfilled")
|
|
2559
2568
|
continue;
|
|
2560
|
-
const { invocationId:
|
|
2561
|
-
JSON.stringify(k[
|
|
2569
|
+
const { invocationId: le, checklist: be } = te.value;
|
|
2570
|
+
JSON.stringify(k[le]) !== JSON.stringify(be) && (z[le] = be, oe = !0);
|
|
2562
2571
|
}
|
|
2563
|
-
return
|
|
2564
|
-
}),
|
|
2572
|
+
return oe ? z : k;
|
|
2573
|
+
}), ve((k) => {
|
|
2565
2574
|
const z = { ...k };
|
|
2566
|
-
let
|
|
2567
|
-
return S.forEach((te,
|
|
2568
|
-
te.status === "rejected" && z[y[
|
|
2569
|
-
}),
|
|
2575
|
+
let oe = !1;
|
|
2576
|
+
return S.forEach((te, le) => {
|
|
2577
|
+
te.status === "rejected" && z[y[le].id] !== Me && (z[y[le].id] = Me, oe = !0);
|
|
2578
|
+
}), oe ? z : k;
|
|
2570
2579
|
}));
|
|
2571
2580
|
})(), () => {
|
|
2572
2581
|
h = !0;
|
|
2573
2582
|
};
|
|
2574
|
-
}, [y,
|
|
2575
|
-
const
|
|
2583
|
+
}, [y, U]);
|
|
2584
|
+
const Ne = x(
|
|
2576
2585
|
async (h) => {
|
|
2577
2586
|
if (!j[h.invocation_id]) {
|
|
2578
|
-
|
|
2587
|
+
D(h.id), ve((S) => {
|
|
2579
2588
|
const k = { ...S };
|
|
2580
2589
|
return delete k[h.id], k;
|
|
2581
2590
|
});
|
|
2582
2591
|
try {
|
|
2583
|
-
const S = await
|
|
2592
|
+
const S = await U(h.invocation_id);
|
|
2584
2593
|
re((k) => ({
|
|
2585
2594
|
...k,
|
|
2586
2595
|
[h.invocation_id]: S.checklist
|
|
2587
2596
|
}));
|
|
2588
2597
|
} catch {
|
|
2589
|
-
|
|
2598
|
+
ve((S) => ({
|
|
2590
2599
|
...S,
|
|
2591
|
-
[h.id]:
|
|
2600
|
+
[h.id]: Me
|
|
2592
2601
|
}));
|
|
2593
2602
|
} finally {
|
|
2594
|
-
|
|
2603
|
+
D((S) => S === h.id ? null : S);
|
|
2595
2604
|
}
|
|
2596
2605
|
}
|
|
2597
2606
|
},
|
|
2598
|
-
[
|
|
2599
|
-
),
|
|
2607
|
+
[U, j]
|
|
2608
|
+
), Ke = x(
|
|
2600
2609
|
(h) => {
|
|
2601
2610
|
if (H === h) {
|
|
2602
2611
|
V(null);
|
|
2603
2612
|
return;
|
|
2604
2613
|
}
|
|
2605
2614
|
const S = y.find(({ id: k }) => k === h);
|
|
2606
|
-
S && (V(h),
|
|
2615
|
+
S && (V(h), Ne(S));
|
|
2607
2616
|
},
|
|
2608
|
-
[y, H,
|
|
2609
|
-
),
|
|
2617
|
+
[y, H, Ne]
|
|
2618
|
+
), ke = W(() => {
|
|
2610
2619
|
const h = {};
|
|
2611
|
-
for (const S of
|
|
2612
|
-
const k =
|
|
2620
|
+
for (const S of ye) {
|
|
2621
|
+
const k = ca(
|
|
2613
2622
|
S,
|
|
2614
2623
|
j[S.invocation_id]
|
|
2615
2624
|
);
|
|
2616
2625
|
(h[k] ?? (h[k] = [])).push(S);
|
|
2617
2626
|
}
|
|
2618
2627
|
return h;
|
|
2619
|
-
}, [
|
|
2628
|
+
}, [ye, j]), We = x((h) => {
|
|
2620
2629
|
R(h);
|
|
2621
|
-
}, []),
|
|
2630
|
+
}, []), Ae = x(
|
|
2622
2631
|
async (h) => {
|
|
2623
2632
|
const S = await ee(h);
|
|
2624
2633
|
R(S), E(!1);
|
|
2625
2634
|
},
|
|
2626
2635
|
[ee]
|
|
2627
|
-
),
|
|
2636
|
+
), Je = x(() => {
|
|
2628
2637
|
R(null);
|
|
2629
|
-
}, []),
|
|
2638
|
+
}, []), Se = {
|
|
2630
2639
|
expandedAgentId: H,
|
|
2631
2640
|
loadingAgentId: Y,
|
|
2632
2641
|
checklistByInvocationId: j,
|
|
2633
|
-
errorByAgentId:
|
|
2642
|
+
errorByAgentId: ze,
|
|
2634
2643
|
definitionNameByRef: ae,
|
|
2635
|
-
onToggleAgent:
|
|
2636
|
-
onViewAgent:
|
|
2644
|
+
onToggleAgent: Ke,
|
|
2645
|
+
onViewAgent: We
|
|
2637
2646
|
};
|
|
2638
2647
|
return /* @__PURE__ */ o("div", { className: "agent-view-frontend agent-view", children: [
|
|
2639
2648
|
g && /* @__PURE__ */ o("div", { className: "agent-view__header", children: [
|
|
2640
|
-
/* @__PURE__ */ n(
|
|
2649
|
+
/* @__PURE__ */ n(fe, { level: 1, children: "Agents" }),
|
|
2641
2650
|
/* @__PURE__ */ n(
|
|
2642
2651
|
Z,
|
|
2643
2652
|
{
|
|
@@ -2650,8 +2659,8 @@ const St = (t, e) => (a) => {
|
|
|
2650
2659
|
}
|
|
2651
2660
|
)
|
|
2652
2661
|
] }),
|
|
2653
|
-
y.length > 0 &&
|
|
2654
|
-
|
|
2662
|
+
y.length > 0 && qe && /* @__PURE__ */ o("div", { className: "agent-view__filters", children: [
|
|
2663
|
+
ie && /* @__PURE__ */ o("div", { className: "agent-view__filter", children: [
|
|
2655
2664
|
/* @__PURE__ */ n(
|
|
2656
2665
|
"label",
|
|
2657
2666
|
{
|
|
@@ -2661,16 +2670,16 @@ const St = (t, e) => (a) => {
|
|
|
2661
2670
|
}
|
|
2662
2671
|
),
|
|
2663
2672
|
/* @__PURE__ */ n(
|
|
2664
|
-
|
|
2673
|
+
rt,
|
|
2665
2674
|
{
|
|
2666
2675
|
id: "agent-view-institution-filter",
|
|
2667
2676
|
triggerVariant: "button",
|
|
2668
2677
|
multiple: !0,
|
|
2669
2678
|
searchType: "substring",
|
|
2670
2679
|
placeholder: "All institutions",
|
|
2671
|
-
options:
|
|
2672
|
-
value:
|
|
2673
|
-
onValueChange:
|
|
2680
|
+
options: Re,
|
|
2681
|
+
value: ce,
|
|
2682
|
+
onValueChange: we,
|
|
2674
2683
|
showSelectionCountBadge: !0,
|
|
2675
2684
|
showClearAll: !0,
|
|
2676
2685
|
clearAllLabel: "Clear institutions"
|
|
@@ -2687,16 +2696,16 @@ const St = (t, e) => (a) => {
|
|
|
2687
2696
|
}
|
|
2688
2697
|
),
|
|
2689
2698
|
/* @__PURE__ */ n(
|
|
2690
|
-
|
|
2699
|
+
rt,
|
|
2691
2700
|
{
|
|
2692
2701
|
id: "agent-view-agent-filter",
|
|
2693
2702
|
triggerVariant: "button",
|
|
2694
2703
|
multiple: !0,
|
|
2695
2704
|
searchType: "substring",
|
|
2696
2705
|
placeholder: "All agents",
|
|
2697
|
-
options:
|
|
2698
|
-
value:
|
|
2699
|
-
onValueChange:
|
|
2706
|
+
options: Ie,
|
|
2707
|
+
value: de,
|
|
2708
|
+
onValueChange: Ge,
|
|
2700
2709
|
showSelectionCountBadge: !0,
|
|
2701
2710
|
showClearAll: !0,
|
|
2702
2711
|
clearAllLabel: "Clear agents"
|
|
@@ -2706,79 +2715,79 @@ const St = (t, e) => (a) => {
|
|
|
2706
2715
|
] }),
|
|
2707
2716
|
u === "error" ? /* @__PURE__ */ o("div", { className: "agent-view__state agent-view__state--error", role: "alert", children: [
|
|
2708
2717
|
/* @__PURE__ */ n(
|
|
2709
|
-
|
|
2718
|
+
P,
|
|
2710
2719
|
{
|
|
2711
2720
|
name: "triangle-alert",
|
|
2712
2721
|
size: 24,
|
|
2713
2722
|
color: "var(--color-semantic-destructive-600)"
|
|
2714
2723
|
}
|
|
2715
2724
|
),
|
|
2716
|
-
/* @__PURE__ */ n("p", { className: "agent-view__state-message", children: I ??
|
|
2725
|
+
/* @__PURE__ */ n("p", { className: "agent-view__state-message", children: I ?? yt }),
|
|
2717
2726
|
/* @__PURE__ */ n(Z, { variant: "secondary", size: "S", onClick: $, children: "Try again" })
|
|
2718
2727
|
] }) : u === "loading" && y.length === 0 ? /* @__PURE__ */ o("div", { className: "agent-view__state", "aria-live": "polite", children: [
|
|
2719
2728
|
/* @__PURE__ */ n(
|
|
2720
|
-
|
|
2729
|
+
P,
|
|
2721
2730
|
{
|
|
2722
2731
|
name: "loader",
|
|
2723
2732
|
size: 24,
|
|
2724
2733
|
color: "var(--color-brand-600)",
|
|
2725
2734
|
className: "agent-view__progress-icon--spinning",
|
|
2726
|
-
screenReaderText:
|
|
2735
|
+
screenReaderText: ot
|
|
2727
2736
|
}
|
|
2728
2737
|
),
|
|
2729
|
-
/* @__PURE__ */ n("p", { className: "agent-view__state-message", children:
|
|
2730
|
-
] }) : y.length === 0 ? /* @__PURE__ */ n(
|
|
2731
|
-
|
|
2732
|
-
|
|
2738
|
+
/* @__PURE__ */ n("p", { className: "agent-view__state-message", children: ot })
|
|
2739
|
+
] }) : y.length === 0 ? /* @__PURE__ */ n(nn, {}) : /* @__PURE__ */ o("div", { className: "agent-view__board", children: [
|
|
2740
|
+
qt.map((h) => /* @__PURE__ */ n(
|
|
2741
|
+
mt,
|
|
2733
2742
|
{
|
|
2734
|
-
column:
|
|
2735
|
-
agents:
|
|
2736
|
-
...
|
|
2743
|
+
column: Ue[h],
|
|
2744
|
+
agents: ke[h] ?? [],
|
|
2745
|
+
...Se
|
|
2737
2746
|
},
|
|
2738
2747
|
h
|
|
2739
2748
|
)),
|
|
2740
|
-
/* @__PURE__ */ n("div", { className: "agent-view__split-column", children:
|
|
2741
|
-
|
|
2749
|
+
/* @__PURE__ */ n("div", { className: "agent-view__split-column", children: Kt.map((h) => /* @__PURE__ */ n(
|
|
2750
|
+
mt,
|
|
2742
2751
|
{
|
|
2743
|
-
column:
|
|
2744
|
-
agents:
|
|
2752
|
+
column: Ue[h],
|
|
2753
|
+
agents: ke[h] ?? [],
|
|
2745
2754
|
isSplit: !0,
|
|
2746
|
-
...
|
|
2755
|
+
...Se
|
|
2747
2756
|
},
|
|
2748
2757
|
h
|
|
2749
2758
|
)) })
|
|
2750
2759
|
] }),
|
|
2751
|
-
|
|
2752
|
-
|
|
2760
|
+
w && /* @__PURE__ */ n(
|
|
2761
|
+
na,
|
|
2753
2762
|
{
|
|
2754
|
-
agent:
|
|
2755
|
-
invocationId:
|
|
2763
|
+
agent: w,
|
|
2764
|
+
invocationId: w.invocation_id,
|
|
2756
2765
|
open: !0,
|
|
2757
2766
|
jwt: t,
|
|
2758
|
-
headers:
|
|
2767
|
+
headers: M,
|
|
2759
2768
|
agentUrl: r,
|
|
2760
2769
|
agentChecklistUrl: l,
|
|
2761
2770
|
agentResourcesUrl: i,
|
|
2762
2771
|
agentTimelineUrl: d,
|
|
2763
2772
|
agentChatUrl: c,
|
|
2764
2773
|
agentConversationUrl: p,
|
|
2765
|
-
enableUpload:
|
|
2766
|
-
initialChecklist: j[
|
|
2767
|
-
onClose:
|
|
2774
|
+
enableUpload: _,
|
|
2775
|
+
initialChecklist: j[w.invocation_id] ?? null,
|
|
2776
|
+
onClose: Je
|
|
2768
2777
|
},
|
|
2769
|
-
|
|
2778
|
+
w.id
|
|
2770
2779
|
),
|
|
2771
2780
|
/* @__PURE__ */ n(
|
|
2772
|
-
|
|
2781
|
+
oa,
|
|
2773
2782
|
{
|
|
2774
2783
|
open: O,
|
|
2775
2784
|
onClose: () => E(!1),
|
|
2776
|
-
onStart:
|
|
2785
|
+
onStart: Ae,
|
|
2777
2786
|
agentDefinitions: N
|
|
2778
2787
|
}
|
|
2779
2788
|
)
|
|
2780
2789
|
] });
|
|
2781
|
-
},
|
|
2790
|
+
}, wa = (t, e) => {
|
|
2782
2791
|
const a = Date.now(), s = e.trim() || t.agent_intent;
|
|
2783
2792
|
return {
|
|
2784
2793
|
id: `agent-${a}`,
|
|
@@ -2786,35 +2795,35 @@ const St = (t, e) => (a) => {
|
|
|
2786
2795
|
agent_definition_ref: t.ref,
|
|
2787
2796
|
agent_intent: t.agent_intent,
|
|
2788
2797
|
invocation_name: s,
|
|
2789
|
-
application_id:
|
|
2790
|
-
created_by:
|
|
2798
|
+
application_id: Wt,
|
|
2799
|
+
created_by: Jt,
|
|
2791
2800
|
status: T["generating-a-response"],
|
|
2792
2801
|
context_ref: null,
|
|
2793
2802
|
checklist_ref: null
|
|
2794
2803
|
};
|
|
2795
2804
|
};
|
|
2796
2805
|
export {
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2806
|
+
va as AgentMonitorKanban,
|
|
2807
|
+
nt as AgentServiceClient,
|
|
2808
|
+
Te as AgentServiceError,
|
|
2809
|
+
na as AgentView,
|
|
2810
|
+
Wn as HttpChatConnector,
|
|
2811
|
+
oa as NewAgentModal,
|
|
2812
|
+
wa as buildAgentFromDefinition,
|
|
2813
|
+
Et as createHttpChatConnectorFactory,
|
|
2814
|
+
dt as mapApiAgent,
|
|
2815
|
+
St as mapApiAgentDefinition,
|
|
2816
|
+
xn as mapApiAgentStatus,
|
|
2817
|
+
Hn as mapApiAgentTimelineResponse,
|
|
2818
|
+
Tt as mapApiChecklistEndpointResponse,
|
|
2819
|
+
Ct as mapApiChecklistItem,
|
|
2820
|
+
Fn as mapApiChecklistResponse,
|
|
2821
|
+
Dn as mapApiChecklistStatus,
|
|
2822
|
+
zn as mapApiConversationMessages,
|
|
2823
|
+
Fe as mapApiOpeningMessage,
|
|
2824
|
+
$n as mapApiResource,
|
|
2825
|
+
bt as mapApiResourcesEndpointResponse,
|
|
2826
|
+
fa as mapApiTripOption,
|
|
2827
|
+
jn as useAgentService,
|
|
2828
|
+
Xn as useAgentWorkspace
|
|
2820
2829
|
};
|