[ai] Return UIMessage[] from DurableAgent stream call#760
[ai] Return UIMessage[] from DurableAgent stream call#760VaguelySerious wants to merge 1 commit intomainfrom
Conversation
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
❌ Some E2E test jobs failed:
Check the workflow run for details. |
|
No benchmark result files found in benchmark-results |
| if (part.type === 'text' && part.text) { | ||
| this.currentMessage.parts.push({ | ||
| type: 'text', | ||
| text: part.text, | ||
| }); | ||
| } else if (part.type === 'reasoning' && part.text) { |
There was a problem hiding this comment.
| if (part.type === 'text' && part.text) { | |
| this.currentMessage.parts.push({ | |
| type: 'text', | |
| text: part.text, | |
| }); | |
| } else if (part.type === 'reasoning' && part.text) { | |
| if (part.type === 'text' && part.text !== undefined && part.text !== null) { | |
| this.currentMessage.parts.push({ | |
| type: 'text', | |
| text: part.text, | |
| }); | |
| } else if (part.type === 'reasoning' && part.text !== undefined && part.text !== null) { |
Empty text and reasoning parts are silently dropped due to falsy check, potentially losing valid empty message content
| } as any); | ||
| } | ||
| break; | ||
|
|
| // Process the chunk to accumulate messages | ||
| this.processChunk(chunk); | ||
|
|
||
| // Forward to the inner writable | ||
| const writer = this.innerWritable.getWriter(); | ||
| try { | ||
| await writer.write(chunk); |
There was a problem hiding this comment.
| // Process the chunk to accumulate messages | |
| this.processChunk(chunk); | |
| // Forward to the inner writable | |
| const writer = this.innerWritable.getWriter(); | |
| try { | |
| await writer.write(chunk); | |
| // Forward to the inner writable first, then process | |
| const writer = this.innerWritable.getWriter(); | |
| try { | |
| await writer.write(chunk); | |
| // Only process the chunk if the write succeeded | |
| this.processChunk(chunk); |
UIMessageAccumulator processes chunks before verifying they can be written to the inner stream, causing accumulated messages to include chunks that failed to write.
|
Closed in favor of #768 |
No description provided.