You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert JS SDK streaming APIs from callbacks to async iterables (#545)
- [x] Convert JS SDK streaming APIs from callbacks to async iterables
- [x] Add `return()` hook to async iterators to prevent unbounded
buffering on early break
- [x] Add guards in streaming callbacks to skip work after error or
cancellation
- [x] Fix test assertions to assert synchronous throws directly
- [x] Replace O(n) `chunks.shift()` with O(1) head-index dequeue with
compaction
- [x] Guard against concurrent `next()` calls with `nextInFlight` flag
- [x] Add comment explaining native stream cancellation limitation in
`return()`
- [x] Fix docs example for `completeStreamingChat(messages, tools)`
overload to pass `tools`
- [x] Regenerate TypeDoc API docs
- [x] Type-check, code review, and security scan
- [x] Add comments explaining why local variable captures are needed
(closures lose `this`)
- [x] Add comments clarifying promise-resolve wake-up pattern in
`.then()` handler
- [x] Add structural comments explaining the AsyncIterable/AsyncIterator
factory pattern
- [x] Apply same readability improvements to chatClient.ts
<!-- START COPILOT CODING AGENT TIPS -->
---
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS
or Windows machine with [Raycast](https://gh.io/cca-raycast-docs).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baijumeswani <12852605+baijumeswani@users.noreply.github.com>
0 commit comments