Commit graph

78 commits

Author SHA1 Message Date
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
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
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
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
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
Ben Brandt
39b6558d0f acp: Move ignored integration tests behind e2e flag (#36711)
Release Notes:

- N/A
2025-08-21 16:18:13 -04: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
Conrad Irwin
bb32d4567a acp: Hide history unless in native agent (#36644)
Release Notes:

- N/A
2025-08-21 10:44:55 -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
Ben Brandt
7f0ce7c6de acp: Add e2e test support for NativeAgent (#36635)
Release Notes:

- N/A
2025-08-21 10:38:44 -04: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
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
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
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
Piotr Osiewicz
74ce543d8b
clippy: println_empty_string & non_minimal_cfg (#36614)
- **clippy: Fix println-empty-string**
- **clippy: non-minimal-cfg**

Related to #36577

Release Notes:
- N/A
2025-08-20 18:45:40 +00:00
Umesh Yadav
ec8106d1db
Fix clippy::println_empty_string, clippy::while_let_on_iterator, clippy::while_let_on_iterator lint style violations (#36613)
Related: #36577

Release Notes:

- N/A
2025-08-20 20:14:30 +02: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
699f58aeba
Capture telemetry when requesting completions in agent2 (#36600)
Release Notes:

- N/A
2025-08-20 16:04:32 +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
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
Antonio Scandurra
4ee565cd39
Fix mentions roundtrip from/to database and other history bugs (#36575)
Release Notes:

- N/A
2025-08-20 12:03:20 +00: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
Bennet Bo Fenner
a32a264508
agent2: Use correct completion intent when generating summary (#36573)
Release Notes:

- N/A
2025-08-20 10:03:35 +00:00
Bennet Bo Fenner
0a80209c5e
agent2: Fix remaining update_model_request_usage todos (#36570)
Release Notes:

- N/A
2025-08-20 09:54:26 +00:00
Bennet Bo Fenner
4290f043cd
agent2: Fix token count not updating when changing model/toggling burn mode (#36562)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-20 09:29:05 +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
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
Conrad Irwin
cac80e2ebd
Silence a bucketload of logs (#36534)
Closes #ISSUE

Release Notes:

- Silenced a bunch of logs that were on by default
2025-08-19 20:26:56 -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
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
Bennet Bo Fenner
6b6eb11643
agent2: Fix tool schemas for Gemini (#36507)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-19 18:06:09 +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
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
Bennet Bo Fenner
790a2a0cfa
agent2: Support preferred_completion_mode setting (#36473)
Release Notes:

- N/A
2025-08-19 10:40:02 +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
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
Cole Miller
7bcea7dc2c
agent2: Support directories in @file mentions (#36416)
Release Notes:

- N/A
2025-08-19 04:09:43 +00:00
Piotr Osiewicz
9e0e233319
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-18 21:54:35 +00:00
Bennet Bo Fenner
5591fc810e
agent: Restore last used agent session on startup (#36401)
Release Notes:

- N/A
2025-08-18 10:22:00 +00:00
Bennet Bo Fenner
2eadd5a396
agent2: Make model of Thread optional (#36395)
Related to #36394 

Release Notes:

- N/A
2025-08-18 09:56:02 +00:00
Ben Brandt
ea828c0c59
agent2: Emit cancellation stop reason on cancel (#36381)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-18 07:58:30 +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
Bennet Bo Fenner
1e41d86b31
agent2: Set thread_id, prompt_id, temperature on request (#36246)
Release Notes:

- N/A
2025-08-15 14:23:55 +00:00