Skip to content

Conversation

@pakrym-oai
Copy link
Collaborator

@pakrym-oai pakrym-oai commented Feb 11, 2026

In the incremental websocket output items are already part of the context, no need to send them again and duplicate.

@pakrym-oai pakrym-oai changed the title Only send additional items Do not resend output items in incremental websockets connections Feb 11, 2026
@pakrym-oai pakrym-oai enabled auto-merge (squash) February 11, 2026 03:19
.take()
.and_then(|mut receiver| match receiver.try_recv() {
Ok(last_response) => Some(last_response),
Err(TryRecvError::Closed) | Err(TryRecvError::Empty) => None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we now drop the receiver on TryRecvError::Empty? if there's a follow up request before the previous stream finishes, aren't we now losing the LastResponse?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

means previous request didn't complete with response.done and if it didn't then trying to append to it is dangerous.

@pakrym-oai pakrym-oai merged commit 4473147 into main Feb 11, 2026
32 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/only-send-additional-items branch February 11, 2026 03:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants