@@ -39,7 +39,7 @@ To remove a project from the Threads Panel, click the close button on its header
Q: What happens if I remove all of the projects in my window, while I have a project open?
A: You cannot remove the currently open project. However, if you do not have any projects open in the window, then we will show the empty state.
-----SIDE THOUGHT: If the opened state is so important, can we show it in the sidebar somehow?-----
+----SIDE THOUGHT: If the opened state is so important, can we show it in the sidebar somehow? But this is hard in the presence of git worktrees...-----
Q: What happens if I have a running thread and remove its project from my window?
A: That thread will stop running.
@@ -50,13 +50,49 @@ When you add or remove folders from your current project, the Threads Panel upda
## Worktrees {#worktrees}
-The Zed agent supports automatic worktree initialization across all agents. When you select "New Worktree" from the dropdown, a new Git worktree is created for each root repository in the project. See the worktree specific documentation for how the worktrees are initialized.
+The Zed agent supports automatic worktree initialization across all agents. When you select "New Worktree" from the dropdown, a new Git worktree is created for each root repository in the project. See the worktree-specific documentation for how the worktrees are initialized.
For each thread started via this new worktree option, a corresponding thread entry is inserted underneath that project in the Threads Panel, with a chip indicating the worktree used. This lets you run isolated agent sessions on separate worktrees without them interfering with each other's work.
-Note that worktrees are considered a separate project, but are only shown as part of their main worktree's project. You can have a window with the main worktree's project open and a window with the linked worktree open, even though normally you can only have one project open at a time.
+> [!NOTE]
+> Worktrees are considered a separate project, but are only shown as part of their main worktree's project. You can have a window with the main worktree's project open and a window with the linked worktree open, even though normally you can only have one project open at a time.
+
+> [!NOTE]
+> Worktrees without threads will not show up in the Threads Panel, only their original repository will be shown.
+
+
+--- SIDE THOUGHT ----
+These notes, and the one above about representing the "open" state, are all tangled up with worktrees not being full-fledged projects. What if we fixed that?
+
+Essentially moving from this:
+
+```
+zed
+ Thread 1 {selectric}
+ Thread 2 {selectric}
+ Thread 3 {olivetti}
+ Thread 4 {olivetti}
+ Thread 5
+ Thread 6
+```
+
+To this:
+
+```
+zed {selectric}
+ Thread 1
+ Thread 2
+
+zed {olivetti}
+ Thread 3
+ Thread 4
+
+zed
+ Thread 5
+ Thread 6
+```
+----- /SIDE THOUGHT -----
-Worktrees without threads will not show up in the Threads Panel, only their original repository will be shown.
Q: What about worktrees made outside of Zed? How do I get them into the Threads Panel?
A: Simply open each folder, like you would any other folder, and then click the agent panel and start typing. The new thread with the worktree chip will appear automatically in the Threads Panel once you submit your prompt.