swarm-ui: a maximize button on each pane of a terminal group opens that agent's own terminal
This commit is contained in:
parent
7e2580ed69
commit
5665bbf827
2 changed files with 11 additions and 1 deletions
|
|
@ -166,7 +166,8 @@ a group of the two, with its own header tab at `/agents/group/<id>`. In a group,
|
||||||
the same drag onto a pane splits that pane, as many times as you like, and
|
the same drag onto a pane splits that pane, as many times as you like, and
|
||||||
dragging a pane's header badge onto another pane moves it there. The **split**
|
dragging a pane's header badge onto another pane moves it there. The **split**
|
||||||
button in a pane's header does the same for an agent whose terminal tab is open:
|
button in a pane's header does the same for an agent whose terminal tab is open:
|
||||||
**right** or **below** puts it beside the pane. The **×** takes the pane's
|
**right** or **below** puts it beside the pane. **maximize** opens that
|
||||||
|
agent's own terminal in its tab, or goes to the tab when one is open already. The **×** takes the pane's
|
||||||
agent out of the group, and a group left with one agent goes, landing on that
|
agent out of the group, and a group left with one agent goes, landing on that
|
||||||
agent's own terminal. Drag a divider to resize, or focus it and use the arrow
|
agent's own terminal. Drag a divider to resize, or focus it and use the arrow
|
||||||
keys. Panes have no minimum size; a divider stops at 2% so a pane can't
|
keys. Panes have no minimum size; a divider stops at 2% so a pane can't
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { useLocation, type RouteComponentProps } from "wouter-preact";
|
import { useLocation, type RouteComponentProps } from "wouter-preact";
|
||||||
import { Badge } from "@hive/shared/badge.js";
|
import { Badge } from "@hive/shared/badge.js";
|
||||||
|
import { ExpandIcon } from "@hive/shared/icons.js";
|
||||||
import { AgentIcon } from "../../agent/AgentIcon.js";
|
import { AgentIcon } from "../../agent/AgentIcon.js";
|
||||||
import {
|
import {
|
||||||
AgentTermPreview,
|
AgentTermPreview,
|
||||||
|
|
@ -158,6 +159,14 @@ export function AgentGroupPage({
|
||||||
groups.update(id, (r) => splitPane(r, agent, other, side))
|
groups.update(id, (r) => splitPane(r, agent, other, side))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Badge
|
||||||
|
icon={<ExpandIcon />}
|
||||||
|
value="maximize"
|
||||||
|
title={`open ${agent}'s terminal on its own`}
|
||||||
|
onClick={() =>
|
||||||
|
open({ href: termPaths(agent).page, label: agent })
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Badge
|
<Badge
|
||||||
variant="quiet"
|
variant="quiet"
|
||||||
value="×"
|
value="×"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue