feat(agent): UI hot-swap de profil (A2) — commande Tauri + sélecteur + dialog
- Tauri : commande change_agent_profile + ChangeAgentProfileRequestDto/Dto (camelCase, relaunchedSession omis si None), câblage state.rs par composition. - Front : gateway changeAgentProfile (adapters Tauri+mock), sélecteur de profil par agent, dialog de confirmation FR (« Changer le moteur abandonne l'historique de conversation… »), refresh sur event agentProfileChanged. Tests : app-tauri dto 5/5 ; vitest 314/314 (mapping, payload, dialog gating, libellé FR, refresh). 0 régression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -18,6 +18,7 @@ export type DomainEvent =
|
||||
| { type: "projectCreated"; projectId: string }
|
||||
| { type: "agentLaunched"; agentId: string; sessionId: string }
|
||||
| { type: "agentExited"; agentId: string; code: number }
|
||||
| { type: "agentProfileChanged"; agentId: string; profileId: string }
|
||||
| { type: "templateUpdated"; templateId: string; version: number }
|
||||
| { type: "agentDriftDetected"; agentId: string; from: number; to: number }
|
||||
| { type: "agentSynced"; agentId: string; to: number }
|
||||
@ -251,6 +252,27 @@ export interface Agent {
|
||||
skills: SkillRef[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A terminal/PTY session as returned by the backend (mirror of
|
||||
* `TerminalSessionDto`, camelCase wire format). Surfaced by `changeAgentProfile`
|
||||
* as the freshly relaunched session when a live agent was hot-swapped.
|
||||
*/
|
||||
export interface TerminalSession {
|
||||
/** Stable session id (UUID) — used for write/resize/close + the output channel. */
|
||||
sessionId: string;
|
||||
/** Working directory the shell runs in. */
|
||||
cwd: string;
|
||||
/** Current rows. */
|
||||
rows: number;
|
||||
/** Current cols. */
|
||||
cols: number;
|
||||
/**
|
||||
* Conversation id assigned by this (re)launch, when the profile supports
|
||||
* session assignment and the hosting cell had none yet; absent otherwise.
|
||||
*/
|
||||
assignedConversationId?: string;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Skills (L12) — mirror of the domain `Skill` / `SkillRef`.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user