Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: show the inference settings and resource caps on one wrapping line each

This commit is contained in:
iris 2026-11-04 16:53:05 +01:00 • committed by mara
commit 369946169c
6 changed files with 83 additions and 79 deletions

View file

@ -1,4 +1,4 @@
/* <AgentInference> — one setting per line: badge, then where it comes from. */ /* <AgentInference> — the settings in one wrapping line: each badge, then where it comes from. */
.ui-agent-inference { .ui-agent-inference {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -6,17 +6,16 @@
gap: 0.3em; gap: 0.3em;
} }
.ui-agent-inference-list { .ui-agent-inference-list {
display: contents;
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
display: grid;
gap: 0.3em;
} }
.ui-agent-inference-list li { .ui-agent-inference-list li {
display: flex; display: contents;
align-items: center; }
gap: 0.5em; .ui-agent-inference-source {
flex-wrap: wrap; margin-left: -0.25em;
} }
.ui-agent-inference-source, .ui-agent-inference-source,
.ui-agent-inference-muted { .ui-agent-inference-muted {

View file

@ -222,6 +222,7 @@ export function AgentInference({ agent }: { agent: string }) {
return ( return (
<div class="ui-agent-inference"> <div class="ui-agent-inference">
{errorPanel} {errorPanel}
<div class="ui-badge-row">
<ul class="ui-agent-inference-list"> <ul class="ui-agent-inference-list">
<li> <li>
{effective ? ( {effective ? (
@ -258,7 +259,9 @@ export function AgentInference({ agent }: { agent: string }) {
<li> <li>
<Badge <Badge
label="subagent models" label="subagent models"
value={swarmModels.length > 0 ? swarmModels.join(", ") : "its own"} value={
swarmModels.length > 0 ? swarmModels.join(", ") : "its own"
}
/> />
</li> </li>
<li> <li>
@ -278,6 +281,7 @@ export function AgentInference({ agent }: { agent: string }) {
title={`set the swarm's model, effort, subagent models and subagent cap for ${agent}`} title={`set the swarm's model, effort, subagent models and subagent cap for ${agent}`}
onClick={() => setEditing(true)} onClick={() => setEditing(true)}
/> />
</div>
<Dialog <Dialog
open={editing} open={editing}
onClose={() => setEditing(false)} onClose={() => setEditing(false)}

View file

@ -1,4 +1,4 @@
/* <AgentLimits> — one cap per line, then the edit action. */ /* <AgentLimits> — the caps and the edit action in one wrapping line. */
.ui-agent-limits { .ui-agent-limits {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -6,11 +6,10 @@
gap: 0.3em; gap: 0.3em;
} }
.ui-agent-limits-list { .ui-agent-limits-list {
display: contents;
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
display: grid;
gap: 0.3em;
} }
.ui-agent-limits-muted { .ui-agent-limits-muted {
color: var(--muted); color: var(--muted);

View file

@ -138,6 +138,7 @@ export function AgentLimits({ agent }: { agent: string }) {
return ( return (
<div class="ui-agent-limits"> <div class="ui-agent-limits">
{errorPanel} {errorPanel}
<div class="ui-badge-row">
<ul class="ui-agent-limits-list"> <ul class="ui-agent-limits-list">
<li> <li>
<Badge label="cpu quota" value={caps.cpu_quota ?? HIVE_DECIDES} /> <Badge label="cpu quota" value={caps.cpu_quota ?? HIVE_DECIDES} />
@ -152,6 +153,7 @@ export function AgentLimits({ agent }: { agent: string }) {
title={`set the swarm's CPU and memory caps for ${agent}`} title={`set the swarm's CPU and memory caps for ${agent}`}
onClick={() => setEditing(true)} onClick={() => setEditing(true)}
/> />
</div>
<Dialog <Dialog
open={editing} open={editing}
onClose={() => setEditing(false)} onClose={() => setEditing(false)}

View file

@ -136,7 +136,7 @@ export function AllowedDomains({ agent }: { agent: string }) {
return ( return (
<div class="ui-agent-limits"> <div class="ui-agent-limits">
{errorPanel} {errorPanel}
<div class="ui-badge-popover-row"> <div class="ui-badge-row">
{shown.length === 0 ? ( {shown.length === 0 ? (
<Badge label="allowed domains" value="none added" /> <Badge label="allowed domains" value="none added" />
) : null} ) : null}

View file

@ -25,8 +25,8 @@
display: grid; display: grid;
gap: 0.3em; gap: 0.3em;
} }
/* A line of badge popovers that wraps when it runs out of room. */ /* A line of badges that wraps when it runs out of room. */
.ui-badge-popover-row { .ui-badge-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;