Commit log

d40b49c Remove edit action markers from `edit_prompt.md` (#27785)

Click to expand commit body
https://github.com/zed-industries/zed/pull/27778 removed most
occurrences, but there were still some more in `edit_prompt.md`

Release Notes:

- N/A

Agus Zubiaga created

edf712d toolchains: Add support for relative paths (#27777)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

627ae7a Remove blade as the default for GPUI (#27794)

Click to expand commit body
Release Notes:

- N/A

Mikayla Maki created

17aecfd vim: Fix :ex, :exit (#27755)

Click to expand commit body
`:exit` should be `:exi[t]` instead of `:ex[it]`, `:ex` has different
command

- https://neovim.io/doc/user/editing.html#%3Aex
- https://neovim.io/doc/user/editing.html#%3Aexit

Changes:
- Add `:ex` same as `:edit`
- Change `:ex[it]` to `:exi[t]`

Release Notes:

- N/A

5brian created

01a2c8e Set tool schema format for zed.dev language model (#27788)

Click to expand commit body
Release Notes:

- N/A

Bennet Bo Fenner created

fc269df vim: Handle exclusive-linewise edgecase correctly (#27786)

Click to expand commit body
Before this change we didn't explicitly handle vim's exclusive-linewise
edgecase
(https://neovim.io/doc/user/motion.html#exclusive).

Instead we had hard-coded workarounds in a few places to make our tests
pass.
The most pernicious of these workarounds was that we represented a
visual line
selection as including the trailing newline (or leading newline for
files that
end with no newline), which other code had to undo to get back to what
the user
indended.

Closes #21440
Updates #6900

Release Notes:

- vim: Fixed `d]}` to not delete the closing brace
- vim: Fixed `d}` from the start of the line to not delete the paragraph
separator
- vim: Fixed `d}` from the middle of the line to not delete the final
newline

Conrad Irwin created

e1e8c17 Fix remote clients unable to query custom, lsp_ext, commands (#27775)

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

A preparation for rust-analyzer's LSP tasks fetching, ensures all remote
clients are able to query custom, lsp_ext, commands.

Release Notes:

- Fixed remote clients unable to query custom, lsp_ext, commands

Kirill Bulatov created

c8a9a74 Add tool calling support for Gemini models (#27772)

Click to expand commit body
Release Notes:

- N/A

Bennet Bo Fenner created

f6d58f7 ui: Render keybinds for disabled actions with disabled color (#27693)

Click to expand commit body
This PR ensures that keybinds for disabled actions in context menus are
also colored according th their disabled state.

### Default

| Current `main` | This PR | 
| --- | --- | 
| <img width="212" alt="main_default"
src="https://github.com/user-attachments/assets/c9f24f4b-dff1-4930-9a3c-07ce1fad516a"
/> | <img width="212" alt="pr_default"
src="https://github.com/user-attachments/assets/fd3db1b8-3a46-4b17-81e7-de66b35b4a79"
/> |

### Vim-Mode

| Current `main` | This PR | 
| --- | --- | 
| <img width="255" alt="main_vim"
src="https://github.com/user-attachments/assets/2845efd3-0109-4e00-af92-203a328d6282"
/> | <img width="255" alt="pr_vim"
src="https://github.com/user-attachments/assets/af073173-30c0-4a60-942f-0f124089c723"
/>|


Release Notes:

- Keybinds in contexts menus will now also be dimmed if the
corresponding action is currently disabled.

Finn Evers created

e6c64eb assistant2: Fail find-replace tool if both strings are equal (#27783)

Click to expand commit body
Models seem to do this ever so often and get very confused. Failing here
helps them recover.

Release Notes:

- N/A

Co-authored-by: Richard Feldman <richard@zed.dev>

Agus Zubiaga and Richard Feldman created

12c58d0 proto: Bump version to v0.2.2 (#27732)

Click to expand commit body
Release Notes:

- N/A

Ben Kunkle created

75689c1 assistant2: System prompt response guidance (#27782)

Click to expand commit body
Adds some guidance for the assistant on how to respond to tool results
and other interactions

Release Notes:

- N/A

Co-authored-by: Richard Feldman <richard@zed.dev>

Agus Zubiaga and Richard Feldman created

ca6be24 assistant2: Change system prompt to discourage doom loops (#27781)

Click to expand commit body
Ask assistant to limit diagnostic fix attempts to 3 max

Release Notes:

- N/A

Co-authored-by: Richard Feldman <richard@zed.dev>

Agus Zubiaga and Richard Feldman created

9b44bac Remove edit action markers literals from source (#27778)

Click to expand commit body
Edit action markers look like git conflicts and can trip up tooling used
to resolve git conflicts. This PR creates them programmatically so that
they don't appear in source code.

Release Notes:

- N/A

Agus Zubiaga created

9b40770 Add Code Symbols tool (#27733)

Click to expand commit body
Lets you get all the code symbols in the project (like the Code Symbols
panel) or in a particular file (like the Outline panel), optionally
paginated and filtering results by regex. The tool gives the files,
lines, and numbers of all of these, which means they can be used in
conjunction with the read file tool to read subsets of large files
without having to open the entire large file and poke around in it.

<img width="621" alt="Screenshot 2025-03-29 at 12 00 21 PM"
src="https://github.com/user-attachments/assets/d78259d7-2746-44c0-ac18-2e21f2505c0a"
/>

Release Notes:

- N/A

Richard Feldman created

5b2adfb Add symbol-info tool to default tools (#27766)

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

Release Notes:

- N/A

Richard Feldman created

078b241 Add symbol info tool (#27742)

Click to expand commit body
Does various readonly LSP operations: get definition, get declaration,
get implementation, get type definition, and find all references.

<img width="635" alt="Screenshot 2025-03-30 at 1 24 11 AM"
src="https://github.com/user-attachments/assets/87eae2b0-9791-4e7f-b91f-79dfc2b746cc"
/>

Release Notes:

- N/A

Richard Feldman created

e42406f python: Fix incorrect highlighting of function parameters (#26815)

Click to expand commit body
This PR addresses the highlighting of function parameters in Python.

#21454 added various improvements to Python highlighting. However, some
of the capture groups are missing corresponding colors in themes, which
was also [noted on the
PR](https://github.com/zed-industries/zed/pull/21454#pullrequestreview-2537510964).

Currently, this is especially bad for function parameters, which are not
only missing corresponding colors, but are also captured incorrectly as
`arguments` instead of `parameters`. Additionally, as not one theme
defines `function.arguments` (I cheked this with the [extension
surveyor](https://github.com/zed-industries/extension-surveyor), we
instead always fall back to `function` here. Thus, parameters are always
highlighted the same as functions, resulting in incorrect and inproper
highlighting.

This PR resolves this issue by instead capturing parameters as
`variable.parameter`, which has not perfect, but much better coverage
among existing themes.

| `main` | <img width="670" alt="main"
src="https://github.com/user-attachments/assets/6942b494-fe0f-4537-8503-8de4e2c5a30e"
/> |
| --- | --- |
| This PR | <img width="670" alt="PR"
src="https://github.com/user-attachments/assets/f0d1d22a-c5f4-46b8-a22b-f18e0e55fa47"
/> |

--- 

Following [this
comment](https://github.com/zed-industries/zed/blob/7d9dbbe5feafb0135e05d29f950d5465203690c8/extensions/test-extension/languages/gleam/highlights.scm#L77-L78)
and [the note on the other
PR](https://github.com/zed-industries/zed/pull/21454#discussion_r1907012758),
I also updated the last two matchs in the file to instead use `any-of`
in the second commit (GitHub falsely shows `id` being removed despite it
still being present). Should that not be wanted, I can revert this
change.

Release Notes:

- Fixed improper highlighting of function parameters in Python.

Finn Evers created

4ee20dd assistant2: Adjust edit files design (#27762)

Click to expand commit body
This PR includes design tweaks to elements involved on the "edit files"
flow: the bar that appears above the message editor, buttons on the
multibuffer hunks, adding keybindings to the "Review Changes" button,
etc.

<img
src="https://github.com/user-attachments/assets/4bff883a-c5c4-443e-8bf5-d98f535c83ce"
width="750" />

Release Notes:

- N/A

Danilo Leal created

74dd32d assistant2: Fix overflowing notification title (#27763)

Click to expand commit body
<img
src="https://github.com/user-attachments/assets/5a22caba-2535-4f45-96a1-6ee9a552266f"
width="500"/>

Release Notes:

- N/A

Danilo Leal created

342acdd Show notifications on primary screen by default (#27665)

Click to expand commit body
By default, agent notifications now display only on your primary screen.
You can optionally configure them to display on all screens (or not to
display at all).

Release Notes:

- N/A

Richard Feldman created

9f8776d Fix stale git statuses (#27735)

Click to expand commit body
Display of git statuses in the git panel, project panel, and tabs
regressed in #27391, causing us to frequently see stale statuses. This
turns out to be because we were not emitting the
`WorktreeUpdatedGitRepositories` event in cases where we should be,
which in turn is because of bumping the `LocalRepositoryEntry`'s
`status_scan_id` too early, so that a later comparison of two
`status_scan_id` values wasn't detecting a change that we're expecting
it to detect.

Release Notes:

- N/A (problematic behavior didn't make it into stable or preview)

Cole Miller created

548a8d7 proto: Create indents.scm (#27730)

Click to expand commit body
Closes #27676

Release Notes:

- N/A

Ben Kunkle created

73f77a7 Actually run git commands if no GIT_ASKPASS is set (#27729)

Click to expand commit body
Follow up to #27681

Release Notes:

- N/A

Conrad Irwin created

4970fe2 editor: Hide mouse cursor also for movements and selections (#27677)

Click to expand commit body
This enables hiding mouse cursor even on cursor movements like up, down,
etc. or selections made using keyboard, etc.

Renamed existing boolean setting "hide_mouse_while_typing" to
"hide_mouse". It can have three values: `on_typing_and_movement`,
`on_typing`, `never`.

Release Notes:

- Now mouse cursor hides even when you navigate, or make selections
using keyboard in editor. This behavior can be changed by setting
`hide_mouse` to `on_typing_and_movement`, `on_typing` or `never`.

Smit Barmase created

7fe6188 Introduce "Keep All" and "Reject All" buttons when reviewing assistant edits (#27724)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

8add90d Set up Rust debugger code runner tasks (#27571)

Click to expand commit body
## Summary 
This PR starts the process of adding debug task locators to Zed's
debugger system. A task locator is a secondary resolution phase that
allows a debug task to run a command before starting a debug session and
then uses the output of the run command to configure itself.

Locators are most applicable when debugging a compiled language but will
be helpful for any language as well.

## Architecture

At a high level, this works by adding a debug task queue to `Workspace`.
Which add's a debug configuration associated with a `TaskId` whenever a
resolved task with a debug config is added to `TaskInventory`'s queue.
Then, when the `SpawnInTerminal` task finishes running, it emits its
task_id and the result of the ran task.

When a ran task exits successfully, `Workspace` tells `Project` to start
a debug session using its stored debug config, then `DapStore` queries
the `LocatorStore` to configure the debug configuration if it has a
valid locator argument.

Release Notes:

- N/A

Anthony Eid created

141a6c3 Revert "terminal: Make IME work with tab and enter keys (#27572)" (#27719)

Click to expand commit body
This reverts commit be657aefa38da0f63bedaea18621edcc0cc929d1. (#27572)

Unfortunately this change broke other bindings in the terminal like
`cmd-left`
and `cmd-right`.

We do need to redo the terminal IME handling at some point, but we'll
need a
bit more thought to find an approach that works.

Release Notes:

- N/A

Conrad Irwin created

b4254a3 gpui: Support window resizing for `PlatformWindow` (#27477)

Click to expand commit body
Support resizing windows to a specified size.

## macOS

https://github.com/user-attachments/assets/8c639bc2-ee5f-4adc-a850-576dac939574


## Wayland

[wayland.webm](https://github.com/user-attachments/assets/3d593604-83b4-488f-8f63-1cf4c0c0cb9a)

## X11

[x11.webm](https://github.com/user-attachments/assets/ce8fa62e-fb74-4641-abe8-70574011e630)

## Windows

https://github.com/user-attachments/assets/abb03e48-f82a-4d62-90b3-2598a4866c3f

Release Notes:

- N/A

Floyd Wang created

f86977e debugger: Touchups to log breakpoints (#27675)

Click to expand commit body
This is a slight refactor that flattens Breakpoint struct in
anticipation of condition/hit breakpoints. It also adds a slight delay
before breakpoints are shown on gutter hover to make breakpoints less
attention grabbing.
Release Notes:

- N/A

Piotr Osiewicz created

8ecf553 assistant2: Add a way to quickly configure tools for the current profile (#27714)

Click to expand commit body
This PR adds a new entry to the profile selector to quickly access tool
customization for the current profile:

<img width="228" alt="Screenshot 2025-03-28 at 7 08 51 PM"
src="https://github.com/user-attachments/assets/929ae5e7-5a16-4bf2-8043-6c09b621fc61"
/>

Release Notes:

- N/A

Marshall Bowers created

e171d16 assistant2: Fix incorrect action when clicking on a profile (#27710)

Click to expand commit body
This PR fixes an issue where clicking on a profile entry would fork it
instead of viewing it.

Release Notes:

- N/A

Marshall Bowers created

35da9c0 assistant2: Move prompt editor item into dropdown menu (#27708)

Click to expand commit body
This PR makes the plus icon button not a dropdown anymore, freeing it up
to be always the new thread action. In consequence, I'm moving all of
the other items into another dropdown, which now houses "new prompt
editor", history, and settings, all of which there are keybindings for.

<img
src="https://github.com/user-attachments/assets/1d0d43da-9447-4218-8b9b-e692c0b74f61"
width="700"/>
 
Release Notes:

- N/A

Danilo Leal created

8b3eb98 assistant2: Adjust elements in the message editor (#27696)

Click to expand commit body
Most notable change in this PR is the changing the default profiles'
names to just "Write" and "Ask". Everything else is mostly
design-related. Here's how it looks like:

<img
src="https://github.com/user-attachments/assets/791948c9-2d63-4523-9d54-08b63a00be6a"
width="600" />

Release Notes:

- N/A

Danilo Leal created

d912b0d Remove unused tasks-related config (#27707)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

044508e assistant2: Visually de-emphasize read-only tool calls (#27702)

Click to expand commit body
<img
src="https://github.com/user-attachments/assets/03961518-ae40-47d8-b84c-974c9b897eb3"
width="500"/>

Release Notes:

- N/A

---------

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

Danilo Leal and Agus Zubiaga created

d63658c Remove duplicate message bubble icon (#27699)

Click to expand commit body
Release Notes:

- N/A

Danilo Leal created

790b56f livekit_client: Sort dependencies in `Cargo.toml` (#27705)

Click to expand commit body
This PR sorts the dependencies in the `Cargo.toml` for `livekit_client`.

Release Notes:

- N/A

Marshall Bowers created

4314200 Switch back to upstream `cargo_metadata` (#27706)

Click to expand commit body
This PR switches us back to the upstream `cargo_metadata`.

We had switched to a fork in #27126, but this shouldn't be necessary
after #27117.

Release Notes:

- N/A

Marshall Bowers created

3e400a4 zed: Fix `package.metadata.bundle-dev` key (#27704)

Click to expand commit body
This PR fixes the `package.metadata.bundle-dev` key in the `zed` crate's
`Cargo.toml`.

It seems this was inadvertently changed in
https://github.com/zed-industries/zed/pull/27126.

Nightly builds are currently failing with:

```
error: `cargo metadata` exited with an error: error: invalid table header
duplicate key `bundle` in table `package.metadata`
   --> Cargo.toml:173:1
    |
173 | [package.metadata.bundle]
    | ^
    |

   0: backtrace::capture::Backtrace::create
   1: error_chain::backtrace::imp::InternalBacktrace::new
   2: <error_chain::State as core::default::Default>::default
   3: cargo_bundle::bundle::settings::load_metadata
   4: cargo_bundle::bundle::settings::Settings::new
   5: cargo_bundle::main
   6: std::sys::backtrace::__rust_begin_short_backtrace
   7: std::rt::lang_start::{{closure}}
   8: std::rt::lang_start_internal
   9: _main
```

Release Notes:

- N/A

Marshall Bowers created

e11e7df Restore editor state on reopen (#27672)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/11626
Part of https://github.com/zed-industries/zed/issues/12853

`"restore_on_file_reopen": true` in workspace settings can now be used
to enable and disable editor data between file reopens in the same pane:


https://github.com/user-attachments/assets/8d938ee1-d854-42a8-bbc3-2a4e4d7d5933

The settings are generic and panes' data store can be extended for
further entities, beyond editors.

---------------
Impl details: 

Currently, the project entry IDs seem to be stable across file reopens,
unlike BufferIds, so those were used.
Originally, the DB data was considered over in-memory one as editors
serialize their state anyway, but managing and exposing PaneIds out of
the DB is quite tedious and joining the DB data otherwise is not
possible.


Release Notes:

- Started to restore editor state on reopen

Kirill Bulatov created

bbd1e62 Fix GPUI keyup events not firing on Windows and macOS (#27290)

Click to expand commit body
While building my own application using GPUI, I found that the `key_up`
event doesn't fire on Windows or macOS, with each platform failing for
different reasons. These events aren't used anywhere in Zed yet, so it
makes sense that the issue hasn't already been caught.

I don't have a Linux machine set up right now, so I don't know if these
events fire correctly on Linux or not.

---

Without this fix, a simple layout like the following:

```rust
div()
    .on_key_down(cx.listener(|_, event, _, _| println!("Key down: {:?}", event)))
    .on_key_up(cx.listener(|_, event, _, _| println!("Key up: {:?}", event)));
```

...would result in the following logs if the 'a' key was pressed:

```text
Key down: KeyDownEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: Some("a") }, is_held: false }
<eof>
```

With this fix, the `key_up` event fires correctly, resulting in the
following logs:

```text
Key down: KeyDownEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: Some("a") }, is_held: false }
Key up: KeyUpEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: None } }
<eof>
```

---

I've made the assumption that the `key_char` field shouldn't be set on
the `key_up` event since, unlike the `key_down` event, it's not an event
that may produce a character.

Happy to make any changes to this PR as required. If it would be
preferable to test this on Linux as well before it's merged, let me know
and I'll sort something out.

Hopefully this makes the experience of building new applications on GPUI
smoother, and potentially saves the Zed team some time if this event is
ever used in the future.

Release Notes:

- N/A

Felix Packard created

01b400e gpui: Implement From trait for Clipboard related structs (#27585)

Click to expand commit body
Implement the From trait for some simple conversations between Clipboard
related structs.

This PR only adds the From trait implementations and doesn't touch any
code. In a future PR we can simplify usage throughout the codebase, such
as:

```rust
// impl ClipboardString
fn new(text: String) -> Self {
    Self::from(text)
}
```

Release Notes:

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

tidely created

9445005 Don't consider empty deleted files to be dirty or conflicting (#27701)

Click to expand commit body
When a file is deleted outside of Zed, but it doesn't have any unsaved
changes, it shouldn't be considered "dirty" (prompting you before you
close it).

Release Notes:

- Fixed an bug where unchanged buffers were marked as conflicting if
their files were deleted outside of Zed.

---------

Co-authored-by: Antonio <antonio@zed.dev>

Max Brunsfeld and Antonio created

5c0adde Correct other end visual block functionality (#27678)

Click to expand commit body
Closes #27385

Builds on #27604 so that `vim::OtherEnd` works in visual block mode.
This is accomplished by reversing the order of active selections in the
buffer when the user hit `o`, so that the cursor moves diagonally across
the selection. The current behavior is preserved for `shift-o`, which is
how the cursors behave in vim.

We'll close #27604 since this encapsulates that change, but if you'd
prefer to take only the visual block motion component, we'll keep the
branch for #27604 open.

Test case: growing a box down and to the right, other ending, followed
by growing and shrinking the box:


https://github.com/user-attachments/assets/1df544e1-efce-4354-b354-bbfec007a7df

Test case: growing a box up and to the left, other ending, followed by
growing and shrinking the box:


https://github.com/user-attachments/assets/2f6d7729-c63a-4486-960b-23474c2e507a



Release Notes:
- Improved visual block mode when cursor is at beginning of selection
- Improved visual block mode so that `o` and `shift-o` reach parity with
vim

---------

Co-authored-by: KyleBarton <kjbarton4@gmail.com>

Peter Finn and KyleBarton created

4a5c492 If GIT_ASKPASS is already set, assume it will do the right thing (#27681)

Click to expand commit body
Fixes running git push on a coder instance.

Closes #ISSUE

Release Notes:

- Zed will now use `GIT_ASKPASS` if you already have one set instead of
overriding with our own. Fixes `git push` in Coder.

Conrad Irwin created

4da987d Delete test file (#27697)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

be657ae terminal: Make IME work with tab and enter keys (#27572)

Click to expand commit body
… in the terminal.

Closes #23003

Release Notes:

- N/A

## Before fix:


https://github.com/user-attachments/assets/249ec62d-1461-4551-87b2-4259dba171f2


## After fix:



https://github.com/user-attachments/assets/2db624a0-8035-4260-9b2e-0cee83662b84

Ishige created

d0ae604 collab: Switch to new encryption format for access tokens (#27691)

Click to expand commit body
This PR switches collab over to start minting access tokens using the
new OAEP-based encryption format.

This is a follow-up to #15058 where we added support for this new
encryption format.

Clients that are newer than 8 months ago should be able to decrypt the
new access tokens. It is only clients older than 8 months ago that will
no longer be supported.

Release Notes:

- N/A

Marshall Bowers created

08bb17a Allow Trash to fallback to Delete on failure (#27682)

Click to expand commit body
This fixes trashing files from the git panel on SSH remotes that don't
run a Desktop environment.

Release Notes:

- Fix trash to work on remotes with no desktop environment configured

Conrad Irwin created