TypeScript
feat(web): agents working banner links to the Agents panel (#13572)
Theo Brownedf9826f0806c
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 079c7d97b5b..cd36675860d 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -6299,6 +6299,9 @@ export default function ChatView(props: ChatViewProps) {}const working = activeBackgroundLiveness === "working";const liveCount = agentPanelModel.liveCount;+ // Hidden once the Agents surface is on screen; the link would point at nothing.+ const showViewAgents =+ liveCount > 0 && !(rightPanelOpen && activeRightPanelSurface?.kind === "agents");return {id: `background-liveness:${activeThread.id}`,variant: "default",@@ -6315,22 +6318,32 @@ export default function ChatView(props: ChatViewProps) {: "Background work": "Monitoring",actions: (- <Button- size="xs"- variant="ghost"- disabled={isStoppingBackgroundWork}- onClick={() => void handleStopBackgroundWork()}- >- {isStoppingBackgroundWork ? "Stopping..." : "Stop"}- </Button>+ <>+ {showViewAgents ? (+ <Button size="xs" variant="ghost" aria-label="View agents" onClick={addAgentsSurface}>+ View+ </Button>+ ) : null}+ <Button+ size="xs"+ variant="ghost"+ disabled={isStoppingBackgroundWork}+ onClick={() => void handleStopBackgroundWork()}+ >+ {isStoppingBackgroundWork ? "Stopping..." : "Stop"}+ </Button>+ </>),};}, [activeBackgroundLiveness,+ activeRightPanelSurface?.kind,activeThread,+ addAgentsSurface,agentPanelModel.liveCount,handleStopBackgroundWork,isStoppingBackgroundWork,+ rightPanelOpen,]);// A woken thread announces itself in the open view, not just the sidebar// pill. Dismissing marks the wake as seen (same acknowledgment as the