Commit graph

36 commits

Author SHA1 Message Date
tidely
7bdc99abc1
Fix clippy::redundant_clone lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.

A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.

I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.

Release Notes:

- N/A
2025-08-20 12:20:13 +02:00
Cole Miller
3996587c0b
Add version detection for CC (#36502)
- Render a helpful message when the installed CC version is too old
- Show the full path for agent binaries when the version is not recent
enough (helps in cases where multiple binaries are installed in
different places)
- Add UI for the case where a server binary is not installed at all
- Refresh thread view after installing/updating server binary

Release Notes:

- N/A
2025-08-20 01:59:14 +00:00
Agus Zubiaga
7c7043947b
Improve claude tools (#36538)
- Return unified diff from `Edit` tool so model can see the final state
- Format on save if enabled
- Provide `Write` tool
- Disable `MultiEdit` tool
- Better prompting

Release Notes:

- N/A
2025-08-20 01:42:11 +00:00
Agus Zubiaga
714c36fa7b
claude: Include all mentions and images in user message (#36539)
User messages sent to Claude Code will now include the content of all
mentions, and any images included.

Release Notes:

- N/A
2025-08-19 22:30:26 -03:00
Antonio Scandurra
6c255c1973
Lay the groundwork to support history in agent2 (#36483)
This pull request introduces title generation and history replaying. We
still need to wire up the rest of the history but this gets us very
close. I extracted a lot of this code from `agent2-history` because that
branch was starting to get long-lived and there were lots of changes
since we started.

Release Notes:

- N/A
2025-08-19 14:24:23 +00:00
Piotr Osiewicz
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
Cole Miller
d30b017d1f
Prevent sending slash commands in CC threads (#36453)
Highlight them as errors in the editor, and add a leading space when
sending them so users don't hit the odd behavior when sending these
commands to the SDK.

Release Notes:

- N/A
2025-08-19 02:00:41 -04:00
Agus Zubiaga
b578031120
claude: Respect always allow setting (#36450)
Claude will now respect the `agent.always_allow_tool_actions` setting
and will set it when "Always Allow" is clicked.

Release Notes:

- N/A
2025-08-18 23:27:08 +00:00
Piotr Osiewicz
9e0e233319
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-18 21:54:35 +00:00
Agus Zubiaga
8b89ea1a80
Handle auth for claude (#36442)
We'll now use the anthropic provider to get credentials for `claude` and
embed its configuration view in the panel when they are not present.

Release Notes:

- N/A
2025-08-18 20:40:59 +00:00
Ben Brandt
b3969ed427
Standardize on canceled instead of cancelled (#36385)
Release Notes:

- N/A
2025-08-18 04:07:32 +00:00
Ben Brandt
332626e582
Allow Permission Request to only require a ToolCallUpdate instead of a full tool call (#36319)
Release Notes:

- N/A
2025-08-16 15:04:09 +00:00
Agus Zubiaga
91e6b38285
Log agent servers stderr (#36243)
Release Notes:

- N/A
2025-08-15 10:58:57 -03:00
Bennet Bo Fenner
6f3cd42411
agent2: Port Zed AI features (#36172)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-15 11:17:17 +00:00
Agus Zubiaga
43ee604179
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-14 18:30:18 +00:00
Ben Brandt
23cd5b59b2
agent2: Initial infra for checkpoints and message editing (#36120)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-13 15:46:28 +00:00
Agus Zubiaga
6912dc8399
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-07 20:26:19 -03:00
Agus Zubiaga
bd1c26cb5b
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-06 22:55:17 -03:00
Agus Zubiaga
69dc870828
Fix CC todo tool parsing (#35721)
It looks like the TODO tool call no longer requires a priority.

Release Notes:

- N/A
2025-08-06 13:27:11 +00:00
Agus Zubiaga
22fa41e9c0
Handle CC thinking (#35722)
Release Notes:

- N/A
2025-08-06 13:20:53 +00:00
Agus Zubiaga
3bbd32b70e
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-06 12:23:47 +00:00
Ben Brandt
eb4b73b88e
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-06 09:01:06 +00:00
Cole Miller
bc2108cbba
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-05 22:52:08 +00:00
Agus Zubiaga
b7469f5bc3
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-05 19:10:51 -03:00
Ben Brandt
f17943e4a3
Update to new agent schema (#35578)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-04 13:49:41 +00:00
Agus Zubiaga
fd68265efd
Fix integration tests for claude (#35212)
Release Notes:

- N/A
2025-07-28 16:18:01 +00:00
Agus Zubiaga
c2fc70eef7
ACP over MCP server impl (#35196)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-07-28 14:14:10 +00:00
Ben Brandt
c995d45bd9
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-07-27 13:58:02 +00:00
Ben Brandt
a5b7cfd128
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-07-27 13:50:04 +00:00
Agus Zubiaga
15c9da4ea4
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-07-25 02:19:20 +00:00
Agus Zubiaga
2d0f10c48a
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-07-24 14:39:29 -03:00
Agus Zubiaga
722a05bc21
Wire up stop button in claude threads (#34839)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-07-21 20:33:59 +00:00
Agus Zubiaga
405244d422
Display ACP plans (#34816)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-07-21 11:11:37 -03:00
Ben Brandt
cfe1adc792
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-07-18 13:17:41 +00:00
Agus Zubiaga
dab0b3509d
Unify agent server settings and extract e2e tests out (#34642)
Release Notes:

- N/A
2025-07-17 17:34:38 +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