diff --git a/apps/web/src/bench/bench-pill.tsx b/apps/web/src/bench/bench-pill.tsx
index b84232c15..cf3b70d58 100644
--- a/apps/web/src/bench/bench-pill.tsx
+++ b/apps/web/src/bench/bench-pill.tsx
@@ -1,5 +1,6 @@
import { CaretDown } from "@/lib/icons";
import { IdentityAvatar } from "@/chat/avatar";
+import type { WorkerStatus } from "../worker-status";
/** Frosted pill centered over the thread: the bench's worker, its name and
* live status. Toggles the bench drawer. */
@@ -12,7 +13,7 @@ export function BenchPill({
}: {
readonly benchName: string;
readonly worker: { readonly id: string; readonly name: string } | undefined;
- readonly status: string;
+ readonly status: WorkerStatus;
readonly open: boolean;
readonly onToggle: () => void;
}) {
@@ -25,10 +26,15 @@ export function BenchPill({
onClick={onToggle}
>
{worker === undefined ? null : (
-
+
)}
{benchName}
- {status}
+ {status.text}
);
diff --git a/apps/web/src/pages/workbench-page.tsx b/apps/web/src/pages/workbench-page.tsx
index c33eeb8be..07dcda807 100644
--- a/apps/web/src/pages/workbench-page.tsx
+++ b/apps/web/src/pages/workbench-page.tsx
@@ -25,6 +25,7 @@ import {
} from "@/chat/threads-api";
import { BenchDrawer } from "../bench/bench-drawer";
import { BenchPill } from "../bench/bench-pill";
+import { useWorkerStatus } from "../worker-status";
import { GrantsTab } from "../bench/grants-tab";
import { InformationTab } from "../bench/information-tab";
import { ToolsTab } from "../bench/tools-tab";
@@ -174,6 +175,7 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string }
agent.address === "" && agent.assetName !== undefined,
);
const startingAgent = releasedAgents[0];
+ const workerStatus = useWorkerStatus(workbenchTenantId, agents[0]?.id);
// Only a live agent can be addressed, so only one can be mentioned.
const mentionables = agents
.filter((agent) => agent.address.includes("@"))
@@ -230,7 +232,7 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string }
setDrawerOpen((open) => !open)}
/>
@@ -304,7 +306,7 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string }
[],
+ enabled: false,
+ });
+ const approvals = useAPIQuery(
+ tenantId === null ? "" : pendingApprovalsPath(tenantId),
+ TenantApprovalsSchema,
+ );
+
+ const agent = participants.data?.find((p) => p.kind === "agent" && p.id === agentId);
+ if (agent === undefined) return { tone: "idle", text: "Live" };
+ if (agent.address === "") return { tone: "idle", text: "Starting" };
+
+ const needsYou =
+ approvals.kind === "ready" &&
+ approvals.data.data.some(
+ (row) => row.status === "pending" && sameAddress(row.agentAddress, agent.address),
+ );
+ return needsYou ? { tone: "ready", text: "Needs you" } : { tone: "idle", text: "Live" };
+}