fix(domain,application,infrastructure,backend,app-tauri,frontend): Stop demande agent préserve la conversation ouverte — arrêt sans fermeture/clôture du chat, états cohérents après cancel sur les 3 adapters de session, cellule et workstate synchronisés — #343 (QA verte)
This commit is contained in:
@ -308,11 +308,16 @@ describe("HttpAgentGateway WS round-trip (B6 frames)", () => {
|
||||
baseUrl: "https://host",
|
||||
fetchImpl: async (url, init) => {
|
||||
calls.push({ url, init });
|
||||
const command = JSON.parse((init as { body: string }).body).command;
|
||||
const response =
|
||||
command === "cancel_agent_chat"
|
||||
? { sessionId: "chat-1", outcome: "cancelled" }
|
||||
: undefined;
|
||||
return {
|
||||
ok: true,
|
||||
status: 200,
|
||||
json: async () => undefined,
|
||||
text: async () => "",
|
||||
json: async () => response,
|
||||
text: async () => response ? JSON.stringify(response) : "",
|
||||
};
|
||||
},
|
||||
}),
|
||||
@ -402,7 +407,10 @@ describe("HttpAgentGateway WS round-trip (B6 frames)", () => {
|
||||
});
|
||||
expect(chunks).toEqual([{ kind: "final", content: "Hello back" }]);
|
||||
|
||||
await gw.cancelAgentChat("chat-1");
|
||||
await expect(gw.cancelAgentChat("chat-1")).resolves.toEqual({
|
||||
sessionId: "chat-1",
|
||||
outcome: "cancelled",
|
||||
});
|
||||
await gw.closeAgentChat("chat-1");
|
||||
await gw.detachAgentChat("chat-1");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user