@ai-sdk/langchain 2.0.237 → 2.0.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/utils.ts CHANGED
@@ -1446,6 +1446,11 @@ export function processLangGraphEvent(
1446
1446
  const text = getMessageText(msg);
1447
1447
  if (text) {
1448
1448
  const seen = messageSeen.get(msgId);
1449
+ if (seen?.reasoning && !seen.text) {
1450
+ controller.enqueue({ type: 'reasoning-end', id: msgId });
1451
+ seen.reasoning = false;
1452
+ }
1453
+
1449
1454
  if (!seen?.text) {
1450
1455
  controller.enqueue({ type: 'text-start', id: msgId });
1451
1456
  getOrCreateMessageSeen(messageSeen, msgId).text = true;