@kenkaiiii/gg-ai 5.49.4 → 5.49.5

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/dist/index.js CHANGED
@@ -1554,7 +1554,15 @@ async function* runStream(options) {
1554
1554
  yield keepalive;
1555
1555
  break;
1556
1556
  }
1557
- // message_stop — loop exits naturally
1557
+ // message_stop — loop exits naturally.
1558
+ //
1559
+ // Deliberately NOT breaking early here. Breaking makes the SDK iterator
1560
+ // run `if (!done) controller.abort()` in its `finally`
1561
+ // (core/streaming.js:97), which tears the connection down instead of
1562
+ // returning it to the keep-alive pool — every turn would then pay a
1563
+ // fresh TLS handshake. Draining to the end is what every other Anthropic
1564
+ // client does, and the stall it guards against is handled by the agent
1565
+ // loop's idle timeout.
1558
1566
  default:
1559
1567
  yield keepalive;
1560
1568
  break;