feat(web): agents working banner links to the Agents panel (#13572)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
1e192b2558
commit
df9826f080
1 file changed
+21
-8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user