# sidebar: Use last used agent when creating a new thread from it \(\#52446\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 831595098279225abf1087604399376418e79bf5

Requested commit: 831595098279225abf1087604399376418e79bf5

Commit: 831595098279225abf1087604399376418e79bf5

Tree: b17381622eea01d39fa3e92c76d38df83ec806ec

Author: Danilo Leal

Committer: GitHub

## Message

```
sidebar: Use last used agent when creating a new thread from it (#52446)

The "new thread" buttons as well as the `cmd-n` keybinding were
resetting the agent to the Zed one instead of following the agent
panel's behavior to use whatever agent was recently selected, as per the
key-value store.

Release Notes:

- N/A
```

## Parents

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

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