| ... | ... | @@ -6299,6 +6299,9 @@ export default function ChatView(props: ChatViewProps) { |
| 6299 | 6299 | } |
| 6300 | 6300 | const working = activeBackgroundLiveness === "working"; |
| 6301 | 6301 | const liveCount = agentPanelModel.liveCount; |
| 6302 | // Hidden once the Agents surface is on screen; the link would point at nothing. |
| 6303 | const showViewAgents = |
| 6304 | liveCount > 0 && !(rightPanelOpen && activeRightPanelSurface?.kind === "agents"); |
| 6302 | 6305 | return { |
| 6303 | 6306 | id: `background-liveness:${activeThread.id}`, |
| 6304 | 6307 | variant: "default", |
| ... | ... | @@ -6315,22 +6318,32 @@ export default function ChatView(props: ChatViewProps) { |
| 6315 | 6318 | : "Background work" |
| 6316 | 6319 | : "Monitoring", |
| 6317 | 6320 | actions: ( |
| 6318 | | <Button |
| 6319 | | size="xs" |
| 6320 | | variant="ghost" |
| 6321 | | disabled={isStoppingBackgroundWork} |
| 6322 | | onClick={() => void handleStopBackgroundWork()} |
| 6323 | | > |
| 6324 | | {isStoppingBackgroundWork ? "Stopping..." : "Stop"} |
| 6325 | | </Button> |
| 6321 | <> |
| 6322 | {showViewAgents ? ( |
| 6323 | <Button size="xs" variant="ghost" aria-label="View agents" onClick={addAgentsSurface}> |
| 6324 | View |
| 6325 | </Button> |
| 6326 | ) : null} |
| 6327 | <Button |
| 6328 | size="xs" |
| 6329 | variant="ghost" |
| 6330 | disabled={isStoppingBackgroundWork} |
| 6331 | onClick={() => void handleStopBackgroundWork()} |
| 6332 | > |
| 6333 | {isStoppingBackgroundWork ? "Stopping..." : "Stop"} |
| 6334 | </Button> |
| 6335 | </> |
| 6326 | 6336 | ), |
| 6327 | 6337 | }; |
| 6328 | 6338 | }, [ |
| 6329 | 6339 | activeBackgroundLiveness, |
| 6340 | activeRightPanelSurface?.kind, |
| 6330 | 6341 | activeThread, |
| 6342 | addAgentsSurface, |
| 6331 | 6343 | agentPanelModel.liveCount, |
| 6332 | 6344 | handleStopBackgroundWork, |
| 6333 | 6345 | isStoppingBackgroundWork, |
| 6346 | rightPanelOpen, |
| 6334 | 6347 | ]); |
| 6335 | 6348 | // A woken thread announces itself in the open view, not just the sidebar |
| 6336 | 6349 | // pill. Dismissing marks the wake as seen (same acknowledgment as the |