(messages: MuxMessage[] = [])
| 123 | }); |
| 124 | |
| 125 | const createSession = async (messages: MuxMessage[] = []) => { |
| 126 | const { historyService, cleanup } = await createTestHistoryService(); |
| 127 | historyCleanup = cleanup; |
| 128 | for (const message of messages) { |
| 129 | await historyService.appendToHistory("ws", message); |
| 130 | } |
| 131 | |
| 132 | const session = new AgentSession({ |
| 133 | workspaceId: "ws", |
| 134 | config: createConfig(), |
| 135 | historyService, |
| 136 | aiService: createAiService(), |
| 137 | initStateManager: createInitStateManager(), |
| 138 | backgroundProcessManager: createBackgroundProcessManager(), |
| 139 | }); |
| 140 | sessions.push(session); |
| 141 | |
| 142 | return { |
| 143 | session, |
| 144 | historyService, |
| 145 | internals: session as unknown as SessionInternals, |
| 146 | }; |
| 147 | }; |
| 148 | |
| 149 | test("legacy continueMessage.mode does not fall back to compact agent", async () => { |
| 150 | let dispatchedMessage: string | undefined; |
no test coverage detected