swarm-ui: a running-subagents menu in the full-screen terminal header
An N running subagents badge opens a list of the agent's subagents, each a link to its terminal, so you can switch without going back to the agents page. A subagent counts as running when it published a row in the last 15 minutes; the quiet ones are listed below it, dimmed. The list under the preview and the menu now share one fetch hook and one definition of running.
This commit is contained in:
parent
0e77d61a9f
commit
664409c87f
8 changed files with 360 additions and 46 deletions
|
|
@ -14,6 +14,7 @@ import type { RouteComponentProps } from "wouter-preact";
|
|||
import { Badge } from "@hive/shared/badge.js";
|
||||
import { AgentDetailPopover } from "../../agent/detail/AgentDetailPopover.js";
|
||||
import { AgentIcon } from "../../agent/AgentIcon.js";
|
||||
import { SubagentsMenu } from "../../agent/terminal/SubagentsMenu.js";
|
||||
import {
|
||||
AgentTermPreview,
|
||||
termPaths,
|
||||
|
|
@ -63,15 +64,18 @@ export function AgentTerminalPage({
|
|||
fullHeight
|
||||
showHeaderBadges
|
||||
leading={
|
||||
<span ref={badgeRef}>
|
||||
<Badge
|
||||
icon={<AgentIcon name={name} small />}
|
||||
value={name}
|
||||
title={`${detailOpen ? "close" : "open"} ${name}'s details`}
|
||||
expanded={detailOpen}
|
||||
onClick={() => setDetailOpen((o) => !o)}
|
||||
/>
|
||||
</span>
|
||||
<>
|
||||
<span ref={badgeRef}>
|
||||
<Badge
|
||||
icon={<AgentIcon name={name} small />}
|
||||
value={name}
|
||||
title={`${detailOpen ? "close" : "open"} ${name}'s details`}
|
||||
expanded={detailOpen}
|
||||
onClick={() => setDetailOpen((o) => !o)}
|
||||
/>
|
||||
</span>
|
||||
<SubagentsMenu agentName={name} current={subagent} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<AgentDetailPopover
|
||||
|
|
|
|||
Loading…
Reference in a new issue