Skip to content

fix(cli): Keep reasoning shading across a stream retry - #931

Merged
JeanMertz merged 2 commits into
mainfrom
shade-after-timer
Aug 3, 2026
Merged

fix(cli): Keep reasoning shading across a stream retry#931
JeanMertz merged 2 commits into
mainfrom
shade-after-timer

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

When a stream error interrupts a reasoning block, JP resends the request and continues the same response. The renderer used to treat that boundary like a normal flush, closing the reasoning region and rendering the gap it owed as an unshaded strip before the continuation reopened the region. The background now visibly breaks around a retry even though the reasoning is one continuous block.

TurnCoordinator::commit_partial_response now calls flush_renderer_for_continuation instead of flush_renderer. The chat renderer's new flush_for_continuation commits buffered content like a normal flush but keeps the deferred separator shaded when the last content written was reasoning, so the gap stays inside the region and the continuation's output lands on the same background.

When a stream error interrupts a reasoning block, JP resends the
request and continues the same response. The renderer used to treat
that boundary like a normal flush, closing the reasoning region and
rendering the gap it owed as an unshaded strip before the
continuation reopened the region. The background now visibly breaks
around a retry even though the reasoning is one continuous block.

`TurnCoordinator::commit_partial_response` now calls
`flush_renderer_for_continuation` instead of `flush_renderer`. The
chat renderer's new `flush_for_continuation` commits buffered content
like a normal flush but keeps the deferred separator shaded when the
last content written was reasoning, so the gap stays inside the
region and the continuation's output lands on the same background.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit 4815827 into main Aug 3, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant