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

@ -8,8 +8,17 @@
import { invoke } from "@tauri-apps/api/core";
import type { AgentProfile, FirstRunState, ProfileAvailability } from "@/domain";
import type { CloneOpenCodeProfileFromSeedInput, ProfileGateway } from "@/ports";
import type {
AgentProfile,
FirstRunState,
OpenCodeProviderCatalogEntry,
ProfileAvailability,
} from "@/domain";
import type {
CloneOpenCodeProfileFromSeedInput,
ProfileGateway,
SaveOpenCodeProviderProfileInput,
} from "@/ports";
export class TauriProfileGateway implements ProfileGateway {
firstRunState(): Promise<FirstRunState> {
@ -51,4 +60,21 @@ export class TauriProfileGateway implements ProfileGateway {
request: { name: input.name, opencode: input.opencode },
});
}
listOpenCodeProviders(): Promise<OpenCodeProviderCatalogEntry[]> {
return invoke<OpenCodeProviderCatalogEntry[]>("list_opencode_providers");
}
saveOpenCodeProviderProfile(
input: SaveOpenCodeProviderProfileInput,
): Promise<AgentProfile> {
return invoke<AgentProfile>("save_opencode_provider_profile", {
request: {
profile: input.profile,
providerId: input.providerId,
model: input.model,
apiKey: input.apiKey,
},
});
}
}