Only archive worktrees that Zed created (#53991)

When archiving a thread, we now check whether the linked worktree lives
inside the Zed-managed worktrees directory (configured via
`git.worktree_directory`). If it doesn't — meaning the user created it
themselves outside of Zed — we skip both the directory deletion and the
`git worktree remove`, leaving it untouched.

Previously, archiving a thread would delete *any* linked worktree
associated with the thread's folder paths, even ones the user had
created manually via `git worktree add`.

Release Notes:

- Fixed archiving an agent thread deleting linked git worktrees the user
created outside of Zed's managed worktrees directory.
e2780f6fbdRichard Feldman committed on 4/15/2026, 7:54:03 PM· committed by GitHubparentbf25cb1
2 files changedLine totals unavailable