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 {
display: flex;
flex-direction: column;
@ -6,17 +6,16 @@
gap: 0.3em;
}
.ui-agent-inference-list {
display: contents;
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.3em;
}
.ui-agent-inference-list li {
display: flex;
align-items: center;
gap: 0.5em;
flex-wrap: wrap;
display: contents;
}
.ui-agent-inference-source {
margin-left: -0.25em;
}
.ui-agent-inference-source,
.ui-agent-inference-muted {

View file

@ -222,6 +222,7 @@ export function AgentInference({ agent }: { agent: string }) {
return (
<div class="ui-agent-inference">
{errorPanel}
<div class="ui-badge-row">
<ul class="ui-agent-inference-list">
<li>
{effective ? (
@ -258,7 +259,9 @@ export function AgentInference({ agent }: { agent: string }) {
<li>
<Badge
label="subagent models"
value={swarmModels.length > 0 ? swarmModels.join(", ") : "its own"}
value={
swarmModels.length > 0 ? swarmModels.join(", ") : "its own"
}
/>
</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}`}
onClick={() => setEditing(true)}
/>
</div>
<Dialog
open={editing}
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 {
display: flex;
flex-direction: column;
@ -6,11 +6,10 @@
gap: 0.3em;
}
.ui-agent-limits-list {
display: contents;
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.3em;
}
.ui-agent-limits-muted {
color: var(--muted);

View file

@ -138,6 +138,7 @@ export function AgentLimits({ agent }: { agent: string }) {
return (
<div class="ui-agent-limits">
{errorPanel}
<div class="ui-badge-row">
<ul class="ui-agent-limits-list">
<li>
<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}`}
onClick={() => setEditing(true)}
/>
</div>
<Dialog
open={editing}
onClose={() => setEditing(false)}

View file

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

View file

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