(overrides: {
state: MemoryStore;
conversationKey?: string;
})
| 7 | import { InMemoryActionStore } from "./action-store.js"; |
| 8 | |
| 9 | function makeTestThread(overrides: { |
| 10 | state: MemoryStore; |
| 11 | conversationKey?: string; |
| 12 | }): Thread { |
| 13 | const adapter = new FakeAdapter(); |
| 14 | const registry = new ActionRegistry({ store: new InMemoryActionStore() }); |
| 15 | const deps: ThreadDeps = { |
| 16 | adapter, |
| 17 | replyTarget: {}, |
| 18 | conversationKey: overrides.conversationKey ?? "c1", |
| 19 | registry, |
| 20 | agentFactory: (id) => { |
| 21 | throw new Error(`agentFactory not needed in this test: ${id}`); |
| 22 | }, |
| 23 | tools: new Map(), |
| 24 | toolDescriptors: [], |
| 25 | context: [], |
| 26 | registerWaiter: () => {}, |
| 27 | interruptHandlers: new Map(), |
| 28 | state: overrides.state, |
| 29 | }; |
| 30 | return new Thread(deps); |
| 31 | } |
| 32 | |
| 33 | describe("Thread.subscribe / unsubscribe / isSubscribed", () => { |
| 34 | it("subscribe marks the conversation as subscribed", async () => { |
no outgoing calls
no test coverage detected
searching dependent graphs…