# sidebar: Add right-click menu to thread items \(\#58232\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 26e69b9d9e3d0782b20313ffc865f62546b09f6b

Requested commit: 26e69b9d9e3d0782b20313ffc865f62546b09f6b

Commit: 26e69b9d9e3d0782b20313ffc865f62546b09f6b

Tree: fb9566236f429d47ff9b41b8c068e50c5ec5a6ab

Author: Danilo Leal

Committer: GitHub

## Message

```
sidebar: Add right-click menu to thread items (#58232)

Closes AI-286

This PR adds a right-click menu to thread items in the sidebar. A big
motivation for this addition was surfacing the "regenerate thread title"
action. And because this action and the "open thread as markdown" action
previously only worked on the already-loaded agent panel, there was a
load of plumbing needed to make that work even for threads in workspaces
that haven't been loaded, mostly using the thread metadata store. At the
end of the day, the title regeneration feature is only possible for the
Zed agent, so this is gated from external agents. But I believe it's now
in a slightly nicer spot due to some refactors to better expose the
state in which the title regeneration can fall into.

Release Notes:

- Agent: Added a right-click menu to thread items in the sidebar,
allowing to regenerate a thread title, rename a thread title, open the
thread as markdown, and archive it.

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

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

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