swarm-ui: one link-account menu, and no subagents section without subagents
The three link-account badges were wider than the agent detail panel and spilled out of it; they are now a single badge opening a dropdown of the three kinds. The subagents row, heading included, is not rendered for an agent that has none.
This commit is contained in:
parent
66df552f68
commit
2c1a9fa488
4 changed files with 75 additions and 55 deletions
|
|
@ -37,16 +37,15 @@ export function SubagentTerms({ agentName }: { agentName: string }) {
|
|||
refresh().catch((e: unknown) => setError({ detail: String(e) }));
|
||||
});
|
||||
|
||||
// An agent with no subagents shows nothing here — no heading, no
|
||||
// "none" line — and so does the first fetch while it is in flight. A
|
||||
// failed fetch still shows, so the error is not swallowed.
|
||||
if (!error && (names === null || names.length === 0)) return null;
|
||||
|
||||
return (
|
||||
<section class="ui-subagent-terms" aria-label={`${agentName}'s subagents`}>
|
||||
<div class="ui-subagent-terms-list">
|
||||
<span class="ui-subagent-terms-heading">subagents</span>
|
||||
{names === null && !error && <Badge value="loading…" />}
|
||||
{names?.length === 0 && (
|
||||
<span class="ui-subagent-terms-empty">
|
||||
none with output on record
|
||||
</span>
|
||||
)}
|
||||
{names?.map((name) => (
|
||||
<Badge
|
||||
key={name}
|
||||
|
|
|
|||
Loading…
Reference in a new issue