(stream: StreamTextResult<any, any>, writer: UIMessageStreamWriter<SBChatMessage>, options: UIMessageStreamOptions<SBChatMessage> = {})
| 33 | |
| 34 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 35 | const mergeStreamAsync = async (stream: StreamTextResult<any, any>, writer: UIMessageStreamWriter<SBChatMessage>, options: UIMessageStreamOptions<SBChatMessage> = {}) => { |
| 36 | await new Promise<void>((resolve) => writer.merge(stream.toUIMessageStream({ |
| 37 | ...options, |
| 38 | onFinish: async () => { |
| 39 | resolve(); |
| 40 | } |
| 41 | }))); |
| 42 | } |
| 43 | |
| 44 | interface CreateMessageStreamResponseProps { |
| 45 | chatId: string; |
no outgoing calls
no test coverage detected