(state: MakaPiTranscriptState, messageId: string, text: string)
| 1494 | } |
| 1495 | |
| 1496 | function appendThinking(state: MakaPiTranscriptState, messageId: string, text: string): void { |
| 1497 | const last = state.entries[state.entries.length - 1]; |
| 1498 | if (last?.kind === 'thinking' && last.messageId === messageId) { |
| 1499 | last.text += text; |
| 1500 | return; |
| 1501 | } |
| 1502 | state.entries.push({ kind: 'thinking', messageId, text, expanded: state.expandAllThinking }); |
| 1503 | } |
| 1504 | |
| 1505 | function setThinking(state: MakaPiTranscriptState, messageId: string, text: string): void { |
| 1506 | // thinking_complete can arrive after the reply text or tool events; replace |
no test coverage detected