{(
[
{ id: "local", label: tr("Local (llama.cpp)", "Local (llama.cpp)") },
{ id: "cloud", label: tr("Fournisseur cloud", "Cloud provider") },
] as const
).map((seg) => {
const active = mode === seg.id;
return (
);
})}
{mode === "local" && (
)}
{mode === "cloud" && (
)}
);
}
/** Field-keyed validation errors for the Cloud sub-form, surfaced on submit. */
interface CloudFieldErrors {
providerId?: string;
model?: string;
apiKey?: string;
npm?: string;
baseUrl?: string;
}
/** Sentinel `