Skip to content

improve stream rendering and show tool calling - #90

Merged
tfcace merged 2 commits into
tfcace:masterfrom
roeyazroel:codex/improve-stream
Aug 2, 2026
Merged

improve stream rendering and show tool calling#90
tfcace merged 2 commits into
tfcace:masterfrom
roeyazroel:codex/improve-stream

Conversation

@roeyazroel

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread internal/agent/acp.go Outdated

// sendStreamingAttempt remains as a small test-facing compatibility helper.
// Production paths use sendEventStreamingAttempt through SendEventStream.
func (t *ACPTransport) sendStreamingAttempt(ctx context.Context, req Request, textCh chan<- string) (bool, error) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this shouldn't live here.
test only functions and methods should live in _test.go files.

Comment thread internal/agent/acp.go Outdated
if attempt < maxAttempts-1 && !receivedText && IsRetryableError(err) {
// Tool activity can be side-effecting even before assistant text is
// available. Never retry such a turn transparently.
if attempt < maxAttempts-1 && !observedActivity && IsRetryableError(err) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'm not sure the substitution makes sense.
If we don't retry on tool calls, will this retry on text output streams? don't we risk duplicated outputs?

Comment thread internal/agent/stream.go Outdated
}
}

events := make(chan StreamEvent, 16)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

why 16?

Comment thread internal/editor/display.go Outdated
//
//nolint:gocyclo // terminal rendering requires many conditional escape sequences
func (d *Display) RenderWithGhost(buf *Buffer, cur *Cursor, hasSelection bool, ghostText string, streaming, fromAgent bool, modelName string) {
func (d *Display) RenderWithGhost(buf *Buffer, cur *Cursor, hasSelection bool, ghostText string, streaming, fromAgent bool, modelName, streamingStatus string) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

there are enough arguments here already.
streaming state should be packed into a single argument, have both a boolean streaming and a string streamingStatus feel wrong.

either collapse to a single struct carrying both, and consider using existing Display patterns for setting state Set[Mode|Gutters] etc.)

Comment thread internal/editor/editor.go Outdated
ghost *GhostText
ghostTextChan GhostTextChan // Channel for streaming ghost text updates
ghostErrChan <-chan error // Channel for ghost text errors
streamingModel string // Model name for "Thinking..." display

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

why is this part of the editor?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I really like the response spinner the way it is.

@roeyazroel
roeyazroel requested a review from tfcace August 1, 2026 11:59
@roeyazroel
roeyazroel force-pushed the codex/improve-stream branch from e87274f to c647ad1 Compare August 1, 2026 12:04
@roeyazroel
roeyazroel force-pushed the codex/improve-stream branch from c647ad1 to 7717565 Compare August 1, 2026 12:10
@tfcace
tfcace merged commit 9aacbd4 into tfcace:master Aug 2, 2026
3 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.

2 participants