This gives us _very_ rudimentary support for `git switch` and `git
checkout` now, by making them aliases for our existing `git::branch`
call.
Release Notes:
- Git Beta: Added `git::Switch` and `git::CheckoutBranch` as aliases for
the existing `git::Branch`
Mikayla Maki
created
bbe7c9a
assistant2: Factor out `Thread::all_tools_finished` method (#26314)
Click to expand commit body
This PR factors out a new `Thread::all_tools_finished` method to
encapsulate some of the boilerplate in the `ThreadEvent::ToolFinished`
event handler.
This should make this event handler easier to replicate for the eval
use-case.
Release Notes:
- N/A
Marshall Bowers
created
f6345a6
Improve when the commit suggestions would show (#26313)
Click to expand commit body
Release Notes:
- Git Beta: Fixed a few bugs where the suggested commit text wouldn't
show in certain cases, or would update slowly.
Mikayla Maki
created
e70d0ed
assistant_tool: Pass an `Entity<Project>` to `Tool::run` (#26312)
Click to expand commit body
This PR updates the `Tool::run` method to take an `Entity<Project>`
instead of a `WeakEntity<Project>`.
Release Notes:
- N/A
Marshall Bowers
created
921c24e
assistant2: Add helper methods to `Thread` for dealing with tool use (#26310)
Click to expand commit body
This PR adds two new helper methods to the `Thread` for dealing with
tool use:
- `use_pending_tools` - This uses all of the tools that are pending
- The reason we aren't calling this directly in `stream_completion` is
that we still might need to have a way for users to confirm that they
want tools to be run, which would need to happen at the UI layer in the
`ActiveThread`.
- `send_tool_results_to_model` - This encapsulates inserting a new user
message that contains the tool results and sending them up to the model.
Release Notes:
- N/A
Marshall Bowers
created
18f3f80
assistant_tool: Decouple `Tool` from `Workspace` (#26309)
Click to expand commit body
This PR decouples the `Tool` trait from the `Workspace` (and from the
UI, in general).
`Tool::run` now takes a `WeakEntity<Project>` instead of a
`WeakEntity<Workspace>` and a `Window`.
Release Notes:
- N/A
Marshall Bowers
created
4f6682c
haskell: Extract to zed-extensions/haskell repository (#26306)
Click to expand commit body
This PR extracts the Haskell extension to the
[zed-extensions/haskell](https://github.com/zed-extensions/haskell)
repository.
Release Notes:
- N/A
Marshall Bowers
created
f57dece
git: Fix errors not showing in the toast notification (#26303)
Click to expand commit body
Release Notes:
- Resolved an issue where error messages from Git were not being
displayed in toast notifications.
<img width="1702" alt="Screenshot 2025-03-08 at 1 11 30 AM"
src="https://github.com/user-attachments/assets/a46517db-4e64-4c5e-a64e-96e820ca9aec"
/>
Kiran_Peraka
created
103ad63
Refactor Completions to allow non-LSP ones better (#26300)
Click to expand commit body
A preparation for https://github.com/zed-industries/zed/issues/4957 that
pushes all LSP-related data out from the basic completion item, so that
it's possible to create completion items without any trace of LSP
clearly.
Release Notes:
- N/A
Kirill Bulatov
created
ec5e7a2
Change the default staging and unstaging state display (#26299)
Click to expand commit body
This adds a setting for the "border" hunk display mode, as discussed,
and makes it the default.
Here's how it looks in light mode:
<img width="1512" alt="Screenshot 2025-03-07 at 11 39 25 AM"
src="https://github.com/user-attachments/assets/a934faa3-ec69-47e1-ad46-535e48b98e9f"
/>
And dark mode:
<img width="1511" alt="Screenshot 2025-03-07 at 11 39 56 AM"
src="https://github.com/user-attachments/assets/43c9afd1-22bb-4bd8-96ce-82702a6cbc80"
/>
Release Notes:
- Git Beta: Adjusted the default hunk styling for staged and unstaged
changes
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Nate <nate@zed.dev>
Mikayla Maki
,
Conrad
, and
Nate
created
05d3ee8
extension: Require that grammar names are written in snake_case (#26295)
Click to expand commit body
This PR updates the `ExtensionBuilder` to require that grammar names are
written in snake_case.
The grammar names are used to construct identifiers, so we need them to
be valid C identifiers.
Release Notes:
- N/A
This PR adds pages to component preview when clicking on a given
component in the sidebar.
This will let us create richer previews & better docs for using
components in the future.
Release Notes:
- N/A
b0b0b00
worktree: Add some info-level logging about added and removed repository entries (#26291)
Click to expand commit body
Trying to track down a user's reported issue with parent repositories
not getting picked up.
Release Notes:
- N/A
Cole Miller
created
80fb885
Remove worktree and project notifies (#26244)
Click to expand commit body
This reduces the number of multibuffer syncs from 100,000 to 20,000.
Before this change each editor individually observed the project, so
literally any project change was amplified by the number of editors you
had open.
Now editors listen to their buffers instead of the project, and other
users of `cx.observe` on the project have been updated to use specific
events to reduce churn.
Follow up to #26237
Release Notes:
- Improved performance of Zed in large repos with lots of file system
events.
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Conrad Irwin
and
Max Brunsfeld
created
aef84d4
Update Linux Graphics troubleshooting (#26263)
Click to expand commit body
Try to re-order the tips for clarity, and make it clear that /etc/prime
could be wrong either way around.
Also remove section on FIPS now we nolonger bundle openssl
Updates #15629
Release Notes:
- N/A
#25944 but now with Vim mode off.
Release Notes:
- N/A
João Marcos
created
14148f5
scripting_tool: Move description into a separate file (#26283)
Click to expand commit body
This PR moves the `scripting_tool` description into a separate file so
it's a bit easier to work with.
Release Notes:
- N/A
Marshall Bowers
created
efde5aa
Extract a `Session` struct to hold state about a given thread's scripting session (#26282)
Click to expand commit body
We're still recreating a session for every tool call, but the idea is to
have a long-lived `Session` per assistant thread.
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Antonio Scandurra
and
Agus Zubiaga
created
fcc5e27
Fix hotkey for toggle filters in project search (#25917)
Click to expand commit body
Closes #24741
Adjusted the shortcut key handling to properly toggle filters in the project search feature.
Release Notes:
- linux: Fixed `ctrl-alt-f` not correctly toggling search filters in project search.
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Guilherme Gonçalves
and
Peter Tripp
created
ed417da
git_ui: Try to prompt the model out of including the diff output (#26281)
Click to expand commit body
This PR updates the prompt for generating commit messages to tell the
model not to include the raw diff output in the message.
Release Notes:
- N/A
Marshall Bowers
created
d1c6789
chore: Do not bust Rust build cache when opening projects with dev build (#26278)
Click to expand commit body
## Problem
Running `cargo run .` twice in Zed repository required a rebuild two
times in a row. The second rebuild was triggered around libz-sys, which
in practice caused a rebuild of the ~entire project.
Some concrete examples:
```
cargo test -p project # Requires a rebuild (warranted)
cargo run .
cargo test -p project # Requires a rebuild (unwarranted)
```
or
```
cargo run . # Requires a rebuild (warranted)
cargo run . # Requires a rebuild (unwarranted)
```
## What's going on
Zed build script on MacOS sets MACOSX_DEPLOYMENT_TARGET to 10.15. This
is fine. However, **cargo propagates all environment variables to child
processes during `cargo run`**. This then affects Rust Analyzer spawned
by dev Zed - it clobbers build cache of whatever package it touches,
because it's behavior is not same between running it with `cargo run`
(where MACOS_DEPLOYMENT_TARGET gets propagated to child Zed) and running
it directly via `target/debug/zed` or whatever (where the env variable
is not set, so that build behaves roughly like Zed Dev.app).
## Solution
~We'll unset that env variable from user environment when we're
reasonably confident that we're running under `cargo run` by exploiting
other env variables set by cargo:
https://doc.rust-lang.org/cargo/reference/environment-variables.html
CARGO_PKG_NAME is always set to `zed` when running it via `cargo run`,
as it's the value propagated from the build.~
~The alternative I've considered is running [via a custom
runner](https://doc.rust-lang.org/cargo/reference/config.html#targetcfgrunner),
though the problem here is that we'd have to use a shell script to unset
the env variable - that could be problematic with e.g. fish. I just
didn't want to deal with that, though admittedly it would've been
cleaner in other aspects.~
Redact all above. We'll just set MACOSX_DEPLOYMENT_TARGET regardless of
whether you have it in your OG shell environment or not.
Release Notes:
- N/A
Piotr Osiewicz
created
a887f3b
Remove plain text file type association from default settings (#25420)
Click to expand commit body
Closes #20291
This PR removes the plain text file association from the default
settings, as #21298 added a `LanguageMatcher` for Plain Text files,
which now associates "Plain Text" with `txt`-files (see
https://github.com/zed-industries/zed/blob/10053e2566c6c3312e2312088e40b757daeab189/crates/language/src/language.rs#L127-L137).
Thus, the association via the default settings is not required anymore,
which fixes #20291 as described in
https://github.com/zed-industries/zed/issues/20291#issuecomment-2500731743
Release Notes:
- Fixed default file type associations overriding associations provided
by extensions for `txt`-files.
Co-authored-by: Peter Tripp <peter@zed.dev>
Finn Evers
and
Peter Tripp
created
f8deebc
Fix inline diagnostics in the project diff (#26275)
Click to expand commit body
https://github.com/zed-industries/zed/blob/205f9a9f0391da47a87cac45a41f67d2a23f5a95/crates/editor/src/element.rs#L1643
Due to the snippet above, Zed is supposed to have `row` larger or equal
to `start_row` here:
https://github.com/zed-industries/zed/blob/205f9a9f0391da47a87cac45a41f67d2a23f5a95/crates/editor/src/element.rs#L1694
yet the panic were reported when clicking in the project diff.
That project diff has a lot of highlighting happening already, so the PR
disables inline diagnostics within a git diff view.
Release Notes:
- N/A
Kirill Bulatov
created
205f9a9
Add lua script access to code using `cx` + reuse project search logic (#26269)
Click to expand commit body
Access to `cx` will be needed for anything that queries entities. In
this commit this is use of `WorktreeStore::find_search_candidates`. In
the future it will be things like access to LSP / tree-sitter outlines /
etc.
Changes to support access to `cx` from functions provided to the Lua
script:
* Adds a channel of requests that require a `cx`. Work enqueued to this
channel is run on the foreground thread.
* Adds `async` and `send` features to `mlua` crate so that async rust
functions can be used from Lua.
* Changes uses of `Rc<RefCell<...>>` to `Arc<Mutex<...>>` so that the
futures are `Send`.
One benefit of reusing project search logic for search candidates is
that it properly ignores paths.
Release Notes:
- N/A
622ed8a
git: Fix git panel not using default width (#26220)
Click to expand commit body
Closes #26062
Removing the width here causes zed to use the default value (inside
default settings) after restart like other panels.
Release Notes:
- Fixed issue where git panel wasn't using default width after restart
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
8422a81
Add staged variants of the hunk_style controls (#26259)
Click to expand commit body
This PR adds a few more hunk style settings that flips the emphasis.
Normally, the concept at Zed has been that the project diff should
emphasize what's going into the commit. However, this leads to a problem
where the default state of all diff hunks are in the non-emphasized
state, making them hard to see and interact with. Especially on light
themes. This PR is an experiment in flipping the emphasis states. Now
the project diff is more like a queue of work, with the next "job" (hunk
to be evaluated) emphasized, and the "completed" (staged) hunks
deemphasized. This fixes the default state issue but is a big jump from
how we've been thinking about it. So here we can try it out and see how
it feels :)
Release Notes:
- Git Beta: Added hunk style settings to emphasize the unstaged state,
rather than the staged state.
Resolves #26032
This PR changes the highlighting for `and`, `not` and `or` in Lua from
`operator` to `keyword.operator`. [VS Code also highlights these as
keyword
operators](https://github.com/LuaLS/lua.tmbundle/blob/1483add845ebfb3e1e631fe372603e5fed2cdd42/Syntaxes/Lua.plist#L277-L279)
and Zed does this for other languages as well, like
[Python](https://github.com/zed-industries/zed/blob/813e207514f76ec3f8bc8bbb649deaafa304de9e/crates/languages/src/python/highlights.scm#L221-L229)
or
[Zig](https://github.com/zed-industries/zed/blob/813e207514f76ec3f8bc8bbb649deaafa304de9e/extensions/zig/languages/zig/highlights.scm#L145-L149).
Additionally, in 813e207514f76ec3f8bc8bbb649deaafa304de9e I removed
duplicate matches for existing keywords to improve readability and align
them to how keywords are generally matched across languages (see
[Rust](https://github.com/zed-industries/zed/blob/813e207514f76ec3f8bc8bbb649deaafa304de9e/crates/languages/src/rust/highlights.scm#L79-L119)
and
[Typescript](https://github.com/zed-industies/zed/blob/813e207514f76ec3f8bc8bbb649deaafa304de9e/crates/languages/src/typescript/highlights.scm#L210-L269)
for example).
Whilst contributing to the majority of the diff, this does not change
any existing highlights.
| Before | After |
| --- | --- |
| <img width="309" alt="old"
src="https://github.com/user-attachments/assets/7790817e-4a0d-442b-b176-9a84bcc6f3c4"
/> | <img width="309" alt="PR"
src="https://github.com/user-attachments/assets/34a57962-938a-4465-9406-288f5c456aa3"
/> |
Release Notes:
- N/A
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
This PR removes some blank lines in `blink_manager.rs`.
Release Notes:
- N/A
Marshall Bowers
created
1763dd7
Worktree paths in git panel, take 2 (#26047)
Click to expand commit body
Modified version of #25950. We still use worktree paths, but repo paths
with a status that lie outside the worktree are not excluded; instead,
we relativize them by adding `..`. This makes the list in the git panel
match what you'd get from running `git status` (with the repo's worktree
root as the working directory).
- [x] Implement + test new unrelativization logic
- [x] ~~When collecting repositories, dedup by .git abs path, so
worktrees can share a repo at the project level~~ dedup repos at the
repository selector layer, with repos coming from larger worktrees being
preferred
- [x] Open single-file worktree with diff when activating a path not in
the worktree
Release Notes:
- N/A
Cole Miller
created
330e799
erlang: Extract to zed-extensions/erlang repository (#26248)
Click to expand commit body
This PR extracts the Erlang extension to the
[zed-extensions/erlang](https://github.com/zed-extensions/erlang)
repository.
Release Notes:
- N/A
Marshall Bowers
created
51c9003
Enable soft-wrap by default in markdown (#26247)
Click to expand commit body
Release Notes:
- Enabled soft-wrap by default in markdown
Max Brunsfeld
created
be75f17
Fix auto-indent when pasting multi-line content that was copied start… (#26246)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/24914 (again)
Release Notes:
- Fixed an issue where multi-line pasted content was auto-indented
incorrectly if copied from the middle of an existing line.
This reduces the number of multibuffer syncs when starting the editor
with 80
files open in the Zed repo from 10,000,000 to 100,000 by avoiding
O(n**2)
dirtyness checks.
Release Notes:
- Fixed a beachball when restarting in a large repo with a large number
open files
Conrad Irwin
created
263d9ff
Add event to track LLM-generated commit messages (#26245)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
829ecda
lsp: Add support for clangd's `inactiveRegions` extension (#26146)
Click to expand commit body
Closes #13089
Here we use `experimental` to advertise our support for
`inactiveRegions`. Note that clangd does not currently have a stable
release that reads the `experimental` object (PR
https://github.com/llvm/llvm-project/pull/116531), this can be tested
with one of clangd's recent "unstable snapshots" in their
[releases](https://github.com/clangd/clangd/releases).
Release Notes:
- Added support for clangd's `inactiveRegions` extension.

---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Naim A.
,
Peter Tripp
, and
Kirill Bulatov
created
af5af9d
Support `workspace/executeCommand` for actions' data (#26239)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/16746
Part of https://github.com/zed-extensions/deno/issues/2
Changes the action-related code so, that
* `lsp::Command` as actions are supported, if server replies with them
* actions with commands are filtered out based on servers'
`executeCommandOptions`
(https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#executeCommandOptions)
— commands that are not listed won't be executed and the corresponding
actions will be hidden in Zed
Release Notes:
- Added support of `workspace/executeCommand` for actions' data
---------
Co-authored-by: Peter Tripp <petertripp@gmail.com>
Kirill Bulatov
and
Peter Tripp
created
97c0a0a
language_models: Remove `.unwrap`s in Bedrock provider (#26238)
Click to expand commit body
This PR removes a number of `.unwrap`s in the Bedrock provider.
We must not `.unwrap` in situations where it is not provably safe to do
so, which it was not in any of these cases.
Release Notes:
- Fixed some potential panics in the AWS Bedrock model provider.
https://github.com/user-attachments/assets/b16e32e6-46c6-41dc-ab68-1824d288c8c2
This PR adds the first part of our planned extended notification system:
StatusToasts.
It also makes various updates to ComponentPreview and adds a `Styled`
extension in `ui::style::animation` to make it easier to animate styled
elements.
_**Note**: We will be very, very selective with what elements are
allowed to be animated in Zed. Assume PRs adding animation to elements
will all need to be manually signed off on by a designer._
## Status Toast

These are designed to be used for notifying about things that don't
require an action to be taken or don't need to be triaged. They are
designed to be ignorable, and dismiss themselves automatically after a
set time.
They can optionally include a single action.
Example: When the user enables Vim Mode, that action might let them undo
enabling it.

Status Toasts should _not_ be used when an action is required, or for
any binary choice.
If the user must provide some input, this isn't the right component!
### Out of scope
- Toasts should fade over a short time (like AnimationDuration::Fast or
Instant) when dismissed
- We should visually show when the toast will dismiss. We'll need to
pipe the `duration_remaining` from the toast layer -> ActiveToast to do
this.
- Dismiss any active toast if another notification kind is created, like
a Notification or Alert.
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <m@cole-miller.net>
Nate Butler
and
Cole Miller
created
b8a8b9c
git_ui: Add support for generating commit messages with an LLM (#26227)
Click to expand commit body
This PR finishes up the support for generating commit messages using an
LLM.
We're shelling out to `git diff` to get the diff text, as it seemed more
efficient than attempting to reconstruct the diff ourselves from our
internal Git state.
https://github.com/user-attachments/assets/9bcf30a7-7a08-4f49-a753-72a5d954bddd
Release Notes:
- Git Beta: Added support for generating commit messages using a
language model.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This PR adds a new rounded/corner border token: `rounded_md` with a
value of 6px.
I feel like I was wanting to use 6px border radius a lot but avoiding
due to it being an arbitrary value... so, not anymore! It's also cool to
have this be consistent with Tailwind v4.
Follow on to the prior renames:
- `rounded_sm` -> `rounded_xs`:
https://github.com/zed-industries/zed/pull/26221
- `rounded_md` -> `rounded_sm`:
https://github.com/zed-industries/zed/pull/26228
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Danilo Leal
and
Marshall Bowers
created
aceab76
gpui: Rename `rounded_md` to `rounded_sm` (#26228)
Click to expand commit body
This PR renames the `rounded_md` style method to `rounded_sm`.
Follow up to https://github.com/zed-industries/zed/pull/26221, which
freed up the `rounded_sm` name.
Release Notes:
- N/A