Commit graph

224 commits

Author SHA1 Message Date
Agus Zubiaga
4bee06e507
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 14:57:46 +00:00
Conrad Irwin
d9ea97ee9c
acp: Detect gemini auth errors and show a button (#36641)
Closes #ISSUE

Release Notes:

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

- N/A
2025-08-21 08:43:57 -06:00
Bennet Bo Fenner
001ec97c0e
acp: Use file icons for edit tool cards when ToolCallLocation is known (#36684)
Release Notes:

- N/A
2025-08-21 14:18:22 +00:00
Bennet Bo Fenner
ad64a71f04
acp: Allow collapsing edit file tool calls (#36675)
Release Notes:

- N/A
2025-08-21 11:05:41 +00:00
Bennet Bo Fenner
62f2ef86dc
agent2: Allow expanding terminals individually (#36670)
Release Notes:

- N/A
2025-08-21 11:25:00 +02:00
Antonio Scandurra
fda6eda3c2
Fix @-mentioning threads when their summary isn't ready yet (#36664)
Release Notes:

- N/A
2025-08-21 08:57:28 +00:00
Kirill Bulatov
5dcb90858e
Stop waiting for part of LSP responses on remote Collab clients' part (#36557)
Instead of holding a connection for potentially long LSP queries (e.g.
rust-analyzer might take minutes to look up a definition), disconnect
right after sending the initial request and handle the follow-up
responses later.

As a bonus, this allows to cancel previously sent request on the local
Collab clients' side due to this, as instead of holding and serving the
old connection, local clients now can stop previous requests, if needed.

Current PR does not convert all LSP requests to the new paradigm, but
the problematic ones, deprecating `MultiLspQuery` and moving all its
requests to the new paradigm.

Release Notes:

- Improved resource usage when querying LSP over Collab

---------

Co-authored-by: David Kleingeld <git@davidsk.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-08-21 09:24:34 +03:00
Marshall Bowers
c20233e0b4
agent_ui: Fix signed-in check in Zed provider configuration (#36639)
This PR fixes the check for if the user is signed in in the Agent panel
configuration.

Supersedes https://github.com/zed-industries/zed/pull/36634.

Release Notes:

- Fixed the user's plan badge near the Zed provider in the Agent panel
not showing despite being signed in.
2025-08-20 23:09:09 +00:00
Conrad Irwin
5120b6b7f9
acp: Handle Gemini Auth Better (#36631)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-20 16:12:41 -06:00
Agus Zubiaga
9e34bb3f05
acp: Hide feedback buttons for external agents (#36630)
Release Notes:

- N/A
2025-08-20 21:35:48 +00:00
Cole Miller
595cf1c6c3
acp: Rename assistant::QuoteSelection and support it in agent2 threads (#36628)
Release Notes:

- N/A
2025-08-20 21:31:25 +00:00
Danilo Leal
fb7edbfb46
thread_view: Add recent history entries & adjust empty state (#36625)
Release Notes:

- N/A
2025-08-20 18:01:22 -03:00
Agus Zubiaga
02dabbb9fa
acp thread view: Do not go into editing mode if unsupported (#36623)
Release Notes:

- N/A
2025-08-20 20:05:53 +00: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
Cole Miller
41e28a7185
Add tracked buffers for agent2 mentions (#36608)
Release Notes:

- N/A
2025-08-20 14:01:18 -04:00
Bennet Bo Fenner
8334cdb358
agent2: Port feedback (#36603)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-20 19:10:43 +02:00
Antonio Scandurra
d0fb6120d9
Fix scrollbar flicker when streaming agent2 response (#36606)
This was caused by calling `list_state.splice` on updated entries. We
don't need to splice the entry, as we'll recompute its measurements
automatically when we render it.

Release Notes:

- N/A
2025-08-20 16:39:46 +00:00
Umesh Yadav
1e6cefaa56
Fix clippy::len_zero lint style violations (#36589)
Related: #36577

Release Notes:

- N/A

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-08-20 14:35:59 +00:00
Antonio Scandurra
eaf6b56163
Miscellaneous UX fixes for agent2 (#36591)
Release Notes:

- N/A
2025-08-20 13:56:39 +00:00
Bennet Bo Fenner
85865fc950
agent2: New thread from summary (#36578)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-20 13:54:00 +00:00
tidely
bc79076ad3
Fix clippy::manual_map lint violations (#36584)
#36577

Release Notes:

- N/A
2025-08-20 15:17:28 +02:00
Antonio Scandurra
de12633591
Wait for agent2 feature flag before loading panel (#36583)
Release Notes:

- N/A
2025-08-20 15:02:40 +02:00
tidely
6ed29fbc34
Enforce style lints which do not have violations (#36580)
Release Notes:

- N/A
2025-08-20 14:07:37 +02:00
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
Piotr Osiewicz
cf7c64d77f
lints: A bunch of extra style lint fixes (#36568)
- **lints: Fix 'doc_lazy_continuation'**
- **lints: Fix 'doc_overindented_list_items'**
- **inherent_to_string and io_other_error**
- **Some more lint fixes**
- **lints: enable bool_assert_comparison, match_like_matches_macro and
wrong_self_convention**


Release Notes:

- N/A
2025-08-20 12:05:58 +02:00
tidely
44941b5dfe
Fix clippy::for_kv_map lint violations (#36493)
Release Notes:

- N/A
2025-08-20 11:22:19 +02:00
Bennet Bo Fenner
d4d049d7b9
agent2: Port more Zed AI features (#36559)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-20 08:45:03 +00:00
Conrad Irwin
5d2bb2466e
ACP history mentions (#36551)
- **TEMP**
- **Update @-mentions to use new history**

Closes #ISSUE

Release Notes:

- N/A
2025-08-20 06:25:07 +00:00
Danilo Leal
159b5e9fb5
agent2: Port user_modifier_to_send setting (#36550)
Release Notes:

- N/A
2025-08-20 05:30:43 +00:00
Danilo Leal
1e1110ee8c
thread_view: Increase click area of the user rules links (#36549)
Release Notes:

- N/A
2025-08-20 05:20:58 +00:00
Danilo Leal
60960409f7
thread view: Refine the UI a bit (#36504)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-20 01:47:28 -03:00
Ben Brandt
d273aca1c1
agent_ui: Add check to prevent sending empty messages in MessageEditor (#36545)
Release Notes:

- N/A
2025-08-20 04:06:24 +00:00
Agus Zubiaga
b12d862236
Rename acp flag (#36541)
Release Notes:

- N/A
2025-08-20 02:11:17 +00: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
Conrad Irwin
757b37fd41
Hide old Agent UI when ACP flag set (#36533)
- **Use key value store instead of JSON**
- **Default NewThread to the native agent when flagged**

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-19 16:42:52 -06:00
Conrad Irwin
88754a70f7
Rebuild recently opened threads for ACP (#36531)
Closes #ISSUE

Release Notes:

- N/A
2025-08-19 16:26:30 -06:00
Bennet Bo Fenner
5fb68cb8be
agent2: Token count (#36496)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-19 20:40:31 +00:00
Piotr Osiewicz
6825715503
Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
2025-08-19 20:33:44 +00:00
Piotr Osiewicz
05fc0c432c
Fix a bunch of other low-hanging style lints (#36498)
- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
2025-08-19 21:26:17 +02:00
Cole Miller
df9c2aefb1
thread_view: Fix issues with images (#36509)
- Clean up failed load tasks for mentions that require async processing
- When dragging and dropping files, hold onto added worktrees until any
async processing has completed; this fixes a bug when dragging items
from outside the project

Release Notes:

- N/A
2025-08-19 15:14:43 -04:00
Conrad Irwin
6ba52a3a42
Re-add history entries for native agent threads (#36500)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-19 12:08:11 -06:00
Agus Zubiaga
e092aed253
Split external agent flags (#36499)
Release Notes:

- N/A
2025-08-19 14:25:25 -03:00
Cole Miller
1444cd9839
Fix Windows test failures not being detected in CI (#36446)
Bug introduced in #35926 

Release Notes:

- N/A
2025-08-19 14:53:10 +00: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
c4083b9b63
Fix unnecessary-mut-passed lint (#36490)
Release Notes:

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

- N/A
2025-08-19 13:27:24 +00:00
Bennet Bo Fenner
97a31c59c9
agent2: Fix agent location still being present after thread stopped (#36471)
Release Notes:

- N/A
2025-08-19 10:22:17 +00:00
Bennet Bo Fenner
0ea0d466d2
agent2: Port retry logic (#36421)
Release Notes:

- N/A
2025-08-19 09:41:55 +00:00
Bennet Bo Fenner
b8ddb0141c
agent2: Port rules UI (#36429)
Release Notes:

- N/A
2025-08-19 11:12:57 +02:00