Files
zed/crates/acp_thread
Ben Brandt a65e743ad9 Show external agent authentication status in the Agent Panel (#67243)
With `acp-beta` enabled, Zed asks an external agent that advertises
`auth.status` whether it needs sign-in before starting a new thread.
Previously, Zed had to try `session/new` and wait for the agent to
reject it. This uses the [ACP authentication state
query](https://agentclientprotocol.com/rfds/get-auth-state) on both v1
and v2.

- When the agent reports `unauthenticated` and offers a supported login
method, show the existing sign-in prompt. Continue the original session
start after sign-in, keeping its draft and working directories. If the
agent doesn't support the query, fails to answer, or takes more than 200
ms, proceed as before. A real authentication error still takes
precedence.
- Show the active connection's account labels in the Agent Panel's **…**
menu (**Toggle Agent Menu**), above Reauthenticate and Log Out. Update
them on `auth/status_update`. The composer's **Agent Options** menu is
for configuration, not account information. A sign-out notification
doesn't interrupt an open thread or resend a prompt.
- Show `auth/status` results and `auth/status_update` notifications as
received in the local ACP debug log. Copied logs can include the account
email or organization if the agent supplied them. No telemetry is added.

Release Notes:

- N/A
2026-11-20 13:58:35 +00:00
..