225deb6
agent: Add animation in the edit file tool card until a diff is assigned (#29773)
Click to expand commit body
This PR prevents this edit card from being shown expanded but empty,
like this:
<img width="590" alt="Screenshot 2025-05-01 at 7 38 47 PM"
src="https://github.com/user-attachments/assets/147d3d73-05b9-4493-8145-0ee915f12cd9"
/>
Now, we will show an animation until it has a diff computed.
https://github.com/user-attachments/assets/52900cdf-ee3d-4c3b-88c7-c53377543bcf
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Max Brunsfeld
and
Danilo Leal
created
33011f2
Open diagnostics editor faster when fetching cargo diagnostics (#29787)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/29706
Release Notes:
- N/A
Kirill Bulatov
created
e14d078
Fix tasks not being stopped on reruns (#29786)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/28993
* Tone down tasks' cancellation logging
* Fix task terminals' leak, disallowing to fully cancel the task by
dropping the terminal off the pane:
https://github.com/zed-industries/zed/blob/f619d5f02af100c34e286af294a42a01dcfb238c/crates/terminal_view/src/terminal_panel.rs#L1464-L1471
Release Notes:
- Fixed tasks not being stopped on reruns
Kirill Bulatov
created
460ac96
Use project environment in LSP runnables context (#29761)
Click to expand commit body
Release Notes:
- Fixed the tasks from LSP not inheriting the worktree environment
----
cc @SomeoneToIgnore
Stanislav Alekseev
created
3553984
Allow `StreamingEditFileTool` to also create files (#29785)
Click to expand commit body
Refs #29733
This pull request introduces a new field to the `StreamingEditFileTool`
that lets the model create or overwrite a file in a streaming way. When
one of the `assistant.stream_edits` setting / `agent-stream-edits`
feature flag is enabled, we are going to disable the `CreateFileTool` so
that the agent model can only use `StreamingEditFileTool` for file
creation.
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Antonio Scandurra
,
Ben Brandt
, and
Oleksiy Syvokon
created
f619d5f
debugger: Add debug task picker to new session modal (#29702)
Click to expand commit body
## Preview

### TODO
- [x] Add scenario picker to new session modal
- [x] Make debugger start action open new session modal instead of task
modal
- [x] Fix `esc` not clearing the cancelling the new session modal while
it's in scenario or attach mode
- [x] Resolve debug scenario's correctly
Release Notes:
- N/A
Anthony Eid
created
ba59305
Use rust-analyzer's flycheck as source of cargo diagnostics (#29779)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/29706
Instead of doing `cargo check` manually, use rust-analyzer's flycheck:
at the cost of more sophisticated check command configuration, we keep
much less code in Zed, and get a proper progress report.
User-facing UI does not change except `diagnostics_fetch_command` and
`env` settings removed from the diagnostics settings.
Release Notes:
- N/A
This PR fixes a typo in `typos.toml`. How ironic.
Release Notes:
- N/A
Marshall Bowers
created
1ffedf4
collab: Add endpoint for migrating users to new billing (#29769)
Click to expand commit body
This PR adds a new `POST /billing/subscriptions/migrate` endpoint for
migrating users to the new billing system.
When called with a GitHub user ID this endpoint will:
1. Find the active billing subscription for this user (if they have one)
2. Cancel the subscription and send a final invoice
3. Ensure the user is in the `new-billing` and `assistant2` feature
flags
Release Notes:
- N/A
Marshall Bowers
created
d25da97
Run additional checks from script/clippy if local (#29768)
Click to expand commit body
Should cut down on the number of CI cycles if you're forgetful like I
am!
Release Notes:
- N/A
Cole Miller
created
e1e3f2e
Improve handling of remote-tracking branches in the picker (#29744)
Click to expand commit body
Release Notes:
- Changed the git branch picker to make remote-tracking branches less
prominent
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Cole Miller
and
Anthony Eid
created
92b9ecd
agent: Do not render unnecessary lines in edit file tool card (#29766)
Click to expand commit body
This PR prevents any unnecessary lines from being rendered in the edit
file tool card in the case of small diffs.
I think this (hopefully) addresses the last remaining task from
https://github.com/zed-industries/zed/pull/29448.
| `main` | This PR |
| --- | --- |
| <img width="634" alt="main"
src="https://github.com/user-attachments/assets/7c06394e-957a-4d36-a484-5974687041e9"
/> | <img width="634" alt="PR"
src="https://github.com/user-attachments/assets/84206d5a-a93a-4a42-99ca-7cdebb0d91bb"
/> |
(The last empty line in the second image is an empty line present in the
file itself)
---
n the second commit I also preemtively disabled vertical overscrolling
for full mode editors which are sized by content. This is basically the
same fix as in https://github.com/zed-industries/zed/pull/28471.
Strictly speaking, this is not needed for the fix here, but I thought it
might be nice to have for the future to prevent any issues from occuring
due to overscroll.
Release Notes:
- agent: Improved rendering of small diffs for the edit file tool card.
Finn Evers
created
758d260
collab: Add ability to initiate a checkout session for the Zed Free plan (#29767)
Click to expand commit body
This PR adds the ability to initiate a checkout session for the Zed Free
plan.
Release Notes:
- N/A
Marshall Bowers
created
8d4d3ba
agent: Add design adjustments to MCP config flow (#29765)
Click to expand commit body
Mostly somewhat small UI tweaks around the MCP extension config flow and
the settings section.
Release Notes:
- N/A
Danilo Leal
created
7c23d13
agent: Render the max mode toggle using a muted color (#29763)
Click to expand commit body
This PR updates the max mode toggle to use the muted color.
This makes it fit in more with the rest of the controls.
<img width="243" alt="Screenshot 2025-05-01 at 5 24 01 PM"
src="https://github.com/user-attachments/assets/57267d29-3c7b-4ea9-b6b9-81c42f6b7e1c"
/>
Release Notes:
- agent: Adjusted the color of the max mode toggle.
Marshall Bowers
created
ad87c54
Make context pills clickable while editing (#29740)
Click to expand commit body
Release Notes:
- Fixed a bug where clicking context pills switched into the "editing
message" state instead of clicking the pill.
Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
Now instead of the model hallucinating tool calls, we get requests for
more context:
<img width="620" alt="Screenshot 2025-05-01 at 12 45 49 PM"
src="https://github.com/user-attachments/assets/847d5c14-82f6-4234-b85a-8cd2bc7ab11d"
/>
It still knows how to answer general questions:
<img width="624" alt="Screenshot 2025-05-01 at 12 47 44 PM"
src="https://github.com/user-attachments/assets/43ab0fc3-4cc8-452f-b26b-474b5d31919f"
/>
Release Notes:
- Fixed the model still trying to do tool calls when no tools selected
(e.g. in `Manual` profile).
---------
Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Michael <michael@zed.dev>
Richard Feldman
,
Ben
, and
Michael
created
d7e1815
Respect cursor_pointer when a ButtonLike is disabled (#29737)
Click to expand commit body
This is desirable for when we want to use a `ButtonLike` to show a
tooltip over an icon, and we don't want it to show the "not allowed"
cursor on hover.
Release Notes:
- N/A
Closes #29527
It looks funny in the diff, but the symlinks are indeed correct:
-
https://github.com/evaporei/zed/blob/fix/license-symlinks/crates/askpass/LICENSE-GPL
-
https://github.com/evaporei/zed/blob/fix/license-symlinks/crates/ui_macros/LICENSE-GPL
I did check all ~170 crates, these were the only inconsistent ones.
Release Notes:
- N/A
Eva Pace
created
2a319ef
Add `editor::GoToParentModule` for rust-analyzer backed projects (#29755)
Click to expand commit body
Support rust-analyzer's "go to parent module" action
https://rust-analyzer.github.io/book/contributing/lsp-extensions.html#parent-module
Release Notes:
- Added `editor::GoToParentModule` for rust-analyzer backed projects
---------
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Closes #29753
The template contains an error: `has_default_user_rules` is always
undefined and should be `has_user_rules` instead.
Release Notes:
- Fixed default user rules ignored during prompt building.
We weren't using this one anymore. We used to use it for the switch that
toggled tools on, which doesn't exist anymore.
Release Notes:
- N/A
---------
Co-authored-by: Joseph T. Lyons <josephtlyons@gmail.com>
Danilo Leal
and
Joseph T. Lyons
created
24eb039
context servers: Show configuration modal when extension is installed (#29309)
This PR changes the tooltip label to say "Remove" when you have the
button toggled on and collaborators in the list.
Release Notes:
- N/A
Co-authored-by: Joseph T. Lyons <josephtlyons@gmail.com>
This PR adds billing thresholds of the unit equivalent of $20 for model
request overages.
Release Notes:
- N/A
Marshall Bowers
created
5bf1b4f
collab: Add `use_new_billing` to `LlmTokenClaims` (#29739)
Click to expand commit body
This PR adds a `use_new_billing` field to the LLM token claims, based on
the `new-billing` feature flag.
Release Notes:
- N/A
Marshall Bowers
created
f891dfb
Introduce a new `StreamingEditFileTool` (#29733)
Click to expand commit body
This pull request introduces a new tool for streaming edits. The
short-term goal is for this tool to replace the existing `EditFileTool`,
but we want to get this out the door as soon as possible so that we can
start testing it.
`StreamingEditFileTool` is mutually exclusive with `EditFileTool`. It
will be enabled by default for anyone who has the `agent-stream-edits`
feature flag, as well as people that set `assistant.stream_edits` to
`true` in their settings.
### Implementation
Streaming is achieved by requesting a completion while the `edit_file`
tool gets called. We invoke the model by taking the existing
conversation with the agent and appending a prompt specifically tailored
for editing. In that prompt, we ask the model to produce a stream of
`<old_text>`/`<new_text>` tags. As the model streams text in, we
incrementally parse it and start editing as soon as we can.
### Evals
Note that, as part of this pull request, I also defined some new evals
that I used to drive the behavior of the recursive LLM call. To run
them, use this command:
```bash
cargo test --package=assistant_tools --features eval -- eval_extract_handle_command_output
```
Or comment out the `#[cfg_attr(not(feature = "eval"), ignore)]` macro.
I recommend running them one at a time, because right now we don't
really have a way of orchestrating of all these evals. I think we should
invest into that effort once the new agent panel goes live.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Antonio Scandurra
,
Nathan Sobo
,
Bennet Bo Fenner
, and
Oleksiy Syvokon
created
e3a2d52
zlog: Fall back to printing module path instead of `*unknown*` or just crate name (#29691)
122af4f
agent: Show nav dropdown close button only on hover (#29732)
Danilo Leal
created
e07ffe7
Allow to fetch cargo diagnostics separately (#29706)
Click to expand commit body
Adjusts the way `cargo` and `rust-analyzer` diagnostics are fetched into
Zed.
Nothing is changed for defaults: in this mode, Zed does nothing but
reports file updates, which trigger rust-analyzers'
mechanisms:
* generating internal diagnostics, which it is able to produce on the
fly, without blocking cargo lock.
Unfortunately, there are not that many diagnostics in r-a, and some of
them have false-positives compared to rustc ones
* running `cargo check --workspace --all-targets` on each file save,
taking the cargo lock
For large projects like Zed, this might take a while, reducing the
ability to choose how to work with the project: e.g. it's impossible to
save multiple times without long diagnostics refreshes (may happen
automatically on e.g. focus loss), save the project and run it instantly
without waiting for cargo check to finish, etc.
In addition, it's relatively tricky to reconfigure r-a to run a
different command, with different arguments and maybe different env
vars: that would require a language server restart (and a large project
reindex) and fiddling with multiple JSON fields.
The new mode aims to separate out cargo diagnostics into its own loop so
that all Zed diagnostics features are supported still.
For that, an extra mode was introduced:
```jsonc
"rust": {
// When enabled, Zed runs `cargo check --message-format=json`-based commands and
// collect cargo diagnostics instead of rust-analyzer.
"fetch_cargo_diagnostics": false,
// A command override for fetching the cargo diagnostics.
// First argument is the command, followed by the arguments.
"diagnostics_fetch_command": [
"cargo",
"check",
"--quiet",
"--workspace",
"--message-format=json",
"--all-targets",
"--keep-going"
],
// Extra environment variables to pass to the diagnostics fetch command.
"env": {}
}
```
which calls to cargo, parses its output and mixes in with the existing
diagnostics:
https://github.com/user-attachments/assets/e986f955-b452-4995-8aac-3049683dd22c
Release Notes:
- Added a way to get diagnostics from cargo and rust-analyzer without
mutually locking each other
- Added `ctrl-r` binding to refresh diagnostics in the project
diagnostics editor context
Kirill Bulatov
created
5e4be01
zed: Fix application menu capitalization (#29722)
Click to expand commit body
This PR is a quick follow-up to #29717 to ensure that the action within
the app menu has the same capitalization as in the context menu.
Release Notes:
- N/A
Finn Evers
created
f055dca
editor: Fix context menu capitalization (#29717)
Click to expand commit body
Fixes context menu capitalization for consistency.
Release Notes:
- N/A
Release Notes:
- Added `open` tool for opening files or URLs.
Richard Feldman
created
1bf9e15
agent: Allow adding/removing context when editing existing messages (#29698)
Click to expand commit body
Release Notes:
- agent: Support adding/removing context when editing existing message
---------
Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: Cole Miller <cole@zed.dev>
Bennet Bo Fenner
,
Cole Miller
, and
Cole Miller
created
f046d70
collab: Look up Stripe prices with lookup keys (#29715)
Click to expand commit body
This PR makes it so we look up Stripe prices via lookup keys instead of
passing in the price IDs as environment variables.
Release Notes:
- N/A
Marshall Bowers
created
afeb3d4
Make eval more resilient to bad input from LLM (#29703)
Click to expand commit body
I saw a slice panic (for begin > end) in a debug build of the eval. This
should just be a failed assertion, not a panic that takes out the whole
eval run!
Release Notes:
- N/A
I saw this come up in an eval, where the LLM provided a start line of 0.
Release Notes:
- N/A
Richard Feldman
created
38ede4b
Fix parsing of author name in git show output (#29704)
Click to expand commit body
Closes #ISSUE
Release Notes:
- Fixed a bug causing incorrect formatting of git commit tooltips
Cole Miller
created
fc920bf
Improve behavior around word-based brackets in bash (#29700)
Click to expand commit body
Closes #28414
Makes it so that `do`, `then`, `done`, `else`, etc are treated as
brackets in bash. They are not auto-closed *yet* as that requires
additional work to function properly, however they can now be toggled
between using `%` in vim. Additionally, newlines are inserted like they
are with regular brackets (`{}()[]""''`) when hitting enter between
them.
While `if <-> fi` `while/for <-> done` and `case <-> esac` are the
*logical* matching pairs, I've opted to instead match between `then <->
else/elif/fi` `do <-> done` and `in <-> esac` as these are the pairs
that delimit the sub-scope, and are more similar to the `{}` style
bracket pairs than `if <-> }` in a c-like syntax. This does cause some
wierd behavior with `else` in `if` expressions as it matches both with
the previous `then` as well as the following `fi`, so in this case
```bash
if true; then
foo
else
bar
f|i
```
after hitting `%` twice times (where cursor is `|`), the cursor will end
up on the `then` instead of back on the `fi` as hitting `%` on the else
will *always* navigate up to the `then`
Release Notes:
- vim: Improved behavior around word-based delimiters in bash (`do <->
done`, `then <-> fi`, etc) so they can be toggled between using `%`
Ben Kunkle
created
04c68dc
Make the default repetitions be 8, and concurrency 4 (#29576)
Click to expand commit body
This is based on having observed that there is a lot of variation
between runs on `n=1` and `n=3`.
* With `n=8` two runs on the same branch give answers that seem close
enough to be reasonably consistent.
* With higher concurrency, trying to run this many repetitions seems to
lead language servers to time out a lot, causing evals to fail.
Release Notes:
- N/A
Richard Feldman
created
399eced
collab: Return current usage by model from `GET /billing/usage` (#29693)
Click to expand commit body
This PR updates the `GET /billing/usage` endpoint to return the number
of requests made to each model and mode.
Release Notes:
- N/A
## Before

## After

Release Notes:
- Context picker and `@`-mentions now work with very large files.
Closes #ISSUE
Re-adds default `file_scan_exclusions` to [project
settings](https://github.com/zed-industries/zed/blob/84e4891d544f14e7e22348b89ecaf261b44ca611/.zed/settings.json)
that were overridden in #29106
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes #27073
Currently, when searching for a file with Ctrl+P, and the first file
found is the active one, file_finder skips focus to the second file
automatically. This PR adds a setting to disable this and make the first
file always the focused one.
Default setting is still skipping the active file.
Release Notes:
- Added the `skip_focus_for_active_in_search` setting for the file
finder, which allows turning off the default behavior of skipping focus
on the active file while searching in the file finder.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>