Commit graph

30505 commits

Author SHA1 Message Date
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
Ben Brandt
e5588fc9ea acp: Tool name prep (#36726)
Prep work for deduping tool names

Release Notes:

- N/A
2025-08-21 21:19:49 -04:00
Danilo Leal
52d14c4473 thread view: Add small refinements to tool call UI (#36723)
Release Notes:

- N/A
2025-08-21 21:19:41 -04:00
Agus Zubiaga
14a50e2b23 acp: Fix MessageEditor::set_message for sent messages (#36715)
The `PromptCapabilities` introduced in previous PRs were only getting
set on the main message editor and not for the editors in user messages.
This caused a bug where mentions would disappear after resending the
message, and for the completion provider to be limited to files.

Release Notes:

- N/A
2025-08-21 17:01:37 -04:00
Antonio Scandurra
3d80be6267 acp: Allow editing of thread titles in agent2 (#36706)
Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-08-21 17:01:26 -04:00
Danilo Leal
22dd7ac732 thread view: Add improvements to the UI (#36680)
Release Notes:

- N/A
2025-08-21 16:19:19 -04:00
Agus Zubiaga
48f51c0c60 acp: Remove invalid creases on edit (#36708)
Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-21 16:19:11 -04:00
Agus Zubiaga
210727412c acp: Hide loading diff animation for external agents and update in place (#36699)
The loading diff animation can be jarring for external agents because
they stream the diff at the same time the tool call is pushed, so it's
only displayed while we're asynchronously calculating the diff. We'll
now only show it for the native agent.

Also, we'll now only update the diff when it changes, which avoids
unnecessarily hiding it for a few frames.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-21 16:19:00 -04:00
Ben Brandt
39b6558d0f acp: Move ignored integration tests behind e2e flag (#36711)
Release Notes:

- N/A
2025-08-21 16:18:13 -04:00
Julia Ryan
ca897fcd2f
Avoid suspending panicking thread while crashing (#36645)
On the latest build @maxbrunsfeld got a panic that hung zed. It appeared
that the hang occured after the minidump had been successfully written,
so our theory on what happened is that the `suspend_all_other_threads`
call in the crash handler suspended the panicking thread (due to the
signal from simulate_exception being received on a different thread),
and then when the crash handler returned everything was suspended so the
panic hook never made it to the `process::abort`.

This change makes the crash handler avoid _both_ the current and the
panicking thread which should avoid that scenario.

Release Notes:

- N/A
2025-08-21 11:10:03 -07:00
Julia Ryan
c5d96e1ef8
Use Tokio::spawn instead of getting an executor handle (#36701)
This was causing panics due to the handles being dropped out of order.
It doesn't seem possible to guarantee the correct drop ordering given
that we're holding them over await points, so lets just spawn on the
tokio executor itself which gives us access to the state we needed those
handles for in the first place.

Fixes: ZED-1R

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-21 11:09:45 -07:00
Julia Ryan
e42a0da5ce
Upload telemetry event on crashes (#36695)
This will let us track crashes-per-launch using the new minidump-based
crash reporting.

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-08-21 11:09:38 -07:00
Antonio Scandurra
ca0a20f3d5 acp: Refactor agent2 send to have a clearer control flow (#36689)
Release Notes:

- N/A
2025-08-21 13:22:38 -04:00
Joseph T. Lyons
3ea59d23fd zed 0.201.2 2025-08-21 11:11:23 -04:00
Agus Zubiaga
e436b82d94 acp: Use ResourceLink for agents that don't support embedded context (#36687)
The completion provider was already limiting the mention kinds according
to `acp::PromptCapabilities`. However, it was still using
`ContentBlock::EmbeddedResource` when
`acp::PromptCapabilities::embedded_context` was `false`. We will now use
`ResourceLink` in that case making it more complaint with the
specification.

Release Notes:

- N/A
2025-08-21 11:08:59 -04:00
Cole Miller
20710a41a0 Fix more improper uses of the buffer_id field of Anchor (#36636)
Follow-up to #36524 

Release Notes:

- N/A
2025-08-21 10:48:06 -04:00
Cole Miller
ca67e0658a Show excerpt dividers in without_headers multibuffers (#36647)
Release Notes:

- Fixed diff cards in agent threads not showing dividers between
disjoint edited regions.
2025-08-21 10:47:36 -04:00
Conrad Irwin
7f95310020 acp: Detect gemini auth errors and show a button (#36641)
Closes #ISSUE

Release Notes:

- N/A
2025-08-21 10:44:55 -04:00
Conrad Irwin
bb32d4567a acp: Hide history unless in native agent (#36644)
Release Notes:

- N/A
2025-08-21 10:44:55 -04:00
Bennet Bo Fenner
79064d1fb8 acp: Use file icons for edit tool cards when ToolCallLocation is known (#36684)
Release Notes:

- N/A
2025-08-21 10:40:10 -04:00
Bennet Bo Fenner
129b93ace9 acp: Allow collapsing edit file tool calls (#36675)
Release Notes:

- N/A
2025-08-21 10:39:56 -04:00
Antonio Scandurra
02506356bc acp: Use unstaged style for diffs (#36674)
Release Notes:

- N/A
2025-08-21 10:39:46 -04:00
Bennet Bo Fenner
90946aeb2a agent2: Allow expanding terminals individually (#36670)
Release Notes:

- N/A
2025-08-21 10:39:36 -04:00
Antonio Scandurra
8c6a1d143c Fix @-mentioning threads when their summary isn't ready yet (#36664)
Release Notes:

- N/A
2025-08-21 10:39:26 -04:00
Agus Zubiaga
b7783efc77 acp: Suggest upgrading to preview instead of latest (#36648)
A previous PR changed the install command from `@latest` to `@preview`,
but the upgrade command kept suggesting `@latest`.

Release Notes:

- N/A
2025-08-21 10:39:05 -04:00
Ben Brandt
7f0ce7c6de acp: Add e2e test support for NativeAgent (#36635)
Release Notes:

- N/A
2025-08-21 10:38:44 -04:00
Piotr Osiewicz
1c91d4b17c remote: Fix toolchain RPC messages not being handled because of the entity getting dropped (#36665)
Release Notes:

- N/A
2025-08-21 11:51:31 +02:00
Agus Zubiaga
5e27924b0b acp: Update to 0.0.30 (#36643)
See: https://github.com/zed-industries/agent-client-protocol/pull/20

Release Notes:

- N/A
2025-08-20 20:30:49 -04:00
Agus Zubiaga
e120ff6673 acp: Reliably suppress gemini abort error (#36640)
https://github.com/zed-industries/zed/pull/36633 relied on the prompt
request responding before cancel, but that's not guaranteed


Release Notes:

- N/A
2025-08-20 20:30:40 -04:00
Joseph T. Lyons
ca5f543763 zed 0.201.1 2025-08-20 18:44:59 -04:00
Agus Zubiaga
69c5af09f4 acp: Supress gemini aborted errors (#36633)
This PR adds a temporary workaround to supress "Aborted" errors from
Gemini when cancelling generation. This won't be needed once
https://github.com/google-gemini/gemini-cli/pull/6656 is generally
available.

Release Notes:

- N/A
2025-08-20 18:37:51 -04:00
Conrad Irwin
5b443bb49e acp: Handle Gemini Auth Better (#36631)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-20 18:13:26 -04:00
Cole Miller
00ff7b72d7 Fix typo in Excerpt::contains (#36621)
Follow-up to #36524 

Release Notes:

- N/A
2025-08-20 18:05:26 -04:00
Agus Zubiaga
8e57f633d0 acp: Hide feedback buttons for external agents (#36630)
Release Notes:

- N/A
2025-08-20 18:01:02 -04:00
Cole Miller
1ee07a4baf acp: Rename assistant::QuoteSelection and support it in agent2 threads (#36628)
Release Notes:

- N/A
2025-08-20 18:00:54 -04:00
Agus Zubiaga
b070dc66b3 acp: Suggest installing gemini@preview instead of latest (#36629)
Release Notes:

- N/A
2025-08-20 18:00:46 -04:00
Danilo Leal
15e451cec8 thread_view: Add recent history entries & adjust empty state (#36625)
Release Notes:

- N/A
2025-08-20 18:00:34 -04:00
Agus Zubiaga
401a604059 acp thread view: Do not go into editing mode if unsupported (#36623)
Release Notes:

- N/A
2025-08-20 18:00:26 -04:00
Ben Brandt
e9a1404329 agent2: Clean up tool descriptions (#36619)
schemars was passing along the newlines from the doc comments. This
should make these closer to the markdown file versions we had in the old
agent.

Release Notes:

- N/A
2025-08-20 18:00:17 -04:00
Joseph T. Lyons
13a5598008 v0.201.x preview 2025-08-20 15:13:52 -04:00
Agus Zubiaga
2813073d7b
message editor: Only allow types of content the agent can handle (#36616)
Uses the new
[`acp::PromptCapabilities`](a39b7f635d/rust/agent.rs (L194-L215))
to disable non-file mentions and images for agents that don't support
them.

Release Notes:

- N/A
2025-08-20 19:04:10 +00:00