( workspaceId: string, messageId: string, historySequence: number )
| 132 | } |
| 133 | |
| 134 | async function appendPartialAssistantForTests( |
| 135 | workspaceId: string, |
| 136 | messageId: string, |
| 137 | historySequence: number |
| 138 | ): Promise<void> { |
| 139 | const appendResult = await historyService.appendToHistory(workspaceId, { |
| 140 | id: messageId, |
| 141 | role: "assistant", |
| 142 | metadata: { historySequence, partial: true }, |
| 143 | parts: [], |
| 144 | }); |
| 145 | expect(appendResult.success).toBe(true); |
| 146 | if (!appendResult.success) { |
| 147 | throw new Error(appendResult.error); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | function createStreamResultForTests( |
| 152 | fullStream: AsyncGenerator<unknown, void, unknown>, |
no test coverage detected