swarm-ui: a group pane's maximize and close are icon-only badges in its top right corner
The two controls sat among the pane's header badges as a labelled badge and a cross glyph. They are now icon badges in the top right corner, through a `trailing` slot of the terminal preview, so the header on the left keeps the agent, split, subagents and state badges and a narrow pane wraps less.
This commit is contained in:
parent
d733b1e2a9
commit
4876acd02a
2 changed files with 53 additions and 15 deletions
|
|
@ -102,6 +102,12 @@
|
|||
.ui-agent-term-preview-controls > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
/* The icon-only controls in the top right corner. */
|
||||
.ui-agent-term-preview-trailing {
|
||||
display: flex;
|
||||
flex: none;
|
||||
gap: 0.25em;
|
||||
}
|
||||
.ui-agent-term-preview-header-badges {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ export function AgentTermPreview({
|
|||
subagent,
|
||||
fullHeight = false,
|
||||
leading,
|
||||
trailing,
|
||||
}: {
|
||||
agentName: string;
|
||||
// Set: this is one of `agentName`'s subagents, output only like the
|
||||
|
|
@ -217,6 +218,9 @@ export function AgentTermPreview({
|
|||
// A badge ahead of the connection badge, for the full-tab mount's
|
||||
// link back to the agent's details.
|
||||
leading?: ComponentChildren;
|
||||
// Icon-only badges in the top right corner, for the full-tab mount's own
|
||||
// controls (a group pane's maximize and close).
|
||||
trailing?: ComponentChildren;
|
||||
}) {
|
||||
const paths = termPaths(agentName, subagent);
|
||||
const { rows, connection, reconnect } = useSwarmTermStream(paths.stream);
|
||||
|
|
@ -293,6 +297,9 @@ export function AgentTermPreview({
|
|||
onClick={() => openTab({ href: paths.page, label: paths.label })}
|
||||
/>
|
||||
)}
|
||||
{trailing !== undefined && (
|
||||
<div class="ui-agent-term-preview-trailing">{trailing}</div>
|
||||
)}
|
||||
</div>
|
||||
<div class="live terminal" ref={logRef} onScroll={handleScroll}>
|
||||
{rows.length === 0 ? (
|
||||
|
|
|
|||
Loading…
Reference in a new issue