subagents publish their model and effort as headers on every row, and the swarm shows them
The subagent daemon stamps Swarm-Model and Swarm-Effort on each row it publishes. The list endpoint reads them off the newest row it already fetches, so a long-running subagent keeps them past the stream's 24 hour window, and the terminal page's menu and the agent panel's list show them beside the name.
This commit is contained in:
parent
ae9c3444bc
commit
da5fcbfd9b
1 changed files with 219 additions and 25 deletions
|
|
@ -12,7 +12,7 @@ import { useEffect, useState } from "preact/hooks";
|
|||
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
|
||||
import { Badge } from "@hive/shared/badge.js";
|
||||
import { AgentTermPreview } from "./AgentTermPreview.js";
|
||||
import { STALE_S, stillListed } from "./subagent-list.js";
|
||||
import { STALE_S, runLabel, stillListed } from "./subagent-list.js";
|
||||
import { useSubagentList } from "./useSubagentList.js";
|
||||
import { RelativeTime } from "../../ui/relative-time/RelativeTime.js";
|
||||
import "./SubagentTerms.css";
|
||||
|
|
@ -41,7 +41,9 @@ export function SubagentTerms({ agentName }: { agentName: string }) {
|
|||
<section class="ui-subagent-terms" aria-label={`${agentName}'s subagents`}>
|
||||
<div class="ui-subagent-terms-list">
|
||||
<span class="ui-subagent-terms-heading">subagents</span>
|
||||
{subagents?.map(({ name, last_row_unix }) => {
|
||||
{subagents?.map((sub) => {
|
||||
const { name, last_row_unix } = sub;
|
||||
const runs = runLabel(sub);
|
||||
const stale =
|
||||
last_row_unix !== null && nowS - last_row_unix > STALE_S;
|
||||
return (
|
||||
|
|
@ -60,6 +62,7 @@ export function SubagentTerms({ agentName }: { agentName: string }) {
|
|||
}
|
||||
onClick={() => setPicked(name === selected ? null : name)}
|
||||
/>
|
||||
{runs && <span class="ui-subagent-terms-age">{runs}</span>}
|
||||
{last_row_unix !== null && (
|
||||
<span class="ui-subagent-terms-age">
|
||||
<RelativeTime epochMs={last_row_unix * 1000} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue