mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Detach realtime sideband observers without ending the session (#57817)
## Why Stopping a sideband observer should close its WebSocket while preserving the frontend-owned realtime session. The existing frameless session close also sends `session.close`, so observer shutdown needs a transport-only close. ## What changed - Add `close_transport()` to send a normal WebSocket close without `session.close`. - Close the sideband transport on cancellation or when the call becomes inactive, including an existing connection awaiting adoption by the input task. Bound the close attempt to five seconds. - Thread an optional sideband base URL through realtime start processing and allow nested thread ID fields in request serialization scopes. ## Testing Add WebSocket and core conversation regression tests covering observer detachment for both realtime parsers and conversation versions. Verify that explicit frameless session close still sends `session.close`. GitOrigin-RevId: 874a8980b0fcd45058e976b00c0d968f5b4b2404
This commit is contained in:
@@ -1723,8 +1723,9 @@ impl MessageProcessor {
|
||||
.await
|
||||
}
|
||||
ClientRequest::ThreadRealtimeStart { params, .. } => {
|
||||
let sideband_base_url = None;
|
||||
self.turn_processor
|
||||
.thread_realtime_start(&request_id, params)
|
||||
.thread_realtime_start(&request_id, params, sideband_base_url)
|
||||
.await
|
||||
}
|
||||
ClientRequest::ThreadRealtimeAppendAudio { params, .. } => {
|
||||
|
||||
Reference in New Issue
Block a user