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

@ -34,6 +34,7 @@ import type {
MemoryType,
McpToolPolicy,
ModelServerCommandPreview,
OpenCodeProviderCatalogEntry,
PermissionSet,
Project,
ProjectMcpToolPermissions,
@ -61,6 +62,7 @@ import type {
PermissionGateway,
ProfileGateway,
ProjectGateway,
SaveOpenCodeProviderProfileInput,
SkillGateway,
TemplateGateway,
WorkStateGateway,
@ -181,6 +183,21 @@ export class HttpProfileGateway implements ProfileGateway {
request: { name: input.name, opencode: input.opencode },
});
}
listOpenCodeProviders(): Promise<OpenCodeProviderCatalogEntry[]> {
return this.http.invoke<OpenCodeProviderCatalogEntry[]>("list_opencode_providers");
}
saveOpenCodeProviderProfile(
input: SaveOpenCodeProviderProfileInput,
): Promise<AgentProfile> {
return this.http.invoke<AgentProfile>("save_opencode_provider_profile", {
request: {
profile: input.profile,
providerId: input.providerId,
model: input.model,
apiKey: input.apiKey,
},
});
}
}
export class HttpModelServerGateway implements ModelServerGateway {