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:
@ -61,13 +61,34 @@ describe("TauriAgentGateway invoke payloads", () => {
|
||||
});
|
||||
|
||||
it("attach_live_agent wraps project, agent and target node in the request DTO", async () => {
|
||||
invoke.mockResolvedValueOnce([
|
||||
{ agentId: "agent-2", nodeId: "node-3", sessionId: "session-4" },
|
||||
]);
|
||||
await new TauriAgentGateway().attachLiveAgent("proj-1", "agent-2", "node-3");
|
||||
invoke.mockResolvedValueOnce({
|
||||
agentId: "agent-2",
|
||||
nodeId: "node-3",
|
||||
sessionId: "session-4",
|
||||
kind: "pty",
|
||||
});
|
||||
const out = await new TauriAgentGateway().attachLiveAgent(
|
||||
"proj-1",
|
||||
"agent-2",
|
||||
"node-3",
|
||||
);
|
||||
expect(invoke).toHaveBeenCalledWith("attach_live_agent", {
|
||||
request: { projectId: "proj-1", agentId: "agent-2", nodeId: "node-3" },
|
||||
});
|
||||
expect(out.sessionId).toBe("session-4");
|
||||
});
|
||||
|
||||
it("stop_live_agent wraps project and agent in the request DTO", async () => {
|
||||
invoke.mockResolvedValueOnce({
|
||||
agentId: "agent-2",
|
||||
sessionId: "session-4",
|
||||
kind: "pty",
|
||||
});
|
||||
const out = await new TauriAgentGateway().stopLiveAgent("proj-1", "agent-2");
|
||||
expect(invoke).toHaveBeenCalledWith("stop_live_agent", {
|
||||
request: { projectId: "proj-1", agentId: "agent-2" },
|
||||
});
|
||||
expect(out.sessionId).toBe("session-4");
|
||||
});
|
||||
|
||||
it("change_agent_profile wraps all five fields in the request DTO (camelCase)", async () => {
|
||||
|
||||
Reference in New Issue
Block a user