Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: start page setup assistant offers to create ruth

This commit is contained in:
damocles 2026-10-15 19:18:01 +02:00
commit 8bf53f7ed9
7 changed files with 208 additions and 15 deletions

View file

@ -97,13 +97,16 @@ const NAME_PATTERN = "[a-z0-9\\-]{1,63}";
export function CreateAgentForm({
onClose,
initialName = "",
}: {
/** The name field's starting value, for a caller that suggests one. */
initialName?: string;
/** Rendered as the form panel's own close button — this form always
* mounts inside a `plain` `Dialog` (see `AgentsPage`), which no longer
* floats its own. */
onClose?: () => void;
}) {
const [name, setName] = useState("");
const [name, setName] = useState(initialName);
const [hive, setHive] = useState("");
// `null` = still loading, `[]` = loaded but empty (a real, if unusual,
// swarm state) — distinct from "not fetched yet" so the placeholder