Commit log

9bbc2e0 collab: Set `plan` in LLM token based on subscription (#29231)

Click to expand commit body
This PR updates the `plan` field in the LLM token to be based on the
subscription.

We weren't using this field anywhere outside of the new billing code, so
it is safe to change its meaning.

Release Notes:

- N/A

Marshall Bowers created

6caf34a gpui: Align image sprites to whole pixels (#29227)

Click to expand commit body
Similar to #15822, just applies the same fix to images as they are also
affected by the same issue.

Release Notes:

- N/A

Matin Aniss created

8607c7d docs: Fix mistake in `Initializing the remote server` section (#28641)

Click to expand commit body
Fix `Initializing the remote server` section.

Release Notes:

- N/A

Konstantin Podsvirov created

e26bb05 docs: Update "checkOnSave" to "check" (#29212)

Click to expand commit body
As-salamu alaykum,

[I recently started suffering from the same issue as this
user](https://users.rust-lang.org/t/rust-analyzer-checkonsave-command-works-but-shows-invalid-config-warning/128652),
which is caused by something the docs of Zed promote, so I decided to
help fix it.

>[anutrix](https://users.rust-lang.org/u/anutrix)
> When I add "rust-analyzer.checkOnSave.command": "clippy" I get:
> 
> invalid config value: /checkOnSave: invalid type: map, expected a
boolean;
> Extension Info: Version 0.3.2433, Server Version 0.3.2433-standalone
(66e3b5819e 2025-04-21)
> and in Language Server logs:
> 
> [Error - 3:26:22 AM] Server process exited with code 0.
> Clippy works fine but these warnings stays and extensions shows
yellow/unstable in VSCode:
> 
> Additionally, if I replace
> 
>     "rust-analyzer.checkOnSave.command": "clippy"
> with
> 
>     "rust-analyzer.checkOnSave": true,
>     "rust-analyzer.checkOnSave.command": "clippy"

> [jplatte](https://users.rust-lang.org/u/jplatte)
> From the documentation, it seems like
rust-analyzer.checkOnSave.command does not exist. It should be
rust-analyzer.check.command.

Doods created

b3b89c8 collab: Don't require payment method to start a trial (#29224)

Click to expand commit body
This PR makes it so a payment method is not required in order to start a
Zed Pro trial.

Release Notes:

- N/A

Marshall Bowers created

962b024 agent: Improve the review changes UX (#29221)

Click to expand commit body
Release Notes:

- agent: Improved the AI-generated changes review UX by clearly exposing
the generating state in the multibuffer tab.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Bennet Bo Fenner and Danilo Leal created

833653a collab: Transfer existing usage from trial to Pro (#28884)

Click to expand commit body
This PR adds support for transferring any existing usage from a trial
subscription to a Zed Pro subscription when the user upgrades.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>

Marshall Bowers and Mikayla created

886f0b7 agent: Add small design tweaks (#29218)

Click to expand commit body
Nothing too serious over here, just spacing and other small-ish tweaks.

Release Notes:

- N/A

Danilo Leal created

207fb04 Implement basic support for VS Code debug configurations (#29160)

Click to expand commit body
- [x] Basic implementation
- [x] Match common VSC debug extension names to Zed debug adapters
- [ ] ~~`preLaunchTask` support~~ descoped for this PR

Release Notes:

- N/A

Cole Miller created

36d02de Rework eval to support interpretable scores and efficient repetitions (#29197)

Click to expand commit body
### Problem

We want to start continuously tracking our progress on agent evals over
time. As part of this, we'd like the *score* to have a clear,
interpretable meaning. Right now, it's a number from 0 to 5, but it's
not clear what any particular number works. In addition, scores vary
widely from run to run, because the agent's output is deterministic. We
try to stabilize the score using a panel of judges, but the behavior of
the agent itself varies much more widely than the judges' scores for a
given run.

### Solution

* **explicit meanings of scores** - In this PR, we're prescribing the
diff and thread criteria files so that they *must* be unordered lists of
assertions. For both the thread and the diff, rather than providing an
abstract score, the judge's task is simply to count how many of these
assertions are satisfied. A percentage score can be derived from this
number, divided by the total number of assertions.
* **repetitions** - Rather than running each example once, and judging
it N times, we'll **run** the example N times. Right now, I'm just
judging the output once per run, because I believe that with these more
clear scoring criteria, the main source of non-determinism will be the
*agent's* behavior, not the judge's

### Questions

* **accounting for diagnostic errors** - Previously, the judge was asked
to incorporate diagnostics into their abstract scores. Now that the
"score" is determined directly from the criteria, the diagnostic will
not be captured in the score. How should the diagnostics be accounted
for in the eval? One thought is - let's simply count and report the
number of errors remaining after the agent finishes, as a separate field
of the run (along with diff score and thread score). We could consider
normalizing it using the total lines of added code (like errors per 100
lines of code added) in order to give it some semblance of stability
between examples.

* **repetitions** - How many repetitions should we run on CI? Each
repetition takes significant time, but I think running more than one
repetition will make the scores significantly less volatile.

### Todo

* [x] Fix `--concurrency` implementation so that only N tasks are
spawned
* [x] Support `--repetitions` efficiently (re-using the same worktree)
* [x] Restructure judge prompts to count passing criteria, not compute
abstract score
* [x] Report total number of diagnostics in some way
* [x] Format output nicely

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

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

Max Brunsfeld and Antonio Scandurra created

36da979 agent: Show project name in the Agent notification (#29211)

Click to expand commit body
Release Notes:

- agent: Added the project name in the Agent Panel notification.

Danilo Leal created

19b5475 agent: Refine the web search tool call UI (#29190)

Click to expand commit body
This PR refines a bit the web search tool UI by introducing a component
(`ToolCallCardHeader`) that aims to standardize the heading element of
tool calls in the thread.

In terms of next steps, I plan to evolve this component further soon
(e.g., building a full-blown "tool call card" component), and even move
it to a place where I can re-use it in the active_thread as well without
making the `assistant_tools` a dependency of it.

Release Notes:

- N/A

Danilo Leal created

109f1d4 agent: Simplify user message design (#29165)

Click to expand commit body
Mainly removing the "You" label, which didn't add a lot of value. Still
figuring out an issue with font size Markdown rendering before merging
this PR.

Release Notes:

- N/A

Danilo Leal created

a5852d4 agent: Support inserting selections as context via `@selection` (#29045)

Click to expand commit body
WIP

Release Notes:

- N/A

Bennet Bo Fenner created

10ded0a agent: Add support for google gemini 2.5 flash preview (#29205)

Click to expand commit body
Adds support for the new gemini-2.5-flash-preview-04-17

Release Notes:

- agent: Added support for gemini-2.5-flash-preview

Stephan Seidt created

b0b620a gemini: Add support for passing images as part of the prompt (#29203)

Click to expand commit body
Release Notes:

- agent: Add support for adding images as context when using Google
Gemini

Bennet Bo Fenner created

eca6d5a agent: Support pasting images as context (#29177)

Click to expand commit body
https://github.com/user-attachments/assets/d6a27b05-3590-4f40-a820-f6f99f6bd581

Release Notes:

- agent: Added support for pasting images as context

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Bennet Bo Fenner and Danilo Leal created

3357736 Fix duplicated multi-buffer excerpts (#29193)

Click to expand commit body
- **add test case**
- **Merge excerpts more aggressively**
- **Randomized test for set_excerpts_for_path**

Closes #ISSUE

Release Notes:

- Fixed duplicted excerpts (and resulting panics)

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>

Conrad Irwin and João Marcos created

458ffaa Add new action to run agent eval (#29158)

Click to expand commit body
The old one wasn't linking, and
https://github.com/zed-industries/zed/pull/29081 has a bunch of merge
conflicts. Wanted to start simple/small.

## Todo

* [x] Remove low-signal examples
* [x] Make the eval run on a cron, on main, and on any PR with the
`run-eval` label
* [x] Noise in logs about failure to write settings
    ```
[2025-04-21T20:45:04Z ERROR settings] Failed to write settings to file
"/home/runner/.config/zed/settings.json"
    
       Caused by:
No such file or directory (os error 2) at path
"/home/runner/.config/zed/.tmpLewFEs"
    ```
* [x] `Agentic loop stalled`
(https://github.com/zed-industries/zed/actions/runs/14581044243/job/40897622894)
* [x] Make sure that events are recorded in snowflake
* [ ] Change judge criteria to be more explicit about meanings of scores

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Thomas Mickley-Doyle <tmickleydoyle@gmail.com>

Nathan Sobo , Antonio Scandurra , Agus Zubiaga , Max Brunsfeld , and Thomas Mickley-Doyle created

b14356d agent: Do not add `<using_tool>` placeholder (#29194)

Click to expand commit body
Our provider code in `language_models` filters out messages for which
`LanguageModelRequestMessage::contents_empty` returns `false`. This
doesn't seem wrong by itself, but `contents_empty` was returning `false`
for messages whose first segment didn't contain non-whitespace text even
if they contained other non-empty segments. This caused requests to fail
when a message with a tool call didn't contain any preceding text.

Release Notes:

- N/A

Agus Zubiaga created

19ef56b agent: Fix file context renames affecting display + simplify loading code (#29192)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

dfbd132 Update Split bindings in terminal (#29188)

Click to expand commit body
Closes #29087

Release Notes:

- Changed default bindings for splitting terminals from `ctrl-k
{up,down,left,right}` to `ctrl-alt-{up,down,left,right}`. `ctrl-k` is
used by Readline to cut to the end of the line.

Conrad Irwin created

2e8ee9b agent: Make directory context display update on rename (#29189)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

c15382c vim: Add cursor shape settings for each vim mode (#28636)

Click to expand commit body
Closes #4495

Release Notes:

- vim: add cursor shape settings for each vim mode

---

Add cursor shape settings for each vim mode to enable users to specify
them.

Example of `settings.json`:

```json
{
  "vim_mode": true,
  "vim": {
    "cursor_shape": {
      "normal": "hollow",
      "insert": "bar",
      "replace": "block",
      "visual": "underline"
    }
  }
}
```

After this change is applied,

- The cursor shape specified by the user for each mode is used.
- In insert mode, the `vim > cursor_shape > insert` setting takes
precedence over the primary `cursor_shape` setting.
- If `vim > cursor_shape > insert` is not set, the primary
`cursor_shape` will be used in insert mode.
- The cursor shape will remain unchanged before and after this update
when the user does not set the `vim > cursor_shape` setting.

Video:


[screen-record.webm](https://github.com/user-attachments/assets/b87461a1-6b3a-4a77-a607-a340f106def5)

Gaku Kanematsu created

70c51b5 agent eval: Default to also running typescript examples (#29185)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

38afae8 Use buffer size for markdown preview (#29172)

Click to expand commit body
Note:

This is implemented in a very hacky and one-off manner. The primary
change is to pass a rem size through the markdown render tree, and scale
all sizing (rems & pixels) based on the passed in rem size manually.
This required copying in the `CheckBox` component from `ui::CheckBox` to
make it use the manual rem scaling without modifying the `CheckBox`
implementation directly as it is used elsewhere.

A better solution is required, likely involving `window.with_rem_size`
and/or _actual_ `em` units that allow text-size-relative scaling.

Release Notes:

- Made it so Markdown preview uses the _buffer_ font size instead of the
_ui_ font size.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Nate Butler <nate@zed.dev>

Mikayla Maki , Ben Kunkle , and Nate Butler created

9249919 Write `{result_count}.diff` and `last.diff` eval run outputs (#29181)

Click to expand commit body
These are only written when the diff has changed. `patch.diff` has been
removed as its redundant with `last.diff`.

It can be convenient to open `last.diff` and use undo/redo to navigate
its history.

Release Notes:

- N/A

Michael Sloan created

9fe4a14 Add a brief description of GPUI 2->GPUI 3 changes to `.rules` (#29180)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

7cc3c03 editor: Fix hang when scrolling over single line input fields (#28471)

Click to expand commit body
Closes #21684
Closes #28463
Closes #28264 

This PR fixes Zed hanging when scrolling over single line input fields
with `scroll_beyond_last_line` set to `vertical_scroll_margin`. The
change here is to fix the calculations of available lines.

The issue only arises with the setting present because with all
overscroll settings and `max_row` being 1 for single-line editors, the
calculation would still return the correct value of available lines,
which is 1. However, with overscrolling set to `vertical_scroll_margin`
and that set to any value greater than 0, the calculation would return
that the single-line editor has more than one line, which caused the
issues described above (Actually, setting `vertical_scroll_margin` to 1
works for some reason, overscrolls "properly" and does not cause a
crash. But I really did not want to investigate this buggy behavior
further).

This PR fixes this by always reporting the number of available lines as
the line number value for single line editors, which will (mostly) be 1
(for more context see the discussion in this PR).

Release Notes:

- Fixed an issue where Zed would crash when scrolling over single line
input fields and `scroll_beyond_last_line` set to
`vertical_scroll_margin`.

Finn Evers created

4f2f9ff Streaming tool calls (#29179)

Click to expand commit body
https://github.com/user-attachments/assets/7854a737-ef83-414c-b397-45122e4f32e8



Release Notes:

- Create file and edit file tools now stream their tool descriptions, so
you can see what they're doing sooner.

---------

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

Richard Feldman and Marshall Bowers created

7aa0fa1 Add ability to attach rules as context (#29109)

Click to expand commit body
Release Notes:

- agent: Added support for adding rules as context.

Michael Sloan created

3b31860 Add to `.rules`: Avoid creating `mod.rs` paths (#29174)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

733cd6b agent: Remove non-rust examples from evals (#29139)

Click to expand commit body
Release Notes:

- N/A

Thomas Mickley-Doyle created

e8fe0eb debugger: Fix restarting terminated child sessions (#29173)

Click to expand commit body
This fixes a bug where terminated child session failed to restart
because they were using the wrong configuration/binary to start a new
session

Release Notes:

- N/A

Anthony Eid created

0f3ac38 Agent eval: Copy `.rules` file into eval worktree for examples based on Zed (#29116)

Click to expand commit body
Also reverts #29108, which cherry-picked the rules file for an eval
example.

Release Notes:

- N/A

Michael Sloan created

32e9757 Fix ctrl-c in vim normal mode (#29167)

Click to expand commit body
This was broken when we added helix keybindings because we populate the
menu's shortcut based on the "last" seen binding for an action ignoring
context.

Release Notes:

- Fix `ctrl-c` in vim normal mode

Conrad Irwin created

be76942 agent: Migrate tool names in settings (#29168)

Click to expand commit body
Release Notes:

- agent: Add migration to rename `find_replace_file` tool to
`edit_file`, and `regex_search` to `grep`.

Agus Zubiaga created

942d4eb agent: Add additional fields to `Agent Tool Finished` telemetry event (#29163)

Click to expand commit body
This PR adds additional fields to the `Agent Tool Finished` telemetry
event:

- `model`
- `model_provider`
- `thread_id`
- `prompt_id`

Release Notes:

- N/A

Marshall Bowers created

9d35f03 debugger: More tidy up for SSH (#28993)

Click to expand commit body
Split `locator` out of DebugTaskDefinition to make it clearer when
location needs to happen.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Cole Miller <m@cole-miller.net>

Conrad Irwin , Anthony Eid , Anthony , and Cole Miller created

d13cd00 zlog: Module-level configuration and other improvements (#29161)

Click to expand commit body
Various improvements to `zlog` including:

- Enable filtering by module (reproducing `env_logger` behavior) both
through env and settings.
- Note: filtering by module currently does not account for parent module
configuration, but does account for crate configuration.
i.e. `crate=trace` will enable `TRACE` messages in `crate::a` and
`crate::a::b` modules, but `crate::a=trace` will not enable trace
messages in module `crate::a::b`
- Implementing the `Log` trait for `zlog::Logger` to support gradual
transition and evaluate tradeoffs of always going through `log` crate.
- Added the ability to turn off logging for a specific filter (module or
scope) completely by setting it to `off` (in env: `crate::a=off`, in
settings: `"project.foo": "off"`)
- Made it so the `zlog::scoped!` macro can be used in constant
expressions, so scoped loggers can be declared as global constants

Release Notes:

- N/A

Ben Kunkle created

f8ac6ee terminal: Add right-click in terminal to create a new selection if none is present (#29131)

Click to expand commit body
This PR adds functionality to right click in terminal create new
selection if none present. The selection is identical with double click
a text in terminal, plus the logic is moved from the double-click in the
terminal::mouse_down.

Closes #28237 

Release Notes:
- Adds functionality to right click in terminal create new selection if
none present

Ho Chun Lau created

6d2bdc3 editor: Hide mouse context menu when modal is opened (#29127)

Click to expand commit body
Closes #28787 

The context menu appears before the modal because it is a Deferred
element, which is always displayed above normal elements.

Release Notes:

Previously, the editor context menu appeared before the Command Palette.
This commit ensures the editor context menu is hidden when a modal,
including the Command Palette, is opened.

redforks created

9a3434e component preview: Focus search input immediately upon opening (#29155)

Click to expand commit body
Just a quick quality of life improvement to make keyboard navigation in
this view a bit better. When you open the Component Preview view now,
the "filter" search input will be focused right off the bat.

Release Notes:

- N/A

Danilo Leal created

333de5d agent: Update Switch color in the settings view (#29154)

Click to expand commit body
Just using the color method for the Switch component added in
https://github.com/zed-industries/zed/pull/29074.

Release Notes:

- N/A

Danilo Leal created

97ab098 Start tracking tool failure rates in eval (#29122)

Click to expand commit body
This pull request will print all the used tools and their failure rates.
The objective goal should be to minimize that failure rate.

@tmickleydoyle: this also changes the telemetry event to report
`tool_metrics` as opposed to `tool_use_counts`. Ideally I'd love to be
able to plot failure rates by tool and hopefully see that percentage go
down. Can we do that with the data we're tracking with this pull
request?

Release Notes:

- N/A

Antonio Scandurra created

3a27e8c edit tool: Handle over-indentation in `replace_with_flexible_indent` (#29153)

Click to expand commit body
Release Notes:

- agent: Correct over-indentation in search/replace strings from model

Agus Zubiaga created

bfb2ed3 ui: Add `.color` method to the Switch (#29074)

Click to expand commit body
This allows to pass, for example, `.color(SwitchColor::Accent)` to the
Switch component and have it render differently.

<img
src="https://github.com/user-attachments/assets/c60bac8a-c5ae-4693-912a-c754e5081f45"
width="550"/>

Release Notes:

- N/A

Danilo Leal created

9db0c4f editor: Hide signature popover on editor scroll (#29149)

Click to expand commit body
Closes #27845

This is also how VSCode tackles this issue. I think this should be
applicable to even more popovers across the editor and context menu, but
it can be addressed later.

Release Notes:

- Fixed the signature popover not hiding on editor scroll.

Smit Barmase created

a4f5c4f windows: Fix `window_min_size` (#29118)

Click to expand commit body
Closes #29117

This makes `window_min_size` work by using the `WM_GETMINMAXINFO` window
message.


Release Notes:

- N/A

---------

Co-authored-by: 张小白 <364772080@qq.com>

angelrecovery and 张小白 created

4dcfe0c Omit duplicate LSP data when generating completion item labels (#29137)

Click to expand commit body
Before: 
<img width="875" alt="before"
src="https://github.com/user-attachments/assets/eec34f4e-3665-47e1-a224-16f1b98d5b29"
/>

After:
<img width="769" alt="after"
src="https://github.com/user-attachments/assets/4ce6a24b-6fd0-4043-b67c-c92105c1501a"
/>

Release Notes:

- N/A

Kirill Bulatov created