feat(workstate): UI des actions contrôlées (Lot D frontend)
Câble les actions contrôlées dans ProjectWorkStatePanel : port et adaptateur agent étendus aux nouvelles commandes, adaptateur mock aligné. Tests verts : workstate + projects (25), agent (8), singletonAgent + agentAlreadyRunning (9), tsc --noEmit OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -26,6 +26,7 @@ import type {
|
||||
LiveAgent,
|
||||
OpenTerminalOptions,
|
||||
ReattachResult,
|
||||
StoppedLiveAgent,
|
||||
TerminalHandle,
|
||||
} from "@/ports";
|
||||
import { makeTerminalHandle } from "./terminal";
|
||||
@ -63,14 +64,14 @@ export class TauriAgentGateway implements AgentGateway {
|
||||
agentId: string,
|
||||
nodeId: string,
|
||||
): Promise<LiveAgent> {
|
||||
return invoke<LiveAgent[]>("attach_live_agent", {
|
||||
return invoke<LiveAgent>("attach_live_agent", {
|
||||
request: { projectId, agentId, nodeId },
|
||||
}).then((list) => {
|
||||
const attached = list[0];
|
||||
if (!attached) {
|
||||
throw new Error(`running session for agent ${agentId} was not returned`);
|
||||
}
|
||||
return attached;
|
||||
});
|
||||
}
|
||||
|
||||
stopLiveAgent(projectId: string, agentId: string): Promise<StoppedLiveAgent> {
|
||||
return invoke<StoppedLiveAgent>("stop_live_agent", {
|
||||
request: { projectId, agentId },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user