Commit graph

30545 commits

Author SHA1 Message Date
Danilo Leal
de81615820 acp: Add onboarding modal & title bar banner (#36784)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-26 16:00:24 -04:00
Danilo Leal
b5b66b76d8 thread view: Improve agent installation UI (#36957)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-26 16:00:06 -04:00
Danilo Leal
ca70f091c2 thread view: Refine tool call UI (#36937)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-26 13:06:03 -04:00
Bennet Bo Fenner
1f35c62577 Revert "ai: Auto select user model when there's no default" (#36932)
Reverts zed-industries/zed#36722

Release Notes:

- N/A
2025-08-26 13:06:03 -04:00
Bennet Bo Fenner
6c8180544c acp: Improve matching logic when adding new entry to agent_servers (#36926)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-26 13:05:42 -04:00
Bennet Bo Fenner
ba07eb2d5f acp: Polish UI (#36927)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-26 13:05:42 -04:00
Ben Brandt
dabad05ecd agent2: Always finalize diffs from the edit tool (#36918)
Previously, we wouldn't finalize the diff if an error occurred during
editing or the tool call was canceled.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-26 13:05:31 -04:00
Bennet Bo Fenner
28b0b4c216 acp: Add button to configure custom agent in the configuration view (#36923)
Release Notes:

- N/A
2025-08-26 13:05:18 -04:00
Conrad Irwin
6a7588c66c acp: Send user-configured MCP tools (#36910)
Release Notes:

- N/A
2025-08-26 13:05:08 -04:00
Conrad Irwin
ee2b1f96d3 Remove unused files (#36909)
Closes #ISSUE

Release Notes:

- N/A
2025-08-26 13:04:59 -04:00
Conrad Irwin
4174b722cf acp: Rename dev command (#36908)
Release Notes:

- N/A
2025-08-26 13:04:47 -04:00
Danilo Leal
d0471d4fea thread view: Add link to docs in the toolbar plus menu (#36883)
Release Notes:

- N/A
2025-08-25 16:37:34 -04:00
Joseph T. Lyons
1d96a7af39 zed 0.201.4 2025-08-25 16:30:49 -04:00
Joseph T. Lyons
662e6a8e6d Sync Cargo.lock with Cargo.toml 2025-08-25 16:29:38 -04:00
Cole Miller
f5ef0e3714 acp: Show output for read_file tool in a code block (#36900)
Release Notes:

- N/A
2025-08-25 16:12:56 -04:00
Conrad Irwin
0b9ff531d9 acp: Update error matching (#36898)
Release Notes:

- N/A
2025-08-25 16:12:56 -04:00
Danilo Leal
fb766a5893 thread view: Fix some design papercuts (#36893)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Matt Miller <mattrx@gmail.com>
2025-08-25 15:07:56 -04:00
Bennet Bo Fenner
40ceeea91e acp: Add telemetry (#36894)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-25 15:07:33 -04:00
Danilo Leal
92a6ae1559 agent: Add section for agent servers in settings view (#35206)
Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-25 15:07:33 -04:00
Cole Miller
5d8e0f6ad1 acp: Model-specific prompt capabilities for 1PA (#36879)
Adds support for per-session prompt capabilities and capability changes
on the Zed side (ACP itself still only has per-connection static
capabilities for now), and uses it to reflect image support accurately
in 1PA threads based on the currently-selected model.

Release Notes:

- N/A
2025-08-25 14:35:22 -04:00
Conrad Irwin
66d9fb09cc Require confirmation for fetch tool (#36881)
Using prompt injection, the agent may be tricked into making a fetch
request that includes unexpected data from the conversation in the URL.

As agent conversations may contain sensitive information (like private
code, or
potentially even API keys), this seems bad.

The easiest way to prevent this is to require the user to look at the
URL
before the model is allowed to fetch it.

Thanks to @ant4g0nist for bringing this to our attention.

Release Notes:

- agent panel: The fetch tool now requires confirmation.
2025-08-25 13:00:22 -04:00
Bennet Bo Fenner
8fccb89ff0 acp: Add Reauthenticate to dropdown (#36878)
Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-25 12:57:34 -04:00
Conrad Irwin
7b17be62ea acp: Remember following state (#36793)
A beta user reported that following was "lost" when asking for
confirmation, I
suspect they moved their cursor in the agent file while reviewing the
change.
Now we will resume following when the agent starts up again.

Release Notes:

- N/A
2025-08-25 12:57:34 -04:00
Antonio Scandurra
7a6f01f37a acp: Simplify control flow for native agent loop (#36868)
Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-25 12:57:34 -04:00
Bennet Bo Fenner
c3574e6046 agent2: Less noisy logs (#36863)
Release Notes:

- N/A
2025-08-25 12:57:34 -04:00
Danilo Leal
b3be6ccb0f thread view: Prevent user message controls to be cut-off (#36865)
In the thread view, when focusing on the user message, we display the
editing control container absolutely-positioned in the top right.
However, if there are no rules items and no restore checkpoint button
_and_ it is the very first message, the editing controls container would
be cut-off. This PR fixes that by giving it a bit more top padding.

Release Notes:

- N/A
2025-08-25 12:57:05 -04:00
Bennet Bo Fenner
f3ab8d6111 acp: Show retry button for errors (#36862)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-25 12:57:05 -04:00
Cole Miller
5d0c696234 acp: Fix read_file tool flickering (#36854)
We were rendering a Markdown link like `[Read file x.rs (lines
Y-Z)](@selection)` while the tool ran, but then switching to just `x.rs`
as soon as we got the file location from the tool call (due to an
if/else in the UI code that applies to all tools). This caused a
flicker, which is fixed by having `initial_title` return just the
filename from the input as it arrives instead of a link that we're going
to stop rendering almost immediately anyway.

Release Notes:

- N/A
2025-08-25 12:57:05 -04:00
Danilo Leal
6e45a893de thread view: Add a few UI tweaks (#36845)
Release Notes:

- N/A
2025-08-25 12:57:05 -04:00
Antonio Scandurra
8bac692757 acp: Never build a request with a tool use without its corresponding result (#36847)
Release Notes:

- N/A
2025-08-24 14:36:34 -04:00
Bennet Bo Fenner
3b4c891242 acp: Cancel editing when focus is lost and message was not changed (#36822)
Release Notes:

- N/A
2025-08-24 14:36:22 -04:00
Cole Miller
29120ad573 acp: Fix accidentally reverted thread view changes (#36825)
Merge conflict resolution for #36741 accidentally reverted the changes
in #36670 to allow expanding terminals individually and in #36675 to
allow collapsing edit cards. This PR re-applies those changes, fixing
the regression.

Release Notes:

- N/A
2025-08-24 14:36:13 -04:00
Cole Miller
a313e9d869 acp: Animate loading context creases (#36814)
- Add pulsating animation for context creases while they're loading
- Add spinner in message editors (replacing send button) during the
window where sending has been requested, but we haven't finished loading
the message contents to send to the model
- During the same window, ignore further send requests, so we don't end
up sending the same message twice if you mash enter while loading is in
progress
- Wait for context to load before rewinding the thread when sending an
edited past message, avoiding an empty-looking state during the same
window

Release Notes:

- N/A
2025-08-24 14:36:06 -04:00
Antonio Scandurra
ad6bc4586a acp: Support launching custom agent servers (#36805)
It's enough to add this to your settings:

```json
{
    "agent_servers": {
        "Name Of Your Agent": {
            "command": "/path/to/custom/agent",
            "args": ["arguments", "that", "you", "want"],
        }
    }
}
```

Release Notes:

- N/A
2025-08-24 14:35:59 -04:00
Cole Miller
7bf6cc058c acp: Eagerly load all kinds of mentions (#36741)
This PR makes it so that all kinds of @-mentions start loading their
context as soon as they are confirmed. Previously, we were waiting to
load the context for file, symbol, selection, and rule mentions until
the user's message was sent. By kicking off loading immediately for
these kinds of context, we can support adding selections from unsaved
buffers, and we make the semantics of @-mentions more consistent.

Loading all kinds of context eagerly also makes it possible to simplify
the structure of the MentionSet and the code around it. Now MentionSet
is just a single hash map, all the management of creases happens in a
uniform way in `MessageEditor::confirm_completion`, and the helper
methods for loading different kinds of context are much more focused and
orthogonal.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2025-08-24 14:35:42 -04:00
Conrad Irwin
e926e0bde4 acp: Remove ACP v0 (#36785)
We had a few people confused about why some features weren't working due
to the fallback logic.

It's gone.

Release Notes:

- N/A
2025-08-24 14:35:42 -04:00
Danilo Leal
abe442c7cc thread view: Simplify tool call & improve required auth state UIs (#36783)
Release Notes:

- N/A
2025-08-24 14:35:27 -04:00
Bennet Bo Fenner
a422082b54 agent2: Tweak usage callout border (#36777)
Release Notes:

- N/A
2025-08-24 14:35:18 -04:00
Danilo Leal
7e2a20878b thread_view: Adjust empty state and error displays (#36774)
Also changes the message editor placeholder depending on the agent.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-24 14:35:10 -04:00
Agus Zubiaga
321f955667 ACP debug tools pane (#36768)
Adds a new "acp: open debug tools" action that opens a new workspace
item with a log of ACP messages for the active connection.

Release Notes:

- N/A
2025-08-24 14:34:58 -04:00
Conrad Irwin
14c599ed5e Remove style lints for now (#36651)
Closes #36577

Release Notes:

- N/A
2025-08-22 13:40:18 -04:00
Joseph T. Lyons
f8a8f4f65d zed 0.201.3 2025-08-22 13:18:25 -04:00
Anthony Eid
399d059b5f onboarding: Remove accept AI ToS from within Zed (#36612)
Users now accept ToS from Zed's website when they sign in to Zed the
first time. So it's no longer possible that a signed in account could
not have accepted the ToS.


Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-08-22 13:09:30 -04:00
Oleksiy Syvokon
e96612f0ff themes: Implement Bright Black and Bright White colors (#36761)
Before:
<img width="356" height="50" alt="image"
src="https://github.com/user-attachments/assets/c4f4ae53-8820-4f22-b306-2e5062cfe552"
/>

After:
<img width="340" height="41" alt="image"
src="https://github.com/user-attachments/assets/8e69d9dc-5640-4e41-845d-f299fc5954e3"
/>


Release Notes:

- Fixed ANSI Bright Black and Bright White colors
2025-08-22 13:08:53 -04:00
Danilo Leal
8550b27c4a thread view: Add more UI improvements (#36750)
Release Notes:

- N/A
2025-08-22 11:44:19 -04:00
Danilo Leal
6d7add4759 thread view: Inform when editing previous messages is unavailable (#36727)
Release Notes:

- N/A
2025-08-22 11:44:19 -04:00
Anthony Eid
c9758465d1 ai: Auto select user model when there's no default (#36722)
This PR identifies automatic configuration options that users can select
from the agent panel. If no default provider is set in their settings,
the PR defaults to the first recommended option. Additionally, it
updates the selected provider for a thread when a user changes the
default provider through the settings file, if the thread hasn't had any
queries yet.

Release Notes:

- agent: automatically select a language model provider if there's no
user set provider.

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
2025-08-22 11:36:49 -04:00
Antonio Scandurra
d53dedca64 acp: Support calling tools provided by MCP servers (#36752)
Release Notes:

- N/A
2025-08-22 11:35:04 -04:00
Cole Miller
6b4c9119d8 acp: Fix panic with edit file tool (#36732)
We had a frequent panic when the agent was using our edit file tool. The
root cause was that we were constructing a `BufferDiff` with
`BufferDiff::new`, then calling `set_base_text`, but not waiting for
that asynchronous operation to finish. This means there was a window of
time where the diff's base text was set to the initial value of
`""`--that's not a problem in itself, but it was possible for us to call
`PendingDiff::update` during that window, which calls
`BufferDiff::update_diff`, which calls
`BufferDiffSnapshot::new_with_base_buffer`, which takes two arguments
`base_text` and `base_text_snapshot` that are supposed to represent the
same text. We were getting the first of those arguments from the
`base_text` field of `PendingDiff`, which is set immediately to the
target base text without waiting for `BufferDiff::set_base_text` to run
to completion; and the second from the `BufferDiff` itself, which still
has the empty base text during that window.

As a result of that mismatch, we could end up adding `DeletedHunk` diff
transforms to the multibuffer for the diff card even though the
multibuffer's base text was empty, ultimately leading to a panic very
far away in rendering code.

I've fixed this by adding a new `BufferDiff` constructor for the case
where the buffer contents and the base text are (initially) the same,
like for the diff cards, and so we don't need an async diff calculation.
I also added a debug assertion to catch the basic issue here earlier,
when `BufferDiffSnapshot::new_with_base_buffer` is called with two base
texts that don't match.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2025-08-22 11:34:27 -04:00
Conrad Irwin
51d678d33b acp: Fix history search (#36734)
Release Notes:

- N/A
2025-08-22 11:34:16 -04:00