feat(terminals): reprise de conversation par cellule + fix ordre d'écriture
Permet de recharger la conversation CLI précédente de chaque cellule à la
réouverture du projet, de façon universelle (indépendant du modèle/CLI).
- profil AgentRuntime: bloc déclaratif optionnel `session { assignFlag, resumeFlag }`
- LeafCell: `conversationId` (persistant, distinct du SessionId PTY) + `agentWasRunning`
- runtime: SessionPlan (None/Assign/Resume) + composition pure des args
- LaunchAgent: décide Assign vs Resume, génère l'UUID, remonte l'id assigné
(persistance par l'appelant via setCellConversation — découplage SRP)
- close: SnapshotRunningAgents fige `agentWasRunning` avant le kill-all
(statut clot/en cours universel, sans parsing CLI)
- SessionInspector: port optionnel best-effort + adapter ClaudeTranscriptInspector
- popup de reprise par cellule (statut + sujet/tokens si dispo), intercalée
avant le Resume auto, jamais sur le chemin reattach
fix(terminals): sérialise les écritures PTY (file FIFO par handle) — corrige
les caractères mélangés/accents dus au réordonnancement des invoke Tauri concurrents
fix(layout): l'opération `move` préservait mal les champs du leaf (perdait `agent`)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -80,6 +80,7 @@ describe("TerminalView (with MockTerminalGateway)", () => {
|
||||
return handle;
|
||||
}),
|
||||
reattach: vi.fn(),
|
||||
closeTerminal: vi.fn(),
|
||||
};
|
||||
|
||||
expect(() => renderView(terminal)).not.toThrow();
|
||||
@ -93,7 +94,7 @@ describe("TerminalView (with MockTerminalGateway)", () => {
|
||||
const close = vi.fn().mockResolvedValue(undefined);
|
||||
const handle = makeHandle({ detach, close });
|
||||
const openTerminal = vi.fn(async () => handle);
|
||||
const terminal: TerminalGateway = { openTerminal, reattach: vi.fn() };
|
||||
const terminal: TerminalGateway = { openTerminal, reattach: vi.fn(), closeTerminal: vi.fn() };
|
||||
|
||||
const { unmount } = renderView(terminal);
|
||||
|
||||
@ -129,7 +130,7 @@ describe("TerminalView (with MockTerminalGateway)", () => {
|
||||
},
|
||||
);
|
||||
const openTerminal = vi.fn(async () => handle);
|
||||
const terminal: TerminalGateway = { openTerminal, reattach };
|
||||
const terminal: TerminalGateway = { openTerminal, reattach, closeTerminal: vi.fn() };
|
||||
|
||||
renderView(terminal, "/cwd", { sessionId: "live-1" });
|
||||
|
||||
@ -147,7 +148,7 @@ describe("TerminalView (with MockTerminalGateway)", () => {
|
||||
it("persists a newly opened session id via onSessionId", async () => {
|
||||
const handle = makeHandle({ sessionId: "new-99" });
|
||||
const openTerminal = vi.fn(async () => handle);
|
||||
const terminal: TerminalGateway = { openTerminal, reattach: vi.fn() };
|
||||
const terminal: TerminalGateway = { openTerminal, reattach: vi.fn(), closeTerminal: vi.fn() };
|
||||
const onSessionId = vi.fn();
|
||||
|
||||
renderView(terminal, "/cwd", { onSessionId });
|
||||
|
||||
Reference in New Issue
Block a user