swarm-ui: start page setup assistant offers to create ruth
This commit is contained in:
parent
89efda5ea2
commit
8bf53f7ed9
7 changed files with 208 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue