feat(subagent): add session-owned task messaging and cancellation (#5985)
let's go!
This commit is contained in:
1 parent
f75470e72f
commit
6ff96f2a8f
93 files changed
+5632
-1156
No files matched your search
@@ -1619,6 +1619,18 @@ describe("NanobotClient", () => {
|
||||
|
||||
expect(chatHandler).toHaveBeenCalledTimes(deliveredBeforeLateFrames);
|
||||
expect(client.getRunStartedAt("chat-canonical")).toBeNull();
|
||||
const otherChat = vi.fn();
|
||||
client.onChat("other-chat", otherChat);
|
||||
const taskUpdate = {
|
||||
event: "subagent_task", chat_id: "chat-canonical",
|
||||
task: { task_id: "child", origin_turn_id: "turn-canonical", state: "done", revision: 4 },
|
||||
};
|
||||
lastSocket().fakeMessage(taskUpdate);
|
||||
expect(chatHandler).toHaveBeenLastCalledWith(taskUpdate);
|
||||
expect(chatHandler).toHaveBeenCalledTimes(deliveredBeforeLateFrames + 1);
|
||||
expect(otherChat).not.toHaveBeenCalled();
|
||||
expect(client.hasUnsettledRun("chat-canonical")).toBe(false);
|
||||
expect(client.getRunStartedAt("chat-canonical")).toBeNull();
|
||||
});
|
||||
|
||||
it("notifies run status subscribers and replays running chats", () => {
|
||||
|
||||
Reference in new issue
Block a user