agent_panel: Fix bug where worktree picker showed linked tree as main (#53334)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
This commit is contained in:
Anthony Eid 2026-04-07 20:35:33 -04:00 committed by GitHub
parent 7bcdb12b4c
commit bf9cea6bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -626,7 +626,7 @@ impl StartThreadIn {
Self::LocalProject => {
let suffix = project.active_repository(cx).and_then(|repo| {
let repo = repo.read(cx);
let work_dir = &repo.work_directory_abs_path;
let work_dir = &repo.original_repo_abs_path;
let visible_paths: Vec<_> = project
.visible_worktrees(cx)
.map(|wt| wt.read(cx).abs_path().to_path_buf())