diff --git a/src/app/components/RegistryEditor.tsx b/src/app/components/RegistryEditor.tsx index 0ebf907..2f15016 100644 --- a/src/app/components/RegistryEditor.tsx +++ b/src/app/components/RegistryEditor.tsx @@ -1,6 +1,7 @@ "use client"; import { useCallback, useEffect, useMemo, useState } from "react"; +import { ChevronDown, ChevronRight } from "lucide-react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; import { invalidateAvailableModels } from "@/app/hooks/useAvailableModels"; @@ -238,6 +239,11 @@ function ModelEditor({ const runtime = model.runtime; const setRuntime = (patch: Partial) => onChange({ ...model, runtime: { ...runtime, ...patch } }); + // New (unsaved) models start expanded so their parameters can be filled + // in; saved models start collapsed to keep the provider overview compact. + const [expanded, setExpanded] = useState( + () => availabilityFor(data, ref) === null + ); const capability = (key: "tools" | "vision" | "structured_output") => { const protocolAllows = spec?.protocol_capabilities[key] !== false; return ( @@ -263,6 +269,19 @@ function ModelEditor({ return (
+ {model.key} @@ -294,6 +313,8 @@ function ModelEditor({ Remove
+ {expanded && ( + <>
+ + )} {outcome && (