Commit graph

38 commits

Author SHA1 Message Date
Agus Zubiaga
9a73aacf88
Log agent servers stderr (#36243)
Release Notes:

- N/A
2025-08-23 10:39:15 -04:00
Bennet Bo Fenner
eb1e6e6b73
agent2: Port Zed AI features (#36172)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-23 10:39:15 -04:00
Agus Zubiaga
03efb2ac3c
acp: Clean up entry views on rewind (#36197)
We were leaking diffs and terminals on rewind, we'll now clean them up.
This PR also introduces a refactor of how we mantain the entry view
state to use a `Vec` that's kept in sync with the thread entries.

Release Notes:

- N/A
2025-08-23 10:39:14 -04:00
Ben Brandt
971738b49e
agent2: Initial infra for checkpoints and message editing (#36120)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-23 10:38:45 -04:00
Agus Zubiaga
39d04a1371
Fix CC tool state on cancel (#35763)
When we stop the generation, CC tells us the tool completed, but it was
actually cancelled.

Release Notes:

- N/A
2025-08-23 10:38:14 -04:00
Ben Brandt
a646f94565
Wire up find_path tool in agent2 (#35799)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-23 10:38:14 -04:00
Antonio Scandurra
948fd9c540
Add system prompt and tool permission to agent2 (#35781)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-08-23 10:38:11 -04:00
Agus Zubiaga
6f193d94d5
Fix interrupting ACP threads and CC cancellation (#35752)
Fixes a bug where generation wouldn't continue after interrupting the
agent, and improves CC cancellation so we don't display "[Request
interrupted by user]"

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-23 10:38:10 -04:00
Agus Zubiaga
22796cbed2
Fix CC todo tool parsing (#35721)
It looks like the TODO tool call no longer requires a priority.

Release Notes:

- N/A
2025-08-23 10:38:09 -04:00
Agus Zubiaga
dcd5ad47f7
Handle CC thinking (#35722)
Release Notes:

- N/A
2025-08-23 10:38:09 -04:00
Agus Zubiaga
aa520493f0
Support CC migrate-installer path (#35717)
If we can't find CC in the PATH, we'll now fall back to a known local
install path.

Release Notes:

- N/A
2025-08-23 10:38:09 -04:00
Ben Brandt
3cd60e81a1
ACP champagne (#35609)
cherry pick changes from #35510 onto latest main

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-23 10:38:09 -04:00
Cole Miller
57da8d4e86
Render error state when agent binary exits unexpectedly (#35651)
This PR adds handling for the case where an agent binary exits
unexpectedly after successfully establishing a connection.

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
2025-08-23 10:37:27 -04:00
Agus Zubiaga
490f63c492
Fix ACP connection and thread leak (#35670)
When you switched away from an ACP thread, the `AcpThreadView` entity
(and thus thread, and subprocess) was leaked. This happened because we
were using `cx.processor` for the `list` state callback, which uses a
strong reference.

This PR changes the callback so that it holds a weak reference, and adds
some tests and assertions at various levels to make sure we don't
reintroduce the leak in the future.

Release Notes:

- N/A
2025-08-23 10:37:27 -04:00
Cole Miller
0feea4b6fb
Handle startup failure for gemini-cli (#35624)
This PR adds handling for the case where the user's gemini-cli binary
fails to start up because it's too old to support the
`--experimental-acp` flag. We previously had such handling, but it got
lost as part of #35578.

This doesn't yet handle the case where the server binary exits
unexpectedly after the connection is established; that'll be dealt with
in a follow-up PR since it needs different handling and isn't specific
to gemini-cli.

Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
2025-08-23 10:37:26 -04:00
Agus Zubiaga
98cef9708d
Update to acp 0.0.18 (#35595)
Release Notes:

- N/A
2025-08-23 10:37:25 -04:00
Agus Zubiaga
a0adf0062c
Fix gemini e2e tests (#35583)
Release Notes:

- N/A
2025-08-23 10:37:19 -04:00
Ben Brandt
5f184614e1
Update to new agent schema (#35578)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-23 10:37:18 -04:00
Finn Evers
aeb68cd84a
Ensure context servers are spawned in the workspace directory (#35271)
This fixes an issue where we were not setting the context server working
directory at all.

Release Notes:

- Context servers will now be spawned in the currently active project
root.

---------

Co-authored-by: Danilo Leal <danilo@zed.dev>
2025-08-23 10:36:05 -04:00
Agus Zubiaga
a9ef9e10bd
Fix remaining agent server integration tests (#35222)
Release Notes:

- N/A
2025-08-23 10:36:05 -04:00
Agus Zubiaga
deaa91cc93
Fix integration tests for claude (#35212)
Release Notes:

- N/A
2025-08-23 10:36:03 -04:00
Agus Zubiaga
44812542d5
ACP over MCP server impl (#35196)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-23 10:36:03 -04:00
Ben Brandt
2f95f939d7
agent_servers: Include result text in Claude error messages (#35156)
This will better surfaces issues that are classified as "success" but
actually have a more meaningful error message attached.

Release Notes:

- N/A
2025-08-23 10:36:02 -04:00
Ben Brandt
846cdc9ea7
agent_servers: Use built-in interrupt handling for Claude sessions (#35154)
We no longer have to stop and restart the entire process. 
I left in the Start/Resume mode handling since we will likely need to
handle restarting Claude in other situations.

Release Notes:

- N/A
2025-08-23 10:36:02 -04:00
Agus Zubiaga
63ef1cd701
McpServerTool output schema (#35069)
Add an `Output` associated type to `McpServerTool`, so that we can
include its schema in `tools/list`.

Release Notes:

- N/A
2025-08-23 10:35:55 -04:00
Agus Zubiaga
3e072896fd
Add ability to register tools in McpServer (#35068)
Makes it easier to add tools to a server by implementing a trait

Release Notes:

- N/A
2025-08-23 10:35:55 -04:00
Agus Zubiaga
45daf26e7a
Refactor to use new ACP crate (#35043)
This will prepare us for running the protocol over MCP

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-08-23 10:35:54 -04:00
Agus Zubiaga
f56525d51b
Improve MCP server responses (#34927)
Release Notes:

- N/A
2025-08-23 10:35:51 -04:00
Agus Zubiaga
45d6ae3647
Wire up stop button in claude threads (#34839)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-23 10:35:23 -04:00
Agus Zubiaga
21f5d0874a
Fix loading agent server settings (#34662)
Release Notes:

- N/A
2025-08-23 10:35:22 -04:00
Agus Zubiaga
2090fb71c6
Display ACP plans (#34816)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-23 10:35:22 -04:00
Ben Brandt
823b2fd292
claude: Don't quote executable path in mcp configuration (#34805)
This was generating an invalid string for the configuration, removing
the extra quotes makes it work. This affected the versions of Zed that
have a space in their name.

Release Notes:

- N/A
2025-08-23 10:35:22 -04:00
Ben Brandt
6740f84de8
E2E Claude tests (#34702)
- **Fix cancellation of tool calls**
- **Make tool_call test more resilient**
- **Fix tool call confirmation test**

Release Notes:

- N/A
2025-08-23 10:35:20 -04:00
Agus Zubiaga
3a03b38c33
Unify agent server settings and extract e2e tests out (#34642)
Release Notes:

- N/A
2025-08-23 10:35:19 -04:00
Ben Brandt
b0eac4267d
Mark glob/grep as code blocks (#34628)
Release Notes:

- N/A
2025-07-17 15:01:02 +00:00
Agus Zubiaga
8e4555455c
Claude experiment (#34577)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-07-17 14:25:55 +00:00
Conrad Irwin
fc24102491
Tweaks to ACP for the Gemini PR (#34506)
- **Update to use --experimental-acp**
- **Fix tool locations**

Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: mkorwel <matt.korwel@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-07-15 17:52:50 -06:00
Conrad Irwin
495ec7a109
ACP (#34030)
Implements an ACP client that can be used from the agent panel
2025-07-09 16:02:31 +00:00