agent_ui: Add reload controls for failed agent connections (#62669)
## Summary
Follow-up to KevinLaveto's #58213 (closed due to no response). Adds two
ways to restart a broken external ACP agent connection from the Agent
Panel, without restarting Zed:
1. A retry button in the toolbar, shown when the active thread's agent
is in `LoadError` state.
2. A "Reload Agent" entry in the panel options menu, available whenever
an agent thread is active.
Both call `ConversationView::retry_connection`, which drops the cached
connection entry (via `AgentConnectionStore::restart_connection`) so the
next request spawns a fresh server process, then rebuilds the thread
state. This covers both launch failures and agents that died after
connecting.
Closes the scenarios in #52102, #55501, #60213, #61386 and
zed-industries/zed#62668.
## Showcase
https://github.com/user-attachments/assets/51b5b588-187d-45fb-a35c-b7d625644b30
Release Notes:
- Added the ability to reload a broken external agent connection from
the Agent Panel without restarting Zed.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
96382d8e7eCodeNebula committed on 8/25/2026, 9:42:52 AM· committed by GitHubparent693140a