agent: Support remote connection args in thread metadata database (#53550)

This PR adds remote connection data to the threads metadata database.
This fixes an issue where threads ran on separate projects with the same
remote/local path list would show up in the sidebar in both workspaces,
instead of only the workspace they were originally created in.

I added a migrator that uses the workspace persistence database to add
remote connection argument to threads that only have path list matches
with a remote project. If a path list matches with both local/remote
workspaces, we default to setting it as local.

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

Release Notes:

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: Eric Holk <eric@zed.dev>
377e78b8bfAnthony Eid committed on 4/10/2026, 2:45:01 AM· committed by GitHubparentb8766ef
3 files changedLine totals unavailable