(messages: ChatMessage[])
| 18 | |
| 19 | /** Helper to extract text content from ChatMessages returned by getSystemMessage */ |
| 20 | const getMessageText = (messages: ChatMessage[]): string => { |
| 21 | return messages |
| 22 | .map((m) => { |
| 23 | // ChatMessage has content as a string, not an array |
| 24 | if (typeof m.content === 'string') { |
| 25 | return m.content |
| 26 | } |
| 27 | return '' |
| 28 | }) |
| 29 | .join('') |
| 30 | } |
| 31 | |
| 32 | describe('handleInitializationFlowLocally', () => { |
| 33 | const TEST_PROJECT_ROOT = '/test/project' |