Commit log

9933512 zed 0.181.3

Joseph T. Lyons created

e845765 ai: Separate model settings for each feature (#28088)

Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/20582

Allows users to select a specific model for each AI-powered feature:
- Agent panel
- Inline assistant
- Thread summarization
- Commit message generation

If unspecified for a given feature, it will use the `default_model`
setting.

Release Notes:

- Added support for configuring a specific model for each AI-powered
feature

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Agus Zubiaga , Danilo Leal , and Bennet Bo Fenner created

b037c91 assistant_eval: Add ACE framework (#27181)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>

Thomas Mickley-Doyle and Michael Sloan created

aca7f54 agent: Add search to Thread History (#28085)

Click to expand commit body
![CleanShot 2025-04-04 at 09 45
47@2x](https://github.com/user-attachments/assets/a8ec4086-f71e-4ff4-a5b3-4eb5d4c48294)


Release Notes:

- agent: Add search box to thread history

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Agus Zubiaga , Bennet Bo Fenner , and Danilo Leal created

10a3ad0 Clear path-based excerpt data properly (cherry-pick #28026) (#28082)

Click to expand commit body
Cherry-picked Clear path-based excerpt data properly (#28026)

Follow-up of https://github.com/zed-industries/zed/pull/27893

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

gcp-cherry-pick-bot[bot] , Kirill Bulatov , and Conrad Irwin created

c4bbdd0 Temporarily disable flaky conflicted-cherry-pick test (cherry-pick #27950) (#28087)

Click to expand commit body
Cherry-picked Temporarily disable flaky conflicted-cherry-pick test
(#27950)

Closes #ISSUE

Release Notes:

- N/A

Co-authored-by: Cole Miller <cole@zed.dev>

gcp-cherry-pick-bot[bot] and Cole Miller created

27a4723 Implement edit rejection in `ActionLog` (#28080)

Click to expand commit body
Release Notes:

- Fixed a bug that would prevent rejecting certain agent edits.

Antonio Scandurra created

0b8c14f agent: Show which lines were read when using `read_file` tool (#28077)

Click to expand commit body
This makes sure that we specify which lines the agent actually read,
avoids confusing scenarios such as:

<img width="642" alt="Screenshot 2025-04-04 at 10 22 10"
src="https://github.com/user-attachments/assets/2680c313-4f77-4971-8743-8e3f5327c18d"
/>

Here the agent starts out by actually only reading a certain amount of
lines when the first tool call happens, then it does a second tool call
to read the whole file. To the user this looks like to identical tool
calls.

Now:
<img width="621" alt="image"
src="https://github.com/user-attachments/assets/76222258-9cc8-4b7c-98c0-6d5cffb282f2"
/>
<img width="362" alt="image"
src="https://github.com/user-attachments/assets/293f2fc0-365d-4b84-8400-4c11474caeb8"
/>
<img width="420" alt="image"
src="https://github.com/user-attachments/assets/ca92493e-67ce-4d45-8f83-0168df575326"
/>



Release Notes:

- N/A

Bennet Bo Fenner created

800f405 agent: Differentiate @mentions from markdown links (#28073)

Click to expand commit body
This ensures that we display @mentions and normal markdown links
differently:

<img width="670" alt="Screenshot 2025-04-04 at 11 07 51"
src="https://github.com/user-attachments/assets/0a4d0881-abb9-42a8-b3fa-912cd6873ae0"
/>


Release Notes:

- N/A

Bennet Bo Fenner created

1f4a2d5 Scroll to first hunk when clicking on a file to review in Agent Panel (#28075)

Click to expand commit body
Release Notes:

- Added the ability to scroll to a file when clicking on it in the Agent
Panel review section.

Antonio Scandurra created

c706acb open_ai: Disable `parallel_tool_calls` (#28056)

Click to expand commit body
This PR disables `parallel_tool_calls` for the models that support it,
as the Agent currently expects at most one tool use per turn.

It was a bit of trial and error to figure this out. OpenAI's API
annoyingly will return an error if passing `parallel_tool_calls` to a
model that doesn't support it.

Release Notes:

- N/A

Marshall Bowers created

3f19ae1 Add tool use support for OpenAI models (#28051)

Click to expand commit body
This PR adds support for using tools to the OpenAI models.

Release Notes:

- agent: Added support for tool use with OpenAI models (Preview only).

Marshall Bowers created

4744c4f Remove unused `extract_tool_args_from_events` functions (#28038)

Click to expand commit body
This PR removes the unused `extract_tool_args_from_events` functions
that were defined in some of the LLM provider crates.

Release Notes:

- N/A

Marshall Bowers created

aa168c6 ui_input: `TextField` -> `SingleLineInput` (#28031)

Click to expand commit body
- Rename `TextField` -> `SingleLineInput`
- Add a component preview for `SingleLineInput`
- Apply `SingleLineInput` to the AddContextServerModal

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

Nate Butler , Agus Zubiaga , Danilo Leal , and Danilo Leal created

ce2918e agent: Snapshot context in user message instead of recreating it (#27967)

Click to expand commit body
This makes context essentially work the same way as `read-file`,
increasing the likelihood of cache hits.

Just like with `read-file`, we'll notify the model when the user makes
an edit to one of the tracked files. In the future, we want to send a
diff instead of just a list of files, but that's an orthogonal change.


Release Notes:
- agent: Improved caching of files in context

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>

Agus Zubiaga and Antonio Scandurra created

3cfaadd zed 0.181.2

Joseph T. Lyons created

b69219e agent: Add token count in the thread view (#28037)

Click to expand commit body
This PR adds the token count to the active thread view. It doesn't
behaves quite like Assistant 1 where it updates as you type, though; it
updates after you submit the message.

<img
src="https://github.com/user-attachments/assets/82d2a180-554a-43ee-b776-3743359b609b"
width="700" />

---

Release Notes:

- agent: Add token count in the thread view

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>

Danilo Leal and Agus Zubiaga created

0ae3518 Fix soft-wrapping with fold creases (#28029)

Click to expand commit body
Release Notes:

- Fixed a rendering bug that caused context in the agent to not wrap
properly.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Zed AI <ai+claude-3.7@zed.dev>

Antonio Scandurra , Conrad Irwin , and Zed AI created

7396435 agent: Handle tool use without text (#28030)

Click to expand commit body
### Context 

The Anthropic API fails if a request message contains a tool use and no
`Text` segments or it only contains empty `Text` segments. These are
cases that the model itself produces, but the API doesn't support
sending them back.

#27917 fixed this by appending "Using tool..." in the thread's message,
but this causes the actual conversation to include it, so it would
appear in the UI (we would actually display a gap because we never
rendered its markdown, but "Using tool..." would show up when the thread
was restored).

### Solution

We'll now only append this placeholder when we build the request, so the
API still sees it, but the UI/Thread doesn't.

Another issue we found is that the model starts mimicking these
placeholders in later tool uses which is undesirable. So unfortunately,
we had to add logic to filter them out.

Release Notes:

- agent: Improved rendering of tool uses without text

---------

Co-authored-by: Bennet <bennet@zed.dev>

Agus Zubiaga and Bennet created

bf6e7cb agent: Add button to continue iterating once all reviews are done (#28027)

Click to expand commit body
This PR adds a button on the review tab empty state that toggles the
focus back to the agent panel so that users can keep iterating on the
thread that's active in the panel.

<img
src="https://github.com/user-attachments/assets/ace5cf93-8869-49bb-8106-e03a9e3c90f2"
width="700"/>

Release Notes:

- N/A

Danilo Leal created

36c4f60 zed 0.181.1

Joseph T. Lyons created

3d032bc agent: Fix thinking step showing up as pending when completion is cancelled (#28019)

Click to expand commit body
Previously the "Thinking..." step would show up as pending, even though
the user cancelled the generation:
<img width="672" alt="image"
src="https://github.com/user-attachments/assets/c9cdce0a-d827-4e23-96f5-b150465911a7"
/>


Release Notes:

- Fixed an issue where the thinking step would show up as pending even
when the generation was cancelled

Bennet Bo Fenner created

3e28fa2 agent: Include active file in recent history (#27914)

Click to expand commit body
This happened because of two reasons:

- `Workspace::recent_navigation_history` didn't include the current file
- The context picker added the current file to a exclude list

The latter was actually intentional because we already show the file in
the suggested context, but now that we actually have mentions, it's just
inconvenient not to have it there.

Release Notes:

- N/A

Agus Zubiaga created

c424429 workspace-hack: remove openssl from remote_server (#27990)

Click to expand commit body
This was accidentally getting added due to increased feature
unification. We've manually excluded reqwest to go back to the desired
behavior: remote_server, doesn't depend on openssl.

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

Julia Ryan and Mikayla Maki created

f23b972 Add workspace-hack (#27277)

Click to expand commit body
This adds a "workspace-hack" crate, see
[mozilla's](https://hg.mozilla.org/mozilla-central/file/3a265fdc9f33e5946f0ca0a04af73acd7e6d1a39/build/workspace-hack/Cargo.toml#l7)
for a concise explanation of why this is useful. For us in practice this
means that if I were to run all the tests (`cargo nextest r
--workspace`) and then `cargo r`, all the deps from the previous cargo
command will be reused. Before this PR it would rebuild many deps due to
resolving different sets of features for them. For me this frequently
caused long rebuilds when things "should" already be cached.

To avoid manually maintaining our workspace-hack crate, we will use
[cargo hakari](https://docs.rs/cargo-hakari) to update the build files
when there's a necessary change. I've added a step to CI that checks
whether the workspace-hack crate is up to date, and instructs you to
re-run `script/update-workspace-hack` when it fails.

Finally, to make sure that people can still depend on crates in our
workspace without pulling in all the workspace deps, we use a `[patch]`
section following [hakari's
instructions](https://docs.rs/cargo-hakari/0.9.36/cargo_hakari/patch_directive/index.html)

One possible followup task would be making guppy use our
`rust-toolchain.toml` instead of having to duplicate that list in its
config, I opened an issue for that upstream: guppy-rs/guppy#481.

TODO:
- [x] Fix the extension test failure
- [x] Ensure the dev dependencies aren't being unified by Hakari into
the main dependencies
- [x] Ensure that the remote-server binary continues to not depend on
LibSSL

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

Julia Ryan , Mikayla , and Mikayla Maki created

07d9cd7 agent: Update thread label to use plural form (#27971)

Click to expand commit body
Update thread label to match the other contexts.

|Before|After|
|--|--|

|![image](https://github.com/user-attachments/assets/6e02808e-50d7-480f-a9ca-251e9519a71d)|![image](https://github.com/user-attachments/assets/174aad84-9e55-4531-bb4a-1a1adaa46418)|

Release Notes:

- N/A

5brian created

a482387 agent: Allow editing previous messages (#27965)

Click to expand commit body
This PR adds the ability to edit previous user messages in the thread.

Release Notes:

- Agent: Added the ability to edit previous user messages
(Preview-only).

Marshall Bowers created

d17d747 agent: Change loading label if command is waiting on permission (#27955)

Click to expand commit body
If there's a command pending confirmation, the label changes from
"Generating" to "Waiting for confirmation".

<img
src="https://github.com/user-attachments/assets/d804e382-5315-40b0-9588-c257cca2430c"
width="600"/>

Release Notes:

- N/A

Danilo Leal created

bc08df2 agent: Refine feedback message input (#27948)

Click to expand commit body
<img
src="https://github.com/user-attachments/assets/cde37a88-9973-4c27-80b7-459f5e986c74"
width="650" />

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Danilo Leal and Bennet Bo Fenner created

0f4b734 aws_http_client: Copy response headers (#27941)

Click to expand commit body
Preemptive fixes required for #26734

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Shardul Vaidya and Marshall Bowers created

6df29d3 agent: Do some cleanup of feedback comments submission (#27940)

Click to expand commit body
This PR does some stylistic cleanup of the feedback comments submission
code.

Release Notes:

- N/A

Marshall Bowers created

647cca8 Use worktree qualified paths in agent file context + some code cleanup (#27943)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

1f81674 v0.181.x preview

Joseph T. Lyons created

e1a8a31 Fix flickering when staging and unstaging files (#27931)

Click to expand commit body
This fixes a bug in #27568 that caused flickering in the git panel's
checkbox state when staging and unstaging entire files. The problem is
that that stage/unstage action first saves the target path (if it's open
as a buffer), and we do a targeted git status scan in response to that
filesystem event, which makes its way to the git panel and causes it to
clear its pending state before the actual stage or unstage has gone
through.

The fix is to not clear the panel's pending state for git repository
events that originated from a targeted scan (i.e. one that was triggered
by FS events for repo paths, as opposed to events inside `.git` which
cause all statuses to be recomputed).

Release Notes:

- N/A

Cole Miller created

0be8bf1 agent: Improve action confirmation UX (#27932)

Click to expand commit body
This PR makes the command permission prompt part of the tool card and
allow users to straight away change the `always_allow_tool_actions`
setting via the "Always Allow" button from that card. If that button is
clicked, that setting is turned on, and any command that requires
permission from that point on will auto-run.

Additionally, if a bash command spans multiple lines, we show the line
count at the end of the command string. (Note: this is not perfect yet
because it can likely be not visible by default, but we didn't think
this was a major blocker for now. We'll work on improving this next).

### Thread View

<img
src="https://github.com/user-attachments/assets/00f93c39-990f-4b79-84ec-0427b997167f"
width="500"/>

### Settings View

<img
src="https://github.com/user-attachments/assets/52d32435-7c8d-4ab4-a319-6cabc007267b"
width="500"/>


Release Notes:

- N/A

---------

Co-authored-by: Thomas Mickley-Doyle <tmickleydoyle@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>

Danilo Leal , Thomas Mickley-Doyle , Bennet Bo Fenner , Nathan Sobo , and Antonio Scandurra created

3e2ac3e Log error and proceed when failing to load repo environment (#27938)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Cole Miller created

646f655 agent: Add newtype for profile IDs (#27939)

Click to expand commit body
This PR adds an `AgentProfileId` newtype for profile IDs that we can use
instead of `Arc<str>` everywhere.

Release Notes:

- N/A

Marshall Bowers created

b2904e5 file_finder: Prioritize file name matches over path matches (#27937)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/27936

Adds additional comparison after the existing history-based comparison.

This comparison checks whether the first position matched via fuzzy
search is in the file name. If so, we prioritize this match over one in
the path. If both items match either the file name or the path, the
existing comparison logic is used.

- [x] Tests

Before:
<img width="580" alt="image"
src="https://github.com/user-attachments/assets/011fdd01-3dfa-4950-abb1-dfda10885664"
/>

After:
<img width="614" alt="image"
src="https://github.com/user-attachments/assets/9c4944b0-83dc-4611-94bb-aae1758fab23"
/>


Release Notes:

- Fixed an issue where fuzzy matching in file finder did not properly
prioritize matches in file names.

Smit Barmase created

45e7cd1 Add comment box to negative feedback reaction (#27934)

Click to expand commit body
Release Notes:

- N/A

Thomas Mickley-Doyle created

889bc13 language_model: Remove `use_any_tool` method from `LanguageModel` (#27930)

Click to expand commit body
This PR removes the `use_any_tool` method from the `LanguageModel`
trait.

It was not being used anywhere, and doesn't really fit in our new tool
use story.

Release Notes:

- N/A

Marshall Bowers created

da3383b agent: Fix thinking step showing up as pending even though it is completed (#27926)

Click to expand commit body
Release Notes:

- N/A

Bennet Bo Fenner created

9c4e61e agent: Add more guidelines to system prompt (#27927)

Click to expand commit body
Release Notes:

- N/A

Agus Zubiaga created

b413605 Fix bug that prevented deletion-only hunks from being kept correctly (#27921)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

961bfad agent: Return an error to the model when trying to use a tool that is disabled (#27928)

Click to expand commit body
This PR makes it so we return an error to the model if it tries to use a
tool that is not currently enabled:

<img width="628" alt="Screenshot 2025-04-02 at 11 10 55 AM"
src="https://github.com/user-attachments/assets/e4bdf01c-f0ea-4c9c-805a-11868bd9c771"
/>

This allows the model to adapt based on that:

<img width="637" alt="Screenshot 2025-04-02 at 11 08 38 AM"
src="https://github.com/user-attachments/assets/41016b47-933c-4dcb-b791-847be0548c8a"
/>

Release Notes:

- N/A

Marshall Bowers created

2eed94f agent: Include context with first message that introduced it (#27925)

Click to expand commit body
We were including the context at the end which meant it never got
cached. We'll now include it with the first message that introduced it
so it's cached as long as it doesn't change.

This is an improvement, but we probably still need to think of ways to
optimize caching for cases where files in context change.

Release Notes:

- N/A

Agus Zubiaga created

7a54dd7 Avoid requiring confirmation for tools that edit buffers (#27923)

Click to expand commit body
It's super easy to undo those changes. In a future PR, we should also
avoid requiring confirmation in the batch tool if all the underlying
tools don't require confirmation.

Release Notes:

- N/A

Antonio Scandurra created

8ac4cbc Don't create repos for invisible worktrees (#27894)

Click to expand commit body
Closes #ISSUE

Release Notes:

- Fixed git repositories being added for files outside the project

Cole Miller created

d82bf13 agent: Remove unneeded branch in `use_pending_tools` (#27922)

Click to expand commit body
This PR removes an unneeded `else if` branch that was the same as the
previous branch in the conditional.

Doesn't seem necessary to run this twice.

Release Notes:

- N/A

Marshall Bowers created

0f58d4f agent: Remove duplicate `OpenConfiguration` action registration (#27918)

Click to expand commit body
I had introduced the same thing a few days ago without noticing there
was one in place already!

Release Notes:

- N/A

Danilo Leal created

d340670 Ensure rejecting a hunk dismisses the diff (#27919)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created