Commit log

0a58e54 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

8539e23 zed: Include full debug info in debug builds (#27924)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Ben Kunkle created

c7d2775 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

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

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

142f991 Fix clippy lints that don't currently appear in CI (#27944)

Click to expand commit body
I may have a newer version of clippy than CI. Also removes some unused
code in `livekit_client.rs`

Release Notes:

- N/A

Michael Sloan created

f8092bf Bump Zed to v0.182 (#27945)

Click to expand commit body
Release Notes:

-N/A

Joseph T. Lyons created

0ba8432 Debugger: Add stop on entry support to debug adapter configs (#27942)

Click to expand commit body
This PR adds passing in `stop_on_entry` to debug configs in debug.json
instead of going through initialization args.

This has two benefits:

1. It's more streamlined to a user since every internal adapter supports
`stop_on_entry` for launch requests and Go's adapter supports it for
attach requests too.
2. It will allow @osiewicz `NewSesssionModal` PR to use this field for
the stop on entry checkbox.

Release Notes:

- N/A

Anthony Eid 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

ad42a8a agent: Adjust permission card design (#27911)

Click to expand commit body
<img
src="https://github.com/user-attachments/assets/76ae380c-6d5b-4ed6-9b47-9a4c44b00042"
width="500" />

Release Notes:

- N/A

Danilo Leal created

2846c55 agent: Account for tool use messages without any corresponding text (#27917)

Click to expand commit body
This PR makes it so if we receive a tool use from the model without any
corresponding text, we'll insert some placeholder text to keep the
conversation in a well-structured format.

This aims to fix an error that Antonio was seeing:


![image](https://github.com/user-attachments/assets/eeba95ef-9b67-41d7-bce3-afe84bcdc7b1)

Release Notes:

- N/A

Marshall Bowers created

5dcd0d3 language_models: Denote Copilot Chat as not supporting tools (#27909)

Click to expand commit body
This PR updates the Copilot Chat language model to indicate it does not
yet support tool use in Zed.

Release Notes:

- N/A

Marshall Bowers created

a70daa4 agent: Update tool names in default profiles to reflect snake_cased rename (#27907)

Click to expand commit body
This PR updates the tool names in the default profiles, as they were not
updated after the tool names were changed to snake_case in #27903.

Release Notes:

- N/A

Marshall Bowers created

b158ee6 Fix Gemini function calling (#27905)

Click to expand commit body
This seems to improve the performance of `gemini-2.5-pro-exp-03-25`
significantly.
We know define a single `Tool` that has multiple `FunctionDeclaration`s,
instead of defining multiple `Tool`s with a single
`FunctionDeclaration`.
Oddly enough the `flash` models seemed to work perfectly fine with the
multiple `Tool { ... }` definitions

Release Notes:

- N/A

Bennet Bo Fenner created

9b7b4a9 assistant2: Use snake_case for tool names (#27903)

Click to expand commit body
The [Gemini
docs](https://ai.google.dev/gemini-api/docs/function-calling?example=weather#function_declarations)
state that function names should be in `snake_case` or `camelCase`.

Release Notes:

- N/A

Bennet Bo Fenner created

c1d6dfd Update selection when keeping/rejecting hunks (#27902)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

57d7bc2 vim: Add `g?` convert to `Rot13`/`Rot47` (#27824)

Click to expand commit body
Release Notes:

- Added `g?` convert to `Rot13`/`Rot47`

---------

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

0x2CA and Conrad Irwin created

7bc0dd1 Don't unwrap on bad zstd data (#27891)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

dc83f1a Rename `assistant2` to `agent` (#27887)

Click to expand commit body
This PR renames the `assistant2` crate to `agent`.

Release Notes:

- N/A

Marshall Bowers created

8e0f70f Bump revision for `livekit-rust-sdks` (#27886)

Click to expand commit body
This PR bumps the revision of the `livekit-rust-sdks` crate.

I was running into issue where Cargo was stuck on "Updating git
submodule `https://chromium.googlesource.com/libyuv/libyuv`".

I resolved the issue by forking `libyuv` to
https://github.com/zed-industries/libyuv and updating our
`livekit-rust-sdks` fork to use it in
https://github.com/zed-industries/livekit-rust-sdks/pull/4.

Release Notes:

- N/A

Marshall Bowers created

6262a46 Fix a bug that prevented repositories from being deduplicated (#27884)

Click to expand commit body
Closes #ISSUE

Release Notes:

- Ensure that only one repository is shown in the git UI when two
subdirectories of a repository root are open in Zed

Cole Miller created

8321e65 Bump tree-sitter-rust to 0.24 (#27875)

Click to expand commit body
Release Notes:

- Added correct syntax highlighting for use bounds and async closures in
Rust.

Max Brunsfeld created

4110928 nix: Clean up build (#27881)

Click to expand commit body
- bump our livekit version to include a fix for a crane bug (TODO: add
link when an issue is filed on crane)
- switch to a clang stdenv for both linux and macos
- manually unify versions of our notify crate
- remove old linker flags which were only needed for livekit
- fix an issue where RUSTFLAGS shadowed the rustflags from cargo configs

Release Notes:

- N/A

Julia Ryan created

a1b53e9 git: Use doc comments for `ResetMode` variants (#27882)

Click to expand commit body
This PR updates the `ResetMode` enum to use doc comments for its
variants instead of line comments.

Release Notes:

- N/A

Marshall Bowers created

4a25251 Improve tracking for agent edits (#27857)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

Antonio Scandurra , Nathan Sobo , and Max Brunsfeld created

d26c477 assistant2: Summarize threads in context and continue long ones (#27851)

Click to expand commit body
We'll now prompt the user to start a new thread when the active one gets
too long.

<img width=500
src="https://github.com/user-attachments/assets/91445bc0-3e81-422f-aa4a-b8f0741f9d9a"></img>


When they click "Start New Thread", will create a new one with the
previous one added as context.

<img width=500
src="https://github.com/user-attachments/assets/c3b4223f-5bdd-4ba4-956f-5a5880d5e2c3"></img>

Instead of including the full thread text, we'll now add summarized
versions of threads to the context, allowing you to continue the
conversation even if it was near the token limit.

- Thread summaries are cached and persisted. 
- A cached summary is invalidated if the thread is continued.
- We start generating the thread summary as soon as it's selected from
the picker. Most times, the summary will be ready by the time the user
sends the message.
- If the summary isn't ready by the time a message is sent, the user
message will be displayed in the thread immediately, and a "Summarizing
context..." indicator will appear. After the summaries are ready, we'll
start generating the response and show the usual "Generating..."
indicator.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Agus Zubiaga , Danilo Leal , and Marshall Bowers created

16f625b Add persistence to command palette history (#26948)

Click to expand commit body
Closes #20391

### Summary
This adds a persistence layer to the command palette so that usages can
persist after Zed is closed and re-opened.

The current "usage" algorithm is unchanged, e.g.:
- Sorts by number of usages descending (no recency preference)
- Once a user's query is active, removes these suggestions in favor of
fuzzy matching

There are some additional considerations in order to keep the DB from
growing uncontrollably (and to make long-term use ergonomic):
- The "invocations" count handles max values (though at u16, it seems
unlikely a user will deal with this)
- If a command is un-invoked for more than a month, it stops being
considered a recent usage, and its next update will update its usages
back to 1

### Future Considerations
- Could make the "command expiry" configurable in settings, so the user
can decide how long to hold onto recent usages
- Could make a more sophisticated algorithm which balances recency and
total invocations - e.g. if I've used COMMAND_A 100 times in the last
month, but COMMAND_B 10 times today, should COMMAND_B actually be
preferred?
- Could do preferential fuzzy-matching against these matches once the
user starts a query.

Release Notes:

- Added persistent history of command palette usages.

---------

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

KyleBarton , Peter Finn , and Conrad Irwin created

9bc4697 Use new multibuffer excerpts in find-all-references and friends (#27876)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Conrad Irwin and Kirill Bulatov created

e7290df Finish removing git repository state and scanning logic from worktrees (#27568)

Click to expand commit body
This PR completes the process of moving git repository state storage and
scanning logic from the worktree crate to `project::git_store`.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>

Cole Miller , Max Brunsfeld , and Conrad created

8f25251 assistant2: Rename `assistant2` actions to `agent` (#27877)

Click to expand commit body
This PR renames the `assistant2` actions to `agent`.

Note that any `assistant` actions have been left as-is for now so that
there aren't any changes to users not in the feature flag.

Release Notes:

- N/A

Marshall Bowers created

1567967 nix: Separate debug output (#27871)

Click to expand commit body
This makes it easier to iterate on the nix flake by adding a package
which builds zed in debug mode rather than release

Release Notes:

- N/A

Julia Ryan created

2d05537 assistant2: Fix notification max width (#27872)

Click to expand commit body
<img width=400
src="https://github.com/user-attachments/assets/4132e075-3f2a-4c65-8c06-c3428f3ad477">

<img width=400
src="https://github.com/user-attachments/assets/95908b32-a9b9-45c3-9db9-dcbeedffc5e7">

Release Notes:

- N/A

Agus Zubiaga created

95b963c vim: Add :Git (#27874)

Click to expand commit body
Just adding to the existing https://zed.dev/docs/vim#ex-commands

Captial G is not used by vim commands.

Release Notes:

- N/A

5brian created

5d1695e assistant2: Add affordances for when the selected model does not support tools (#27870)

Click to expand commit body
This PR adds some affordances for when the currently-selected model does
not support tools.

We disable the profile selector and put it into a "No Tools" state:

<img width="1394" alt="Screenshot 2025-04-01 at 3 58 00 PM"
src="https://github.com/user-attachments/assets/de6ecb0f-7657-4e16-9d5d-7bbfbc2b0a5c"
/>

We will also only attach tools to the request to the model if the model
supports it.

Release Notes:

- N/A

Marshall Bowers created

192097f assistant2: Ensure errors are also displayed in populated new thread view (#27869)

Click to expand commit body
Follow-up to https://github.com/zed-industries/zed/pull/27812

This PR makes sure these errors cases also show up in the panel's empty
state even when there is past data.

| No ToS | Missing Provider |
|--------|--------|
| ![CleanShot 2025-04-01 at 4  49
36@2x](https://github.com/user-attachments/assets/6da6bdc9-daa6-4a7b-a224-989eb845e205)
| ![CleanShot 2025-04-01 at 4  50
04@2x](https://github.com/user-attachments/assets/bddf62cb-3727-44b5-b115-9a88313c6d85)
|

Release Notes:

- N/A

Danilo Leal created