agent_ui: Auto-expand and then collapse thinking blocks#51525
Merged
danilo-leal merged 1 commit intomainfrom Mar 13, 2026
Merged
agent_ui: Auto-expand and then collapse thinking blocks#51525danilo-leal merged 1 commit intomainfrom
danilo-leal merged 1 commit intomainfrom
Conversation
tommyming
pushed a commit
to tommyming/zed
that referenced
this pull request
Mar 15, 2026
…es#51525) With these newer models that come with different thinking levels, it's become more frequent to want to see what the thinking is outputting. Thus far in Zed, the thinking block would show up automatically collapsed and every time you wanted to see it, you had to expand it manually. This PR changes that by making the thinking block automatically _expanded_ instead, but as soon as it's done, it collapses again. Release Notes: - Agent: Improved visibility of thinking blocks by making them auto-expanded while in progress.
I think it's a good idea to add the "Expand Thinking Card" setting, similar to the others. @danilo-leal |
This was referenced Mar 27, 2026
Closed
danilo-leal
added a commit
that referenced
this pull request
Mar 30, 2026
Follow up to #51525 Closes #52452 This PR further refines the behavior of thinking blocks in the agent panel. In the PR linked above, I had previously made it auto-expand while running but then auto-collapse when finished. Although that reduced the sense of staleness when the model is thinking for too long, it caused layout shift that many found jarring. Therefore, this PR changes the behavior so that, by default, thinking blocks render "almost" fully expanded. They will have a max-height and will auto-scroll as content streams in. Therefore, this design fully removes layout shift and still allows you to sort of follow along the generated thinking content, even though sometimes it can be fast, in which case you can always fully expand it. Lastly, I'm also adding a "thinking display" setting that allows to choose between the "automatic" behavior (what I just described, the default), always expanded, or always collapsed. Here's a preview: https://github.com/user-attachments/assets/c96c89c7-40ed-4e9b-9ffc-f70b0659be47 Release Notes: - Agent: Refined thinking block display, removing layout shift while still allowing it to be readable while it streams in. It comes together with a "Thinking Display" setting to control the behavior
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.

With these newer models that come with different thinking levels, it's become more frequent to want to see what the thinking is outputting. Thus far in Zed, the thinking block would show up automatically collapsed and every time you wanted to see it, you had to expand it manually. This PR changes that by making the thinking block automatically expanded instead, but as soon as it's done, it collapses again.
Release Notes: