agent_ui: Improve draft threads for worktrees (#58268)

Closes AI-351

This PR builds on top of
https://github.com/zed-industries/zed/pull/57692 by improving the draft
threads UX in the context of worktrees. If you have more than one
worktree loaded for a given group, clicking on the plus button will now
display a menu allowing you to choose for which worktree you'd like to
open a new thread in. This felt particularly relevant in the case of
discarding a draft within a worktree when that was the only thread item
for that worktree, making it hard to come back to it.

Added some extra stuff in here as well with regards to better draft
management. Most notably, if you created a new thread and then typed
something, this draft thread would show a timestamp that's relative to
the creation time of the thread. However, if you moments later deleted
the draft content and then typed something up again, the timestamp would
be stuck in the creation time. That felt wrong because by erasing the
content you effectively reset the draft. So, this branch makes it so, in
this context, the timestamp would be reset to now.

Release Notes:

- Agents: Added improvements for the draft thread UX particularly in the
context of worktrees, allowing to choose for which worktree to open a
thread in when the group contains more than one.
b077f41a9fDanilo Leal committed on 6/2/2026, 12:30:15 PM· committed by GitHubparent39f7849
1 file changedLine totals unavailable