@invergent/agent-chat-react 2.0.0 → 2.0.1
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 +26 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10780,6 +10780,16 @@ function truncate2(s, max) {
|
|
|
10780
10780
|
return `${s.slice(0, max - 1)}\u2026`;
|
|
10781
10781
|
}
|
|
10782
10782
|
var DEFAULT_POLL_INTERVAL_MS = 5e3;
|
|
10783
|
+
var MISSION_WORKER_KIND_BADGE_CLASS = {
|
|
10784
|
+
task: "border-primary/40 bg-primary/10 text-primary uppercase tracking-wide text-[10px]",
|
|
10785
|
+
worker: "border-foreground/30 bg-foreground/5 text-foreground/80 uppercase tracking-wide text-[10px]",
|
|
10786
|
+
delegation: "border-foreground/20 bg-foreground/[0.03] text-foreground/60 uppercase tracking-wide text-[10px]"
|
|
10787
|
+
};
|
|
10788
|
+
var MISSION_WORKER_KIND_TOOLTIP = {
|
|
10789
|
+
task: "Durable Task row created by spawn_task. Retried by the dispatcher; survives across coordinator wakes.",
|
|
10790
|
+
worker: "Async one-shot session spawned by spawn_worker. Durable session, no retry/DAG.",
|
|
10791
|
+
delegation: "Sync fork-join child spawned by delegate_task. Coordinator's wake blocked until it finished."
|
|
10792
|
+
};
|
|
10783
10793
|
var INITIAL_STATE = {
|
|
10784
10794
|
mission: null,
|
|
10785
10795
|
tasks: [],
|
|
@@ -10866,7 +10876,11 @@ function MissionDashboard({
|
|
|
10866
10876
|
[state.tasks]
|
|
10867
10877
|
);
|
|
10868
10878
|
const runningWorkerCount = react.useMemo(
|
|
10869
|
-
|
|
10879
|
+
// "running" means the child is still consuming compute right now.
|
|
10880
|
+
// For task-backed children that's ``taskStatus === "running"``; for
|
|
10881
|
+
// spawn_worker / delegate_task direct children the Task row doesn't
|
|
10882
|
+
// exist, so fall back to the session-level signal.
|
|
10883
|
+
() => state.workers.filter((w) => w.kind === "task" ? w.taskStatus === "running" : w.sessionStatus === "active").length,
|
|
10870
10884
|
[state.workers]
|
|
10871
10885
|
);
|
|
10872
10886
|
if (state.loading && !state.mission) {
|
|
@@ -10929,7 +10943,7 @@ function MissionDashboard({
|
|
|
10929
10943
|
}
|
|
10930
10944
|
};
|
|
10931
10945
|
const statusVariant = mission.status === "satisfied" ? "default" : mission.status === "failed" || mission.status === "cancelled" ? "destructive" : "secondary";
|
|
10932
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 p-4 sm:gap-6 sm:p-6
|
|
10946
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 p-4 sm:gap-6 sm:p-6", children: [
|
|
10933
10947
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10934
10948
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-stretch gap-4 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
10935
10949
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 min-w-0 flex-1", children: [
|
|
@@ -11077,7 +11091,16 @@ function MissionDashboard({
|
|
|
11077
11091
|
children: [
|
|
11078
11092
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
11079
11093
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11080
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11094
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11095
|
+
Badge,
|
|
11096
|
+
{
|
|
11097
|
+
variant: "outline",
|
|
11098
|
+
className: MISSION_WORKER_KIND_BADGE_CLASS[w.kind],
|
|
11099
|
+
title: MISSION_WORKER_KIND_TOOLTIP[w.kind],
|
|
11100
|
+
children: w.kind
|
|
11101
|
+
}
|
|
11102
|
+
),
|
|
11103
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "text-foreground/70", children: w.kind === "task" ? w.taskStatus ?? "\u2014" : w.sessionStatus }),
|
|
11081
11104
|
w.agentDefName ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground/70", children: w.agentDefName }) : null
|
|
11082
11105
|
] }),
|
|
11083
11106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm wrap-break-word", children: deriveMissionWorkerActivityLabel(w) }),
|