-
Notifications
You must be signed in to change notification settings - Fork 1
feat: handle webrtc reasoning events #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for handling reasoning events from thinking/reasoning models by introducing a new REASONING_TEXT event type for WebRTC data channel communication. When reasoning responses are received via the data channel, they are forwarded to users through a new REASONING_TEXT_MESSAGE_RECEIVED event.
- Adds
REASONING_TEXTdata channel message type - Creates
WebRtcReasoningTextMessageEventinterface to type reasoning event data - Implements event handling logic to emit reasoning events to users
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/types/streaming/index.ts | Exports the new WebRtcReasoningTextMessageEvent type |
| src/types/streaming/WebRtcReasoningTextMessageEvent.ts | Defines the interface for reasoning text message events |
| src/types/streaming/DataChannelMessage.ts | Adds REASONING_TEXT enum value for the new message type |
| src/types/events/public/EventCallbacks.ts | Adds callback signature for the new reasoning event |
| src/types/events/public/AnamEvent.ts | Adds REASONING_TEXT_MESSAGE_RECEIVED event enum |
| src/types/AgentAudioInputStream.ts | Reformats arrow function for consistency |
| src/modules/StreamingClient.ts | Implements reasoning event handling in the data channel message switch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 7 files
b9389de to
9d70a1c
Compare
ao-anam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9d70a1c to
5c268b8
Compare
5c268b8 to
ce0f26e
Compare
ao-anam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


Adds an event to handle reasoning responses from thinking/reasoning models via the
REASONING_TEXTevent sent over the webrtc datachannel.These are forwarded to the user via a new AnamEvent
REASONING_STREAM_EVENT_RECEIVED/REASONING_HISTORY_UPDATEDSummary by cubic
Adds WebRTC reasoning text handling and a reasoning stream so clients can display live reasoning and receive final reasoning history.
Written for commit ce0f26e. Summary will update on new commits.