(requestId: string, reasoning: string)
| 59 | } |
| 60 | |
| 61 | private emitReasoning(requestId: string, reasoning: string): void { |
| 62 | const state = this.requestStates.get(requestId) |
| 63 | if (!state || state.status !== 'running') { |
| 64 | return |
| 65 | } |
| 66 | |
| 67 | state.fullReasoning += reasoning |
| 68 | state.event.sender.send(state.eventChannel, { |
| 69 | requestId, |
| 70 | type: 'reasoning_content', |
| 71 | reasoning_content: reasoning |
| 72 | } as AIStreamChunk) |
| 73 | } |
| 74 | |
| 75 | private finalizeComplete(requestId: string): void { |
| 76 | const state = this.requestStates.get(requestId) |