feat(frontend): provider OpenCode dynamique + saisie provider personnalisé (#92)

Le picker de provider OpenCode du first-run wizard consomme le
catalogue dynamique exposé par le backend et propose une option
« provider personnalisé » avec un formulaire de saisie libre
(id + clé API) quand le provider souhaité n'y figure pas.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 12:44:02 +02:00
parent e943a0efed
commit 1784027f5d
7 changed files with 470 additions and 69 deletions

View File

@ -13,6 +13,7 @@ import type {
AgentDrift,
AgentProfile,
AppExitWorkGuardState,
CustomProviderConfig,
DomainEvent,
EmbedderEngines,
EmbedderProfile,
@ -701,12 +702,18 @@ export interface CloneOpenCodeProfileFromSeedInput {
export interface SaveOpenCodeProviderProfileInput {
/** The profile to create or replace (by id). */
profile: AgentProfile;
/** Provider id in the OpenCode registry (e.g. `"anthropic"`). */
/** Provider id — a catalogue entry, or a free-form id when {@link custom} is set. */
providerId: string;
/** Model name served by this provider. */
model: string;
/** Literal API key — sealed into the `SecretStore`, never persisted as-is. */
apiKey: string;
/**
* Optional custom-provider configuration (ticket #92): an endpoint outside
* the OpenCode registry. Absent/`undefined` = known catalogue provider
* (unchanged behaviour).
*/
custom?: CustomProviderConfig;
}
/**