Repository navigation
Conversation
Gleek
marked this pull request as ready for review
November 12, 2026 15:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In chat mode, streaming responses cause frequent relabeling of the entire conversation. This is expensive in long sessions: my CPU profiles showed prompt discovery taking roughly half the sampled CPU time. With multiple such sessions running in parallel Emacs bogs down quite considerably.
Disclaimer: agent-shell is v0.87.10
From what I understand the prompt overlays include text inserted at their start.
Since streamed output is inserted immediately before the live prompt, those overlays can expand over the output and hide it. Relabeling adjusts their boundaries to reveal the output.
This change gives prompt overlays front-advance so they move with the prompt automatically.
Ordinary streaming skips prompt relabelling, while response headings continue to update.
Submissions, restores, etc, would retain full relabelling.
Checklist
M-x checkdocandM-x byte-compile-file.