# agent_ui: Fix creating a thread from the toolbar \(\#53706\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9f507655c85d498d3eadb88349729e35ae35d684

Requested commit: 9f507655c85d498d3eadb88349729e35ae35d684

Commit: 9f507655c85d498d3eadb88349729e35ae35d684

Tree: 9748791ca6bee13c552ee3174c3298050990229a

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Fix creating a thread from the toolbar (#53706)

Follow up to https://github.com/zed-industries/zed/pull/53574
Closes https://github.com/zed-industries/zed/issues/53705

In the draft feature PR, we didn't update the new thread creation from
the agent panel's toolbar to _also_ create a corresponding draft item in
the sidebar. Additionally, the draft feature exposed a
previously-existing bug where the toolbar wouldn't get synced with the
currently selected agent; and as you navigated between them, we would
fall back to the native agent, as well as when you hit cmd-n.

cc @mikayla-maki just a quick FYI here for the revamp! Will push this
forward in the meantime given it's a bit of a bad bug.

Release Notes:

- N/A
```

## Parents

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

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