feat(frontend): support des providers OpenCode cloud (#92)

Ajoute l'UI de configuration des providers OpenCode cloud dans le wizard
first-run (sélection, édition, sauvegarde, suppression), le domaine et
les ports associés, ainsi que les adapters HTTP/mock correspondants.

Build + 952 tests verts, comportements clés vérifiés en exécution réelle,
y compris un test de couverture ajouté pour le parcours d'édition.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 08:18:02 +02:00
parent 23a3c2788f
commit c181b43d04
8 changed files with 649 additions and 6 deletions

View File

@ -144,9 +144,11 @@ export function validateProfile(p: AgentProfile): ProfileErrors {
Object.assign(errors, validateHttpChatConfig(p.chatHttp));
}
}
// An OpenCode profile carries its own llama.cpp endpoint config; the backend
// refuses to persist it unless base URL + model are well-formed, so mirror that.
if (p.structuredAdapter === "openCode") {
// An OpenCode profile carries its own llama.cpp endpoint config (local mode)
// or a cloud provider config (`opencodeProvider`, ticket #92) — never both,
// and the cloud sub-form owns its own submit-time validation (provider,
// model, API key), so only the local-mode shape is mirrored here.
if (p.structuredAdapter === "openCode" && !p.opencodeProvider) {
if (!p.opencode) {
errors.baseURL = "Base URL must start with http:// or https://.";
errors.model = "Model is required.";