# agent_ui: Make thread generation top-down \(\#52440\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a3d72e542756d7f50e8067234dac1168a2da8acd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a3d72e542756d7f50e8067234dac1168a2da8acd

Requested commit: a3d72e542756d7f50e8067234dac1168a2da8acd

Commit: a3d72e542756d7f50e8067234dac1168a2da8acd

Tree: d6e739efe715fb2579936a9622aab7bd7b1fbb88

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Make thread generation top-down (#52440)

Ever since we introduced the agent panel the way it is right now back in
May 2025, we wanted to make the thread generation be top-down. Now, with
the changes we're planning to launch very soon revolving around parallel
agents, doing this become even more important for a better experience.
Particularly because in the agent panel's new empty state, the message
editor is full screen. We want to minimize as much as possible layout
shift between writing your first prompt and actually submitting it. So
this means that content will stream down from your first prompt and
auto-scroll you if it goes beyond the viewport.

To pull this off, we added a `follow_tail` feature directly to the GPUI
list so that we could only call it in the thread view layer as opposed
to doing it all there.


https://github.com/user-attachments/assets/99961819-6a79-40e0-b482-dca68c829161

Release Notes:

- Agent: Made the thread generation be top-down instead of bottom-up.
Agent content now streams from the top and auto-scroll as they go beyond
the viewport.

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
```

## Parents

- [b7c64e56b1f95cf787c0e52bd5e39f247cfb9125](https://git.cafe/gitcafe/zed/commit/b7c64e56b1f95cf787c0e52bd5e39f247cfb9125?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a3d72e542756d7f50e8067234dac1168a2da8acd?format=markdown)
