Compare commits

..

1873 Commits

Author SHA1 Message Date
Antonio Scandurra
55e4589739 WIP
We can parse `actions` but we need to enable them in rust-analyzer via

`rust-analyzer.hoverActions.enable`
2025-11-11 16:39:44 +00:00
Danilo Leal
993919d360 agent_ui: Add icon button to trigger the @-mention completions menu (#42449)
Closes https://github.com/zed-industries/zed/issues/37087

This PR adds an icon button to the footer of the message editor enabling
to trigger and interact with the @-mention completions menu with the
mouse. This is a first step towards making other types of context you
can add in Zed's agent panel more discoverable. Next, I want to improve
the discoverability of images and selections, given that you wouldn't
necessarily know they work in Zed without a clear way to see them. But I
think that for now, this is enough to close the issue above, which had
lots of productive comments and discussion!

<img width="500" height="540" alt="Screenshot 2025-11-11 at 10  46 3@2x"
src="https://github.com/user-attachments/assets/fd028442-6f77-4153-bea1-c0b815da4ac6"
/>

Release Notes:

- agent: Added an icon button in the agent panel that allows to trigger
the @-mention menu (for adding context) now also with the mouse.
2025-11-11 12:50:56 -03:00
Danilo Leal
8467a3dbd6 agent_ui: Allow to uninstall agent servers from the settings view (#42445)
This PR also adds items within the "Add Agent" menu to:
1. Add more agent servers from extensions, opening up the extensions
page with "Agent Servers" already filtered
2. Go to the agent server + ACP docs to learn more about them

I feel like having them there is a nice way to promote this knowledge
from within the product and have users learn more about them.

<img width="500" height="540" alt="Screenshot 2025-11-11 at 10  46 3@2x"
src="https://github.com/user-attachments/assets/9449df2e-1568-44d8-83ca-87cbb9eefdd2"
/>

Release Notes:

- agent: Enabled uninstalled agent servers from the agent panel's
settings view.
2025-11-11 12:47:08 -03:00
Bennet Bo Fenner
ee2e690657 agent_servers: Fix panic when setting default mode (#42452)
Closes ZED-35A

Release Notes:

- Fixed an issue where Zed would panic when trying to set the default
mode for ACP agents
2025-11-11 15:25:27 +00:00
tidely
28d019be2e ollama: Fix tool calling (#42275)
Closes #42303

Ollama added tool call identifiers
(https://github.com/ollama/ollama/pull/12956) in its latest version
[v0.12.10](https://github.com/ollama/ollama/releases/tag/v0.12.10). This
broke our json schema and made all tool calls fail.

This PR fixes the schema and uses the Ollama provided tool call
identifier when available. We remain backwards compatible and still use
our own identifier with older versions of Ollama. I added a `TODO` to
remove the `Option` around the new field when most users have updated
their installations to v0.12.10 or above.

Note to reviewer: The fix to this issue should likely get cherry-picked
into the next release, since Ollama becomes unusable as an agent without
it.

Release Notes:

- Fixed tool calling when using the latest version of Ollama
2025-11-11 16:10:47 +01:00
Lukas Wirth
a19d11184d remote: Add more context to error logging in wsl (#42450)
cc https://github.com/zed-industries/zed/issues/40892

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 15:09:56 +00:00
Lukas Wirth
38e2c7aa66 editor: Hide file blame on editor cancel (ESC) (#42436)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 13:56:04 +00:00
liuyanghejerry
10d5d78ded Improve error messages on extension loading (#42266)
This pull request improves error message when extension loading goes
wrong.

Before:

```
2025-11-08T21:16:02+08:00 ERROR [extension_host::extension_host] failed to load arkts extension.toml

Caused by:
    No such file or directory (os error 2)
```

Now:

```
2025-11-08T22:57:00+08:00 ERROR [extension_host::extension_host] failed to load arkts extension.toml, "/Users/user_name_placeholder/Library/Application Support/Zed/extensions/installed/arkts/extension.toml"

Caused by:
    No such file or directory (os error 2)

```

Release Notes:

- N/A
2025-11-11 15:45:03 +02:00
Terra
dfd7e85d5d Replace deprecated json.schemastore.org with www.schemastore.org (#42336)
Release Notes:

- N/A

According to
[microsoft/vscode#254689](https://github.com/microsoft/vscode/issues/254689),
the json.schemastore.org domain has been deprecated and should now use
www.schemastore.org (or schemastore.org) instead.

This PR updates all occurrences of the old domain within the Zed
codebase,
including code, documentation, and configuration files.
2025-11-11 15:43:25 +02:00
Lukas Wirth
b8fcd3ea04 gpui: Fix RefCell already borrowed in WindowsPlatform::run (#42440)
Fixes ZED-1VX

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 13:43:06 +00:00
Libon
9be5e31aca Add clear recent files history command (#42176)
![2025-11-07
181619](https://github.com/user-attachments/assets/a9bef7a6-dc0b-4db2-85e5-2e1df7b21cfa)


Release Notes:

- Added "workspace: clear navigation history" command
2025-11-11 15:42:00 +02:00
Kirill Bulatov
58db38722b Find proper applicable chunks for visible ranges (#42422)
Release Notes:

- Fixed inlay hints not being queried for certain long-ranged jumps

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-11 13:38:28 +00:00
Agus Zubiaga
f2ad0d716f zeta cli: Print log paths when running predict (#42396)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-11-11 09:56:20 -03:00
Lukas Wirth
777b46533f auto_update: Ignore dir removal errors on windows (#42435)
The auto update helper already removes these when successful, so these
will always fail in the common case.

Additional replaces a mutable const with a static as otherwise we'll
rebuild the job list on every access

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 12:55:19 +00:00
Miguel Raz Guzmán Macedo
b3dd51560b docs: Fix broken links in docs with lychee (#42404)
Lychee is a [Rust based](https://lychee.cli.rs) async parallel link
checker.

I ran it against the codebase to suss out stale links and fixed those
up.

There's currently 2 remaining cases that I don't know how to resolve:

1. https://flathub.org/apps/dev.zed.Zed - nginx is giving a 502 bad
gateway
2.
https://github.com/zed-industries/zed/actions/workflows/ci.yml/badge.svg
- I don't want to mess with the CI pipeline in this PR.

Once again, I'll punt to the Docs Czar to see if this gets incorporated
into CI later.

---

## Running `lychee` locally:

```
cargo binstall -y lychee
lychee .
```

---
Release Notes:

- N/A

Signed-off-by: mrg <miguelraz@ciencias.unam.mx>
2025-11-11 13:55:02 +01:00
dDostalker
25489c2b7a Fix adding a Python virtual environment, may duplicate the "open this dictionary" string when modifying content. (#41840)
Release Notes:

- Fixed an issue when adding a Python virtual environment that may cause
duplicate "open this dictionary" entries

- Trigger condition:
Type `C:\`, delete `\`, then repeatedly add `\`.

-Video

bug:

https://github.com/user-attachments/assets/f68008bb-9138-4451-a842-25b58574493b

fix:

https://github.com/user-attachments/assets/2913b8c2-adee-4275-af7e-e055fd78915f
2025-11-11 13:22:32 +01:00
Alexandre Anício
dc372e8a84 editor: Unfold buffers with selections on edit + Remove selections on buffer fold (#37953)
Closes #36376 

Problem:
Multi-cursor edits/selections in multi-buffers view were jumping to
incorrect locations after toggling buffer folds. When users created
multiple selections across different buffers in a multi-buffer view
(like project search results) and then folded one of the buffers,
subsequent text insertion would either:

1. Insert text at wrong locations (like at the top of the first unfolded
buffer)
2. Replace the entire content in some buffers instead of inserting at
the intended cursor positions
3. Create orphaned selections that caused corruption in the editing
experience

The issue seems to happen because when a buffer gets folded in a
multi-buffer view, the existing selections associated with that buffer
become invalid anchor points.

Solution:
1. Selection Cleanup on Buffer Folding
- Added `remove_selections_from_buffer()` method that filters out all
selections from a buffer when it gets folded
- This prevents invalid selections from corrupting subsequent editing
operations
- Includes edge case handling: if all selections are removed (all
buffers folded), it creates a default selection at the start of the
first buffer to prevent panics

2. Unfolding buffers before editing  
- Added `unfold_buffers_with_selections()` call in `handle_input()`
ensures buffers with active selections are automatically unfolded before
editing
- This helps in fixing an edge case (covered in the tests) where, if you
fold all buffers in a multi-buffer view, and try to insert text in a
selection, it gets unfolded before the edit happens. Without this, the
inserted text would override the entire buffer content.
- If we don't care about this edge case, we could remove this method. I
find it ok to add since we already trigger buffer unfolding after edits
with `Event::ExcerptsEdited`.

Release Notes:

- Fixed multi-cursor edits jumping to incorrect locations after toggling
buffer folds in multi-buffer views (e.g, project search)
- Multi-cursor selections now properly handle buffer folding/unfolding
operations
- Text insertion no longer occurs at the wrong positions when buffers
are folded during multi-cursor editing
- Eliminated content replacement bugs where entire buffer contents were
incorrectly overwritten
- Added safe fallback behavior when all buffers in a multi-buffer view
are folded

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-11-11 16:59:44 +05:30
Lukas Wirth
1c4bb60209 gpui: Fix invalid unwrap in windows window creation (#42426)
Fixes ZED-34M

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 10:55:19 +00:00
Dino
97100ce52f editor: Respect search case sensitivity when selecting occurrences (#42121)
Update how the editor's `select_*` methods work in order to respect the
`search.case_sensitive` setting, or to be overriden by the
`BufferSearchBar` search options.

- Update both the `SearchableItem` and `SearchableItemHandle` traits
  with a new `set_search_is_case_sensitive` method that allows callers
  to set the case sensitivity of the search
- Update the `BufferSearchBar` to leverage
  `SearchableItemHandle.set_search_is_case_sensitive` in order to sync
  its case sensitivity options with the searchable item
- Update the implementation of the `SearchableItem` trait for `Editor`
  so as to store the argument provided to the
  `set_search_is_case_sensitive` method
- Update the way search queries are built by `Editor` so as to rely on
  `SearchableItem.set_search_is_case_sensitive` argument, if not `None`,
  or default to the editor's `search.case_sensitive` settings

Closes #41070 

Release Notes:

- Improved the "Select Next Occurrence", "Select Previous Occurrence"
and "Select All Occurrences" actions in order to respect the case
sensitivity search settings

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-11-11 10:26:40 +00:00
Dino
dcf56144b5 vim: Sort whole buffer when no range is specified (#42376)
- Introduce a `default_range` field to `VimCommand`, to be optionally
  used when no range is specified for the command
- Update `VimCommand.parse` to take into consideration the
  `default_range`
- Introduce `CommandRange::buffer` to obtain the `CommandRange` which
  corresponds to the whole buffer
- Update the `VimCommand` definitions for both `sort` and `sort i` to
  default to the whole buffer when no range is specified

Closes #41750 

Release Notes:

- Improved vim's `:sort` command to sort the buffer's content when no
selection is used
2025-11-11 10:04:30 +00:00
Lukas Wirth
46db753f79 diagnostics: Fix panic due non-sorted diagnostics excerpt ranges (#42416)
Fixes ZED-356

Release Notes:

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

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-11-11 09:57:11 +01:00
Lukas Wirth
1a807a7a6a terminal: Spawn terminal process on main thread on macos again (#42411)
Closes https://github.com/zed-industries/zed/issues/42365, follow up to
https://github.com/zed-industries/zed/pull/42234

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-11 07:57:30 +00:00
Alvaro Parker
f90d0789fb git: Add notification to git clone (#41712)
Adds a simple notification when cloning a repo using the integrated git
clone on Zed. Before this, the user had no feedback after starting the
cloning action.

Demo:


https://github.com/user-attachments/assets/72fcdf1b-fc99-4fe5-8db2-7c30b170f12f

Not sure about that icon I'm using for the animation, but that can be
easily changed.

Release Notes:

- Added notification when cloning a repo from zed
2025-11-11 01:02:13 -05:00
Conrad Irwin
9e717c7711 Use cloud for auto-update (#42246)
We've had several outages with a proximate cause of "vercel is
complicated",
and auto-update is considered a critical feature; so lets not use vercel
for
that.

Release Notes:

- Auto Updates (and remote server binaries) are now downloaded via
https://cloud.zed.dev instead of https://zed.dev. As before, these URLs
redirect to the GitHub release for actual downloads.
2025-11-10 23:00:55 -07:00
CnsMaple
823844ef18 vim: Fix increment order (#42256)
before:


https://github.com/user-attachments/assets/d490573c-4c2b-4645-a685-d683f06c611f


after:


https://github.com/user-attachments/assets/a69067a1-6e68-4f05-ba56-18eadb1c54df

Release Notes:

- Fix vim increment order
2025-11-10 21:48:27 -07:00
Conrad Irwin
70bcf93355 Add an event_source to events (#42125)
Release Notes:

- N/A
2025-11-10 21:32:09 -07:00
Conrad Irwin
378b30eba5 Use cloud.zed.dev for install.sh (#42399)
Similar to #42246, we'd like to avoid having Vercel on the critical
path.

https://zed.dev/install.sh is served from Cloudflare by intercepting a
route on that page, so this makes the shell-based install flow vercel independent.

Release Notes:

- `./script/install.sh` will now fetch assets via
`https://cloud.zed.dev/`
instead of `https://zed.dev`. As before it will redirect to GitHub
releases
  to complete the download.
2025-11-10 23:55:19 +00:00
Marshall Bowers
83e7c21b2c collab: Remove unused user queries (#42400)
This PR removes queries on users that were no longer being used.

Release Notes:

- N/A
2025-11-10 23:47:39 +00:00
Finn Evers
e488b6cd0b agent_ui: Fix issue where MCP extension could not be uninstalled (#42384)
Closes https://github.com/zed-industries/zed/issues/42312

The issue here was that we assumed that context servers provided by
extensions would always need a config in the settings to be present when
actually the opposite was the case - context servers provided by
extensions are the only context servers that do not need a config to be
in place in order to be available in the UI.

Release Notes:

- Fixed an issue where context servers provided by extensions could not
be uninstalled if they were previously unconfigured.
2025-11-11 00:25:27 +01:00
Kirill Bulatov
f52549c1c4 Small documentation fixes (#42397)
Release Notes:

- N/A

Co-authored-by: Ole Jørgen Brønner <olejorgenb@gmail.com>
2025-11-11 01:16:28 +02:00
Conrad Irwin
359521e91d Allow passing model_name to evals (#42395)
Release Notes:

- N/A
2025-11-10 23:00:52 +00:00
Max Brunsfeld
b607077c08 Add old_text/new_text as a zeta2 prompt format (#42171)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-11-10 15:44:54 -07:00
Marshall Bowers
e5fce424b3 Update CI badge in README (#42394)
This PR updates the CI badge in the README, after the CI workflow
reorganization.

Release Notes:

- N/A
2025-11-10 22:05:46 +00:00
Andrew Farkas
a8b04369ae Refactor completions (#42122)
This is progress toward multi-word snippets (including snippets with
prefixes containing symbols)

Release Notes:

- Removed `trigger` argument in `ShowCompletions` command

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-11-10 17:00:59 -05:00
Marshall Bowers
11b38db3e3 collab: Drop channel_messages table and its dependents (#42392)
This PR drops the `channel_messages` table and its
dependents—`channel_message_mentions` and `observed_channel_messages`—as
they are no longer used.

Release Notes:

- N/A
2025-11-10 21:59:05 +00:00
John Tur
112b5c16b7 Add QuitMode policy to GPUI (#42391)
Applications can select a policy for when the app quits using the new
function `Application::with_quit_mode`:
- Only on explicit calls to `App::quit`
- When the last window is closed
- Platform default (former on macOS, latter everywhere else) 

Release Notes:

- N/A
2025-11-10 16:45:43 -05:00
Marshall Bowers
32ec1037e1 collab: Remove unused models left over from chat (#42390)
This PR removes some database models that were left over from the chat
feature.

Release Notes:

- N/A
2025-11-10 21:39:44 +00:00
Connor Tsui
a44fc9a1de Rename ThemeMode to ThemeAppearanceMode (#42279)
There was a TODO in `crates/settings/src/settings_content/theme.rs` to
make this rename.

This PR is just splitting off this change from
https://github.com/zed-industries/zed/pull/40035 to make reviewing that
one a bit easier since that PR is a bit more involved than expected.

Release Notes:

- N/A

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-11-10 14:26:01 -07:00
Ole Jørgen Brønner
efcd7f7d10 Slightly improve completion in settings.json (for lsp.<language-server>.) (#42263)
Document "any-typed" (`serde_json::Value`) "lsp" keys to include them in
json-language-server completions.

The vscode-json-languageserver seems to skip generically typed keys when
offering completion.

For this schema

```
    "LspSettings": {
        "type": "object",
        "properties": {
            ...
            "initialization_options": true,
            ...
         }
     }
```

"initialization_options" is not offered in the completion.

The effect is easy to verify by triggering completion inside:

```
    "lsp": {
        "basedpyright": {
           COMPLETE HERE
```

<img width="797" height="215" alt="image"
src="https://github.com/user-attachments/assets/d1d1391c-d02c-4028-9888-8869f4d18b0f"
/>

By adding a documentation string the keys are offered even if they are
generically typed:

<img width="809" height="238" alt="image"
src="https://github.com/user-attachments/assets/9a072da9-961b-4e15-9aec-3d56933cbe67"
/>

---

Note: I did some cursory research of whether it's possible to make
vscode-json-languageserver change behavior without success. IMO, not
offering completions here is a bug (or at minimal should be
configurable)

---

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2025-11-10 23:08:40 +02:00
John Tur
aaf2f9d309 Ignore "Option as Meta" setting outside of macOS (#42367)
The "Option" key only exists on a Mac. On other operating systems, it is
always expected that the Alt key generates escaped characters.

Fixes https://github.com/zed-industries/zed/issues/40583

Release Notes:

- N/A
2025-11-10 15:11:18 -05:00
Finn Evers
62e3a49212 editor: Fix rare panic in wrap map (#39379)
Closes ZED-1SV
Closes ZED-TG
Closes ZED-22G
Closes ZED-22J

This seems to fix the reported error there, but ultimately, this might
benefit from a test to reproduce. Hence, marking as draft for now.

Release Notes:

- Fixed a rare panic whilst wrapping lines.
2025-11-10 20:08:48 +00:00
Finn Evers
87d0401e64 editor: Show relative line numbers for deleted rows (#42378)
Closes #42191

This PR adds support for relative line numbers in deleted hunks. Note
that this only applies in cases where there is a form of relative
numbering.

It also adds some tests for this functionality as well as missing tests
for other cases in line layouting that was previously untested.

Release Notes:

- Line numbers will now be shown in deleted git hunks if relative line
numbering is enabled
2025-11-10 21:00:50 +01:00
Danilo Leal
2c375e2e0a agent_ui: Ensure message editor placeholder text is accurate (#42375)
This PR creates a dedicated function for the agent panel message
editor's placeholder text so that we can wait for the agent
initialization to capture whether they support slash commands or not. On
the one (nice) hand, this allow us to stop matching agents by name and
make this a bit more generic. On the other (bad) hand, the "/ for
commands" bit should take a little second to show up because we can only
know whether an agent supports it after it is initialized.

This is particularly relevant now that we have agents coming from
extensions and for them, we would obviously not be able to match by
name.

Release Notes:

- agent: Fixed agent panel message editor's placeholder text by making
it more accurate as to whether agents support slash commands,
particularly those coming from extensions.
2025-11-10 16:50:52 -03:00
Conrad Irwin
c24f9e47b4 Try to download wasi-sdk ahead of time (#42377)
This hopefully resolves the lingering test failures on linux,
but also adds some logging just in case this isn't the problem...

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-11-10 19:50:43 +00:00
Andrew Farkas
3fbfea491d Support relative paths in LSP & DAP binaries (#42135)
Closes #41214

Release Notes:

- Added support for relative paths in LSP and DAP binaries

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-11-10 19:33:00 +00:00
Finn Evers
2b369d7532 rust: Explicitly capture lifetime identifier (#42372)
Closes #42030

This matches what VSCode and basically also this capture does. However,
the identifier capture was overridden by other captures, hence the need
to be explicit here.

| Before | After | 
| - | - |
| <img width="930" height="346" alt="Bildschirmfoto 2025-11-10 um 17 56
28"
src="https://github.com/user-attachments/assets/e938c863-0981-4368-ab0a-a01dd04cfb24"
/> | <img width="930" height="346" alt="Bildschirmfoto 2025-11-10 um 17
54 35"
src="https://github.com/user-attachments/assets/f3b74011-c75c-448a-819e-80e7e8684e92"
/> |


Release Notes:

- Improved lifetime highlighting in Rust using the `lifetime` capture.
2025-11-10 19:41:14 +01:00
Danilo Leal
ed61a79cc5 agent_ui: Fix history view losing focus when empty (#42374)
Closes https://github.com/zed-industries/zed/issues/42356

This PR fixes the history view losing focus by simply always displaying
the search editor. I don't think it's too weird to not have it when it's
empty, and it also ends up matching how regular pickers work.

Release Notes:

- agent: Fixed a bug where navigating the agent panel with the keyboard
wouldn't work if you visited the history view and it was empty/had no
entries.
2025-11-10 15:29:55 -03:00
Tim Vermeulen
aa6270e658 editor: Add sticky scroll (#42242)
Closes #5344


https://github.com/user-attachments/assets/37ec58b0-7cf6-4eea-9b34-dccf03d3526b

Release Notes:

- Added a setting to stick scopes to the top of the editor

---------

Co-authored-by: KyleBarton <kjb@initialcapacity.io>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-11-10 11:24:30 -07:00
Dino
d896af2f15 git: Handle buffer file path changes (#41944)
Update `GitStore.on_buffer_store_event` so that, when a
`BufferStoreEvent::BufferChangedFilePath` event is received, we check if
there's any diff state for the buffer and, if so, update it according to
the new file path, in case the file exists in the repository.

Closes #40499

Release Notes:

- Fixed issue with git diff tracking when updating a buffer's file from
an untracked to a tracked file
2025-11-10 18:19:08 +00:00
Agus Zubiaga
c748b177c4 zeta2 cli: Cache at LLM request level (#42371)
We'll now cache LLM responses at the request level (by hash of
URL+contents) for both context and prediction. This way we don't need to
worry about mistakenly using the cache when we change the prompt or its
components.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-11-10 14:23:52 -03:00
Tryanks
ddf5937899 gpui: Move 'app closing on last window closed' behavior to app-side (#41436)
This commit is a continuation of #36548. As per [mikayla-maki's
Comment](https://github.com/zed-industries/zed/pull/36548#issuecomment-3412140698),
I removed the process management behavior located in GPUI and
reimplemented it in Zed.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-11-10 17:19:35 +00:00
Piotr Osiewicz
6e1d86f311 fs: Handle io::ErrorKind::NotADirectory in fs::metadata (#42370)
New error variants were stabilized in 1.83, and this might've led to us
mis-handling not-a-directory errors.

Co-authored-by: Dino <dino@zed.dev>

Release Notes:

- N/A

Co-authored-by: Dino <dino@zed.dev>
2025-11-10 18:18:40 +01:00
Abul Hossain Khan
a3f04e8b36 agent_ui: Fix thread history item showing GMT time instead of local time on Windows (#42198)
Closes #42178
Now it's consistent with the DateAndTime path which already does
timezone conversion.

- **Future Work**
Happy to tackle the TODO in `time_format.rs` about implementing native
Windows APIs for proper localized formatting (similar to macOS's
`CFDateFormatter`) as a follow-up.

Release Notes:

- agent: Fixed the thread history item timestamp, which was being shown
in GMT instead of in the user's local timezone on Windows.
2025-11-10 13:34:59 -03:00
Danilo Leal
3c81ee6ba6 agent_ui: Allow to configure a default model for profiles through modal (#42359)
Follow-up to https://github.com/zed-industries/zed/pull/39220

This PR allows to configure a default model for a given profile through
the profile management modal.

| Option In Picker | Model Selector |
|--------|--------|
| <img width="1172" height="538" alt="Screenshot 2025-11-10 at 12  24
2@2x"
src="https://github.com/user-attachments/assets/33dfb6f1-f8fd-42f9-b824-3dab807094da"
/> | <img width="1172" height="1120" alt="Screenshot 2025-11-10 at 12 
24@2x"
src="https://github.com/user-attachments/assets/50360b0a-fbb1-455e-9cf7-9fa987345038"
/> |

Release Notes:

- N/A
2025-11-10 13:12:13 -03:00
Miguel Raz Guzmán Macedo
35ae2f5b2b typo: Use tips from proselint (#42362)
I ran [proselint](https://github.com/amperser/proselint) (recommended by
cURL author [Daniel
Stenberg](https://daniel.haxx.se/blog/2022/09/22/taking-curl-documentation-quality-up-one-more-notch/))
against all the `.md` files in the codebase to see if I could fix some
easy typos.

The tool is noisier than I would like and picking up the overrides to
the default config in a `.proselintrc.json` was much harder than I
expected.

There's many other small nits [1] that I believe are best left to your
docs czar whenever they want to consider incorporating a tool like this
into big releases or CI, but these seemed like small wins for now to
open a conversation about a tool like proselint.

---

[1]: Such nits include
- incosistent 1 or 2 spaces
- "color" vs "colour"
- ab/use of `very` 
- awkward or superfluous phrasing.

Release Notes:

- N/A

Signed-off-by: mrg <miguelraz@ciencias.unam.mx>
2025-11-10 17:51:44 +02:00
Agus Zubiaga
d420dd63ed zeta: Improve unified diff prompt (#42354)
Extract some of the improvements from to the unified diff prompt from
https://github.com/zed-industries/zed/pull/42171 and adds some other
about how context work to improve the reliability of predictions.

We also now strip the `<|user_cursor|>` marker if it appears in the
output rather than failing.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-11-10 14:58:42 +00:00
feeiyu
42ed032f12 Fix circular reference issue between EditPredictionButton and PopoverMenuHandle (#42351)
Closes #ISSUE

While working on issue #40906, I discovered that RemoteClient was not
being released after the remote project closed.
Analysis revealed a circular reference between EditPredictionButton and
PopoverMenuHandle.

Dependency Chain: RemoteClient → Project → ZetaEditPredictionProvider →
EditPredictionButton ↔ PopoverMenuHandle

<img width="400" height="300" alt="image"
src="https://github.com/user-attachments/assets/6b716c9b-6938-471a-b044-397314b729d4"
/>

a) EditPredictionButton hold the reference of PopoverMenuHandle 

5f8226457e/crates/zed/src/zed.rs (L386-L394)

b) PopoverMenuHandle hold the reference of Fn which capture
`Entity<EditPredictionButton>`

5fc54986c7/crates/edit_prediction_button/src/edit_prediction_button.rs (L382-L389)


a9bc890497/crates/ui/src/components/popover_menu.rs (L376-L384)


Release Notes:

- N/A
2025-11-10 16:52:03 +02:00
David
2d84af91bf agent: Add ability to set a default_model per profile (#39220)
Split off from https://github.com/zed-industries/zed/pull/39175

Requires https://github.com/zed-industries/zed/pull/39219 to be merged
first

Adds support for `default_model` for profiles: 

```
      "my-profile": {
        "name": "Coding Agent",
        "tools": {},
        "enable_all_context_servers": false,
        "context_servers": {},
        "default_model": {
          "provider": "copilot_chat",
          "model": "grok-code-fast-1"
        }
      }
```

Which will then switch to the default model whenever the profile is
activated

![2025-09-30 17 09
06](https://github.com/user-attachments/assets/43f07b7b-85d9-4aff-82ce-25d6f5050d50)


Release Notes:

- Added `default_model` configuration to agent profile

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-10 11:11:24 -03:00
Abdugani Toshmukhamedov
7aacc7566c Add support for closing window tabs with middle mouse click (#41628)
This change adds support for closing a system window tabs by pressing
the middle mouse button.
It improves tab management UX by matching common tab behavior.

Release Notes:

- Added support for closing system window tabs with middle mouse click.
2025-11-10 15:09:37 +01:00
Caleb Van Dyke
8d632958db Add better labels for completions for ty lsp (#42233)
Verified that this works locally. I modeled it after how basedpyright
and pyright work. Here is a screenshot of what it looks like (issue has
screenshots of the old state):

<img width="593" height="258" alt="Screenshot 2025-11-07 at 2 40 50 PM"
src="https://github.com/user-attachments/assets/5d2371fc-360b-422f-ba59-0a95f2083c87"
/>

Closes #42232

Release Notes:

- python/ty: Code completion menu now shows packages that will be
imported when a given entry is accepted.
2025-11-10 13:28:12 +01:00
Lukas Wirth
0149de4b54 git: Fix panic in git2 due to empty repo paths (#42304)
Fixes ZED-1VR

Release Notes:

- Fixed sporadic panic in git features
2025-11-10 09:27:51 +00:00
Jakub Konka
359160c8b1 git: Add askpass delegate to git-commit handlers (#42239)
In my local setup, I always enforce git-commit signing with GPG/SSH
which automatically enforces `git commit -S` when committing. This
changeset will now show a modal to the user for them to specify the
passphrase (if any) so that they can unlock their private key for
signing when committing in Zed.

<img width="1086" height="948" alt="Screenshot 2025-11-07 at 11 09
09 PM"
src="https://github.com/user-attachments/assets/ac34b427-c833-41c7-b634-8781493f8a5e"
/>


Release Notes:

- Handle automatic git-commit signing by presenting the user with an
askpass modal
2025-11-10 07:57:50 +00:00
Max Brunsfeld
b8081ad7a6 Make it easy to point zeta2 at ollama (#42329)
I wanted to be able to work offline, so I made it a little bit more
convenient to point zeta2 at ollama.

* For zeta2, don't require that request ids be UUIDs
* Add an env var `ZED_ZETA2_OLLAMA` that sets the edit prediction URL
and model id to work w/ ollama.

Release Notes:

- N/A
2025-11-09 21:10:36 -08:00
ᴀᴍᴛᴏᴀᴇʀ
35c58151eb git: Fix support for self-hosted Bitbucket (#42002)
Closes #41995

Release Notes:

- Fixed support for self-hosted Bitbucket
2025-11-09 21:37:22 -05:00
Ayush Chandekar
e025ee6a11 git: Add base branch support to create_branch (#42151)
Closes [#41674](https://github.com/zed-industries/zed/issues/41674)

Description:
Creating a branch from a base requires switching to the base branch
first, then creating the new branch and checking out to it, which
requires multiple operations.

Add base_branch parameter to create_branch to allow a new branch from a
base branch in one operation which is synonymous to the command `git
switch -c <new-branch> <base-branch>`.

Below is the video after solving the issue: 

(`master` branch is the default branch here, and I create a branch
`new-branch-2` based off the `master` branch. I also show the error
which used to appear before the fix.)

[Screencast from 2025-11-07
05-14-32.webm](https://github.com/user-attachments/assets/d37d1b58-af5f-44e8-b867-2aa5d4ef3d90)

Release Notes:

- Fixed the branch-picking error by replacing multiple sequential switch
operations with just one switch operation.

Signed-off-by: ayu-ch <ayu.chandekar@gmail.com>
2025-11-09 21:35:29 -05:00
Mayank Verma
c60d31a726 git: Track worktree references to resolve stale repository state (#41592)
Closes #35997
Closes #38018
Closes #41516

Release Notes:
- Fixes stale git repositories persisting after removal
2025-11-09 21:24:20 -05:00
Bennet Bo Fenner
0bcf607a28 agent_ui: Always allow to include symbols (#42261)
We can always include symbols, since we either include a ResourceLink to
the symbol (when `PromptCapabilities::embedded_context = false`) or a
Resource (when `PromptCapabilities::embedded_context = true`)

Release Notes:

- Fixed an issue where symbols could not be included when using specific
ACP agents
2025-11-09 20:45:00 +01:00
Bennet Bo Fenner
431a195c32 acp: Fix issue with mentions when embedded_context is set to false (#42260)
Release Notes:

- acp: Fixed an issue where Zed would not respect
`PromptCapabilities::embedded_context`
2025-11-09 20:44:07 +01:00
Danilo Leal
6db6251484 agent_ui: Fix external agent icons in configuration view (#42313)
This PR makes the icons for external agents in the configuration view
use `from_external_svg` instead of `from_path`.

Release Notes:

- N/A
2025-11-09 14:32:19 -03:00
Danilo Leal
2fb3d593bc agent_ui: Add component to standardize the configured LLM card (#42314)
This PR adds a new component to the `language_models` crate called
`ConfiguredApiCard`:

<img width="500" height="420" alt="Screenshot 2025-11-09 at 2  07@2x"
src="https://github.com/user-attachments/assets/655ea941-2df8-4489-a4da-bba34acf33a9"
/>

We were previously recreating this component from scratch with regular
divs in all LLM providers render function, which was redundant as they
all essentially looked the same and didn't have any major variations
aside from labels. We can clean up a bunch of similar code with this
change, which is cool!

Release Notes:

- N/A
2025-11-09 14:32:05 -03:00
chenmi
cc1d66b530 agent_ui: Improve API key configuration UI display (#42306)
Improve the layout and text display of API key configuration in multiple
language model providers to ensure proper text wrapping and ellipsis
handling when API URLs are long.

Before:

<img width="320" alt="image"
src="https://github.com/user-attachments/assets/2f89182c-34a0-4f95-a43a-c2be98d34873"
/>

After:

<img width="320" alt="image"
src="https://github.com/user-attachments/assets/09bf5cc3-07f0-47bc-b21a-d84b8b1caa67"
/>

Changes include:
- Add proper flex layout with overflow handling
- Replace truncate_and_trailoff with CSS text ellipsis
- Ensure consistent UI behavior across all providers

Release Notes:

- Improved API key configuration display in language model settings
2025-11-09 13:00:31 -03:00
Lukas Wirth
5d08c1b35f Surpress more rust-analyzer error logs (#42299)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-09 11:27:16 +00:00
Lukas Wirth
b7d4d1791a diagnostics: Keep diagnostic excerpt ranges properly ordered (#42298)
Fixes ZED-2CQ

We were doing the binary search by buffer points, but due to await
points within this function we could end up mixing points of differing
buffer versions.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-09 10:55:56 +00:00
John Tur
81d38d9872 Additional Windows keyboard input fixes (#42294)
- Enable Alt+Numpad input
- For this to be effective, the default keybindings for Alt+{Number}
will need to be unbound. This won't be needed once we gain the ability
to differentiate numpad digit keys from alphanumeric digit keys.
  - Fixes https://github.com/zed-industries/zed/issues/40699
- Fix a number of edge cases with dead keys

Release Notes:

- N/A
2025-11-09 03:51:39 -05:00
Matt Miller
21f73d9c02 Use ButtonLike and add OpenExcerptsSplit and dispatches on click (#42283)
Closes #42099 

Release Notes:

- N/A
2025-11-08 17:47:01 -06:00
Danilo Leal
12857a7207 agent: Improve AddSelectionToThread action display (#42280)
Closes https://github.com/zed-industries/zed/issues/42276

This fixes the fact that the `AddSelectionToThread` action was visible
when `disable_ai` was true, as well as it improves its display by making
it either disabled or hidden when there are no selections in the editor.
I also ended up removing it from the app menu simply because making it
observe the `disable_ai` setting would be a bit more complex than I'd
like at the moment, so figured that, given I'm also now adding it to the
toolbar selection menu, we could do without it over there.

Release Notes:

- Fixed the `AddSelectionToThread` action showing up when `disable_ai`
is true
- Improved the `AddSelectionToThread` action display by only making it
available when there are selections in the editor
2025-11-08 14:41:08 -03:00
Danilo Leal
f6be16da3b docs: Update text threads page (#42273)
Adding a section clarifying the difference between regular threads vs.
text threads.

Release Notes:

- N/A
2025-11-08 12:55:31 -03:00
Danilo Leal
94aa643484 docs: Update agent tools page (#42271)
Release Notes:

- N/A
2025-11-08 12:54:42 -03:00
Jakub Konka
28a85158c7 shell_env: Wrap error context in format! where missing (#42267)
Release Notes:

- N/A
2025-11-08 15:46:01 +00:00
boris.zalman
a2c2c617b5 Add helix keymap to delete without yanking (#41988)
Added previously missing keymap for helix deleting without yank. Action
"editor::Delete" is mapped to "Ald-d" as in
https://docs.helix-editor.com/master/keymap.html#changes

Release Notes:

- N/A
2025-11-08 15:53:34 +01:00
Xipeng Jin
77667f4844 Remove Markdown CodeBlock metadata and Custom rendering (#42211)
Follow up #40736

Clean up `CodeBlockRenderer::Custom` related rendering per the previous
PR
[comment](https://github.com/zed-industries/zed/pull/40736#issuecomment-3503074893).
Additional note here:
1. The `Custom` variant in the enum `CodeBlockRenderer` will become not
useful since cleaning all code related to the custom rendering logic.
2. Need to further review the usage of code block `metadata` field in
`MarkdownTag::CodeBlock` enum.

I would like to have the team further review my note above so that we
can make sure it will be safe to clean it up and will not affect any
potential future features will be built on top of it. Thank you!

Release Notes:

- N/A
2025-11-08 14:00:53 +01:00
Hyeondong Lee
b01a6fbdea Fix missing highlight for macro_invocation bang (#41572)
(Not sure if this was left out on purpose, but this makes things feel a
bit more consistent since [VS Code parses bang mark as part of the macro
name](https://github.com/microsoft/vscode/blob/main/extensions/rust/syntaxes/rust.tmLanguage.json#L889-L905))


Release Notes:
- Added the missing highlight for the bang mark in macro invocations.


| **Before** | **After** |
| :---: | :---: |
| <img width="684" height="222" alt="before"
src="https://github.com/user-attachments/assets/ae71eda3-76b5-4547-b2df-4e437a07abf5"
/> | <img width="646" height="236" alt="fixed"
src="https://github.com/user-attachments/assets/500deda5-d6d8-439c-8824-65c2fb0a5daa"
/> |
2025-11-08 08:42:33 +00:00
Roland Rodriguez
44d91c1709 docs: Explain what scrollbar marks represent (#42130)
## Summary

Adds explanations for what each type of scrollbar indicator visually
represents in the editor.

## Description

This PR addresses the issue where users didn't understand what the
colored marks on the scrollbar mean. The existing documentation
explained how to toggle each type of mark on/off, but didn't explain
what they actually represent.

This adds a brief, clear explanation after each scrollbar indicator
setting describing what that indicator shows (e.g., "Git diff indicators
appear as colored marks showing lines that have been added, modified, or
deleted compared to the git HEAD").

## Fixes

Closes #31794

## Test Plan

- Documentation follows the existing style and format of
`docs/src/configuring-zed.md`
- Each explanation is concise and immediately follows the setting
description
- Language is clear and user-friendly

Release Notes:

- N/A
2025-11-08 10:40:18 +02:00
Donnie Adams
d187cbb188 Add comment injection support to remaining languages (#41710)
Release Notes:

- Added support for comment language injections for remaining built-in
languages and multi-line support for Rust
2025-11-08 10:34:53 +02:00
Agus Zubiaga
c241eadbc3 zeta2: Targeted retrieval search (#42240)
Since we removed the filtering step during context gathering, we want
the model to perform more targeted searches. This PR tweaks search tool
schema allowing the model to search within syntax nodes such as `impl`
blocks or methods.

This is what the query schema looks like now:

```rust
/// Search for relevant code by path, syntax hierarchy, and content.
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct SearchToolQuery {
    /// 1. A glob pattern to match file paths in the codebase to search in.
    pub glob: String,
    /// 2. Regular expressions to match syntax nodes **by their first line** and hierarchy.
    ///
    /// Subsequent regexes match nodes within the full content of the nodes matched by the previous regexes.
    ///
    /// Example: Searching for a `User` class
    ///     ["class\s+User"]
    ///
    /// Example: Searching for a `get_full_name` method under a `User` class
    ///     ["class\s+User", "def\sget_full_name"]
    ///
    /// Skip this field to match on content alone.
    #[schemars(length(max = 3))]
    #[serde(default)]
    pub syntax_node: Vec<String>,
    /// 3. An optional regular expression to match the final content that should appear in the results.
    ///
    /// - Content will be matched within all lines of the matched syntax nodes.
    /// - If syntax node regexes are provided, this field can be skipped to include as much of the node itself as possible.
    /// - If no syntax node regexes are provided, the content will be matched within the entire file.
    pub content: Option<String>,
}
```

We'll need to keep refining this, but the core implementation is ready.

Release Notes:

- N/A

---------

Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-11-08 01:06:12 +00:00
Mikayla Maki
5f8226457e Automate settings registration (#42238)
Release Notes:

- N/A

---------

Co-authored-by: Nia <nia@zed.dev>
2025-11-07 22:27:14 +00:00
Anthony Eid
309947aa53 editor: Allow clicking on excerpts with alt key to open file path (#42235)
#42021 Made clicking on an excerpt title toggle it. This PR brings back
the old behavior if a user is pressing the Alt key when clicking on an
excerpt title.

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-11-07 16:23:55 -05:00
Lukas Wirth
0881e548de terminal: Spawn terminal process on main thread on unix (#42234)
Otherwise the terminal will not process the signals correctly 

Release Notes:

- Fixed ctrl+c and friends not working in the terminal on macOS and
linux
2025-11-07 20:56:43 +00:00
claytonrcarter
4511d11a11 bundle: Skip sentry upload for local install on macOS (#42231)
This is a follow up to #41482. When running `script/bundle-mac`, it will
upload debug symbols to Sentry if you have a `$SENTRY_AUTH_TOKEN` set. I
happen to have one set, so this script was trying to generate and upload
those. Whoops! This change skips the upload entirely if you're running a
local install.

Release Notes:

- N/A
2025-11-07 12:38:01 -08:00
Conrad Irwin
19d2fdb6c6 Refresh releases page post deploy (#42218)
Release Notes:

- N/A
2025-11-07 13:34:47 -07:00
Conrad Irwin
20953ecb9d Make nightly bucket objects public (#42229)
Makes it easier to port updates to cloudflare

Closes #ISSUE

Release Notes:

- N/A
2025-11-07 19:43:08 +00:00
Anthony Eid
7475bdaf20 debugger: Truncate scope names to avoid text overlapping in variable list (#42230)
Closes #41969

This was caused because scope names weren't being truncated unlike the
other type of variable list entries.

Release Notes:

- debugger: Fix bug where minimizing the width of the variable list
would cause scope names to overlap

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-11-07 19:42:14 +00:00
Dima
8e4c807c6a Fix duplicated 'the' typo (#42225)
Just found this while reading the docs.

Release Notes:

- N/A
2025-11-07 21:37:10 +02:00
John Tur
a66dac7b3a Fix crash during drag-and-drop on Windows (#42227)
The HGLOBAL is itself the HDROP. Do not dereference it.

Release Notes:

- windows: Fixed crashes during drag-and-drop operations
2025-11-07 19:18:47 +00:00
morgankrey
8a903f9c10 2025 11 07 update privacy docs (#42226)
Docs update

Release Notes:

- N/A
2025-11-07 13:16:13 -06:00
Lukas Wirth
9f9575d100 Silence rust-analyzer startup errors (#42222)
When rust-analyzer is still loading the cargo project it tends to error
out on most lsp requests with `content modified`. This pollutes our
logs.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 18:43:43 +00:00
Marshall Bowers
00898d46c0 docs: Add docs on extension capabilities (#42223)
This PR adds some initial docs on extension capabilities.

Release Notes:

- N/A
2025-11-07 18:38:20 +00:00
Joseph T. Lyons
bcc3307a7e Add optional Zed log field to all bug report templates (#42221)
Release Notes:

- N/A
2025-11-07 18:28:35 +00:00
Lukas Wirth
8ba33ad270 gpui: Do not unwrap in window_procedure (#42216)
Technically these should not be possible to hit, but sentry says
otherwise. Turning these into errors should give us more information
than the abort due to unwinding across ffi boundaries.

Fixes ZED-321

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 18:10:30 +00:00
Marshall Bowers
1e6344899d docs: Update extension features language (#42215)
This PR updates the language around what features extensions can
provide.

Release Notes:

- N/A
2025-11-07 17:43:22 +00:00
Jakub Konka
93f9cff876 Remove invalid assertion in editor (#42210)
Release Notes:

- N/A
2025-11-07 17:36:10 +00:00
Lukas Wirth
6cafe4a9c5 gpui: Do not panic when unable to find the selected fonts (#42212)
Fixes ZED-329

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 17:08:37 +00:00
Lukas Wirth
585c440e6e util: Support shell env fetching for git bash (#42208)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 16:28:41 +00:00
Lukas Wirth
083bd147ef util: Fall back to cmd if we can't find powershell on the system (#42204)
Closes https://github.com/zed-industries/zed/issues/42165

Release Notes:

- Fixed trying to use powershell for commands when its not installed on
the system
2025-11-07 17:13:52 +01:00
Remco Smits
9591790d8d markdown: Add support for HTML styling attributes (#42143)
Second take on https://github.com/zed-industries/zed/pull/37765.

This PR adds support for styling elements (**b**, **strong**, **em**,
**i**, **ins**, **del**), but also allow you to show the styling text
inline with the current text.
This is done by appending all the up-following text into one text chunk
and merge the highlights from both of them into the already existing
chunk. If there does not exist a text chunk, we will create one and the
next iteration we will use that one to store all the information on.

**Before**
<img width="483" height="692" alt="Screenshot 2025-11-06 at 22 08 09"
src="https://github.com/user-attachments/assets/6158fd3b-066c-4abe-9f8e-bcafae85392e"
/>

**After**
<img width="868" height="300" alt="Screenshot 2025-11-06 at 22 08 21"
src="https://github.com/user-attachments/assets/4d5a7a33-d31c-4514-91c8-2b2a2ff43e0e"
/>

**Code example**
```html
<p>some text <b>bold text</b></p>
<p>some text <strong>strong text</strong></p>
<p>some text <i>italic text</i></p>
<p>some text <em>emphasized text</em></p>
<p>some text <del>delete text</del></p>
<p>some text <ins>insert text</ins></p>

<p>Some text <strong>strong text</strong> more text <b>bold text</b> more text <i>italic text</i> more text <em>emphasized text</em> more text <del>deleted text</del> more text <ins>inserted text</ins></p>

<p><a href="https://example.com">Link Text</a></p>

<p style="text-decoration: underline;">text styled from style attribute</p>
```

cc @bennetbo 

**TODO**
- [x] add tests for styling nested text that should result in one merge

Release Notes:

- Markdown Preview: Added support for `HTML` styling elements

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-11-07 16:12:27 +00:00
Lukas Wirth
74bf1a170d recent_projects: Do not try to watch /etc/ssh/ssh_config on windows (#42200)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 15:46:37 +00:00
Bennet Bo Fenner
e72c3bf20d agent_ui: Remove message_editor module (#42195)
Artefact from agent1 removal

Release Notes:

- N/A
2025-11-07 14:36:58 +00:00
Maokaman1
160bf915aa language_models: Filter out whitespace-only text content parts for OpenAI and OpenAI compatible providers (#40316)
Closes #40097

When multiple files are added sequentially to the agent panel, the
request JSON incorrectly includes "text" elements containing only
spaces. These empty elements cause the Zhipu AI API to return a "text
cannot be empty" error.
The fix filters out any "text" elements that are empty or contain only
whitespaces.

UI state when the error occurs:
<img width="300" alt="Image"
src="https://github.com/user-attachments/assets/c55e5272-3f03-42c0-b412-fa24be2b0043"
/>

Request JSON (causing the error):
```
{
  "model": "glm-4.6",
  "messages": [
    {
      "role": "system",
      "content": "<<CUT>>"
    },
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "[@1.txt](zed:///agent/file?path=C%3A%5CTemp%5CTest%5C1.txt)"
        },
        { "type": "text", "text": " " },
        {
          "type": "text",
          "text": "[@2.txt](zed:///agent/file?path=C%3A%5CTemp%5CTest%5C2.txt)"
        },
        { "type": "text", "text": " describe" },
```

Release Notes:

- Fixed an issue when an OpenAI request contained whitespace-only text content

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-11-07 14:43:07 +01:00
Xipeng Jin
aff4c25a47 markdown: Restore horizontal scrollbars for codeblocks (#40736)
### Summary

Restore the agent pane’s code-block horizontal scrollbar for easier
scrolling without trackpad and preserve individual scroll state across
multiple code blocks.

### Motivation

Addresses https://github.com/zed-industries/zed/issues/34224, where
agent responses with wide code snippets couldn’t be scrolled
horizontally in the panel. Previously there is no visual effect for
scrollbar to let the user move the code snippet and it was not obviously
to use trackpad or hold down `shift` while scrolling. This PR will
ensure the user being able to only use their mouse to drag the
horizontal scrollbar to show the complete line when the code overflow
the width of code block.

### Changes

- Support auto-hide horizontal scrollbar for rendering code block in
agent panel by adding scrollbar support in markdown.rs
- Add `code_block_scroll_handles` cache in
_crates/markdown/src/markdown.rs_ to give each code block a persistent
`ScrollHandle`.
- Wrap rendered code blocks with custom horizontal scrollbars that match
the vertical scrollbar styling and track hover visibility.
- Retain or clear scroll handles based on whether horizontal overflow is
enabled, preventing leaks when the markdown re-renders.

### How to Test

1. Open the agent panel, request code generation, and ensure wide
snippets show a horizontal scrollbar on hover.
3. Scroll horizontally, navigate away (e.g., change tabs or trigger a
re-render), and confirm the scroll position sticks when returning.
5. Toggle horizontal overflow styling off/on (if applicable) and verify
scrollbars appear or disappear appropriately.

### Screenshots / Demos (if UI change)


https://github.com/user-attachments/assets/e23f94d9-8fe3-42f5-8f77-81b1005a14c8

### Notes for Reviewers

- This is my first time contribution for `zed`, sorry for any code
patten inconsistency. So please let me know if you have any comments and
suggestions to make the code pattern consistent and easy to maintain.
- For now, the horizontal scrollbar is not configurable from the setting
and the style is fixed with the same design as the vertical one. I am
happy to readjust this setting to fit the needs.
- Please let me know if you think any behaviors or designs need to be
changed for the scrollbar.
- All changes live inside _crates/markdown/src/markdown.rs_; no API
surface changes.

Closes #34224 

### Release Notes:

- AI: Show horizontal scroll-bars in wide markdown elements
2025-11-07 13:35:59 +00:00
aohanhongzhi
146e754f73 URL-encode the image paths in Markdown so that images with filenames (#41788)
Closes https://github.com/zed-industries/zed/issues/41786

Release Notes:

- markdown preview: Fixed an issue where path urls would not be parsed
correctly when containing URL-encoded characters

<img width="1680" height="1126"
alt="569415cb-b3e8-4ad6-b31c-a1898ec32085"
src="https://github.com/user-attachments/assets/7de8a892-ff01-4e00-a28c-1c5e9206ce3a"
/>
2025-11-07 14:02:40 +01:00
Kirill Bulatov
278fe91a9a Skip buffer registration if lsp data should be ignored (#42190)
Release Notes:

- N/A
2025-11-07 12:57:54 +00:00
Lukas Wirth
39fb89e031 workspace: Do not panic when the database is corruped (#42186)
Fixes ZED-1NK

Release Notes:

- Fixed zed not starting when the database cannot be loaded
2025-11-07 12:36:36 +00:00
Casper van Elteren
9d52b6c538 terminal: Allow configuring conda manager (#40577)
Closes #40576
This PR makes Conda activation configurable and transparent by adding a
`terminal.detect_venv.on.conda_manager` setting (`"auto" | "conda" |
"mamba" | "micromamba"`, default `"auto"`), updating Python environment
activation to honor this preference (or the detected manager executable)
and fall back to `conda` when necessary.

The preference is passed via `ZED_CONDA_MANAGER` from the terminal
settings, and the activation command is built accordingly (with proper
quoting for paths). Changes span
`zed/crates/terminal/src/terminal_settings.rs` (new `CondaManager` and
setting), `zed/crates/project/src/terminals.rs` (inject env var),
`zed/crates/languages/src/python.rs` (activation logic), and
`zed/assets/settings/default.json` (document the setting). Default
behavior remains unchanged for most users while enabling explicit
selection of `mamba` or `micromamba`.

Release Notes:
- Added: terminal.detect_venv.on.conda_manager setting to choose the
Conda manager (auto, conda, mamba, micromamba). Default: auto.
- Changed: Python Conda environment activation now respects the
configured manager, otherwise uses the detected environment manager
executable, and falls back to conda.
- Reliability: Activation commands quote manager paths to handle spaces
across platforms.
- Compatibility: No breaking changes; non-Conda environments are
unaffected; remote terminals are supported.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 12:35:06 +00:00
Mikayla Maki
082b80ec89 gpui: Unify the index_for_x methods (#42162)
Supersedes https://github.com/zed-industries/zed/pull/39910

At some point, these two (`index_for_x` and `closest_index_for_x`)
methods where separated out and some code paths used one, while other
code paths took the other. That said, their behavior is almost
identical:

- `index_for_x` computes the index behind the pixel offset, and returns
`None` if there's an overshoot
- `closest_index_for_x` computes the nearest index to the pixel offset,
taking into account whether the offset is over halfway through or not.
If there's an overshoot, it returns the length of the line.

Given these two behaviors, `closest_index_for_x` seems to be a more
useful API than `index_for_x`, and indeed the display map and other core
editor features use it extensively. So this PR is an experiment in
simply replacing one behavior with the other.

Release Notes:

- Improved the accuracy of mouse selections in Markdown
2025-11-07 14:23:43 +02:00
Bennet Bo Fenner
483e31e42a Fix telemetry (#42184)
Follow up to #41991 🤦🏻 

Release Notes:

- N/A
2025-11-07 11:36:05 +00:00
Bennet Bo Fenner
61c263fcf0 agent_ui: Allow opening thread as markdown in remote projects (#42182)
Release Notes:

- Added support for opening thread as markdown in remote projects
2025-11-07 11:32:16 +00:00
Lukas Wirth
3c19174f7b diagnostics: Fix diagnostics view no clearing blocks correctly (#42179)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 11:16:25 +00:00
Bennet Bo Fenner
7e93c171b5 action_log: Remove unused code (#42177)
Release Notes:

- N/A
2025-11-07 10:33:51 +00:00
Lukas Wirth
88a8e53696 editor: Remove buffer and display map fields from SelectionsCollection (#42175)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 11:21:14 +01:00
Bennet Bo Fenner
c2416d6bab Add agent metrics (#41991)
Release Notes:

- N/A
2025-11-07 10:07:57 +00:00
Jason Lee
29cc3d0e18 gpui: Add to support check state to MenuItem (#39876)
Release Notes:

- N/A

---


https://github.com/user-attachments/assets/d46b77ae-88ba-43da-93ad-3656a7fecaf9

The system menu is only support for macOS, so here just modify the macOS
platform special code.

The Windows, Linux used `ApplicationMenu`, I have already added
`checked` option to Zed's ContextMenu.

Then later when this PR merged, we can improve "View" menu to show check
state to panels (Project Panel, Outline Panel, ...).
2025-11-07 09:42:55 +00:00
Remco Smits
760747f127 markdown: Add support for HTML table captions (#41192)
Thanks to @Angelk90 for pointing out that, we were missing this feature.
So this PR implement the caption feature for HTML tables for the
markdown preview.

**Code example**
```html
<table>
    <caption>Revenue by Region</caption>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>
```

**Result**:
<img width="1201" height="774" alt="Screenshot 2025-10-25 at 21 18 01"
src="https://github.com/user-attachments/assets/c2a8c1c2-f861-40df-b5c9-549932818f6e"
/>

Release Notes:

- Markdown preview: Added support for `HTML` table captions
2025-11-07 09:47:12 +01:00
Lukas Wirth
d4ec55b183 editor: Correctly handle blocks spanning more than 128 rows (#42172)
Release Notes:

- Fixed block rendering for blocks spanning more than 128 rows
2025-11-07 08:46:57 +00:00
Max Brunsfeld
f89bb2f0d2 Small zeta cli fixes (#42170)
* Fix a panic that happened because we lost the
`ContextRetrievalStarted` debug message, so we didn't assign `t0`.
* Write the edit prediction response log file as a markdown file
containing the text, not a JSON file. We mostly always want the text
content.

Release Notes:

- N/A
2025-11-07 07:34:05 +00:00
Conrad Irwin
e43c436cb6 Create sentry releases in after_release (#42169)
This had been moved to auto-release preview, and was not running for
stable.

Closes #ISSUE

Release Notes:

- N/A
2025-11-07 07:30:10 +00:00
Lukas Wirth
de1bf64f41 project: Remove unnecessary panic (#42167)
If we are in a remote session with the remote dropped, this path is very
much reachable if the call to this function got queued up in a task.

Fixes ZED-124

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 06:56:19 +00:00
Jakub Konka
00eafe63d9 git: Make long-running git staging snappy in git panel (#42149)
Previously, staging a large file in the git panel would block the UI
items until that operation finished. This is due to the fact that
staging is a git op that is locked globally by git (per repo) meaning
only one op that is modifying the git index can run at any one time. In
order to make the UI snappy while letting any pending git staging jobs
to finish in the background, we track their progress via `PendingOps`
indexed by git entry path. We have already had a concept of pending
operations however they existed at the UI layer in the `GitPanel`
abstraction. This PR moves and augments `PendingOps` into the model
`Repository` in `git_store` which seems like a more natural place for
tracking running git jobs/operations. Thanks to this, pending ops are
now stored in a `SumTree` indexed by git entry path part of the
`Repository` snapshot, which makes for efficient access from the UI.

Release Notes:

- Improved UI responsiveness when staging/unstaging large files in the
git panel
2025-11-07 07:34:06 +01:00
Max Brunsfeld
5044e6ac1d zeta2: Make eval example file format more expressive (#42156)
* Allow expressing alternative possible context fetches in `Expected
Context` section
* Allow marking a subset of lines as "required" in `Expected Context`.

We still need to improve how we display the results. I've removed the
context pass/fail pretty printing for now, because it would need to be
rethought to work with the new structure, but for now I think we should
focus on getting basic predictions to run. But this is progress toward a
better structure for eval examples.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-11-06 18:05:18 -08:00
Max Brunsfeld
784fdcaee3 zeta2: Build edit prediction prompt and process model output in client (#41870)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-11-06 18:36:58 -05:00
Ben Kunkle
fb87972f44 settings_ui: Use any open workspace window when opening settings links (#42106)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 18:36:23 -05:00
Julia Ryan
8cccb5d4f5 Use windows runner for publishing winget package (#42144)
Our new linux runners don't have powershell installed which causes the
`release-winget` job to fail. This simply runs that step on windows
instead.

Release Notes:

- N/A
2025-11-06 14:13:03 -08:00
Andrew Farkas
2895d31d83 Fix tab switcher close item using wrong pane (#42138)
Closes #40646

Release Notes:

- Fixed `tab_switcher::CloseSelectedItem` doing nothing on tab in
inactive pane

Co-authored-by: Cole Miller <cole@zed.dev>
2025-11-06 20:38:52 +00:00
Cave Bats Of Ware
a112153a2e Enable image support in remote projects (#39158)
Adds support for opening and displaying images in remote projects. The
server streams image data to the client in chunks, where the client then
reconstructs the image and displays it. This change includes:

- Adding `image` crate as a dependency for remote_server
- Implementing `ImageStore` for remote access
- Creating proto definitions for image-related messages
- Adding handlers for creating images for peers
- Computing image metadata from bytes instead of reading from disk for
remote images

Closes #20430
Closes #39104
Closes #40445

Release Notes:

- Added support for image preview in remote sessions.
- Fixed #39104

<img width="982" height="551" alt="image"
src="https://github.com/user-attachments/assets/575428a3-9144-4c1f-b76f-952019ea14cc"
/>
<img width="978" height="547" alt="image"
src="https://github.com/user-attachments/assets/fb58243a-4856-4e73-bb30-8d5e188b3ac9"
/>

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-11-06 11:31:32 -08:00
Richard Feldman
d21184b1d3 Fix ACP extension root dir (#42131)
Agents running in extensions need to have a root directory of the
extension's dir for installation and authentication, but *not* for the
conversation itself - otherwise the agent is running things like
terminal commands in the wrong dir.

Release Notes:

- Fixed Agent Server extensions having the current working directory of
the extension rather than the project
2025-11-06 19:19:16 +00:00
Anthony Eid
ba136abf6c editor: Add action to move between snippet tabstop positions v2 (#42127)
Closes https://github.com/zed-industries/zed/issues/41407

This PR fixes the issues that caused #41407 to be reverted in #42008.
Namely that the action context didn't take into account if a snippet
could move backwards or forwards, and the action shared the same key
mapping as `editor::MoveToPreviousWordStart` and
`editor::MoveToNextWordEnd`.

I changed the default key mapping for the move to snippet tabstop to tab
and shift-tab to match the default behavior of other editors.

Release Notes:

- Editor: Add actions to move between snippet tabstop positions
2025-11-06 18:49:39 +00:00
Lukas Wirth
2d45c23fb0 remote: Flush to stdin when writing to sftp 2 (#42126)
https://github.com/zed-industries/zed/pull/42103#issuecomment-3498137130

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 18:18:19 +00:00
Bo Lorentsen
b78f19982f Allow for using config specific gdb binaries in gdb adapter (#37193)
I really need this for embedded development in IDF and Zephyr, where the
chip vendors sometimes provide there own specialized version of the
tools, and I need to direct zed to use these.

The current GDB adapter only supports the gdb it find in the normal
search path, and it also seems like we where not able to transfer gdb
specific startup arguments (only `-i=dap` is set) .

In order to fix this I (semi wipe using GPT-4.1) expanded the GDB
adapter with 2 new config options :

* **gdb_path** holds a full path to the gdb executable, for now only
full path or relative to cwd
* **gdb_args** an array holding additional arguments given to gdb on
startup
 
It seemed to me, like the `env` config did not transferred to gdb, so
this is added to.
 
 I have tested this locally, and it seems to work not only compile :-)

Release Notes:

debugger: Adds gdb_path and gdb_args to gdb debug adapter options 
debugger: Fix bug where gdb debug sessions wouldn't inherit the shell
environment from Zed

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-11-06 12:53:59 -05:00
Lukas Wirth
a7fac65d62 gpui: Remove unneeded weak Rc cycle in WindowsWindowInner (#42119)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 17:33:09 +00:00
Lukas Wirth
bf8864d106 gpui: Remove all (unsound) ManuallyDrop usages, panic on device loss (#42114)
Given that when we lose our devices unrecoverably we will panic anyways,
might as well do so eagerly which makes it clearer.

Additionally this PR replaces all uses of `ManuallyDrop` with `Option`,
as otherwise we need to do manual bookkeeping of what is and isn't
initialized when we try to recover devices as we can bail out halfway
while recovering. In other words, the code prior to this was fairly
unsound due to freely using `ManuallyDrop::drop`.
 
Fixes ZED-1SS
 
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 17:29:15 +00:00
Nia
08ee4f7966 notify: Bump to rebased 8.2.0 fork (#42113)
Hopefully makes progress towards #38109, #39266

Release Notes:

- N/A
2025-11-06 16:30:17 +00:00
Lukas Wirth
6f6f652cf2 zlog: Add env var to enable line number logging (#41905)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 15:31:26 +00:00
Lukas Wirth
9c8e37a156 clangd: Fix switch source header action on windows (#42105)
Fixes https://github.com/zed-industries/zed/issues/40935

Release Notes:

- Fixed clangd's switch source header action not working on windows
2025-11-06 15:12:34 +00:00
Kirill Bulatov
d54c64f35a Refresh outline panel on file renames (#42104)
Closes https://github.com/zed-industries/zed/issues/41877

Release Notes:

- Fixed outline panel not updating file headers on rename
2025-11-06 14:46:46 +00:00
Lukas Wirth
0b53da18d5 remote: Flush to stdin when writing to sftp (#42103)
https://github.com/zed-industries/zed/issues/42027#issuecomment-3497210172

Release Notes:

- Fixed ssh remoting potentially failing due to not flushing stdin to
sftp
2025-11-06 14:27:26 +00:00
Libon
5ced3ef0fd editor: Improve multibuffer header spacing (#42071)
BEFORE:
<img width="1751" height="629" alt="image"
src="https://github.com/user-attachments/assets/f88464d3-5daa-4d53-b394-f92db8b0fd8c"
/>

AFTER:
<img width="1714" height="493" alt="image"
src="https://github.com/user-attachments/assets/022c883b-b219-40a3-aa5f-0c16d23e8abf"
/>

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-06 14:09:06 +00:00
ʟᴜɴᴇx
7a37dd9433 Do not serialize buffers containing bundled files (#38102)
Fix bundled file persistence by introducing SerializationMode enum

Closes: #38094

What's the issue?

Opening bundled files like Default Key Bindings
(zed://settings/keymap-default.json) was causing SQLite foreign key
constraint errors. The editor was trying to save state for these
read-only assets just like regular files, but since bundled files don't
have database entries, the foreign key constraint would fail.

The fix

Replaced the boolean serialize_dirty_buffers flag with a type-safe
SerializationMode enum:

```rust
pub enum SerializationMode {
    Enabled,   // Regular files persist across sessions
    Disabled,  // Bundled files don't persist
}
```

This prevents serialization at the source: workspace_id() returns None
for disabled editors, serialize() bails early, and should_serialize()
returns false. When opening bundled files, we set the mode to Disabled
from the start, so they're treated as transient views that never
interact with the persistence layer.

Changes

- editor.rs: Added SerializationMode enum and updated serialization
methods to respect it
- items.rs: Guarded should_serialize() to prevent disabled editors from
being serialized
- zed.rs: Set SerializationMode::Disabled in open_bundled_file()

Result

Bundled files open cleanly without SQLite errors and don't persist
across workspace reloads (expected behavior). Regular file persistence
remains unaffected.

Release Notes: Fixed SQLite foreign key constraint errors when opening
bundled files like Default Key Bindings.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-11-06 13:30:03 +00:00
Danilo Leal
a7163623e7 agent_ui: Make "add more agents" menu item take to extensions (#42098)
Now that agent servers are a thing, this is the primary and easiest way
to quickly add more agents to Zed, without touching any settings JSON
file. :)

Release Notes:

- N/A
2025-11-06 09:55:06 -03:00
Lukas Wirth
f08068680d agent_ui: Do not show Codex wsl warning on wsl take 2 (#42096)
https://github.com/zed-industries/zed/pull/42079#discussion_r2498472887

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 12:15:17 +00:00
Lukas Wirth
a951e414d8 util: Fix shell environment fetching with cmd (#42093)
Release Notes:

- Fixed shell environment fetching failing when having `cmd` configured
as terminal shell
2025-11-06 12:07:34 +00:00
Lukas Wirth
e75c6b1aa5 remote: Fix detect_can_exec detection (#42087)
Closes https://github.com/zed-industries/zed/issues/42036

Release Notes:

- Fixed an issuer with wsl exec detection eagerly failing, breaking
remote connections
2025-11-06 12:06:32 +00:00
Kirill Bulatov
149eedb73d Fix scroll position restoration (#42088)
Follow-up of https://github.com/zed-industries/zed/pull/42035
Scroll position needs to be stored immediately, otherwise editor close
may not register that.

Release Notes:

- N/A
2025-11-06 11:37:27 +00:00
Lukas Wirth
fb46bae3ed remote: Add missing quotation in extract_server_binary (#42085)
Also respect the shell env for various commands again
Should close https://github.com/zed-industries/zed/issues/42027

Release Notes:

- Fixed remote server installation failing on some setups
2025-11-06 11:19:24 +00:00
Lukas Wirth
28d7c37b0d recent_projects: Improve user facing error messages on connection failure (#42083)
cc https://github.com/zed-industries/zed/issues/42004

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 11:00:41 +00:00
Lukas Wirth
f6da987d4c agent_ui: Do not show Codex wsl warning on wsl (#42079)
Release Notes:

- Fixed the codex wsl warning being shown on wsl itself
2025-11-06 10:34:14 +00:00
Kirill Bulatov
efc71f35a5 Tone down extension errors (#42080)
Before:
<img width="2032" height="1161" alt="before"
src="https://github.com/user-attachments/assets/5c497b47-87e8-4167-bc28-93e34556ea4d"
/>

After:
<img width="2032" height="1161" alt="after"
src="https://github.com/user-attachments/assets/4a87803f-67df-4bf8-ade0-306f3c9ca81e"
/>

Release Notes:

- N/A
2025-11-06 10:12:04 +00:00
Lukas Wirth
3b7ee58cfa zed: Attach console to parent process before processing --printenv (#42075)
Otherwise the `--printenv` flag will simply not work on windows

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 09:47:54 +00:00
Lukas Wirth
32047bef93 text: Improve panic messages with more information (#42072)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 09:16:45 +00:00
Lukas Wirth
4003287cc3 vim: Downgrade user config error from panic to log (#42070)
Fixes ZED-2W3

Release Notes:

- Fixed panic due to invalid vim keycap
2025-11-06 08:37:04 +00:00
Lukas Wirth
001a47c8b7 gpui: Inline some hot recursive scope functions (#42069)
This reduces stack usage in prepainting slightly as we stack less
references to window/app.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-06 08:31:39 +00:00
Lukas Wirth
113f0780b3 agent_ui: Fix string slicing panic in message editor (#42068)
Fixes ZED-302

Release Notes:

- Fixed a panic in agent message editor when using multibyte whitespace
characters
2025-11-06 07:58:20 +00:00
Lexi Mattick
273321608f gpui: Add debug assertion to Window::on_action and make docs consistent (#41202)
Improves formatting consistency across various docs, fixes some typos,
and adds a missing `debug_assert_paint` to `Window::on_action` and
`Window::on_action_when`.

Release Notes:

- N/A
2025-11-06 07:55:20 +00:00
Smit Barmase
92cfce568b language: Fix completion menu no longer prioritizes relevant items for Typescript and Python (#42065)
Closes #41672

Regressed in https://github.com/zed-industries/zed/pull/40242

Release Notes:

- Fixed issue where completion menu no longer prioritizes relevant items
for TypeScript and Python.
2025-11-06 13:19:46 +05:30
Coenen Benjamin
2b6cf31ace file_finder: Display duplicated file in file finder history (#41917)
Closes #41850

When digging into this I figured out that basically what was going on is
in the history of the file finder it doesn't update the name of the file
duplicated because when you duplicate a file it's named automatically
with `filename copy` and so this filename was added to the history but
not updated so once you wanted to go back into this file it was not part
of file finder displayed history anymore because this file doesn't exist
anymore but the entity id remains the same.
I was also to reproduce this bug when just renaming a file.

Release Notes:

- Fixed: Display duplicated file in file finder history

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-11-06 07:06:45 +00:00
Lemon
58cec41932 Adjust terminal decorative character ranges to include missing Powerline characters (#42043)
Closes #41975.

This change adjusts some of the ranges which were incorrectly labeled or
excluded characters. The new ranges include three codepoints which are
not assigned in Nerd Fonts. However, one of these codepoints were
already included prior to this change. These codepoints are:

- U+E0C9, between the two ice separators
- U+E0D3, between the two trapezoid separators. The ranges prior to this
PR already included this one.
- U+E0D5, between the trapezoid separators and the inverted triangle
separators

I included these so as to not overcomplicate the ranges by
cherry-picking the defined codepoints. That being said, if we're okay
with this and an additional unassigned codepoint (U+E0CB, between ice
separators and honeycomb separators) being included then a simple range
from 0xE0B0 to 0xE0D7 nicely includes all of the Powerline characters.

I wasn't sure how to write tests for this so I just added two characters
to the existing tests which were previously not covered lol. All of the
Powerline characters can be seen
[here](https://www.nerdfonts.com/cheat-sheet) by searching `nf-pl`.

Release Notes:

- Fixed certain Powerline characters incorrectly having terminal
contrast adjustment applied.
2025-11-06 06:38:34 +00:00
Conrad Irwin
2ec5ca0e05 Fix generate release notes script on first stable (#42061)
Don't crash in generate-release-notes on the first stable
commit on a branch.

Release Notes:

- N/A
2025-11-05 23:25:30 -07:00
Conrad Irwin
f8da550867 Refresh zed.dev releases page after releases (#42060)
Release Notes:

- N/A
2025-11-05 23:25:13 -07:00
Mayank Verma
0b1d3d78a4 git: Fix pull failing when tracking remote with different branch name (#41768)
Closes #31430

Release Notes:

- Fixed git pull failing when tracking remote with different branch name

Here's a before/after comparison when `dev` branch has upstream set to
`origin/main`:


https://github.com/user-attachments/assets/3a47e736-c7b7-4634-8cd1-aca7300c3a73
2025-11-06 05:18:08 +00:00
Cole Miller
930b489d90 ci: Don't require protobuf and postgres checks for tests_pass for now (#42057)
For now, there are cases where we want to merge PRs (advisedly) even
though these checks fail.

Release Notes:

- N/A
2025-11-06 00:03:50 -05:00
Delvin
121cee8045 git: Add cursor pointer on last commit to check changes (#41960)
Release Notes:
-  Improved visual cue on git panel ui to check previous commit changes 

Before: 
<img width="1470" height="956" alt="Screenshot 2025-11-05 at 2 06 49 pm"
src="https://github.com/user-attachments/assets/b8c54bb6-c8b8-4d36-a14f-71d725ed68f2"
/>

After:
<img width="1470" height="956" alt="Screenshot 2025-11-05 at 2 06 24 pm"
src="https://github.com/user-attachments/assets/d8d96f9e-ceed-4c02-9f93-de9fd3dfcbf1"
/>
2025-11-05 23:27:38 -05:00
Viraj Bhartiya
5360dc1504 Refactor timestamp formatting in Git UI components to use chrono for local time calculations (#41005)
- Updated `blame_ui.rs`, `branch_picker.rs`, `commit_tooltip.rs`, and
`commit_view.rs` to replace the previous timestamp formatting with
`chrono` for better accuracy in local time representation.
- Introduced `chrono::Local::now().offset().local_minus_utc()` to obtain
the local offset for timestamp formatting.

Closes #40878

Release Notes:
- Improved timestamp handling in various Git UI components for enhanced
user experience.
2025-11-05 23:23:22 -05:00
Danilo Leal
69862790cb docs: Improve content in /ai/agent-panel and /ai/rules (#42055)
- Clarify about first-party supported features in external agents
- Create new section for selection as context for higher visibility
- Add keybindings for agent profiles
- Fix outdated setting using `assistant` instead of `agent`
- Add keybinding for accessing the rules library

Release Notes:

- N/A
2025-11-06 01:18:55 -03:00
ᴀᴍᴛᴏᴀᴇʀ
284d8f790a Support Forgejo and Gitea avatars in git blame (#41813)
Part of #11043.

Codeberg is a public instance of Forgejo, as confirmed by the API
documentation at https://codeberg.org/api/swagger. Therefore, I renamed
the related component from codeberg to forgejo and added codeberg.org as
a public instance.

Furthermore, to optimize request speed for the commit API, I set
`stat=false&verification=false&files=false`.

<img width="1650" height="1268" alt="CleanShot 2025-11-03 at 19 57
06@2x"
src="https://github.com/user-attachments/assets/c1b4129e-f324-41c2-86dc-5e4f7403c046"
/>

<br/>
<br/>

Regarding Gitea Support: 

Forgejo is a fork of Gitea, and their APIs are currently identical
(e.g., for getting avatars). However, to future-proof against potential
API divergence, I decided to treat them as separate entities. The
current gitea implementation is essentially a copy of the forgejo file
with the relevant type names and the public instance URL updated.

Release Notes:

- Added Support for Forgejo and Gitea avatars in git blame
2025-11-05 22:53:28 -05:00
Danilo Leal
f824e93eeb docs: Remove non-existing keybinding in /visual-customization (#42053)
Release Notes:

- N/A
2025-11-06 00:38:39 -03:00
Danilo Leal
e71bc4821c docs: Add section about agent servers in /external-agents (#42052)
Release Notes:

- N/A
2025-11-06 00:38:33 -03:00
Jason Lee
64c8c19e1b gpui: Impl Default for TextRun (#41084)
Release Notes:

- N/A

When I was implementing Input, I often used `TextRun`, but `background`,
`underline` and `strikethrough` were often not used.

So make change to simplify it.
2025-11-06 01:50:23 +00:00
Richard Feldman
622d626a29 Add agent-servers.md (#41609)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2025-11-06 01:35:56 +00:00
Petros Amoiridis
714481073d Fix macOS new window stacking (#38683)
Closes #36206 

Disclaimer: I did use AI for help to end up with this proposed solution.
😅

## Observed behavior of native apps on macOS (like Safari)

I first did a quick research on how Safari behaves on macOS, and here's
what I have found:

1. Safari seems to position new windows with an offset based on the
currently active window
2. It keeps opening new windows with an offset until the new window
cannot fit the display bounds horizontally, vertically or both.
3. When it cannot fit horizontally, the new window opens at x=0
(y=active window's y)
4. When it cannot fit vertically, the new window opens at y=0 (x=active
window's x)
5. When it cannot fit both horizontally and vertically, the new window
opens at x=0 and y=0 (top left).
6. At any moment if I activate a different Safari window, the next new
window is offset off of that
7. If I resize the active window and open a new window, the new window
has the same size as the active window

So, I implemented the changes based on those observations.

I am not sure if touching `gpui/src/window.rs` is the way to go. I am
open to feedback and direction here.

I am also not sure if making my changes platform (macOS) specific, is
the right thing to do. I reckoned that Linux and Windows have different
default behaviors, and the original issue mentioned macOS. But,
likewise, I am open to take a different approach.

## Tests

I haven't included tests for such change, as it seems to me a bit
difficult to properly test this, other than just doing a manual
integration test. But if you would want them for such a change, happy to
try including them.

## Alternative approach

I also did some research on macOS native APIs that we could use instead
of trying to make the calculations ourselves, and I found
`NSWindow.cascadeTopLeftFromPoint` which seems to be doing exactly what
we want, and more. It probably takes more things into consideration and
thus it is more robust. We could go down that road, and add it to
`gpui/src/platform/mac/window.rs` and then use it for new window
creation. Again, if that's what you would do yourselves, let me know and
I can either change the implementation here, or open a new pull request
and let you decide which one would you would like to pursue.

## Video showing the behavior


https://github.com/user-attachments/assets/f802a864-7504-47ee-8c6b-8d9b55474899

🙇‍♂️

Release Notes:

- Improved macOS new window stacking
2025-11-06 01:22:49 +00:00
Sean Timm
eccdfed32b gpui: Convert macOS clipboard file URLs to paths for paste (#36848)
- On macOS, pasting now inserts the actual file path when the clipboard
contains a file URL (public.file-url/public.url)
- Terminal paste remains text-only; no temp files or data URLs are
created. If only raw image bytes exist on the clipboard, paste is a
no-op.
- Scope: macOS only; no dependency changes.
- Added a test (test_file_url_converts_to_path) that verifies URL→path
conversion using a unique pasteboard.

Release Notes:

- Improved pasting on macOS: now inserts the actual file path when the
clipboard contains a file URL (enables image paste support for Claude
Code)
2025-11-06 00:35:52 +00:00
Cyandev
2664596a34 gpui: Fix incorrect handling of Function key modifier on macOS (#38518)
On macOS, the Function key is reserved for system use and should not be
used in application code.

This commit updated keystroke matching and key event handling to ignore
the Function key modifier while users are typing or pressing
keybindings.

For some keyboards with compact layout (like my 65% keyboard), there is
no separated backtick key. Esc and it shares the same physical key. To
input backtick, users may press `Fn-Esc`. However, macOS will still
deliver events with Fn key modifier to applications. Cocoa framework can
handle this correctly, which typically ignore the Fn directly. GPUI
should also follow the same rule, otherwise, the backtick key on those
keyboards won't work.

Release Notes:

- Fixed a bug where typing fn-\` on macOS would not insert a `.
2025-11-05 23:19:32 +00:00
Richard Feldman
23f2fb6089 Run ACP login from same cwd as agent server (#42038)
This makes it possible to do login via things like `cmd: "node", args:
["my-node-file.js", "login"]`

Also, that command will now use Zed's managed `node` instance.

Release Notes:

- ACP extensions can now run terminal login commands using relative
paths
2025-11-05 18:17:50 -05:00
Julia Ryan
fb2c2c55dc Fix windows crash handler (#42039)
Closes #41471

We were killing the crash handler when it received a second copy of any
of the messages, but this GPU specs one is sent on each new window
rather than once at startup. We could gate the sending to only happen
once, but it's simpler to just allow multiple gpu specs messages.

Release Notes:

- N/A
2025-11-05 22:34:05 +00:00
Rémi Kalbe
8315fde1ff Fix LSP spawning by resetting exception ports in child processes (#40716)
## Summary

Fixes #36754

This PR fixes an issue where LSPs fail to spawn after the crash handler
is initialized.

## Problem

After PR #35263 added minidump crash reporting, some users experienced
LSP spawn failures. The issue manifests as:
- LSPs fail to spawn with no clear error messages
- The problem only occurs after crash handler initialization
- LSPs work when a debugger is attached, revealing a timing issue

### Root Cause

The crash handler installs Mach exception ports for minidump generation.
Due to a timing issue, child processes inherit these exception ports
before they're fully stabilized, which can block child process spawning.

## Solution

Reset exception ports in child processes using the `pre_exec()` hook,
which runs after `fork()` but before `exec()`. This prevents children
from inheriting the parent's crash handler exception ports.

### Implementation

- Adds macOS-specific implementation of `new_smol_command()` that resets
exception ports before exec
- Calls `task_set_exception_ports` to reset all exception ports to
`MACH_PORT_NULL`
- Graceful error handling: logs warnings but doesn't fail process
spawning if port reset fails

Release Notes:

- Fixed LSPs failing to spawn on some macOS systems

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-11-05 22:05:34 +00:00
John Tur
fc87440682 Update Windows docs (#41423)
- Document Arm64 support
- Document minimum Windows version requirements

Release Notes:

- N/A
2025-11-05 21:23:48 +00:00
Kirill Bulatov
c996eadaf5 Update editor data only after real scroll reports (#42035)
Release Notes:

- N/A
2025-11-05 21:22:29 +00:00
Danilo Leal
e8c6c1ba04 agent_ui: Fix how icons from external agents are displayed (#42034)
Release Notes:

- N/A
2025-11-05 21:14:16 +00:00
versecafe
b8364d7c33 node: Move managed runtime to v24 LTS (#41956)
Release Notes:

- Moved managed Node runtime to v24 LTS
2025-11-05 14:10:42 -07:00
John Tur
7c23ef89ec Fix corrupted characters being inserted when Alt is pressed (#42033)
The Alt+Numpad buffer that's maintained by the input stack is getting
corrupted, leading to garbage characters being inserted on keystrokes
like Alt+Up. Disable the automatic handling of Alt+Numpad for now until
the cause of this corruption is understood. The Alt+Numpad input did not
work anyway, so this does not regress anything.

Release Notes:

- windows: Fixed corrupted characters being inserted when Alt is pressed
(preview only)
2025-11-05 21:03:36 +00:00
Matt Miller
2f463370cc Refactor buffer headers to collapse on click (#42021)
Release Notes:
Updated how clicking on multi-buffer headers works to provide better
control and prevent unexpected navigation:

Clicking the header now collapses/expands the file section instead of
opening the file.
Opening files can be done by clicking the filename or the "Open file"
button on the right side of the header.
Existing shortcuts continue to work: use the left chevron to collapse or
your keyboard shortcut to jump to the file

**Demo:**

https://github.com/user-attachments/assets/dca9ccc5-bd98-416c-97af-43b4e4b2f903
2025-11-05 14:59:50 -06:00
Danilo Leal
feed34cafe gpui: Add support for rendering SVG from external files (#42024)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-11-05 16:12:30 -03:00
Joseph T. Lyons
4724aa5cb8 Bump Zed to v0.213 (#42018)
Release Notes:

- N/A
2025-11-05 17:31:18 +00:00
Cameron Mcloughlin
366a5db2c0 collab_ui: Show parents when searching channels (#42005)
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-05 16:51:10 +00:00
Danilo Leal
81e87c4cd6 settings ui: Fix divider in items that doesn't have subfields (#42016)
Release Notes:

- N/A

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2025-11-05 16:49:19 +00:00
Andrew Farkas
b8ba663c20 Revert "Refactor completions" (#42014)
Reverts zed-industries/zed#41939
2025-11-05 16:48:28 +00:00
Anthony Eid
27fb1098fa Revert "editor: Add action to move between snippet tabstop positions" (#42008)
Reverts zed-industries/zed#41466

This PR would add "in_snippet" context when there wasn't a completion
menu visible, causing some actions to not be hit.

Release Note:

- N/A
2025-11-05 11:16:39 -05:00
Danilo Leal
0f5a63a9b0 agent_ui: Make "waiting confirmation" state more apparent (#41998)
This PR changes the loading/generating indicator when in the "waiting
for tool call confirmation" state so that's a bit more visible and
discernible as needing your attention, as opposed to a regular
generating state.

<img width="400" alt="Screenshot 2025-11-05 at 10  46@2x"
src="https://github.com/user-attachments/assets/88adbf97-20fb-49c4-9c77-b0a3a22aa14e"
/>

Release Notes:

- agent: Improved the "waiting for confirmation" state visibility so
that you more rapidly know the agent is waiting for you to act.
2025-11-05 11:45:44 -03:00
Danilo Leal
c8ada5b1ae agent_ui: Reduce label repetitiveness on new thread menu (#42001)
Mostly just removing "thread" from all external agent menu items; I
think we can do without it and it already becomes much better/cleaner.

Release Notes:

- N/A
2025-11-05 11:45:31 -03:00
Techy
27a18843d4 open_ai: Make the deltas optional (#39142)
I am using an Azure OpenAI instance since that is what is provided at
work and with how they have it setup not all responses contain a delta,
which lead to errors and truncated responses. This is related to how
they are filtering potentially offensive requests and responses. I don't
believe this filter was made in-house, instead I believe it is provided
by Microsoft/Azure, so I suspect this fix may help other users.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-11-05 13:47:14 +01:00
Smit Barmase
2bc1d60c52 remote: Fix open terminal fails when $SHELL is not set (#41990)
Closes #41644

Release Notes:

- Fixed issue where it failed to spawn terminal on systems such as
Alpine.
2025-11-05 18:15:15 +05:30
Karl-Erik Enkelmann
17933f1222 Update documentation on Java support (#41758)
This brings the documentation on Java in line with the much changed
reality of the Java extension.
Note that the correctness of this is contingent on
https://github.com/zed-industries/extensions/pull/3745 being merged.

Release Notes:

- N/A
2025-11-05 12:24:29 +01:00
Vitaly Slobodin
cd87307289 language: Fix language detection for injected syntax layers (#41111)
Closes #40632

**TL;DR:** The `wrap selections in tag` action was unavailable in ERB
files, even when the cursor was positioned in HTML content (outside of
Ruby code blocks). This happened because `syntax_layer_at()` incorrectly
returned the Ruby language for positions that were actually in HTML.
**NOTE:** I am not familiar with that part of Zed so it could be that
the fix here is completely incorrect.

Previously, `syntax_layer_at` incorrectly reported injected languages
(e.g., Ruby in ERB files) even when the cursor was in the base language
content (HTML). This broke actions like `wrap selections in tag` that
depend on language-specific configuration.

The issue had two parts:
1. Missing start boundary check: The filter only checked if a layer's
end was after the cursor (`end_byte() > offset`), not if it started
before, causing layers outside the cursor position to be included. See
the `BEFORE` video: when I click on the HTML part it reports `Ruby`
language instead of `HTML`.
2. Wrong boundary reference for injections: For injected layers with
`included_sub_ranges` (like Ruby code blocks in ERB), checking the root
node boundaries returned the entire file range instead of the actual
injection ranges.

This fix:
- Adds the containment check using half-open range semantics [start,
end) for root node boundaries. That ensures proper reporting of the
detected language when a cursor (`|`) is located right after the
injection:

   ```
   <body>
    <%= yield %>|
  </body>
   ```

- Checks `included_sub_ranges` for injected layers to determine if the
cursor is actually within an injection
- Falls back to root node boundaries for base layers without sub-ranges.
This is the original behavior.

Fixes ERB language support where actions should be available based on
the cursor's actual language context. I think that also applies to some
other template languages like HEEX (Phoenix) and `*.pug`. On short
videos below you can see how I navigate through the ERB template and the
terminal on the right outputs the detected language if you apply the
following patch:

```diff
diff --git i/crates/editor/src/editor.rs w/crates/editor/src/editor.rs
index 15af61f5d2..54a8e0ae37 100644
--- i/crates/editor/src/editor.rs
+++ w/crates/editor/src/editor.rs
@@ -10671,6 +10671,7 @@ impl Editor {
         for selection in self.selections.disjoint_anchors_arc().iter() {
             if snapshot
                 .language_at(selection.start)
+                .inspect(|language| println!("Detected language: {:?}", language))
                 .and_then(|lang| lang.config().wrap_characters.as_ref())
                 .is_some()
             {
```

**Before:**


https://github.com/user-attachments/assets/3f8358f4-d343-462e-b6b1-3f1f2e8c533d


**After:**



https://github.com/user-attachments/assets/c1b9f065-1b44-45a2-8a24-76b7d812130d



Here is the ERB template:

```
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style>
      /* Email styles need to be inline */
    </style>
  </head>
  <body>
    <%= yield %>
  </body>
</html>
```

Release Notes:

- N/A
2025-11-05 12:16:28 +01:00
Vitaly Slobodin
11b29d693f ruby: Add note about enabling Ruby LSP for ERB files (#41851)
Hi, this is a follow-up change for
https://github.com/zed-industries/zed/pull/41754 I think it important to
keep existing things working. So add notes to the Ruby extension doc
about enabling Ruby LSP for ERB files as well. Thanks!

Release Notes:

- N/A
2025-11-05 11:00:12 +01:00
Lukas Wirth
c061698229 project: Fetch latest lsp data in deduplicate_range_based_lsp_requests (#41971)
Fixes ZED-2MK

Release Notes:

- Fixed a panic in inlay hints
2025-11-05 08:30:22 +00:00
John Tur
b4f7af066e Work around codegen bug with GetKeyboardState (#41970)
Works around an issue, which can be reproduced in the following program:
```rs
use windows::Win32::UI::Input::KeyboardAndMouse::{GetKeyboardState, VK_CONTROL};

fn main() {
    let mut keyboard_state = [0u8; 256];
    unsafe {
        GetKeyboardState(&mut keyboard_state).unwrap();
    }

    let ctrl_down = (keyboard_state[VK_CONTROL.0 as usize] & 0x80) != 0;
    println!("Is Ctrl down: {ctrl_down}");
}
```

In debug mode, this program prints the correct answer. In release mode,
it always prints false. The optimizer appears to think that
`keyboard_state` isn't mutated and remains zeroed, and folds the
`modifier_down` comparisons to `false`.

Release Notes:

- N/A
2025-11-05 08:06:14 +00:00
Smit Barmase
c83621fa1f editor: Fix setting multi_cursor_modifier opens implementation in new pane instead of new tab (#41963)
Closes #41014

Release Notes:

- Fixed an issue where `multi_cursor_modifier` set to `cmd_or_ctrl`
opens implementation in new pane instead of new tab.
2025-11-05 11:31:56 +05:30
Richard Feldman
0da52d6774 Add ACP terminal-login via _meta field (#41954)
As discussed with @benbrandt and @mikayla-maki:

* We now tell ACP clients we support the nonstandard `terminal-auth`
`_meta` field for terminal-based authentication
* In the future, we anticipate ACP itself supporting *some* form of
terminal-based authentication, but that hasn't been designed yet or gone
through the RFD process
* For now, this unblocks terminal-based auth

Release Notes:

- Added experimental terminal-based authentication to ACP support
2025-11-04 21:40:35 -05:00
Richard Feldman
60ee0dd19b Use our node runtime for ACP extensions (#41955)
Release Notes:

- Now ACP extensions use Zed's managed Node.js runtime

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-11-04 21:40:23 -05:00
Conrad Irwin
9fc4abd8de Re-enable preview auto-release (#41952)
Patch releases to preview will now automatically release

Release Notes:

- N/A
2025-11-04 19:26:33 -07:00
John Tur
2ead8c42fb Improve Windows text input for international keyboard layouts and IMEs (#41259)
- Custom handling of dead keys has been removed. UX for dead keys is now
the same as other applications on Windows.
- We could bring back some kind of custom UI, but only if UX is fully
compatible with expected Windows behavior (e.g. ability to move the
cursor after typing a dead key).
  - Fixes https://github.com/zed-industries/zed/issues/38838
- Character input via AltGr shift state now always has priority over
keybindings. This applies regardless of whether the keystroke used the
AltGr key or Ctrl+Alt to enter the shift state.
- In particular, we use the following heuristic to determine whether a
keystroke should trigger character input first or trigger keybindings
first:
- If the keystroke does not have any of Ctrl/Alt/Win down, trigger
keybindings first.
- Otherwise, determine the character that would be entered by the
keystroke. If it is a control character, or no character at all, trigger
keybindings first.
- Otherwise, the keystroke has _any_ of Ctrl/Alt/Win down and generates
a printable character. Compare this character against the character that
would be generated if the keystroke had _none_ of Ctrl/Alt/Win down:
- If the character is the same, the modifiers are not significant;
trigger keybindings first.
- If there is no active input handler, or the active input handler
indicates that it isn't accepting text input (e.g. when an operator is
pending in Vim mode), character entry is not useful; trigger keybindings
first.
- Otherwise, assume the modifiers enable access to an otherwise
difficult-to-enter key; trigger character entry first.
  - Fixes https://github.com/zed-industries/zed/issues/35862
- Fixes
https://github.com/zed-industries/zed/issues/40054#issuecomment-3447833349
  - Fixes https://github.com/zed-industries/zed/issues/41486
- TranslateMessage calls are no longer skipped for unhandled keystrokes.
This fixes language input keys on Japanese and Korean keyboards (and
surely other cases as well).
- To avoid any other missing-TranslateMessage headaches in the future,
the message loop has been rewritten in a "traditional" Win32 style,
where accelerators are handled in the message loop and TranslateMessage
is called in the intended manner.
  - Fixes https://github.com/zed-industries/zed/issues/39971
  - Fixes https://github.com/zed-industries/zed/issues/40300
  - Fixes https://github.com/zed-industries/zed/issues/40321
  - Fixes https://github.com/zed-industries/zed/issues/40335
  - Fixes https://github.com/zed-industries/zed/issues/40592
  - Fixes https://github.com/zed-industries/zed/issues/40638
- As a bonus, Alt+Space now opens the system menu, since it is triggered
by the WM_SYSCHAR generated by TranslateMessage.
- VK_PROCESSKEYs are now ignored rather than being unwrapped and matched
against keybindings. This ensures that IMEs will reliably receieve
keystrokes that they express interest in. This matches the behavior of
native Windows applications.
  - Fixes https://github.com/zed-industries/zed/issues/36736
  - Fixes https://github.com/zed-industries/zed/issues/39608
  - Fixes https://github.com/zed-industries/zed/issues/39991
  - Fixes https://github.com/zed-industries/zed/issues/41223
  - Fixes https://github.com/zed-industries/zed/issues/41656
  - Fixes https://github.com/zed-industries/zed/issues/34180
  - Fixes https://github.com/zed-industries/zed/issues/41766


Release Notes:

- windows: Improved keyboard input handling for international keyboard
layouts and IMEs
2025-11-04 20:28:12 -05:00
Danilo Leal
0a4b1ac696 inline assistant: Mention ability to add context with @ in the placeholder (#41950)
This has been possible in the inline assistant for ages now and maybe
you didn't know because we didn't say anything about it! This PR fixes
that by including that you can @-mention context on it the same you can
in the agent panel.

Release Notes:

- N/A
2025-11-04 21:18:49 -03:00
Conrad Irwin
f9fb855990 Fetch (just) enough refs in script/cherry-pick (#41949)
Before this change we'd download all the tagged commits, but none of
their ancestors,
this was slow and made cherry-picking fail.

Release Notes:

- N/A
2025-11-04 17:09:43 -07:00
Conrad Irwin
b587a62ac3 No-op commit to test cherry-picking (#41948)
Closes #ISSUE

Release Notes:

- N/A
2025-11-04 23:35:19 +00:00
Conrad Irwin
1b2e38bb33 More tweaks to CI pipeline (#41941)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-04 16:28:29 -07:00
Kirill Bulatov
4339c772e4 Tidy up Edit in json footer entries (#41890)
Before:
<img width="350" height="109" alt="before"
src="https://github.com/user-attachments/assets/d5d3e6bd-3a65-4d7d-8585-1e4d8f72997f"
/>

After:
<img width="310" height="103" alt="after"
src="https://github.com/user-attachments/assets/40137084-7323-4a79-b95b-a020c418646b"
/>

* All items got a keybinding label
* All items were made of a non-small size, to match the text size in the
right button
* Keybindings are rendered as disabled for disabled buttons

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-05 00:49:47 +02:00
tidely
ba7ea71c00 node_runtime: Improve proxy mapping (#41807)
Closes #ISSUE

More accurately map localhost to `127.0.0.1`. Previously we would
lowercase and simply replace all instances of localhost inside of the
URL string, meaning query parameters, username, password etc. could not
contain the string `localhost` or contain uppercase letters without
getting modified. Added a test ensuring the mapping logic works. The
previous implementation would fail this new test.

Release Notes:

- Improved the behavior of mapping `localhost` to `127.0.0.1` when
passing configured proxy urls to `node`
2025-11-04 17:11:54 -05:00
Andrew Farkas
cd04450273 Refactor completions (#41939)
This is progress toward multi-word snippets (including snippets with
prefixes containing symbols)

Release Notes:

- Removed `trigger` argument in `ShowCompletions` command

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-11-04 20:18:03 +00:00
Sergey Cherepanoff
769a8a650e windows: Automatically find Windows SDK when building gpui (#38711)
### Summary

This PR changes `gpui/build.rs` to look up the Windows SDK directory in
the registry instead of falling back to a hard-coded path.

---

### Problem

Currently, building `gpui` on Windows requires `fxc.exe` to be in `PATH`
or at a predefined location (unless `GPUI_FXC_PATH` is set). This
requires to maintain a certain build environment with proper paths/vars
or to install the specific SDK version.

It is possible to find the SDK automatically using the registry keys it
creates upon installation. Specifically in
`SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0`
branch there are:
* `InstallationFolder` telling the SDK installation location;
* `ProductVersion` telling the SDK version in use.

These keys provide enough information to locate the SDK binaries, with
added robustness:
* handles non-standard SDK installation path;
* deterministically selects the latest SDK when multiple versions are
present.

---

### Changes Made

* **Updated `crates/gpui/build.rs`**:

  * added dependency on `winreg`
  * introduced `find_latest_windows_sdk_binary()` helper
  * updated fallback logic to use registry lookup

This PR only changes the fallback location, and does not touch the
established environment-based workflow.

Release Notes:

- N/A

---

### Impact

Reduces manual configuration needed to build GPUI on Windows.

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2025-11-04 20:14:54 +00:00
Anthony Eid
94ff4aa4b2 AI: Fix Github Copilot edit predictions failing to start (#41934)
Closes #41457 #41806 #41801

Copilot started using `node:sqlite` module which is an experimental
feature between node v22-v23 (stable in v24). The fix was passing in the
experimental flag when Zed starts the copilot LSP.

I tested this with v20.19.5 and v24.11.0. The fix got v20.19 working and
didn't affect v24.11 which was already working.

Release Notes:

- AI: Fix Github Copilot edit predictions failing to start
2025-11-04 14:31:51 -05:00
Ignasius
1e1480405a Fix integer underflow in autosave mode after delay in the settings (#41898)
Closes #41774 

Release Notes:

- settings_ui: Fixed an integer underflow panic when attempting to hit
the `-` sign on settings item that take delays in milliseconds
2025-11-04 14:12:05 -05:00
scuzqy
cdd7d4b2fb windows: Skip AppendCategory call when there are no shell links (#37926)
`ICustomDestinationList::AppendCategory` rejects an empty `IObjectArray`
and returns an `E_INVALIDARG` error. Error propagated and caused an
early-return from `update_jump_list()`.
<img width="1628" height="540" alt="image"
src="https://github.com/user-attachments/assets/f8143297-c71e-42a1-a505-66cd77dfa599"
/>

Release Notes:

- N/A
2025-11-04 18:48:18 +00:00
Piotr Osiewicz
4fd2b3f374 editor: Jumping to diagnostics unfolds target locations (#41932)
Release Notes:

- Jumping to diagnostics no longer skips over folded regions. The folded
region that contains a target diagnostic is now unfolded.
2025-11-04 18:43:24 +00:00
Conrad Irwin
43a7f96462 Improve compare_perf.yml, cherry_pick.yml (#41606)
Release Notes:

- N/A

---------

Co-authored-by: Nia Espera <nia@zed.dev>
2025-11-04 11:29:35 -07:00
Joseph T. Lyons
2a2e04bb5c Add docs for settings profiles (#41931)
Release Notes:

- N/A
2025-11-04 18:27:39 +00:00
Piotr Osiewicz
9bf212bd1e lsp: Fix dynamic registration of document diagnostics (#41929)
- lsp: Fix dynamic registration of diagnostic capabilities not taking
effect when an initial capability is not specified
Gist of the issue lies within use of .get_mut instead of .entry. If we
had not created any dynamic capability beforehand, we'd miss a
registration, essentially

- **Determine whether to update remote caps in a smarter manner**

Release Notes:

- Fixed document diagnostics with Ty language server.
2025-11-04 18:23:14 +00:00
localcc
38cd16aad9 Fix save_last_workspace (#41907)
Closes #37348

Release Notes:

- Fixed last workspace window restoration on linux/windows
2025-11-04 18:47:49 +01:00
Ben Kunkle
d8655f0656 settings_ui: Fix dropdowns after #41036 (#41920)
Closes #41533

Both of the issues in the release notes that are fixed in this PR, were
caused by incorrect usage of the `window.use_state` API.
The first issue was caused by calling `window.use_state` in a render
helper, resulting in the element ID used to share state being the same
across different pages, resulting in the state being re-used when it
should have been re-created. The fix for this was to move the
`window.state` (and rendering logic) into a `impl RenderOnce` component,
so that the IDs are resolved during the render, avoiding the state
conflicts.

The second issue is caused by using a `move` closure in the
`window.use_state` call, resulting in stale closure values when the
window state is re-used.

Release Notes:

- settings_ui: Fixed an issue where some dropdown menus would show
options from a different dropdown when clicked
- settings_ui: Fixed an issue where attempting to change a setting in a
dropdown back to it's original value after changing it would do nothing
2025-11-04 12:46:16 -05:00
Oleksiy Syvokon
91d631c229 Evaluate zeta2 context retrieval and edit predictions (#41921)
This PR implements the `zeta-cli eval` command. It will:

- Run the edit prediction model if there are no cached results
- Compute precision/recall/F1 for context retrieval at the line level:
every retrieved line of context is counted as a true positive (correct
retrieval), false positive (retrieved something that was not expected),
or false negative (didn't retrieve an expected line)
- Compute similar metrics for edit predictions
- Pretty-print results, highlighting the difference between actual and
expected when printing to tty

Other changes:
- `zeta-cli predict` accepts a `--format` argument with options `md`,
`json`, `diff`
- Code restructure

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-11-04 17:36:50 +00:00
Joseph T. Lyons
054d2e1524 Add Ben K to gpui PR reviewers (#41919)
Release Notes:

- N/A
2025-11-04 17:06:16 +00:00
Sathiyaraman M
982f2418f4 git: Add support for git pull with rebase (#41117)
- Adds a new action `git::PullRebase` which adds `--rebase` in the final
command invoked by existing Git-Pull implementation.
- Includes the new action in "Fetch/Push" button in the Git Panel
(screenshot below)
- Adds key-binding for `git::PullRebase` in all three platforms,
following the existing key-binding patterns (`ctrl-g shift-down`)
- Update git docs to include the new action.

Sidenote: This is my first ever OSS contribution

Screenshot:

<img width="234" height="215" alt="image"
src="https://github.com/user-attachments/assets/713d068f-5ea5-444f-8d66-444ca65affc8"
/>

---

Release Notes:

- Git: Added `git: pull rebase` for running `git pull --rebase`.
2025-11-04 16:41:06 +00:00
Joseph T. Lyons
9f580464f0 Add Anthony and Cameron to gpui PR reviewers (#41914)
Release Notes:

- N/A
2025-11-04 16:20:41 +00:00
ᴀᴍᴛᴏᴀᴇʀ
fc3e503cfe remote: Fix incorrect default repository selection when using remote (#41698)
If I understand this correctly: The `active_repo_id` uses
`get_or_insert_with`, which makes it dependent on the `RepositoryAdded`
event sequence. To ensure correct initialization of the `active_repo_id`
on the remote side, the first local `RepositoryAdded` event must
synchronously send an `UpdateRepository` to `updates_tx`.

Closes #30694

Release Notes:

- Fixed incorrect default repository selection when using remote
2025-11-04 11:15:35 -05:00
Joseph T. Lyons
52c49b86b2 Sort PR reviewer categories (#41912)
Release Notes:

- N/A
2025-11-04 16:07:46 +00:00
Joseph T. Lyons
07b707153d Sort PR reviewers per category (#41909)
Release Notes:

- N/A
2025-11-04 15:44:17 +00:00
Lukas Wirth
75cef88ea2 agent_ui: Render error context when failing to spawn agent thread (#41908)
Release Notes:

- Fixed not telling the user what went wrong when spawning ACP agents
2025-11-04 15:35:33 +00:00
Pranav Joglekar
46b39f0077 editor: Clean up edit prediction preview when edit prediction is disabled (#40159)
Update the `editor::Editor.handle_modifiers_changed` method to ensure
that the `editor::Editor.update_edit_prediction_preview` method is
called even if edit prediction preview is disabled, if there's an active
edit prediction preview.

Without this change it was possible for users to get into a state where
holding the modifiers to show the prediction were part of the modifiers
used to disable edit prediction. When that keybinding was used, edit
prediction would be disabled, but the edit prediction preview would
remain as active, so the context menu for the editor would never be
shown again, as the editor would assume it was still showing the edit
prediction preview.

Closes #40056 

Release Notes:

- Fixed a bug that could cause the completions menu to stop being show
when edit predictions were disabled

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-11-04 15:30:37 +00:00
Thomas Heartman
fb410ab3ae Support relative line number on wrapped lines (rework) (#41805)
## Add relative line numbers on wrapped lines, take 2

This is a rework of https://github.com/zed-industries/zed/pull/39268
that excludes
e7096d27a6.
This commit introduced some line number rendering issues as described in
https://github.com/zed-industries/zed/issues/41422.

While @ConradIrwin suggested we try to pass in the buffer rows from the
calling method instead of the snapshot, that
appears to have had unintended consequences and I don't think the two
calculations were intended to do the same thing. Hence, this PR has
removed those changes.

This PR also includes the migration fix originally done by @MrSubidubi
in https://github.com/zed-industries/zed/pull/41351.

## Original PR description and release notes.

**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.

**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.

**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence, where the relative number shown
always matches the `<n>j/k` distance needed.

**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios

Also explained and discussed in
https://github.com/zed-industries/zed/discussions/25733.

Release Notes:

- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
2025-11-04 08:24:17 -07:00
B. Collier Jones
1b93242351 project_panel: Add hidden files glob patterns and action toggle hidden files visibility (#41532)
This PR adds the ability to configure which files are considered
"hidden" in the project panel and toggle their visibility with a
keyboard shortcut. Previously, the editor hardcoded dotfiles as hidden -
now users can customize the pattern and quickly show/hide them.

### Release Notes

- Added `project_panel::ToggleHideHidden` action with keyboard shortcuts
to toggle visibility of hidden files
- Added configurable `hidden_files` setting to customize which files are
marked as hidden (defaults to `**/.*` for dotfiles)

### Motivation

This change allows users to:
1. Quickly toggle hidden file visibility with a keyboard shortcut
2. Customize which files are considered "hidden" beyond just dotfiles
3. Better organize their project panel by hiding build artifacts, logs,
or other generated files

### Usage

**Toggle hidden files:**
- **macOS:** `cmd-alt-.`
- **Linux:** `ctrl-alt-.`
- **Windows:** `ctrl-alt-.`

**Customize patterns in settings:**
```json
{
  "hidden_files": ["**/.*", "**/*.tmp", "**/build/**"]
}
```

### Changes

**Core Implementation:**
- Added `hidden_files` setting (defaults to `**/.*` to match current
dotfile behavior)
- Replaced hardcoded `name.starts_with('.')` logic with configurable
pattern matching using `PathMatcher`
- Hidden status propagates through directory hierarchies (if a directory
is hidden, all children inherit that status)

**User-Facing:**
- Added `ToggleHideHidden` action in the project panel
- Added keyboard shortcuts for all platforms
- Added settings UI entry for configuring `hidden_files` patterns

**Testing:**
- Added comprehensive test coverage validating default behavior, custom
patterns, propagation, and settings changes

### Implementation Notes

- Uses `PathMatcher` for efficient glob matching
- Settings changes automatically trigger worktree re-indexing
- No breaking changes - defaults maintain current behavior (hiding
dotfiles)

---

**Disclaimer:** This was implemented with a fair amount of copy/paste
(particularly the gitignore handling), trial and error, and a healthy
dose of Claude.

### Screenshots

**Project Panel with hidden files visible:**
<img width="1368" height="935" alt="Screenshot 2025-10-30 at 3 15 53 AM"
src="https://github.com/user-attachments/assets/1cbe90ce-504c-4f9b-bca8-bef02ab961be"
/>

**Project Panel with hidden files hidden:**
<img width="1363" height="917" alt="Screenshot 2025-10-30 at 3 16 07 AM"
src="https://github.com/user-attachments/assets/9297f43e-98c7-4b19-be8f-3934589d6451"
/>

**Toggle action in command palette:**
<img width="565" height="161" alt="Screenshot 2025-10-30 at 3 17 26 AM"
src="https://github.com/user-attachments/assets/4dc9e7b6-9c29-4972-b886-88d8018905da"
/>

Release Notes:

- Added the ability to configure glob patterns for files treated as
hidden in the project panel using the `hidden_files` setting.
- Added an action `project panel: toggle hidden files` to quickly show
or hide hidden files in the project panel.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-11-04 20:35:37 +05:30
Lukas Wirth
fb6e41d51e remote_server: Fix panic due to invalid settings access (#41904)
Closes https://github.com/zed-industries/zed/issues/41860

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-04 14:56:24 +00:00
Lukas Wirth
0ec31db398 util: Add missing quotes in shell env capturing on windows (#41902)
Release Notes:

- Fixed shell env capturing failing if zed is installed on a path with
whitespace in it
2025-11-04 14:31:20 +00:00
Jakub Konka
a262ca1cd5 util: Log JSON with envs if failed to deserialize (#41894)
Release Notes:

- N/A
2025-11-04 15:30:26 +01:00
localcc
6a38d699dc Fix autoupdate nuking the app on Windows (#41571)
Closes #41477

Release Notes:

- N/A
2025-11-04 15:06:30 +01:00
Smit Barmase
95feefc1cf remote: Fix terminal crash on Elvish shell (#41893) 2025-11-04 17:48:42 +05:30
Coenen Benjamin
a827f25d00 file_finder: Respect .gitignore and file_scan_inclusions with ** in glob (#40654)
Closes #39037 

Previously, the code split the `**/.env` glob in `file_scan_inclusions`
into two sources for the `PathMatcher`: `["**", "**/.env"]`. This
approach works for directories, but including `**` will match all
directories and their files. To address this, I now select the
appropriate `PathMatcher` using only `**/.env` when specifically
targeting a file to determine whether to include it in the file finder.

Release Notes:

- Fixed: respect `.gitignore` and `file_scan_inclusions` settings with
`**` in glob for file finder

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-11-04 12:11:17 +00:00
Kirill Bulatov
cc6208b17f Show inlay label parts' tooltips if those are present and hovered (#41889)
Part of https://github.com/zed-industries/zed/issues/33715


https://github.com/user-attachments/assets/d2d6f47d-3974-4c8c-aab9-9046891186bf

Unlike VSCode that does more advanced hovering, this one only works for
inlays with tooltip LSP data in them.

Release Notes:

- Started to show inlay label parts' tooltips when they are hovered

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-04 11:10:51 +00:00
Dino
8d15ec7f99 vim: Fix mini delimiters in multibuffer (#41834)
- Update `vim::object::find_mini_delimiters` in order to filter out the
  ranges before calling `vim::object::cover_or_next`, ensuring that the
  provided ranges are converted from multibuffer space into buffer
  space.
- Remove the `range_filter` from `vim::object::cover_or_next` was the
  `find_mini_delimiters` function is the only caller and no longer uses
  it

Closes #41346 

Release Notes:

- Fixed a crash that could occur when using `vim::MiniQuotes` and
`vim::MiniBrackets` in a multibuffer
2025-11-04 11:08:51 +00:00
Jakub Konka
ca5a4dcffa terminal: Resolve env based on the project dir on the target (#41867)
Prior to this change we would always resolve envs when spawning a new
terminal window based on the inherited CLI environment. This works fine
as long as we open a new Zed instance in the terminal when using it
locally only. When using Zed connected to a remote server, it would not
be meaningful however. WIth this change, we correctly ping the remote
for the project-local envs and use that instead. This change should also
fix a pesky issue when updating Zed - after Zed restarts, opening a new
terminal window will not run `direnv` for example.

Release Notes:

- N/A
2025-11-04 09:52:28 +01:00
Lukas Wirth
3e7b8efb98 editor: Newtype WrapRow (#41843)
Makes a better distinction between `WrapRow` and `BlockRow`

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-04 08:48:38 +00:00
John Tur
4002b32ad4 Coalesce dispatcher window messages on Windows (#41861)
Take 2 at https://github.com/zed-industries/zed/pull/41595

Release Notes:

- N/A
2025-11-04 09:43:06 +01:00
Coenen Benjamin
3ef8163357 yaml: Fix indentation with dictionary when editing (#40913)
Closes #39570 

Release Notes:

- Fixed indentation with dictionary when editing YAML file.

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-11-04 12:23:34 +05:30
Conrad Irwin
b9524837bb Fix branch diff hunk expansion (#41873)
Closes #ISSUE

Release Notes:

- (preview only) Fixes a bug where hunks were not expanded when viewing
branch diff
2025-11-04 03:46:02 +00:00
Alvaro Parker
e5660d25f1 git: Add git worktree picker (#38719)
Related discussions #26084 

Worktree creations are implemented similar to how branch creations are
handled on the branch picker (the user types a new name that's not on
the list and a new entry option appears to create a new branch with that
name).


https://github.com/user-attachments/assets/39e58983-740c-4a91-be88-57ef95aed85b

With this picker you have a few workflows: 

- Open the picker and type the name of a branch that's checked out on an
existing worktree:
    - Press enter to open the worktree on a new window
- Press ctrl-enter to open the worktree and replace the current window
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- Press enter to create the worktree and open in a new window. If the
branch doesn't exists, we will create a new one based on the branch you
have currently checked out. If the branch does exists then we create a
worktree with that branch checked out.
- Press ctrl-enter to do everything on the previous point but instead,
replace the current window with the new worktre.
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- If a default branch is detected on the repo, you can create a new
worktree based on that branch by pressing ctrl-enter or
ctrl-shift-enter. The first one will open a new window and the last one
will replace the current one.


Note: If you preffer to not use the system prompt for choosing a
directory, you can set `"use_system_path_prompts": false` in zed
settings.

Release Notes:

- Added git worktree picker to open a git worktree on a new window or
replace the current one
- Added git worktree creation action

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-11-03 21:38:00 -05:00
Danilo Leal
57adf42492 agent_ui: Add profiles item in the panel menu (#41871)
Making the profile management modal accessible through the agent panel
additional options menu as well. And in the process, adjusting the menu
keybinding that was getting conflicted with something else.

Release Notes:

- N/A
2025-11-03 22:54:28 -03:00
Danilo Leal
4cdcb0c15e agent_ui: Improve display of external agents in configuration view (#41869)
This PR makes the agent panel's configuration view use the icon from an
external agent that comes directly from the extension, as well as some
other clean ups.

Release Notes:

- N/A
2025-11-03 22:22:50 -03:00
Conrad Irwin
9113a20b8b Shell out to real tar in extension builder (#41856)
We see `test_extension_store_with_test_extension` hang in untarring the
WASI SDK some times.

In lieu of trying to debug the problem, let's try shelling out for now
in the hope that the test becomes more reliable.

There's a bit of risk here because we're using async-tar for other
things (but probably not 300Mb tar files...)

Assisted-By: Zed AI

Closes #ISSUE

Release Notes:

- N/A
2025-11-03 16:13:03 -07:00
Max Brunsfeld
1631cec15a Add zeta-cli subcommand for running zeta2 predictions (#41722)
This PR adds a `zeta zeta2 predict` subcommand that takes an edit
prediction example markdown file as an argument, and performs zeta2's
prediction, showing the retrieved context and the predicted edit.

* [x] Apply uncommitted diff to get repo into the right state.
* [x] Apply edits in edit history
* [x] Display predicted edits as unified diff, regardless of model
output format

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-11-03 15:12:08 -08:00
Kirill Bulatov
5e41ce17e3 Do not pull diagnostics when those are disabled (#41865)
Based on 

[hang.log](https://github.com/user-attachments/files/23319081/hang.log)


Release Notes:

- N/A
2025-11-03 22:42:26 +00:00
KyleBarton
5ed458497e Copy outline improvements from typescript over to tsx as well (#41862)
Closes #4483 

Release Notes:

- Interprets outline of tsx files with the same grammar as typescript,
including improvements from #39797
2025-11-03 14:38:05 -08:00
Kirill Bulatov
9ecf257502 Fix incorrect search ranges when rendering search matches in the outline panel (#41859)
Closes https://github.com/zed-industries/zed/issues/41792

Release Notes:

- Fixed outline panel panicking when rendering certain search matches
2025-11-03 22:01:52 +00:00
Anthony Eid
2eeb02305c editor: Add a setting to show a scrollbar in completion menu (#41849)
A user on Discord requested this feature:
https://discord.com/channels/869392257814519848/1434188637389717556/1434188637389717556

I added a scrollbar setting called `completion_menu_scrollbar` to the
completion menu and defaulted it to "Never" to match past behavior.

Release Notes:

- editor: Add `editor.completion_menu_scrollbar` setting to show a
scrollbar in the completion menu
2025-11-03 21:03:18 +00:00
Katie Geer
c2b3e60f6d settings: Change "remove trailing whitespace on save" to default false for Markdown (#41658)
Closes #ISSUE: reported on X by user. 

Release Notes:

- Made it so that the default value for the "remove trailing whitespace
on save" setting in Markdown is false, to fix cases where the removed
trailing whitespace had syntactic meaning
2025-11-03 13:00:30 -08:00
Conrad Irwin
d075a56ee7 Fix merge conflict (#41853)
Closes #ISSUE

Release Notes:

- N/A
2025-11-03 13:41:39 -07:00
Piotr Osiewicz
8217e57a2d ci: Enable namespace caching for Linux workers (#41652)
Release Notes:

- N/A
2025-11-03 21:07:36 +01:00
Finn Evers
08daedd014 editor: Add support for no scroll margin in full mode (#41838)
Noticed this whilst testing the Docker debugger. I randomly scrolled the
console off screen and was confused briefly as to why this was the case.

Release Notes:

- The debugger query console will no longer needlessly overscroll.
2025-11-03 20:47:39 +01:00
Conrad Irwin
4da5675920 Re-use the existing bundle steps for nightly too (#41699)
One of the reasons we didn't spot that we were missing the telemetry env
vars for the production builds was that nightly (which was working) had
its own set of build steps. This re-uses those and pushes the env vars
down from the workflow to the job.

It also fixes nightly releases to upload all-in-one go so that all
platforms update in sync.

Closes #41655

Release Notes:

- N/A
2025-11-03 12:29:22 -07:00
Lukas Wirth
5fc54986c7 Revert "sum_tree: Replace rayon with futures (#41586) (#41846)
This causes the background executor to hang

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-03 19:25:15 +00:00
Finn Evers
cb5055aaec agent_ui: Fix expand message editor button not always working (#41845)
The button could not be clicked whenever the editor was currently not
focused. This PR fixes this and also registers the action on a more
global level, similar to how this is done for all the other agent
actions.

Release Notes:

- Fixed an issue where the `Expand message editor` button would not work
in agent threads if the message editor was not focused.
2025-11-03 19:08:27 +00:00
warrenjokinen
454d649b6e docs: Mark macOS 26.x as being supported (#41777)
Add "Tahoe" to list of supported macOS versions.

Closes #ISSUE

Release Notes:

- N/A
2025-11-03 13:43:42 -05:00
Vitaly Slobodin
222767e69b ruby: Disable Ruby LSP for ERB files (#41754)
The Ruby extension uses the `solargraph`
language server by default for Ruby files.
However, when a user opens any ERB file,
the extension automatically starts the Ruby LSP.
This affects developers because
they do not expect the Ruby LSP to be running.

Closes https://github.com/zed-extensions/ruby/issues/172

Release Notes:

- N/A
2025-11-03 19:35:36 +01:00
Xiaobo Liu
d7b7fa3ee2 agent: Add XML escaping for TextThreadContext title attribute (#39734)
Escape special characters (&, <, >, ", ') in the title attribute of
TextThreadContext's XML output to prevent malformed XML when titles
contain these characters.

Resolves TODO at context.rs:629

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-11-03 18:16:36 +00:00
Dylan
7cfce60570 project_search: Add button to collapse/expand all excerpts (#41654)
<img width="500" height="834" alt="Screenshot 2025-11-03 at 12  59@2x"
src="https://github.com/user-attachments/assets/15c5e1fc-2291-41b4-9eec-a8cfa5a446c7"
/>

Releases Note:

- Added a button that allows to expand/collapse all project search
excerpts at once.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-03 14:50:34 -03:00
Nia
45b78482f5 perf: Fixup Hyperfine finding (#41837)
Release Notes:

- N/A
2025-11-03 17:36:33 +00:00
Antal Szabó
71f1f3728d windows: Remove null terminator from keyboard ID (#41785)
Closes #41486, closes #35862 

It is unnecessary, and it broke the `uses_altgr` function.

Also add Slovenian layout as using AltGr.

This should fix:
-
https://github.com/zed-industries/zed/pull/40536#issuecomment-3477121224
- https://github.com/zed-industries/zed/issues/41486
- https://github.com/zed-industries/zed/issues/35862

As the current strategy relies on manually adding layouts that have
AltGr, it's brittle and not very elegant. It also has other issues (it
requests the current layout on every kesytroke and mouse movement).

**A potentially better and more comprehensive solution is at
https://github.com/zed-industries/zed/pull/41259**
This is just to fix the immediate issues while that gets reviewed.

Release Notes:

- windows: Fix AltGr handling on non-US layouts again.
2025-11-03 18:29:28 +01:00
Richard Feldman
8b560cd8aa Fix bug with uninstalled agent extensions (#41836)
Previously, uninstalled agent extensions didn't immediately disappear
from the menu. Now, they do!

Release Notes:

- N/A
2025-11-03 12:09:26 -05:00
Lukas Wirth
38e1e3f498 project: Use user configured shells for project env fetching (#41288)
Closes https://github.com/zed-industries/zed/issues/40464

Release Notes:

- Fix shell environment sourcing not respecting users remote shells
2025-11-03 16:29:07 +00:00
Karl-Erik Enkelmann
a6b177d806 Update open buffers with newly registered completion trigger characters (#41243)
Closes https://github.com/zed-extensions/java/issues/108

Previously, when language servers dynamically register completion
capabilities with trigger characters for completions (hello JDTLS), this
would not get updated in buffers for that language server that were
already open. This change is to find open buffers for the language
server and update the trigger characters in each of them when the new
capability is being registered.

Release Notes:

- N/A
2025-11-03 17:28:30 +01:00
Lukas Wirth
73366bef62 diagnostics: Live update diagnostics view on edits while focused (#41829)
Prior we were only updating the diagnostics pane when it is either
unfocued, saved or when a disk based diagnostic run finishes (aka cargo
check). The reason for this is simple, we do not want to take away the
excerpt under the users cursor while they are typing if they manage to
fix the diagnostic. Additionally we need to prevent dropping the changed
buffer before it is saved.

Delaying updates was a simple way to work around these kind of issues,
but comes at a huge annoyance that the diagnostics pane is not actually
reflecting the current state of the world but some snapshot of it
instead making it less than ideal to work within it for languages that
do not leverage disk based diagnostics (that is not rust-analyzer, and
even for rust-analyzer its annoying).

This PR changes this. We now always live update the view but take care
to retain unsaved buffers as well as buffers that contain a cursor in
them (as well as some other "checkpoint" properties).

Release Notes:

- Improved diagnostics pane to live update when editing within its
editor
2025-11-03 16:16:05 +00:00
David Kleingeld
48bd253358 Adds instructions on how to use Perf & Flamegraph without debug symbols (#41831)
Release Notes:

- N/A
2025-11-03 16:11:30 +00:00
Bob Mannino
2131d88e48 Add center_on_match option for search (#40523)
[Closes discussion
#28943](https://github.com/zed-industries/zed/discussions/28943)

Release Notes:

- Added `center_on_match` option to center matched text in view during buffer or project search.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-11-03 21:17:09 +05:30
Kirill Bulatov
42149df0f2 Show modal hover for one-off tasks (#41824)
Before, one-off commands did not show anything on hover at all, now they
show their command:

<img width="657" height="527" alt="after"
src="https://github.com/user-attachments/assets/d43292ca-9101-4a6a-b689-828277e8cfeb"
/>

Release Notes:

- Show modal hover for one-off tasks
2025-11-03 15:25:44 +00:00
Bing Wang
379bdb227a languages: Add ignore keyword for gomod (#41520)
go 1.25 introduce ignore directive in go.mod to specify directories the
go command should ignore.

ref: https://tip.golang.org/doc/go1.25#go-command


Release Notes:

- Added syntax highlighting support for the new [`ignore`
directive](https://tip.golang.org/doc/go1.25#go-command) in `go.mod`
files
2025-11-03 09:11:50 -06:00
Dijana Pavlovic
04e53bff3d Move @punctuation.delimiter before @operator capture (#41663)
Closes #41593

From what I understand the order of captures inside tree-sitter query
files matters, and the last capture will win. `?` and `:` are captured
by both `@operator` and `@punctuation.delimiter`.So in order for the
ternary operator to win it should live after `@punctuation.delimiter`.

Before:
<img width="298" height="32" alt="Screenshot 2025-10-31 at 17 41 21"
src="https://github.com/user-attachments/assets/af376e52-88be-4f62-9e2b-a106731f8145"
/>


After:
<img width="303" height="39" alt="Screenshot 2025-10-31 at 17 41 33"
src="https://github.com/user-attachments/assets/9a754ae9-0521-4c70-9adb-90a562404ce8"
/>


Release Notes:

- Fixed an issue where the ternary operator symbols in TypeScript would
not be highlighted as operators.
2025-11-03 08:51:22 -06:00
Kirill Bulatov
28f30fc851 Fix racy inlay hints queries (#41816)
Follow-up of https://github.com/zed-industries/zed/pull/40183

Release Notes:

- (Preview only) Fixed inlay hints duplicating when multiple editors are
open for the same buffer

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-03 13:54:53 +00:00
Lukas Wirth
f8b414c22c zed: Reduce number of rayon threads, spawn with bigger stacks (#41812)
We already do this for the cli and remote server but forgot to do so for
the main binary

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-03 12:28:32 +00:00
Lukas Wirth
50504793e6 file_finder: Fix highlighting panic in open path prompt (#41808)
Closes https://github.com/zed-industries/zed/issues/41249

Couldn't quite come up with a test case here but verified it works.

Release Notes:

- Fixed a panic in file finder when deleting characters
2025-11-03 12:07:13 +00:00
kallyaleksiev
b625263989 remote: Close window when SSH connection fails (#41782)
## Context 

This PR closes issue https://github.com/zed-industries/zed/issues/41781

It essentially `matches` the result of opening the connection here
f7153bbe8a/crates/recent_projects/src/remote_connections.rs (L650)

and adds a Close / Retry alert that upon 'Close' closes the new window
if the result is an error
2025-11-03 11:13:20 +00:00
Lukas Wirth
c8f9db2e24 remote: Fix more quoting issues with nushell (#41547)
https://github.com/zed-industries/zed/pull/40084#issuecomment-3464159871
Closes https://github.com/zed-industries/zed/pull/41547

Release Notes:

- Fixed remoting not working when the remote has nu set as its shell
2025-11-03 10:50:05 +00:00
Lukas Wirth
bc3c88e737 Revert "windows: Don't flood windows message queue with gpui messages" (#41803)
Reverts zed-industries/zed#41595

Closes #41704
2025-11-03 10:41:53 +00:00
Oleksiy Syvokon
3a058138c1 Fix Sonnet's regression with inserting </parameter></invoke> (#41800)
Sometimes, inside the edit agent, Sonnet thinks that it's doing a tool
call and closes its response with `</parameter></invoke>` instead of
properly closing </new_text>.

A better but more labor-intensive way of fixing this would be switching
to streaming tool calls for LLMs that support it.

Closes #39921

Release Notes:

- Fixed Sonnet's regression with inserting `</parameter></invoke>`
sometimes
2025-11-03 12:22:51 +02:00
Lukas Wirth
f2b539598e sum_tree: Spawn less tasks in SumTree::from_iter_async (#41793)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-03 10:02:31 +00:00
ᴀᴍᴛᴏᴀᴇʀ
dc503e9975 Support GitLab and self-hosted GitLab avatars in git blame (#41747)
Part of #11043.

Release Notes:

- Added Support for showing GitLab and self-hosted GitLab avatars in git
blame
2025-11-03 07:51:04 +01:00
ᴀᴍᴛᴏᴀᴇʀ
73b75a7765 Support Gitee avatars in git blame (#41783)
Part of https://github.com/zed-industries/zed/issues/11043.

<img width="3596" height="1894" alt="CleanShot 2025-11-03 at 10 39
08@2x"
src="https://github.com/user-attachments/assets/68d16c32-fd23-4f54-9973-6cbda9685a8f"
/>


Release Notes:

- Added Support for showing Gitee avatars in git blame
2025-11-03 07:47:20 +01:00
Danilo Leal
deacd3e922 extension_ui: Fix card label truncation (#41784)
Closes https://github.com/zed-industries/zed/issues/41763

Release Notes:

- N/A
2025-11-03 03:54:47 +00:00
Aero
f7153bbe8a agent_ui: Add delete button for compatible API-based LLM providers (#41739)
Discussion: https://github.com/zed-industries/zed/discussions/41736

Release Notes:

- agent panel: Added the ability to remove OpenAI-compatible LLM
providers directly from the UI.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-02 16:05:29 -03:00
Xiaobo Liu
4e7ba8e680 acp_tools: Add vertical scrollbar to ACP logs (#41740)
Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-02 18:11:21 +00:00
Danilo Leal
9909b59bd0 agent_ui: Improve the "go to file" affordance in the edit bar (#41762)
This PR makes it clearer that you can click on the file path to open the
corresponding file in the agent panel's "edit bar", which is the element
that shows up in the panel as soon as agent-made edits happen.

Release Notes:

- agent panel: Improved the "go to file" affordance in the edit bar.
2025-11-02 14:56:23 -03:00
Danilo Leal
00ff89f00f agent_ui: Make single file review actions match panel (#41718)
When we introduced the ACP-based agent panel, the condition that the
"review" | "reject" | "keep" buttons observed to be displayed got
mismatched between the panel and the pane (when in the single file
review scenario). In the panel, the buttons appear as soon as there are
changed buffers, whereas in the pane, they appear when response
generation is done.

I believe that making them appear at the same time, observing the same
condition, is the desired behavior. Thus, I think the panel behavior is
more correct, because there are loads of times where agent response
generation isn't technically done (e.g., when there's a command waiting
for permission to be run) but the _file edit_ has already been performed
and is in a good state to be already accepted or rejected.

So, this is what this PR is doing; effectively removing the "generating"
state from the agent diff, and switching to `EditorState::Reviewing`
when there are changed buffers.

Release Notes:

- Improved agent edit single file reviews by making the "reject" and
"accept" buttons appear at the same time.
2025-11-02 14:30:50 -03:00
Danilo Leal
12fe12b5ac docs: Update theme, icon theme, and visual customization pages (#41761)
Some housekeeping updates:

- Update hardcoded actions/keybindings so they're pulled from the repo
- Mention settings window when useful
- Add more info about agent panel's font size
- Break sentences in individual lines

Release Notes:

- N/A
2025-11-02 14:30:37 -03:00
Mayank Verma
a9bc890497 ui: Fix popover menu not restoring focus to the previously focused element (#41751)
Closes #26548

Here's a before/after comparison:


https://github.com/user-attachments/assets/21d49db7-28bb-4fe2-bdaf-e86b6400ae7a

Release Notes:

- Fixed popover menus not restoring focus to the previously focused
element
2025-11-02 16:56:58 +01:00
Xiaobo Liu
d887e2050f windows: Hide background helpers behind CREATE_NO_WINDOW (#41737)
Close https://github.com/zed-industries/zed/issues/41538

Release Notes:

- Fixed some processes on windows not spawning with CREATE_NO_WINDOW

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-11-02 09:15:01 +01:00
Anthony Eid
d5421ba1a8 windows: Fix click bleeding through collab follow (#41726)
On Windows, clicking on a collab user icon in the title bar would
minimize/expand Zed because the click would bleed through to the title
bar. This PR fixes this by stopping propagation.

#### Before (On MacOS with double clicks to mimic the same behavior)

https://github.com/user-attachments/assets/5a91f7ff-265a-4575-aa23-00b8d30daeed
#### After (On MacOS with double clicks to mimic the same behavior)

https://github.com/user-attachments/assets/e9fcb98f-4855-4f21-8926-2d306d256f1c

Release Notes:

- Windows: Fix clicking on user icon in title bar to follow
minimizing/expanding Zed

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-11-02 07:35:11 +00:00
Joseph T. Lyons
548cdfde3a Delete release process docs (#41733)
These have been migrated to the README.md
[here](https://github.com/zed-industries/release_notes). These don't
need to be public. Putting them in the same repo where we draft
(`release_notes`) means less jumping around and allows us to include
additional information we might not want to make public.

Release Notes:

- N/A
2025-11-02 00:37:02 -04:00
Ben Kunkle
2408f767f4 gh-workflow unit evals (#41637)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-01 22:45:44 -04:00
Haojian Wu
df15d2d2fe Fix doc typos (#41727)
Release Notes:

- N/A
2025-11-01 20:52:32 -03:00
Anthony Eid
07dcb8f2bb debugger: Add program and module path fallbacks for debugpy toolchain (#40975)
Fixes the Debugpy toolchain detection bug in #40324 

When detecting what toolchain (venv) to use in the Debugpy configuration
stage, we used to only base it off of the current working directory
argument passed to the config. This is wrong behavior for cases like
mono repos, where the correct virtual environment to use is nested in
another folder.

This PR fixes this issue by adding the program and module fields as
fallbacks to check for virtual environments. We also added support for
program/module relative paths as well when cwd is not None.

Release Notes:

- debugger: Improve mono repo virtual environment detection with Debugpy

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-11-01 17:30:13 -04:00
Agus Zubiaga
06bdb28517 zeta cli: Add convert-example command (#41608)
Adds a `convert-example` subcommand to the zeta cli that converts eval
examples from/to `json`, `toml`, and `md` formats.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-11-01 19:35:04 +00:00
Mark Christiansen
d6b58bb948 agent_ui: Use agent font size tokens for thread markdown rendering (#41610)
Release Notes:

- N/A

--- 

Previously, agent markdown rendering used hardcoded font sizes
(TextSize::Default and TextSize::Small) which ignored the
agent_ui_font_size and agent_buffer_font_size settings. This updates the
markdown style to respect these settings.

This pull request adds support for customizing the font size of code
blocks in agent responses, making it possible to set a distinct font
size for code within the agent panel. The changes ensure that if the new
setting is not specified, the font size will fall back to the agent UI
font size, maintaining consistent appearance.

(I am a frontend developer without any Rust knowledge so this is
co-authored with Claude Code)


**Theme settings extension:**

* Added a new `agent_buffer_code_font_size` setting to
`ThemeSettingsContent`, `ThemeSettings`, and the default settings JSON,
allowing users to specify the font size for code blocks in agent
responses.
[[1]](diffhunk://#diff-a3bba02a485aba48e8e9a9d85485332378aa4fe29a0c50d11ae801ecfa0a56a4R69-R72)
[[2]](diffhunk://#diff-aed3a9217587d27844c57ac8aff4a749f1fb1fc5d54926ef5065bf85f8fd633aR118-R119)
[[3]](diffhunk://#diff-42e01d7aacb60673842554e30970b4ddbbaee7a2ec2c6f2be1c0b08b0dd89631R82-R83)
* Updated the VSCode import logic to recognize and import the new
`agent_buffer_code_font_size` setting.

**Font size application in agent UI:**

* Modified the agent UI rendering logic in `thread_view.rs` to use the
new `agent_buffer_code_font_size` for code blocks, and to fall back to
the agent UI font size if unset.
[[1]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5584-R5584)
[[2]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5596-R5598)
* Implemented a helper method in `ThemeSettings` to retrieve the code
block font size, with fallback logic to ensure a value is always used.
* Updated the settings application logic to propagate the new code block
font size setting throughout the theme system.


### Example Screenshots
![Screenshot 2025-10-31 at 12 38
28](https://github.com/user-attachments/assets/cbc34232-ab1f-40bf-a006-689678380e47)
![Screenshot 2025-10-31 at 12 37
45](https://github.com/user-attachments/assets/372b5cf8-2df8-425a-b052-12136de7c6bd)

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-01 11:14:21 -03:00
Charles McLaughlin
03e0581ee8 agent_ui: Show notifications also when the panel is hidden (#40942)
Currently Zed only displays agent notifications (e.g. when the agent
completes a task) if the user has switched apps and Zed is not in the
foreground. This adds PR supports the scenario where the agent finishes
a long-running task and the user is busy coding within Zed on something
else.

Releases Note:

- If agent notifications are turned on, they will now also be displayed
when the agent panel is hidden, in complement to them showing when the
Zed window is in the background.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-01 11:14:12 -03:00
Conrad Irwin
1552e13799 Fix telemetry in release builds (#41695)
This was inadvertently broken in v0.211.1-pre when we rewrote the
release build

Release Notes:

- N/A
2025-10-31 22:55:12 -06:00
Dijana Pavlovic
ade0f1342c agent_ui: Prevent mode selector tooltip from going off-screen (#41589)
Closes #41458 

Dynamically position mode selector tooltip to prevent clipping.

Position tooltip on the right when panel is docked left, otherwise on
the left. This ensures the tooltip remains visible regardless of panel
position.

**Note:** The tooltip currently vertically aligns with the bottom of the
menu rather than individual items. Would be great if it can be aligned
with the option it explains. But this doesn't seem trivial to me to
implement and not sure if it's important enough atm?

Before: 
<img width="431" height="248" alt="Screenshot 2025-10-30 at 22 21 09"
src="https://github.com/user-attachments/assets/073f5440-b1bf-420b-b12f-558928b627f1"
/>

After:
<img width="632" height="158" alt="Screenshot 2025-10-30 at 17 26 52"
src="https://github.com/user-attachments/assets/e999e390-bf23-435e-9df0-3126dbc14ecb"
/>
<img width="685" height="175" alt="Screenshot 2025-10-30 at 17 27 15"
src="https://github.com/user-attachments/assets/84efca94-7920-474b-bcf8-062c7b59a812"
/>


Release Notes:

- Improved the agent panel's mode selector by preventing it to go
off-screen in case the panel is docked to the left.
2025-11-01 04:29:58 +00:00
Joe Innes
04f7b08ab9 Give visual feedback when an operation is pending (#41686)
Currently, if a commit operation takes some time, there's no visual
feedback in the UI that anything's happening.

This PR changes the colour of the text on the button to the
`Color::Disabled` colour when a commit operation is pending.

Release Notes:

- Improved UI feedback when a commit is in progress

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-01 04:24:59 +00:00
Anthony Eid
ecbdffc84f debugger: Fix Debugpy attach with connect session startup (#41690)
Closes #38345, #34882, #33280

Debugpy has four distinct configuration scenarios, which are:
1. launch
2. attach with process id
3. attach with listen
4. attach with connect

Spawning Debugpy directly works with the first three scenarios but not
with "attach with connect". Which requires host/port arguments being
passed in both with an attach request and when starting up Debugpy. This
PR passes in the right arguments when spawning Debugpy in an attach with
connect scenario, thus fixing the bug.

The VsCode extension comment that explains this:
98f5b93ee4/src/extension/debugger/adapter/factory.ts (L43-L51)

Release Notes:

- debugger: Fix Python attach-based sessions not working with `connect`
or `port` arguments
2025-10-31 19:02:51 -04:00
Jakub Konka
aa61f25795 git: Make GitPanel more responsive to long-running staging ops (#41667)
Currently, this only applies to long-running individually selected
unstaged files in the git panel. Next up I would like to make this work
for `Stage All`/`Unstage All` however this will most likely require
pushing `PendingOperation` into `GitStore` (from the `GitPanel`).

Release Notes:

- N/A
2025-10-31 22:47:49 +01:00
Danilo Leal
d406409b72 Fix categorization of agent server extensions (#41689)
We missed making extensions that provide agent servers fill the
`provides` field with `agent-servers`, and thus, filtering for this type
of extension in both the app and site wouldn't return anything.

Release Notes:

- N/A
2025-10-31 21:18:22 +00:00
Danilo Leal
bf79592465 git_ui: Adjust stash picker (#41688)
Just tidying it up by removing the unnecessary eye icon buttons in all
list items and adding that action in the form of a button in the footer,
closer to all other actions. Also reordering the footer buttons so that
the likely most common action is in the far right.

Release Notes:

- N/A
2025-10-31 18:15:52 -03:00
Ben Kunkle
d3d7199507 Fix release.yml workflow (#41675)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-31 16:29:13 -04:00
Danilo Leal
743a9cf258 Add included agents in extensions search (#41679)
Given agent servers will soon be a thing, I'm adding Claude Code, Gemini
CLI, and Codex CLI as included agents in case anyone comes first to
search them as extensions before looking up on the agent panel.

Release Notes:

- N/A
2025-10-31 16:45:39 -03:00
Conrad Irwin
a05358f47f Delete old ci.yml (#41668)
The new one is much better

Release Notes:

- N/A
2025-10-31 12:58:47 -06:00
Ben Kunkle
3a4aba1df2 gh-workflow release (#41502)
Closes #ISSUE

Rewrite our release pipeline to be generated by `gh-workflow`

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-31 14:23:25 -04:00
tidely
12d71b37bb ollama: Add button for refreshing available models (#38181)
Closes #17524

This PR adds a button to the bottom right corner of the ollama settings
ui. It resets the available ollama models, also resets the "Connected"
state in the process. This means it can be used to check if the
connection is still valid as well. It's a question whether we should
clear the available models on ALL `fetch_models` calls, since these only
happen during auth anyway.

Ollama is a local model provider which means clicking the refresh button
often only flashes the "not connected" state because the latency of the
request is so low. This accentuates changes in the UI, however I don't
think there's a way around this without adding some rather cumbersome
deferred ui updates.

I've attached the refresh button to the "Connected" `ButtonLike`, since
I don't think automatic UI spacing should separate these elements. I
think this is okay because the "Connected" isn't actually something that
the user can interact with.

Before: 
<img width="211" height="245" alt="image"
src="https://github.com/user-attachments/assets/ea90e24a-b603-4ee2-9212-2917e1695774"
/>

After: 
<img width="211" height="250" alt="image"
src="https://github.com/user-attachments/assets/be9af950-86a2-4067-87a0-52034a80a823"
/>


Alternative approach: There was also a suggestion to simply add a entry
to the command palette, however none of the other providers have this
ability currently either so I went with this approach. The current
approach also makes it more discoverable to the user.

Release Notes:

- Added a button for refreshing available ollama models

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-31 18:12:02 +00:00
Conrad Irwin
34e0c97dbc Generate dwarf files for builds again (#41651)
Closes #ISSUE

Release Notes:

- N/A
2025-10-31 10:51:06 -06:00
Andrew Farkas
cf31b736f7 Add Andrew to REVIEWERS.conl (#41662)
Release Notes:

- N/A
2025-10-31 16:48:21 +00:00
versecafe
1cb512f336 bedrock: Fix duplicate region input (#41341)
Closes #41313

Release Notes:

- Fixes #41313

<img width="453" height="870" alt="Screenshot 2025-10-27 at 10 23 37 PM"
src="https://github.com/user-attachments/assets/93bfba18-1bff-494e-a4c2-05b54ad6eed8"
/>

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-10-31 16:43:45 +00:00
Lukas Wirth
4e6a562efe editor: Fix refresh_linked_ranges panics due to old snapshot use (#41657)
Fixes ZED-29Z

Release Notes:

- Fixed panic in `refresh_linked_ranges`
2025-10-31 17:39:55 +01:00
versecafe
c1dea842ff agent: Model name context (#41490)
Closes #41478

Release Notes:

- Fixed #41478

<img width="459" height="916" alt="Screenshot 2025-10-29 at 1 31 26 PM"
src="https://github.com/user-attachments/assets/1d5b9fdf-9800-44e4-bdd5-f0964f93625f"
/>

> caused by using haiku 4.5 from the anthropic provider and then
swapping to sonnet 3.7 through zed, doing this does mess with prompt
caching but a model swap already invalidates that so it shouldn't have
any cost impact on end users
2025-10-31 16:12:46 +00:00
Dino
c42d54af17 agent_ui: Autoscroll after inserting selections (#41370)
Update the behavior of the `zed_actions::agent::AddSelectionToThread`
action so that, after the selecitons are added to the current thread,
the editor automatically scrolls to the cursor's position, fixing an
issue where the inserted selection's UI component could wrap the cursor
to the next line below, leaving it outside the viewable area.

Closes #39694

Release Notes:

- Improved the `agent: add selection to thread` action so as to
automatically scroll to the cursor's position after selections are
inserted
2025-10-31 15:17:26 +00:00
Dino
f3a5ebc315 vim: Only focus when associated editor is also focused (#41487)
Update `Vim::activate` to ensure that the `Vim.focused` method is only
called if the associated editor is also focused.

This ensures that the `VimEvent::Focused` event is only emitted when the
editor is actually focused, preventing a bug where, after starting Zed,
Vim's mode indicator would show that the mode was `Insert` even though
it was in `Normal` mode in the main editor.

Closes #41353 

Release Notes:

- Fixed vim's mode being shown as `Inserted` right after opening Zed

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-31 15:04:54 +00:00
Lukas Wirth
f73d6fe4ce terminal: Kill the terminal child process, not the terminal process on exit (#41631)
When rerunning a task, our process id fetching seems to sometimes return
the previous terminal's process id when respawning the task, causing us
to kill the new terminal once the previous one drops as we spawn a new
one, then drop the old one. This results in rerun sometimes spawning a
blank task as the terminal immediately exits. The fix here is simple, we
actually want to kill the process running inside the terminal process,
not the terminal process itself when we exit in the terminal.

No relnotes as this was introduced yesterday in
https://github.com/zed-industries/zed/pull/41562

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-31 15:01:50 +00:00
Lukas Wirth
c6d61870e2 editor: Fix incorrect hover popup row clamping (#41645)
Fixes ZED-2TR
Fixes ZED-2TQ
Fixes ZED-2TB
Fixes ZED-2SW
Fixes ZED-2SQ

Release Notes:

- Fixed panic in repainting hover popups

Co-authored by: David <david@zed.dev>
2025-10-31 14:24:23 +00:00
Danilo Leal
1f938c08d2 project panel: Remove extra separator when "Rename" is hidden (#41639)
Closes https://github.com/zed-industries/zed/issues/41633

Release Notes:

- N/A
2025-10-31 13:55:08 +00:00
Lukas Wirth
f2ce06c7b0 sum_tree: Replace rayon with futures (#41586)
Release Notes:

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

Co-authored by: Kate <kate@zed.dev>
2025-10-31 10:39:01 +00:00
Mikayla Maki
7c29c6d7a6 Increased the max height of pickers (#41617)
Release Notes:

- Increased the max size of picker based UI
2025-10-31 04:26:36 +00:00
Andrew Farkas
eab06eb1d9 Keep selection in SwitchToHelixNormalMode (#41583)
Closes #41125

Release Notes:

- Fixed `SwitchToHelixNormalMode` to keep selection
- Added default keybinds for `SwitchToHelixNormalMode` when in Helix
mode
2025-10-31 01:53:46 +00:00
Conrad Irwin
c2537fad43 Add a no-op compare_perf workflow (#41605)
Testing PR for @zed-zippy

Release Notes:

- N/A
2025-10-30 17:28:03 -06:00
Bennet Bo Fenner
977856407e Add bennetbo to REVIEWERS.conl (#41604)
Release Notes:

- N/A
2025-10-30 22:25:47 +00:00
Mikayla Maki
7070038c92 gpui: Remove type bound (#41603)
Release Notes:

- N/A
2025-10-30 22:17:45 +00:00
Bennet Bo Fenner
b059c1fce7 agent_servers: Expand ~ in path from settings (#41602)
Closes #40796


Release Notes:

- Fixed an issue where `~` would not be expanded when specifiying the
path of an ACP server
2025-10-30 22:14:41 +00:00
Chris
03c6d6285c outline_panel: Fix collapse/expand all entries (#41342)
Closes #39937

Release Notes:

- Fixed expand/collapse all entries not working in singleton buffer mode
2025-10-30 21:48:37 +00:00
Agus Zubiaga
60c546196a zeta2: Expose llm-based context retrieval via zeta_cli (#41584)
Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-10-30 21:41:09 +00:00
Dino
8aa2158418 vim: Improve pasting while in replace mode (#41549)
- Update `vim::normal::Vim.normal_replace` to work with more than one
  character
- Add `vim::replace::Vim.paste_replace` to handle pasting the 
  clipboard's contents while in replace mode
- Update vim's handling of the `editor::actions::Paste` action so that
  the `paste_replace` method is called when vim is in replace mode,
  otherwise it'll just call the regular `editor::Editor.paste` method

Closes #41378 

Release Notes:

- Improved pasting while in Vim's Replace mode, ensuring that the Zed
replaces the same number of characters as the length of the contents
being pasted
2025-10-30 20:33:03 +00:00
Anthony Eid
5ae0768ce4 debugger: Polish breakpoint list UI (#41598)
This PR fixes breakpoint icon alignment to also be at the end of a
rendered entry and enables editing breakpoint qualities when there's no
active session.

The alignment issue was caused by some icons being invisible, so the
layout phase always accounted for the space they would take up. Only
laying out the icons when they are visible fixed the issue.

#### Before
<img width="1014" height="316" alt="image"
src="https://github.com/user-attachments/assets/9a9ced06-e219-4d9d-8793-6bdfdaca48e8"
/>

#### After
[
<img width="502" height="167" alt="Screenshot 2025-10-30 at 3 21 17 PM"
src="https://github.com/user-attachments/assets/23744868-e354-461c-a940-9b6812e1bcf4"
/>
](url)

Release Notes:

- Breakpoint list: Allow adding conditions, logs, and hit conditions to
breakpoints when there's no active session
2025-10-30 16:15:21 -04:00
Anthony Eid
44e5a962e6 debugger: Add horizontal scroll bars to variable list, memory view, and breakpoint list (#41594)
Closes #40360

This PR added heuristics to determine what variable/breakpoint list
entry has the longest width when rendered. I added this in so the
uniform list would correctly determine which item has the longest width
and use that to calculate the scrollbar size.

The heuristic can be off if a non-mono space font is used in the UI; in
most cases, it's more than accurate enough though.

Release Notes:

- debugger: Add horizontal scroll bars to variable list, memory view,
and breakpoint list

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
2025-10-30 19:43:32 +00:00
Lukas Wirth
3944234bab windows: Don't flood windows message queue with gpui messages (#41595)
Release Notes:

- N/A

Co-authored by: Max Brunsfeld <max@zed.dev>
2025-10-30 20:09:32 +01:00
Lukas Wirth
ac3b232dda Reduce amount of foreground tasks spawned on multibuffer/editor updates (#41479)
When doing a project wide search in zed on windows for `hang`, zed
starts to freeze for a couple seconds ultimately starting to error with
`Not enough quota is available to process this command.` when
dispatching windows messages. The cause for this is that we simply
overload the windows message pump due to the sheer amount of foreground
tasks we spawn when we populate the project search.

This PR is an attempt at reducing this.

Release Notes:

- Reduced hangs and stutters in large project file searches
2025-10-30 17:40:56 +00:00
Paweł Kondzior
743180342a agent_ui: Insert thread summary as proper mention URI (#40722)
This ensures the thread summary is treated as a tracked mention with
accessible context.

Changes:
- Fixed `MessageEditor::insert_thread_summary()` to use proper mention
URI format
- Added test coverage to verify the fix

Release Notes:

- Fixed an issue where "New From Summary" was not properly inserting
thread summaries as contextual mentions when creating new threads.
Thread summaries are now inserted as proper mention URIs.
2025-10-30 17:19:32 +01:00
Bennet Fenner
3825ce523e agent_ui: Fix agent: Chat with follow not working (#41581)
Release Notes:

- Fixed an issue where `agent: Chat with follow` was not working anymore

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-10-30 16:03:12 +00:00
Anthony Eid
b4cf7e440e debugger: Get rid of initialize_args in php debugger setup docs (#41579)
Related to issue: #40887

Release Notes:

- N/A

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-10-30 11:47:59 -04:00
Conrad Irwin
bdb2d6c8de Don't skip tests in nightly release (#41573)
Release Notes:

- N/A
2025-10-30 14:59:30 +00:00
Lukas Wirth
0c73252c9d project: Spawn terminal process on background executor (#41216)
Attempt 2 for https://github.com/zed-industries/zed/pull/40774

We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.

Release Notes:

- Improved startup time on systems with slow process spawning
capabilities
2025-10-30 13:55:19 +00:00
Danilo Leal
c7aa805398 docs: Improve the Inline Assistant content (#41566)
Release Notes:

- N/A
2025-10-30 13:53:31 +00:00
Lukas Wirth
94ba24dadd terminal: Properly kill child process on terminal exit (#41562)
Release Notes:

- Fixed terminal processes occasionally leaking

Co-authored by: Jakub <jakub@zed.dev>
2025-10-30 13:40:31 +00:00
Agus Zubiaga
046b43f135 collab panel: Open selected channel notes (#41560)
Adds an action to open the notes for the currently selected channel in
the collab panel, which is mapped to `alt-enter` in all platforms.

Release Notes:

- collab: Add `collab_panel::OpenSelectedChannelNotes` action
(`alt-enter` by default)
2025-10-30 13:10:19 +00:00
Caleb Jasik
426040f08f Add cmd-d shortcut for (terminal) pane::SplitRight (#41139)
Add default keybinding for `pane::SplitRight` in the `Terminal` context
for all platforms.

Closes #ISSUE

Release Notes:

- Added VS Code's terminal split keybindings (`cmd` on MacOS,
`ctrl-shift-5` on Windows and Linux)

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-30 12:28:06 +00:00
Finn Evers
785b5ade6e extension_host: Do not try auto installing suppressed extensions (#41551)
Release Notes:

- Fixed an issue where Zed would try to install extensions specified
under `auto_install_extensions` which were moved into core.
2025-10-30 12:24:32 +00:00
A. Teo Welton
344f63c6ca Language: Fix minor C++ completion label formatting issue (#41544)
Closes #39515

**Details:**
- Improved logic for formatting completion labels, as some (such as
`namespace`) were missing space characters.
- Added extra logic as per stale PR #39533
[comment](https://github.com/zed-industries/zed/pull/39533#issuecomment-3368549433)
ensuring that cases where extra spaces are not necessary (such as
functions) are not affected
- I will note, I was not able to figure out how to fix the coloring of
`namespace` within completion labels as mentioned in that comment, if
someone would provide me with direction I would be happy to look into
that too.

Previous:
<img width="812" height="530" alt="previous"
src="https://github.com/user-attachments/assets/b38f1590-ca2d-489d-9dcb-2d478eb6ed03"
/>

Fixed:
<img width="812" height="530" alt="fixed"
src="https://github.com/user-attachments/assets/020b151d-e5d9-467e-99c1-5b0cab057169"
/>


Release Notes:

- Fixed minor issue where some `clangd` labels would be missing a space
in formatting
2025-10-30 10:47:44 +00:00
claytonrcarter
e30d5998e4 bundle: Restore local install on macOS (#41482)
I just pulled and ran a local build via `script/bundle-mac -l -i` but
found that the resulting bundle wasn't installed as expected. (me:
"ToggleAllDocks!! Wait! Where is it?!") Looking into, it looks like the
`-l` flag was removed in #41392, leaving the `$local_only` var orphaned,
which then left the `-i/$local_install` flag unreachable. I suspect that
this was unintentional, so this PR re-adds the `-l/$local_only` flag to
`script/bundle-mac`.

I ran the build again and confirmed that local install seemed to work as
expected. (ie "ToggleAllDocks!! 🎉")

While here, I also removed the last reference to `$local_arch`, because
all other references to that were removed in #41392.

/cc @osiewicz 

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-29 21:55:02 -06:00
Conrad Irwin
277ae27ca2 Use gh-workflow for tests (take 2) (#41420)
This re-implements the reverted commit 8b051d6cc3.

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-29 21:28:43 -04:00
Danilo Leal
64fdc1d5b6 docs: Fix Codestral section title in edit prediction page (#41509)
Follow up to https://github.com/zed-industries/zed/pull/41507 as I
realized I didn't change the title for this section.

Release Notes:

- N/A
2025-10-30 01:18:43 +00:00
Danilo Leal
992448b560 edit prediction: Add ability to switch providers from the status bar menu (#41504)
Closes https://github.com/zed-industries/zed/issues/41500

<img width="500" height="1122" alt="Screenshot 2025-10-29 at 9  43@2x"
src="https://github.com/user-attachments/assets/ac2a81ad-99bb-43cd-b032-f2485fc23166"
/>

Release Notes:

- Added the ability to switch between configured edit prediction
providers through the status bar menu.
2025-10-29 22:16:13 -03:00
Danilo Leal
802b0e4968 docs: Add content about EP with Codestral (#41507)
This was missing after we added support to Codestral as an edit
prediction provider.

Release Notes:

- N/A
2025-10-29 22:07:38 -03:00
Agus Zubiaga
b8cdd38efb zeta2: Improve context search performance (#41501)
We'll now perform all searches from the context model concurrently, and
combine queries for the same glob into one reducing the total number of
project searches.

For better readability, the debug context view now displays each
top-level regex alternation individually, grouped by its corresponding
glob:

<img width="1592" height="672" alt="CleanShot 2025-10-29 at 19 56 03@2x"
src="https://github.com/user-attachments/assets/f6e8408e-09d6-4e27-ba11-a739a772aa12"
/>

  
Release Notes:

- N/A
2025-10-29 23:06:49 +00:00
Danilo Leal
87f9ba380f settings_ui: Close the settings window when going to the JSON file (#41491)
Release Notes:

- N/A
2025-10-29 19:19:36 -03:00
Danilo Leal
12dae07108 agent_ui: Fix history view background color when zoomed in (#41493)
Release Notes:

- N/A
2025-10-29 17:58:31 -03:00
Danilo Leal
cf0f442869 settings_ui: Fix links for edit prediction items (#41492)
Follow up to the bonus commit we added in
https://github.com/zed-industries/zed/pull/41172/.

Release Notes:

- N/A
2025-10-29 17:58:22 -03:00
Joseph T. Lyons
de9c4127a5 Remove references to how-to blog posts (#41489)
Release Notes:

- N/A
2025-10-29 19:48:50 +00:00
Joseph T. Lyons
e7089fe45c Update release process doc (#41488)
Release Notes:

- N/A
2025-10-29 19:47:32 +00:00
Kirill Bulatov
901b6ffd28 Support numeric tokens in work report LSP requests (#41448)
Closes https://github.com/zed-industries/zed/issues/41347

Release Notes:

- Indicate progress for more kinds of language servers
2025-10-29 19:35:16 +00:00
Danilo Leal
edc380db80 settings_ui: Add edit prediction settings (#41480)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <Ben.kunkle@gmail.com>
2025-10-29 16:18:06 -03:00
Danilo Leal
33adfa443e docs: Add content about adding selection as context in the agent panel (#41485)
Release Notes:

- N/A
2025-10-29 16:17:45 -03:00
Finn Evers
9e5438906a svg_preview: Update preview on every buffer edit (#41270)
Closes https://github.com/zed-industries/zed/issues/39104

This fixes an issue where the preview would not work for remote buffers
in the process.

Release Notes:

- Fixed an issue where the SVG preview would not work in remote
scenarios.
- The SVG preview will now rerender on every keypress instead of only on
saves.
2025-10-29 18:49:39 +01:00
Joseph T. Lyons
fbe2907919 Document zed: reveal log in file manager in crash report template (#41053)
Merge once stable is v0.210 (10/29/2025).

Release Notes:

- N/A
2025-10-29 13:35:23 -04:00
Paul Xu
02f5a514ce gpui: Add justify_evenly to Styled (#41262)
Release Notes:
- gpui: Add `justify_evenly()` to `Styled`.
2025-10-29 12:56:53 -04:00
tidely
4bd4d76276 gpui: Fix GPUI prompts from bleeding clicks into lower windows (#41442)
Closes #41180 

When using the fallback prompt renderer (default on Wayland), clicks
would bleed through into underlying windows. When the click happens to
hit a button that creates a prompt, it drops the
`RenderablePromptHandle` which is contained within `Window`, causing the
`Receiver` which returns the index of the clicked `PromptButton` to
return `Err(Canceled)` even though a button was pressed.

This bug appears in the GPUI `window.rs` example, which can be ran using
`cargo run -p gpui --example window`. MacOS has a native
`PromptRenderer` and thus needs additional code to be adjusted to be
able to reproduce the issue.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-29 12:53:06 -04:00
Cameron Mcloughlin
7a7e820030 settings_ui: Remove OpenSettingsAt from command palette (#41358)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-29 16:29:53 +00:00
Bennet Fenner
0e45500158 prompt_store: Remove unused code (#41473)
Release Notes:

- N/A
2025-10-29 16:27:30 +00:00
Danilo Leal
16c399876c settings_ui: Add ability to copy a link for a given setting (#41172)
Release Notes:

- settings_ui: Added the ability to copy a link to a given setting,
allowing users to quickly open the settings window at the correct
location in a faster way.

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-29 13:15:08 -03:00
Lukas Wirth
3583e129d1 editor: Limit the amount of git processes spawned per multibuffer (#41472)
Release Notes:

- Reduced the number of concurrent git processes spawned for blaming
2025-10-29 16:08:41 +00:00
skewb1k
75b1da0f65 Fix Gruvbox accent colors (#41470)
In #11503, the "accents" option was incorrectly at the top level. This
moves it under the "style" key so it takes effect.

### Before/After
<img width="872" height="499" alt="1761750444_screenshot"
src="https://github.com/user-attachments/assets/2720d576-33b7-42df-9290-7b6a56f5b6a6"
/>
<img width="901" height="501" alt="1761750448_screenshot"
src="https://github.com/user-attachments/assets/bd6b7ccb-77ef-467c-b7cc-a5107b093db5"
/>

Release Notes:

- N/A
2025-10-29 15:59:42 +00:00
Shardul Vaidya
207a202477 bedrock: Add support for Claude Haiku 4.5 model (#41045)
Release Notes:

- bedrock: Added support for Claude Haiku 4.5

---------

Co-authored-by: Ona <no-reply@ona.com>
2025-10-29 16:41:43 +01:00
Yordis Prieto
0871c539ee acp_tools: Add button to clear messages (#41206)
Added a "Clear Messages" button to the ACP logs toolbar that removes all
messages.

## Motivation

When debugging ACP protocol implementations, the message list can become
cluttered with old messages. This feature allows clearing all messages
with a single click to start fresh, making it easier to focus on new
interactions without closing and reopening the ACP logs view.

Release Notes:

- N/A
2025-10-29 16:40:02 +01:00
Hilmar Wiegand
b92664c52d gpui: Implement support for wlr layer shell (#35610)
This reintroduces `layer_shell` support after #32651 was reverted. On
top of that, it allows setting options for the created surface,
restricts the enum variant to the `wayland` feature, and adds an example
that renders a clock widget using the protocol.

I've renamed the `WindowKind` variant to `LayerShell` from `Overlay`,
since the protocol can also be used to render wallpapers and such, which
doesn't really fit with the word.

Things I'm still unsure of:
- We need to get the layer options types to the user somehow, but
nothing from the `platform::linux` crate was exported, I'm assuming
intentionally. I've kept the types inside the module (instead of doing
`pub use layer_shell::*` to not pollute the global namespace with
generic words like `Anchor` or `Layer` Let me know if you want to do
this differently.
- I've added the options to the `WindowKind` variant. That's the only
clean way I see to supply them when the window is created. This makes
the kind no longer implement `Copy`.
- The options don't have setter methods yet and can only be defined on
window creation. We'd have to make fallible functions for setting them,
which only work if the underlying surface is a `layer_shell` surface.
That feels un-rust-y.

CC @zeroeightysix  
Thanks to @wuliuqii, whose layer-shell implementation I've also looked
at while putting this together.

Release Notes:

- Add support for the `layer_shell` protocol on wayland

---------

Co-authored-by: Ridan Vandenbergh <ridanvandenbergh@gmail.com>
2025-10-29 11:32:01 -04:00
Anthony Eid
19099e808c editor: Add action to move between snippet tabstop positions (#41466)
Closes #41407

This solves a problem where users couldn't navigate between snippet
tabstops while the completion menu was open.

I named the action {Next, Previous}SnippetTabstop instead of Placeholder
to be more inline with the LSP spec naming convention and our codebase
names.

Release Notes:

- Editor: Add actions to move between snippet tabstop positions
2025-10-29 15:26:09 +00:00
Ben Kunkle
f29ac79bbd Add myself as a docs reviewer (#41463)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-29 14:21:56 +00:00
Angelo Verlain
797ac5ead4 docs: Update docs for using ESLint as the only formatter (#40679)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <Ben.kunkle@gmail.com>
2025-10-29 13:58:35 +00:00
Lukas Wirth
37c6cd43e0 project: Fix inlay hints duplicatig on chunk start (#41461)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-29 13:52:03 +00:00
Justin Su
01a1b9b2c1 Document Go hard tabs in default settings (#41459)
Closes https://github.com/zed-industries/zed/issues/40876

This is already present in the code but missing from the default
settings, which is confusing.

Release Notes:

- N/A
2025-10-29 09:44:26 -04:00
Anthony Eid
d44437d543 display map: Fix left shift debug panic (#38656)
Closes https://github.com/zed-industries/zed/issues/38558

The bug occurred because TabStopCursor chunk_position.1 is bounded
between 0 and 128. The fix for this was changing the bound to 0 and 127.

This also allowed me to simplify some of the tab stop cursor code to be
a bit faster (less branches and unbounded shifts).

Release Notes:

- N/A
2025-10-29 09:34:33 -04:00
Finn Evers
6be029ff17 Document plain text soft wrap in default settings (#41456)
Closes #41169

This was alredy present in code before, but not documented in the
default settings, which could lead to confusion,

Release Notes:

- N/A
2025-10-29 12:38:18 +00:00
Finn Evers
d59ecf790f ui: Don't show scrollbar track in too many cases (#41455)
Follow-up to https://github.com/zed-industries/zed/pull/41354 which
introduced a small regression.

Release Notes:

- N/A
2025-10-29 12:20:57 +00:00
Lukas Wirth
bde7e55adb editor: Render diagnostic popover even if the source is out of view (#41449)
This happens quite often with cargo based diagnostics which may spawn
several lines (sometimes the entire screen), forcing the user to scroll
up to the start of the diagnostic just to see the hover message is not
great.

Release Notes:

- Fixed diagnostics hovers not working if the diagnostic spans out of
view
2025-10-29 12:18:34 +00:00
Lukas Wirth
b7d31fabc5 vim: Add helix mode toggle (#41454)
Just for parity with vim. Also prevents these toggles from having both
enabled at the same time as that is a buggy state.

Release Notes:

- Added command to toggle helix mode
2025-10-29 12:16:31 +00:00
Finn Evers
1a223e23fb Revert "Support relative line number on wrapped lines (#39268)" (#41450)
Closes #41422

This completely broke line numbering as described in the linked issue
and scrolling up does not have the correct numbers any more.

Release Notes:

- NOTE: The `relative_line_numbers` change
(https://github.com/zed-industries/zed/pull/39268) was reverted and did
not make the release cut!
2025-10-29 11:07:23 +00:00
Xiaobo Liu
f2c03d0d0a gpui: Fix typo in ForegroundExecutor documentation (#41446)
Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-29 10:53:52 +00:00
Lukas Wirth
6fa823417f editor: When expanding first excerpt up, scroll it into view (#41445)
Before

https://github.com/user-attachments/assets/2390e924-112a-43fa-8ab8-429a55456d12

After

https://github.com/user-attachments/assets/b47c95f0-ccd9-40a6-ab04-28295158102e

Release Notes:

- Fixed an issue where expanding the first excerpt upwards would expand
it out of view
2025-10-29 10:32:42 +00:00
Mayank Verma
8725a2d166 go_to_line: Fix scroll position restore on dismiss (#41234)
Closes #35347

Release Notes:

- Fixed Go To Line jumping back to previous position on dismiss
2025-10-29 08:47:48 +00:00
Conrad Irwin
f9c97d29c8 Bump Zed to v0.212 (#41417)
Release Notes:

- N/A
2025-10-29 02:10:33 +00:00
Conrad Irwin
5192233b59 Fix people who use gh instead of env vars (#41418)
Closes #ISSUE

Release Notes:

- N/A
2025-10-29 02:09:22 +00:00
Callum Tolley
d0d7b9cdcd Update docs to use == instead of = (#41415)
Closes #41219

Release Notes:

- Updated docs to use `==` instead of `=` in keymap context.

Hopefully I'm not mistaken here, but I think the docs have a bug in them
2025-10-28 19:34:19 -06:00
Ben Kunkle
8b051d6cc3 Revert "Use gh workflow for tests" (#41411)
Reverts zed-industries/zed#41384

The branch-protection rules work much better when there is a Job that
runs every time and can be depended on to pass, we no longer have this.

Release Notes:

- N/A
2025-10-29 00:37:57 +00:00
John Tur
16d84a31ec Adjust Windows fusion manifests (#41408)
- Declare UAC support. This will prevent Windows from flagging
`auto_update_helper.exe` as a legacy setup program that needs to run as
administrator.
- Declare support for Windows 10. This will stop Windows from applying
various application compatibility profiles.

The UAC policy is not really appropriate to apply to all GPUI
applications (e.g. an installer written in GPUI may want to declare
itself as `requireAdministrator` instead of `asInvoker`). I tried
splitting this into a Zed.exe-only manifest and enabling manifest file
merging, but I ran out of my time-box. We can fix this later if this is
flagged by GPUI users.

Release Notes:

- N/A
2025-10-28 20:21:31 -04:00
Ben Kunkle
4adff4aa8a Use gh workflow for tests (#41384)
Follow up for: #41304

Splits CI tests (cherry-picks and PRs only for now) into separate
workflows using `gh-workflow`. Includes a couple restructures to
- run more things in parallel
- remove our previous shell script based checking to filter tests based
on files changed, instead using the builtin `paths:` workflow filters


Splitting the docs/style/rust tests & checks into separate workflows
means we lose the complete summary showing all the tests in one view,
but it's possible to re-add in the future if we go back to checking what
files changed ourselves or always run everything.

Release Notes:

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

---------

Co-authored-by: Conrad <conrad@zed.dev>
2025-10-28 23:31:38 +00:00
Danilo Leal
7de3c67b1d docs: Improve header on mobile (#41404)
Release Notes:

- N/A
2025-10-28 19:34:13 -03:00
Max Brunsfeld
60bd417d8b Allow inspection of zeta2's LLM-based context retrieval (#41340)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-10-28 22:26:48 +00:00
Danilo Leal
d31194dcf8 docs: Fix keybinding display in /configuring-zed (#41402)
Release Notes:

- N/A
2025-10-28 19:20:49 -03:00
Piotr Osiewicz
4cc6d6a398 ci: Notarize in parallel (different flavor) (#41392)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Conrad Irwin <conrad@zed.dev>
2025-10-28 16:18:17 -06:00
Piotr Osiewicz
b9eafb80fd extensions: Load extension byte repr in background thread (again) (#41398)
Release Notes:

- N/A
2025-10-28 20:54:35 +00:00
Cameron Mcloughlin
5e7927f628 [WIP] editor: Implement next/prev reference (#41078)
Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-28 20:41:44 +00:00
Katie Geer
b75736568b docs: Reorganize introduction (#41387)
Release Notes:
- Remove Windows/Linux from Getting Started
- Consolidate download & system into new Installation page
- Move Remote Dev out of Windows and into Remote Development
- Add Uninstall page
- Add updates page
- Remove addl learning materials from intro
2025-10-28 17:39:40 -03:00
Lukas Wirth
360074effb rope: Prevent stack overflows by bumping rayon stack sizes (#41397)
Thread stacks in rust by default have 2 megabytes of stack which for
sumtrees (or ropes in this case) can easily be exceeded depending on the
workload.

Release Notes:

- Fixed stack overflows when constructing large ropes
2025-10-28 20:21:49 +00:00
Conrad Irwin
b1922b7156 Move Nightly release to gh-workflow (#41349)
Follow up to #41304 to move nightly release over

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-28 13:57:23 -06:00
Danilo Leal
54fd7ea699 agent_ui: Don't show root project in path prefix in @-mention menu (#41372)
This PR hides the worktree root name from the path prefix displayed when
you @-mention a file or directory in the agent panel. Given the tight UI
real state we have, I believe that having the project name in there is
redundant—the project you're in is already displayed in the title bar.
Not only it was the very first word you'd see after the file's name, but
it also made the path longer than it needs to. A bit of a design clean
up here :)

(PS: We still show the project name if there are more than one in the
same workspace.)

Release Notes:

- N/A
2025-10-28 16:15:53 -03:00
Danilo Leal
8564602c3b command palette: Make footer buttons justified to the right (#41382)
Release Notes:

- N/A
2025-10-28 16:15:44 -03:00
Marshall Bowers
e604ef3af9 Add a setting to prevent sharing projects in public channels (#41395)
This PR adds a setting to prevent projects from being shared in public
channels.

This can be enabled by adding the following to the project settings
(`.zed/settings.json`):

```json
{
  "prevent_sharing_in_public_channels": true
}
```

This will then disable the "Share" button when not in a private channel:

<img width="380" height="115" alt="Screenshot 2025-10-28 at 2 28 10 PM"
src="https://github.com/user-attachments/assets/6761ac34-c0d5-4451-a443-adf7a1c42bcd"
/>

Release Notes:

- collaboration: Added a `prevent_sharing_in_public_channels` project
setting for preventing projects from being shared in public channels.
2025-10-28 18:48:07 +00:00
Bennet Fenner
1f5101d9fd agent_ui: Trim whitespace when submitting message (#41391)
Closes #41017

Release Notes:

- N/A
2025-10-28 19:02:39 +01:00
Christian Durán Carvajal
37540d1ff7 agent: Only include tool guidance in system prompt when profile has tools enabled (#40413)
Was previously sending all of the tools to the LLM on the first message
of a conversation regardless of the selected agent profile. This added
extra context, and tended to create scenarios where the LLM would
attempt to use the tool and it would fail since it was not available.

To reproduce, create a new conversation where you ask the Minimal mode
which tools it has access to, or try to write to a file.

Release Notes:

- Fixed an issue in the agent where all tools would be presented as
available even when using the `Minimal` profile

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-28 16:56:39 +00:00
Piotr Osiewicz
d9d24582bb lsp: Fix workspace diagnostics when registered statically (#41386)
Closes #41379

Release Notes:

- Fixed diagnostics for Ruff and Biome
2025-10-28 17:16:42 +01:00
Sushant Mishra
a4a2acfaa5 gpui: Set initial window title on Wayland (#36844)
Closes #36843 

Release Notes:

- Fixed: set the initial window title correctly on startup in Wayland.
2025-10-28 16:52:01 +01:00
Jason Lee
55554a8653 markdown_preview: Improve nested list item prefix style (#39606)
Release Notes:

- Improved nested list item prefix style for Markdown preview.


## Before

<img width="667" height="450" alt="SCR-20251006-rtis"
src="https://github.com/user-attachments/assets/439160c4-7982-463c-9017-268d47c42c0c"
/>

## After

<img width="739" height="440" alt="SCR-20251006-rzlb"
src="https://github.com/user-attachments/assets/f6c237d9-3ff0-4468-ae9c-6853c5c2946a"
/>

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-28 16:44:05 +01:00
Paweł Kondzior
d00ad02b05 agent_ui: Add file name and line number to symbol completions (#40508)
Symbol completions in the context picker now show "SymbolName
filename.txt L123" instead of just "SymbolName". This helps distinguish
between symbols with the same name in different files.

## Motivation

I noticed that the message prompt editor only showed symbol names
without any context, making it hard to use in large projects with many
symbols sharing the same name. The inline prompt editor already includes
file context for symbol completions, so I brought that same UX
improvement to the message prompt editor. I've decided to match the
highlighting style with directory completion entries from the message
editor.

## Changes

- Extract file name from both InProject and OutsideProject symbol
locations
- Add `build_symbol_label` helper to format labels with file context
- Update test expectation for new label format

## Screenshots
Inline Prompt Editor
<img width="843" height="334" alt="Screenshot 2025-10-17 at 17 47 52"
src="https://github.com/user-attachments/assets/16752e1a-0b8c-4f58-a0b2-25ae5130f18c"
/>
Old Message Editor:
<img width="466" height="363" alt="Screenshot 2025-10-17 at 17 31 44"
src="https://github.com/user-attachments/assets/900659f3-0632-4dff-bc9a-ab2dad351964"
/>
New Message Editor:
<img width="482" height="359" alt="Screenshot 2025-10-17 at 17 31 23"
src="https://github.com/user-attachments/assets/bf382167-f88b-4f3d-ba3e-1e251a8df962"
/>


Release Notes:

- Added file names and line numbers to symbol completions in the agent
panel
2025-10-28 16:43:48 +01:00
David Kleingeld
233a1eb46e Open keymap editor from command palette entry (#40825)
Release Notes:

- Adds footer to the command palette with buttons to add or change the
selected actions keybinding. Both open the keymap editor though the add
button takes you directly to the modal for recording a new keybind.


https://github.com/user-attachments/assets/0ee6b91e-b1dd-4d7f-ad64-cc79689ceeb2

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-28 15:14:58 +00:00
Conrad Irwin
c656101862 Use gh-workflow for the run-bundling aspects of CI.yml (#41304)
To help make our GitHub Actions easier to understand, we're planning to
split the existing `ci.yml` into three separate workflows:

* run_bundling.yml (this PR)
* run_tests.yml 
* make_release.yml

To avoid the duplication that this might otherwise cause, we're planning
to write the workflows with gh-workflow, and use rust instead of
encoding logic in YAML conditions.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-28 09:12:04 -06:00
Lionel Henry
3248a05406 Propagate Jupyter client errors (#40886)
Closes #40884

- Make IOPub task return a `Result`
- Create a monitoring task that watches over IOPub, Control, Routing and
Shell tasks.
- If any of these tasks fail, report the error with `kernel_errored()`
(which is already used to report process crashes)


https://github.com/user-attachments/assets/3125f6c7-099a-41ca-b668-fe694ecc68b9

This is not perfect. I did not have time to look into this but:

- When such errors happen, the kernel should be shut down.
- The kernel should no longer appear as online in the UI

But at least the user is getting feedback on what went wrong.

Release Notes:

- Jupyter client errors are now surfaced in the UI (#40884)
2025-10-28 14:45:27 +00:00
Bennet Fenner
baaf87aa23 Fix unit_evals.yml (#41377)
Release Notes:

- N/A
2025-10-28 14:30:47 +00:00
Piotr Osiewicz
8991f58b97 ci: Bump target directory size limit for mac runners (#41375)
Release Notes:

- N/A
2025-10-28 14:12:03 +00:00
Bennet Fenner
2579f86bcd acp_thread: Fix @mention file path format (#41310)
After #38882 we were always including file/directory mentions as
`zed:///agent/file?path=a/b/c.rs`.
However, for most resource links (files/directories/symbols/selections)
we want to use a common format, so that ACP servers don't have to
implement custom handling for parsing `ResourceLink`s coming from Zed.

This is what it looks like now:
```
[@index.js](file:///Users/.../projects/reqwest/examples/wasm_github_fetch/index.js) 
[@wasm](file:///Users/.../projects/reqwest/src/wasm) 
[@Error](file:///Users/.../projects/reqwest/src/async_impl/client.rs?symbol=Error#L2661:2661) 
[@error.rs (23:27)](file:///Users/.../projects/reqwest/src/error.rs#L23:27) 
```

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-28 15:06:19 +01:00
Kirill Bulatov
5423fafc83 Use proper inlay hint range when filtering out hints (#41363)
Follow-up of https://github.com/zed-industries/zed/pull/40183

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-10-28 12:58:38 +00:00
Finn Evers
8a01e48339 ui: Properly update scrollbar track color (#41354)
Closes https://github.com/zed-industries/zed/issues/41334

This comes down to a caching issue..

Release Notes:

- Fixed an issue where the scrollbar track color would not update in
case the theme was changed.
2025-10-28 09:30:58 +00:00
Adir Shemesh
1b43217c05 Add a jetbrains-like Toggle All Docks action (#40567)
The current Jetbrains keymap has `ctrl-shift-f12` set to
`CloseAllDocks`. On Jetbrains IDEs this hotkey actually toggles the
docks, which is very convenient: You press it once to hide all docks and
just focus on the code, and then you can press it again to toggle your
docks right back to how they were. Unlike `CloseAllDocks`, a toggle
means the editor needs to remember the previous docks state so this
necessitated some code changes.

Release Notes:

- Added a `Toggle All Docks` editor action and updated the keymaps to
use it
2025-10-28 08:54:05 +00:00
Kirill Bulatov
1b6cde7032 Revert "Fix ESLint linebreak-style errors by preserving line endings in LSP communication (#38773)" (#41355)
This reverts commit 435eab6896.

This caused format on save to scroll down to bottom instead of keeping
the position.

Release Notes:

- N/A
2025-10-28 08:45:02 +00:00
Finn Evers
bd0bcdb0ed Fix line number settings migration (#41351)
Follow-up to https://github.com/zed-industries/zed/pull/39268

Also updates the documentation.

Release Notes:

- N/A
2025-10-28 08:08:49 +00:00
Anthony Eid
2b5699117f editor: Fix calculate relative line number panic (#41352)
### Reproduction steps

1. Turn on relative line numbers
2. Start a debugging session and hit an active debug line
3. minimize Zed so the editor element with the active debug line has
zero visible rows

#### Before 

https://github.com/user-attachments/assets/57cc7a4d-478d-481a-8b70-f14c879bd858
#### After 

https://github.com/user-attachments/assets/19614104-f9aa-4b76-886b-1ad4a5985403

Release Notes:

- debugger: Fix a panic that could occur when minimizing Zed
2025-10-28 08:08:02 +00:00
John Tur
0857ddadc5 Always delete OpenConsole.exe on Windows uninstall (#41348)
By default, the uninstaller will only delete files that were written by
the original installer. When users upgrade Zed, these new
OpenConsole.exe files will have been written by auto_upgrade_helper, not
the installer. Force them to be deleted on uninstall, so they do not
hang around.

Release Notes:

- N/A
2025-10-28 07:14:56 +00:00
Coenen Benjamin
3e3618b3ff debugger: Add horizontal scrollbar for frame item and tooltip for variables (#41261)
Closes #40360 

I first tried to use an horizontal scrollbar also for variables but as
it's a List that can be collapsed it didn't feel natural so I ended up
adding a tooltip to have to full value of the variable when you hover
the item. (cf screenshots).




https://github.com/user-attachments/assets/70c4150d-b967-46b0-8720-82bbad9c9cca




https://github.com/user-attachments/assets/d0b52189-b090-4824-8eb7-2f455fa58b33



Release Notes:

- Added: for debugger UI horizontal scrollbar for frame item and tooltip
for variables.

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-10-28 03:04:21 -04:00
Anthony Eid
2163580b16 Fix tab switcher spacing bug (#41329)
The tab switcher render matches calls each workspace item's
`Item::tab_content` function that can return an element of variable
size. Because the tab switcher was using a uniform list under the hood,
this would cause spacing issues when tab_contents elements had different
sizes.

The fix is by changing the picker to use a material list under the hood.

Release Notes:

- N/A
2025-10-28 03:00:55 -04:00
h-michaelson20
4778d61bdd Fix copy button not working for REPL error output (#40669)
## Description

Fixes the copy button functionality in REPL interactive mode error
output sections.

When executing Python code that produces errors in the REPL (e.g.,
`NameError`), the copy button in the error output section was
unresponsive. The stdout/stderr copy button worked correctly, but the
error traceback section copy button had no effect when clicked.

Fixes #40207

## Changes

Modified the following:
src/outputs.rs: Fixed context issues in render_output_controls by
replacing cx.listener() with simple closures, and added custom button
implementation for ErrorOutput that copies/opens the complete error
(name + message + traceback)
src/outputs/plain.rs: Made full_text() method public to allow access
from button handlers
src/outputs/user_error.rs: Added Clone derive to ErrorView struct and
removed a couple pieces of commented code

## Why This Matters

The copy button was clearly broken and it is useful to have for REPL
workflows. Users could potentially need to copy error messages for a
variety of reasons.

## Testing

See attached demo for proof that the fix is working as intended. (this
is my first ever commit, if there are additional test cases I need to
write or run, please let me know!)


https://github.com/user-attachments/assets/da158205-4119-47eb-a271-196ef8d196e4

Release Notes:

- Fixed copy button not working for REPL error output
2025-10-28 06:52:53 +00:00
Lukas Wirth
46c5d515bf recent_projects: Surface project opening errors to user (#41308)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-28 06:44:44 +00:00
Xiaobo Liu
73bd12ebbe editor: Optimize selection overlap checking (#41281)
Replace the binary search approach with a more efficient partition_point
method for checking selection overlaps. This eliminates the need to
collect and sort selection ranges separately, reducing memory allocation
and improving performance when handling multiple selections.

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-28 07:40:38 +01:00
versecafe
cc829e7fdb remote: 60 second timeout on initial connection (#41339)
Closes #41316

Release Notes:

- Fixes #41316 

> This keeps the 5 second heartbeat behavior for after the connection is
made
2025-10-28 06:58:35 +01:00
Jakub Konka
fdf5bf7e6a remote: Support building x86_64-linux-musl proxy in nix-darwin (#41291)
This change adds two things to our remote server build
process:
1. It now checks if all required tooling is installed before using it or installing it on demand. This includes checks for `rustup` and `cargo-zigbuild` in your `PATH`.
2. Next, if `ZED_BUILD_REMOTE_SERVER` contains `musl` and `ZED_ZSTD_MUSL_LIB`
is set, we will pass its value (the path) to `cargo-zigbuild` as `-C
link-arg=-L{path}`.

Release Notes:

- N/A
2025-10-28 06:58:09 +01:00
John Tur
c94536a2d6 Fix Windows updater failing to copy OpenConsole.exe (#41338)
Release Notes:

- N/A
2025-10-28 05:10:57 +00:00
John Tur
9db474051b Reland Windows Arm64 builds in CI (#40855)
Release Notes:

- windows: Added builds for Arm64 architecture

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-27 23:59:34 -04:00
Lukas
1d0bb5a7a6 Make 'wrap selections in tag' work with line selection mode (#41030)
The `wrap selections in tag` action currently did not take line_mode
into account, which means when selecting lines with `shift-v`, the
start/end tags would be inserted into the middle of the selection (where
the cursor sits)


https://github.com/user-attachments/assets/a1cbf3da-d52a-42e2-aecf-1a7b6d1dbb32

This PR fixes this behaviour by checking if the selection uses line_mode
and then adjusting start and end points accordingly.

NOTE: I looked into amending the test cases for this, but I am unsure
how to express line mode with range markers. I would appreciate some
guidance on this and then I am happy to add test cases.

After:


https://github.com/user-attachments/assets/a212c41f-b0db-4f50-866f-fced7bc677ca

Release Notes:

- Fixed `Editor: wrap selection in tags` when in vim visual line mode

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-28 03:07:41 +00:00
Josh Piasecki
6823847978 Add buffer_search_deployed key context (#41193)
Release Notes:

- Pane key context now includes 'buffer_search_deployed' identifier

The goal of this PR is to add a new identifier in the key context that
will let the user target when the BufferSearchBar is deployed even if
they are not focused on it.

requested in #36930

Same rational as #40454 this will allow users to make more flexible
keybindings, by including some additional information higher up the key
context tree.

i thought adding this context to `Pane` seemed more appropriate than
`Editor` since `Terminal` also has a `BufferSearchBar`; however, I ran
into some import issues between BufferSearchBar, Search, Pane, and
Workspace which made it difficult to implement adding this context
directly inside `Pane`'s render function.

instead i added a new method called `contributes_context` to
`ToolbarItem` which will allow any toolbar item to add additional
context to the `Pane` level, which feels like it might come in handy.

here are some screen shots of the context being displayed in the Editor
and the Terminal

<img width="1653" height="1051" alt="Screenshot 2025-10-25 at 14 34 03"
src="https://github.com/user-attachments/assets/21c5b07a-8d36-4e0b-ad09-378b12d2ea38"
/>

<img width="1444" height="1167" alt="Screenshot 2025-10-25 at 12 32 21"
src="https://github.com/user-attachments/assets/86afe72f-b238-43cd-8230-9cb59fb93b2c"
/>
2025-10-27 20:37:37 -06:00
Conrad Irwin
3a7bdf43f5 Fix unwrap in branch diff (#41330)
Closes #ISSUE

Release Notes:

- N/A
2025-10-28 02:24:54 +00:00
Thomas Heartman
d5e297147f Support relative line number on wrapped lines (#39268)
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.

**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.

**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence where the relative number shown
always matches the `<n>j/k` distance needed.

**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios

Also explained an discussed in
https://github.com/zed-industries/zed/discussions/25733.

Release Notes:

Release Notes:

- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-27 20:20:45 -06:00
Lukas Wirth
1c4923e1c8 gpui: Add a timeout to #[gpui::test] tests (#41303)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-28 01:37:41 +00:00
Agus Zubiaga
ee80ba6693 zeta2: LLM-based context gathering (#41326)
Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Max Brunsfeld <max@zed.dev>
2025-10-27 22:54:42 +00:00
Abdelhakim Qbaich
fd306c97f4 Fix default settings entry for basedpyright (#40812)
If you set `{"basedpyright": {"analysis": {"typeCheckingMode":
"off"}}}`, you will notice that it doesn't actually work, but
`{"basedpyright.analysis": {"typeCheckingMode": "off"}}` does.

Made the change on how the default is being set.

Release Notes:

- N/A
2025-10-27 22:57:04 +01:00
Anthony Eid
b3483a157c settings_ui: Fix tabbing in settings UI main page content (#41209)
Tabbing into the main page would move focus to the navigation panel
instead of auto-scrolling. This PR fixes that bug.


Release Notes:

- N/A
2025-10-27 17:30:34 -04:00
Conrad Irwin
ac66e912d5 Don't upload symbols to DO anymore (#41317)
Sentry now symbolicates stack traces, no need to make our builds slower

Release Notes:

- N/A
2025-10-27 15:22:53 -06:00
Anthony Eid
5e37a7b78c Fix shell welcome prompt showing up in Zed's stdout (#41311)
The bug occurred because `smol::process::Command::from(_)` doesn't set
the correct fields for stdio markers. So moving the stdio configuration
after converting to a `smol` command fixed the issue.

I added the `std::process::Command::{stdout, stderr, stdin}` functions
to our disallowed list in clippy to prevent any bugs like this appearing
in the future.

Release Notes:

- N/A
2025-10-27 20:04:36 +00:00
Cameron Mcloughlin
00278f43bb Add Rust convenience Tree-sitter injections for common crates (#41258) 2025-10-27 19:58:04 +00:00
Mikayla Maki
ac3d2a338b Tune the focus-visible heuristics a bit (#41314)
This isn't quite right yet, as a proper solution would remember the
input modality at the moment of focus change, rather than at painting
time. But this gets us close enough for now.

Release Notes:

- N/A
2025-10-27 19:53:53 +00:00
Conrad Irwin
58f07ff709 Try gh-workflow (#41155)
Experimenting with not writing YAML by hand...

Release Notes:

- N/A
2025-10-27 13:39:01 -06:00
Danilo Leal
db0f7a8b23 docs: Mention the settings and keymap UIs more prominently (#41302)
Release Notes:

- N/A
2025-10-27 15:17:11 -03:00
Marshall Bowers
f5ad4c8bd9 Remove PostgREST (#41299)
This PR removes the PostgREST containers and deployments, as we're no
longer using it.

Release Notes:

- N/A
2025-10-27 13:27:59 -04:00
Piotr Osiewicz
172984978f collab: Add 'Copy channel notes link' to right click menu on channels (#41298)
Release Notes:

- Added a "Copy Channel Notes Link" action to right-click menu of Zed
channels.
2025-10-27 17:00:36 +00:00
Mohin Hasin Rabbi
ba26ca4aee docs: Document per-release channel configuration (#40833)
## Summary
- Document the `stable`/`preview`/`nightly` top-level keys that let
users scope settings overrides per release channel.
- Provide an example `settings.json` snippet and call out that overrides
replace array values rather than merging them.
- Mention that UI-driven changes edit the root config so per-channel
blocks might need manual updates.

## Testing
- Not run (docs only).

Fixes #40458.

Release Notes:

- N/A

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-10-27 16:50:32 +00:00
Finn Evers
1ae8e0c53a keymap_editor: Clear action query when showing matching keybindings (#41296)
Closes https://github.com/zed-industries/zed/issues/41050

Release Notes:

- Fixed an issue where showing matching keystrokes in the keybind editor
modal would not clear an active text query.
2025-10-27 17:49:13 +01:00
pedrxd
a70f80df95 Add support for changing the Codestral endpoint (#41116)
```json
  "edit_predictions": {
    "codestral": {
      "api_url": "https://codestral.mistral.ai",
      "model": "codestral-latest",
      "max_tokens": 150
    }
  },
```

Release Notes:

- Added support for changing the Codestral endpoint. This was discussed
at #34371.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-27 16:00:27 +00:00
Dino
821a4880bd cli: Use --wait to prefer focused window (#41051)
Introduce a new `prefer_focused_window` field to the
`workspace::OpenOptions` struct that, when provided, will make it so
that Zed opens the provided path in the currently focused window.

This will now automatically be set to true when the `--wait` flag is
used with the CLI.

Closes #40551 

Release Notes:

- Improved the `--wait` flag in Zed's CLI so as to always open the
provided file in the currently focused window

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-27 15:58:41 +00:00
Danilo Leal
7f17d4b61d Add Tailwind CSS and Ruff to built-in features list (#41285)
Closes https://github.com/zed-industries/zed/issues/41168

This PR adds both Tailwind CSS and Ruff (linter for Python) as built-in
features; a banner mentioning this should show up now for these two when
searching for them in the extensions UI.

There will also be a corresponding zed.dev site PR adding a "Ruff is
built-in" card to the zed.dev/extensions page.

Release Notes:

- N/A
2025-10-27 12:38:56 -03:00
Bennet Fenner
ebf4a23b18 Use paths::external_agents_dir (#41286)
We were not actually using `paths::agent_servers` and were manually
constructing the path to the `external_agents` folder in a few places.

Release Notes:

- N/A
2025-10-27 15:24:44 +00:00
Adam Richardson
370d4ce200 rope: Micro optimize the creation of masks (#41132)
Using compiler explorer I saw that the compiler wasn't clever enough to
optimise away the branches in the masking code. I thought the compiler
would have a better chance if we always branched, which [turned out to
be the case](https://godbolt.org/z/PM594Pz18).

Running the benchmarks the biggest benefit I saw was:
```
push/65536              time:   [2.9067 ms 2.9243 ms 2.9417 ms]
                        thrpt:  [21.246 MiB/s 21.373 MiB/s 21.502 MiB/s]
                 change:
                        time:   [-8.3452% -7.2617% -6.2009%] (p = 0.00 < 0.05)
                        thrpt:  [+6.6108% +7.8303% +9.1050%]
                        Performance has improved.
```
But I did also see some regressions:
```
slice/4096              time:   [66.195 µs 66.815 µs 67.448 µs]
                        thrpt:  [57.915 MiB/s 58.464 MiB/s 59.012 MiB/s]
                 change:
                        time:   [+3.7131% +5.1698% +6.6971%] (p = 0.00 < 0.05)
                        thrpt:  [-6.2768% -4.9157% -3.5802%]
                        Performance has regressed.
```

Release Notes:

- N/A
2025-10-27 16:16:16 +01:00
Richard Feldman
2284131bfc Add @rtfeldman to reviewers list (#41127)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-27 11:13:12 -04:00
Ben Kunkle
2f7045f724 settings_ui: Show migration banner (#41112)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Danilo <danilo@zed.dev>
2025-10-27 10:13:26 -04:00
Jakub Konka
5d359ea2f2 remote: Fall back to SCP if SFTP fails (#41255)
Fixes https://github.com/zed-industries/zed/issues/41260

After experimenting and reading through the implementation of OpenSSH
stack on Windows, it looks like batch mode precludes use of passwords.
In the listing
b8c08ef9da/sshconnect2.c (L417),
the last field of each `Authmode` struct is a pointer to the config
value that *disables* that particular mode. In this case, `keyboard`
(interactive) and `password` modes are both disabled if batch mode is
used. We should therefore fall back to `scp` if `sftp` fails rather than
to fail outright.

Release Notes:

- N/A
2025-10-27 15:01:13 +01:00
Ben Kunkle
72c6a74505 keymap_editor: Fix updating empty keymap (#40909)
Closes #40898

Release Notes:

- Fixed an issue where attempting to add or update a key binding in the
keymap editor with an empty `keymap.json` file would fail
2025-10-27 09:56:54 -04:00
Alvaro Parker
941033e373 settings_ui: Add vim motions on navigation menu (#39988)
Closes #ISSUE

Release Notes:

- Added vim motions on settings navigation menu
2025-10-27 09:53:37 -04:00
Piotr Osiewicz
83884ca36f lsp: Support tracking multiple registrations of diagnostic providers (#41096)
Closes #40966
Closes #41195
Closes #40980 

Release Notes:

- Fixed diagnostics not working with basedpyright/pyright beyond an
initial version of the document

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-27 14:52:23 +01:00
Kirill Bulatov
f503c65924 Make "About Zed" menu entry to work when all Zed windows are closed (#41272)
Closes https://github.com/zed-industries/zed/issues/41267

The only downside would be the fact that a Zed window will appear behing
the version modal, but this is a limitation for all "window-less"
actions currently.

Release Notes:

- Made "About Zed" menu entry to work when all Zed windows are closed
2025-10-27 11:33:50 +00:00
Lukas Wirth
c1cd371786 fix: Edit predictions using stale snapshot (#41271)
Release Notes:

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

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-27 11:00:37 +00:00
Ben Brandt
7cb2d83608 acp: Start sending Client Info to the Agent (#41265)
Updates to acp crate 0.7, which allows us to send information about the
client to the Agent.
In the future, we can also use the AgentInfo on the response for
internal metrics.

Release Notes:

- N/A
2025-10-27 10:05:50 +00:00
Lukas Wirth
ae3abf50d8 editor: Fix panics in CursorPosition::update_position (#41237)
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/39857. As for the exact
reason this causes this issue I am not yet sure will investigate (as per
the todos in code)

Fixes ZED-23R

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-27 08:26:39 +00:00
deltamaya
edf2ec7d4c editor: Make hover popover delay strictly respect hover_popover_delay setting (#41149)
Previously, the hover popover delay was implemented using two
overlapping timers, which caused the minimum delay to always be at least
HOVER_REQUEST_DELAY_MILLIS, regardless of the hover_popover_delay
setting.
This change updates the logic to wait for hover_popover_delay only,
ensuring the total delay is always equals to hover_popover_delay . As a
result, the hover popover now appears after the intended delay, matching
the user's configuration more accurately.

Release Notes:

- Improved hover popover respecting settings delay correctly
2025-10-27 08:01:43 +00:00
Marshall Bowers
2919e1976a docs: Display action names in backticks instead of quotes (#41248)
This PR fixes some instances where we were displaying action names in
quotes instead of in backticks.

Also fixed some mentions of using an action to open the settings file,
as this has changed after the release of the settings UI.

Release Notes:

- N/A
2025-10-27 00:50:31 +00:00
Lukas Wirth
fd3ca0303f workspace: Handle non-cloneable items better (#41215)
When trying to split and clone a non clone-able workspace item we now
attempt split and move instead of doing nothing. Additionally we disable
the split menu buttons if we can't split the active item at all.

Release Notes:

- Improved handling of unsplittable panes
2025-10-26 13:24:26 +00:00
Lukas Wirth
61e4a1d16a settings: Fix out of bounds index (#41227)
Fixes ZED-2J8

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-26 12:57:44 +00:00
Lukas Wirth
2471ae451c Pre-initialize global rayon threadpool (#41226)
We only use it a handful of times and the default amount of threads
(logical cpu core number) its spawns is overkill for this. This also
gives the threads names oppose to being labeled `<unknown>`

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-26 12:44:34 +00:00
Lukas Wirth
d6b31d8932 gpui: Fix TextLayout::layout producing invalid text runs (#41224)
The issues is that the closure supplied to `request_measured_layout`
could be run multiple times with differing `known_dimensions`. This in
turn will mean we truncate the font runs once, inserting a multibyte
char at the end but then in the next iteration use those truncated runs
for possible the original untruncated string which has multibyte
characters overlapping the now truncated run end resulting in a faulty
utf8 boundary index.

Solution to this is simple, truncate a clone of the runs when needed
instead of modifying the original.

Fixes https://github.com/zed-industries/zed/issues/36925
Fixed ZED-2FF
Fixes ZED-2KM
Fixes ZED-2KK
Fixes ZED-1FF
Fixes ZED-255
Fixes ZED-2JD
Fixes ZED-2FX
Fixes ZED-2K2
Fixes ZED-2JX
Fixes ZED-2GE
Fixes ZED-2FC
Fixes ZED-2GD
Fixes ZED-2HY
Fixes ZED-2HR
Fixes ZED-2FN
Fixes ZED-2GT
Fixes ZED-2FK
Fixes ZED-2EY
Fixes ZED-27E
Fixes ZED-272
Fixes ZED-2EM
Fixes ZED-2CC
Fixes ZED-29V
Fixes ZED-25B
Fixes ZED-257
Fixes ZED-24R
Fixes ZED-24Q
Fixes ZED-23Z
Fixes ZED-227

Release Notes:

- Fixed a crash in text shaping when truncating rendered text
2025-10-26 13:00:52 +01:00
Lukas Wirth
95ad7a6cae gpui: Drop unnecessary use of StringIndexConverter (#41221)
Might help with ZED-1FF

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-26 10:35:33 +00:00
Kirill Bulatov
54a7da364c Fix task terminal split (#41218)
Re-lands https://github.com/zed-industries/zed/pull/40824

Release Notes:

- N/A
2025-10-26 10:01:40 +00:00
Lukas Wirth
003a39740a Try working around spurious rebuild bug in cargo (#41015)
We've been seeing a lot of weird constant rebuilds recently with
rust-anaylzer's check, either with cargo thinking build scripts are too
new timestamp wise or all fingerprints having gone missing somehow
(???). Reading through some related bug reports hints at disabling
incremental potentially working around this for now so let's test that
out

cc https://github.com/rust-lang/cargo/issues/16104

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-26 10:38:59 +01:00
Lukas Wirth
33ec545d1f workspace: Make Item::clone_on_split async (#41211)
Split out from https://github.com/zed-industries/zed/pull/40774 to
reduce the size of the reland of that PR (once I figure out the cause of
the issue)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-26 08:46:37 +00:00
phpjit
b7cc597d28 languages: Add inline values support for JavaScript, TypeScript, and TSX (#40914)
Adds debugger inline values support for JavaScript, TypeScript, and TSX languages. 

Release Notes:

- debugger: Add inline value support for Javascript, TypeScript, and TSX

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-10-25 22:51:59 +00:00
Anthony Eid
ef306245e0 settings_ui: Add telemetry (#40973)
1. Settings Viewed: Whenever someone opens or refocus the settings ui
via an action
2. Settings Closed: When the settings ui window is closed 
3. Settings Navigation Clicked: The category and subcategory that a user
clicked on
4. Settings Error Shown: Whenever an error banner shows up
5. Settings Changed: The setting a user changed through the UI


cc: @katie-z-geer 

Release Notes:

- N/A
2025-10-25 22:43:16 +00:00
Abdelhakim Qbaich
615d1d7ab4 Avoid menu clipping with debugger welcome panel on resize (#41177)
Before:
<img width="1345" height="58" alt="before"
src="https://github.com/user-attachments/assets/cba79bba-6437-47fd-ad2b-b4ceaf03ef5d"
/>

After:
<img width="1756" height="90" alt="after"
src="https://github.com/user-attachments/assets/3442c7f6-a4dc-4c4c-92c5-2ca5ad9beb0d"
/>


Release Notes:

- N/A
2025-10-25 18:26:13 -04:00
Remco Smits
45983e11e9 markdown: Add support for HTML lists (#39553)
This PR adds support for **HTML** both ordered and unordered lists.

<img width="1441" height="805" alt="Screenshot 2025-10-07 at 21 40 17"
src="https://github.com/user-attachments/assets/8a54aec1-75aa-48fb-bf9f-c153cca48682"
/>

See code example used inside the screenshot:

```html
<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item
    <ol>
      <li>Indented item</li>
      <li>Indented item</li>
    </ol>
  </li>
  <li>Fourth item</li>
</ol>
```

TODO: 
- [x] Add examples
- [x] update description (screenshots, add small description)
- [x] fix displaying of nested lists

cc @bennetbo

Release Notes:

- markdown preview: Added support for HTML lists

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-25 20:15:17 +00:00
Bennet Fenner
06e1db54a7 codex: Delete older versions after installing new one (#41191)
Release Notes:

- codex: Fixed an issue where downloading a new version would not delete
older versions
2025-10-25 19:19:57 +00:00
Karl-Erik Enkelmann
8e09256c8c Handle itemDefaults in CompletionList according to spec (#41187)
Closes https://github.com/zed-extensions/java/issues/101

Previously Zed did not handle resolving CompletionList with itemDefaults
correctly according to the
[LSP-Spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#:~:text=/**%0A%09%20*%20The%20edit%20text,%3F%3A%20string%3B).
When a `CompletionList` is provided by the server, that includes ranges
as `itemDefaults`, the field to use for the snippet to insert as
`newText` is in the `textEditText` field, with a fallback to `label` if
that does not exist (`insertText` is ignored).

Release Notes:

- Fixed Java language severs' completion defaults handling on Zed's side
2025-10-25 22:15:32 +03:00
Remco Smits
79ef10bfc3 markdown: Add support for HTML table column align attribute (#41163)
This PR allows you to define `align="right"` for example to change the
default alignment on **HTML** table columns. This PR also refactors
where we store the alignments in order to make it so you can define it
column based instead of only row based.

See that the `Revenue` column is left aligned instead of the default
`centered`.

**Result**

<img width="1161" height="177" alt="Screenshot 2025-10-25 at 11 01 38"
src="https://github.com/user-attachments/assets/94bda4f0-00c1-4726-a3bd-99b3f2573ef5"
/>


**Code example**

```HTML
<table>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2" align="left">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>
```

Release Notes:

- markdown preview: Add support for `HTML` table column `align`
attribute
2025-10-25 20:12:05 +02:00
Remco Smits
986ca19516 markdown: Fix HTML tables with mismatching columns (#41108)
Follow-up: https://github.com/zed-industries/zed/pull/39898

Right now, we don't fill the empty column when the current row count is
less than the max row count. This PR fixes that by filling it with an
empty cell. So the table columns don't flow in the wrong direction, as
you can see inside the first screenshot.

**Before**
<img width="1095" height="182" alt="Screenshot 2025-10-24 at 16 09 02"
src="https://github.com/user-attachments/assets/e3abf24e-c190-4bd7-b43a-39f2f01ecd1c"
/>

**After**
<img width="1165" height="178" alt="Screenshot 2025-10-24 at 16 19 17"
src="https://github.com/user-attachments/assets/427c25f9-82a7-498b-a1a2-d71e4c288fe5"
/>

**Code example**
```html
<table>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
        <td>+99%</td> // extra column here
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>
```

**Note** there are no release notes, as the previous PR didn't get
released yet.

Release Notes:

- N/A
2025-10-25 20:09:56 +02:00
Douglas Leão
42d8d77938 Update GDScript documentation (#41142)
Some information in the GDScript documentation page was outdated (like
it still treats Zed if it was a macOS exclusive app) or some details
were missing.

- The `zed-gdscript` URL has been updated with the new owner.
- Pre-requisites added (with netcat included).
- Godot installation steps removed, it's now listed in the
pre-requisites.
- Setup steps simplified and reworded.

The note at the bottom was removed as I didn't see the issue in my end.

Release Notes:

- N/A
2025-10-25 15:59:04 +03:00
Julia Ryan
e4c90be58a Add more detailed error for remove_file (#41147)
This should help us debug #40958.

Release Notes:

- N/A
2025-10-25 02:02:06 +00:00
Julia Ryan
7433d85458 Notify on opening WSL paths outside of wsl (#40195)
Closes #27340

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-25 01:44:32 +00:00
Kirill Bulatov
1dffdea27c Fix duplicate hints in multi buffer excerpts during editing and scrolling (#41143)
Follow-up of https://github.com/zed-industries/zed/pull/40183
Closes https://github.com/zed-industries/zed/issues/24798

Release Notes:

- N/A
2025-10-24 23:08:19 +00:00
Mohin Hasin Rabbi
1f40a3c70e Document global debug.json usage and fix REPL error copy (#40836)
## Overview
- document how to keep a per-user debug.json so global launch tasks show
up everywhere (Fixes #39849)
- sanitize REPL terminal text before copying so error blocks can be
copied and opened in buffers (Fixes #40207)

## Design Decisions
- reused the existing user debug file (paths::debug_scenarios_file) and
pointed docs at the zed::OpenDebugTasks command to stay aligned with the
settings UX
- extract a sanitize helper inside TerminalOutput::full_text to strip
\r/null padding while keeping indentation intact, then join the cleaned
lines so clipboard and buffers get readable text

## Testing
- Not run (cargo is unavailable in this environment)

Fixes #39849.
Fixes #40207.
2025-10-25 01:13:53 +03:00
Somtoo Chukwurah
92c31278ee Add support for GitHub Copilot /responses endpoint (#40762)
Add support for GithubCopilot /responses endpoint. This gives the
copilot chat provider the ability to use the new GPT-5 codex model and
any other model that lacks support for /chat/copmletions endpoint.

Closes #38858 

Release Notes:

- Add support for GithubCopilot /responses endpoint.

# Added
1. copilot_response.rs that has the /response endpoint types
2. uses response endpoint if model does not support /chat/completions.
3. new into_copilot_response() to map LanguageCompletionEvents to
Request.
4. new map_stream() to map response stream event to
LanguageCompletionEvents and tests.
5. Fixed a bug where trying to parse response for non streaming for
/chat/completion was failing

# Notes
There is a pr open - https://github.com/zed-industries/zed/pull/39989
for adding /response support for OpenAi and OpenAi compatible API.
Altough they share some similarities (copilot api seems to mirror openAi
directly) ive simplified some stuff and tried to keep it the same with
the vscode-chat implementation where possible. There might be a case for
code reuse but i think keeping them separate for now should be ok.

# Tool Calls
<img width="716" height="670" alt="Screenshot from 2025-10-15 17-12-30"
src="https://github.com/user-attachments/assets/14e88a52-ba8b-4209-8f78-73d15034b1e0"
/>

# Image
<img width="923" height="494" alt="Screenshot from 2025-10-21 02-02-26"
src="https://github.com/user-attachments/assets/b96ce97c-331e-45cb-b5b1-7aa10ed387b4"
/>
2025-10-24 13:25:58 -06:00
Danilo Leal
a7c5b8d78b Add ResetAllZoom and ResetAgentZoom actions (#41124)
Very often, when I'm testing or playing around with the zoom feature,
including the agent panel, I find myself missing one quick action that
would bring everything back to normal. That's what `ResetAllZoom` does.
If you have customized your zoom level in all areas of Zed, that action
returns everything to its default state. Similarly, if you're playing
around with zoom just in the agent panel, `ResetAgentZoom` does the same
in that context.

Release Notes:

- Added the `ResetAllZoom` and `ResetAgentZoom ` actions, allowing to
return the zoom level across the whole app and/or just in the agent
panel to its default/original value.
2025-10-24 18:11:39 +00:00
Conrad Irwin
d1b28e6431 REVIEWERS.conl (#40533)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Kate <work@localcc.cc>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-10-24 11:50:49 -06:00
Danilo Leal
ecf179df0c agent: Scale the agent UI and buffer font proportionally (#41121)
Closes https://github.com/zed-industries/zed/issues/41094

This PR adds the `agent_buffer_font_size` settings to be scaled in the
same proportion as the agent panel's UI font size, which was the only
setting that was being accounted for. This is something that I forgot to
do when we broke down the agent panel's font size controls into these
two values.

Release Notes:

- agent: Fixed an issue where the agent panel's buffer and UI font size
wouldn't scale proportionally.
2025-10-24 14:45:32 -03:00
Ben Kunkle
e54c9da2a8 Fix include ignored migration rerunning (#41114)
Closes #ISSUE

Release Notes:

- Fixed an issue where having a correct `file_finder.include_ignored`
setting would result in failed to migrate errors
2025-10-24 13:06:29 -04:00
Jakub Konka
bcbc6a330e Use ShellKind::try_quote whenever we need to quote shell args (#41104)
Re-reverts
8f4646d6c3
with fixes

Release Notes:

- N/A
2025-10-24 18:19:53 +02:00
feeiyu
f213f4bcc8 Fix duplicate process entries in WSL debug attach list (#40591)
Closes #40589

Replaced `System::new_all()` with `System::new_with_specifics` to fetch
only essential process information and exclude non-main threads from the
process list

after fix:
<img width="641" height="474" alt="image"
src="https://github.com/user-attachments/assets/32335552-2f7a-4317-8c01-f37b2eadfdc1"
/>


Release Notes:

- Fix duplicate process entries in WSL debug attach list
2025-10-24 11:49:30 -04:00
Dino
0ee6ca1767 project: Fix inability to open file after save as (#41012)
Update `project::buffer_store::BufferStore.save_buffer_as` in order to
correctly update the `path_to_buffer_id` hash map, ensuring that the
currently open file's path is dissociated from the buffer's id, to
prevent the new buffer from being open when trying to open the original
file.

Closes #29783 

Release Notes:

- Fixed issue where using `workspace: save as` would prevent users from
opening the original file from which the new file was created

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-10-24 15:27:34 +01:00
ToBinio
762082b15a ui_input: Don’t focus previous on decrement in NumberField (#41095)
This PR removes the behavior that the number_field changes focus to the
previous element when using the decrement button.

I mainly noticed this while decreasing the tab-size of a language, since
it there closes the page...

Please note that I am unsure what if any purpose this code has.
I was unable to find a use case and since it is not present in the
`increment_handler` I guess it should never have been here

---

Release Notes:

* Fixed wrongly focus previous element on number_field decrement
2025-10-24 14:03:01 +00:00
Joseph T. Lyons
fcd690d04c Enable source.organizeImports.ruff by default for Python (#41103)
Release Notes:

- Enabled automatic import organization, via
[ruff](https://github.com/astral-sh/ruff), when saving Python files. To
disable this, use:

```json
"Python": {
  "code_actions_on_format": { "source.organizeImports.ruff": false }
}
```
2025-10-24 13:44:23 +00:00
Richard Feldman
8de4b360e8 ACP Extensions (#40663)
Adds the ability to install ACP agents via extensions

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-24 07:52:51 -04:00
Bennet Fenner
7644e797fe agent: Fix edit_agent evals (#40921)
Release Notes:

- N/A
2025-10-24 07:48:14 +00:00
Danilo Leal
4fb91135d1 ui: Use focus_visible method for some components (#41077)
Using the cool, [recently
added](https://github.com/zed-industries/zed/pull/40940) `focus-visible`
support in some components. This will be particularly nice in the
settings UI, as it will not display the focus styles if you're
navigating it with a pointer device as opposed to the keyboard.

Release Notes:

- N/A
2025-10-24 05:47:53 +00:00
Conrad Irwin
f45a9b351d git: Branch diff (#40188)
Release Notes:

- git: Adds the ability to view the diff of the current branch since
main

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-23 22:38:40 -06:00
Danilo Leal
f11a3dcc97 settings_ui: Add small UI adjustments (#41065)
Super tiny changes that impact mostly Windows/Linux.

Release Notes:

- N/A
2025-10-24 01:08:26 +00:00
Danilo Leal
5aa82887ec rules library: Improve empty state & fix quirks on Windows (#41064)
Just got a new Windows machine and realized that the rules library empty
state was completly busted. Ended up also adding some little UI tweaks
to make it better for both Windows and Linux.

Release Notes:

- N/A
2025-10-23 21:45:48 -03:00
warrenjokinen
fe730e9129 Fix typo in Font Features description, s/b "OpenType" (#41058)
Fix typo (regression?), 
"Opentype" should be "OpenType"

Closes #ISSUE

Release Notes:

- N/A
2025-10-23 21:19:21 -03:00
John Tur
59a98bae3a Add attribution for code sourced from Windows Terminal (#41061)
Release Notes:

- N/A
2025-10-24 00:12:06 +00:00
Agus Zubiaga
1cf765e126 Revert: Spawn terminal process on background executor (#41060)
Reverts https://github.com/zed-industries/zed/pull/40774 and
https://github.com/zed-industries/zed/pull/40824 since they introduce a
bug where Nushell processes are leaked and Ctrl+C doesn't kill the
current process.

Release Notes:

- Fix a bug where nushell processes wouldn't get killed after closing a
terminal tab
2025-10-23 23:37:23 +00:00
Tom Planche
79eff1fe05 Make cursor move to duplicated line when duplicating line up (#41004)
![Screen Recording 2025-10-23 at 14 50
26](https://github.com/user-attachments/assets/3427aa06-faf4-4f76-a604-bfc5af30f8ce)

Closes #40919
Follow-up of #39610

Release Notes:
- When duplicating line up, fixed cursor to move to the duplicated line
2025-10-24 02:20:16 +03:00
Kunall Banerjee
af0d2ad491 docs: Fix small grammatical typo in JSX section (#41055)
Happened to notice this typo while going through the docs.

Release Notes:

- N/A

---

💖
2025-10-24 00:38:32 +02:00
Anthony Eid
f0ac54e8a5 settings_ui: Fix memory leak (#41036)
Closes #40351

The leak mainly showed up in the appearance page because it had a lot of
dropdown menus. The problem occurred because the drop-down menus were
creating a new entity on each frame instead of using the
`window.use_state...` API.

Release Notes:

- settings ui: Fixed memory leak in UI

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-10-23 21:31:20 +00:00
Nia
68707ffc74 crashes: Avoid crash handler on detached threads (#40883)
Set a TLS bit to skip invoking the crash handler when a detached thread
panics.

cc @P1n3appl3 - is this at odds with what we need the crash handler to
do?

May close #39289, cannot repro without a nightly build

Release Notes:

- Fixed extension panics crashing Zed on Linux

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-23 21:04:22 +00:00
Conrad Irwin
1ce9a85a1a git: Only save dirty files during staging (#41047)
Closes #40581

Release Notes:

- git: No longer save clean files when staging (to avoid triggering
unnecessary rebuilds in external file watchers like vite)
2025-10-23 20:53:19 +00:00
Joseph T. Lyons
1966d4c818 Add an issue template for Git bugs (#41048)
Release Notes:

- N/A
2025-10-23 16:22:32 -04:00
Smit Barmase
b6a18671dc settings_ui: Fix settings window doesn't inherit Zed icon (#41031)
Closes #40946

Release Notes:

- N/A
2025-10-24 01:32:09 +05:30
Jakub Konka
c0ff8ef8e9 remote: Do not compress remote by default when building from source (#40994)
Release Notes:

- N/A
2025-10-23 21:26:34 +02:00
Lukas Wirth
66ec0fc0e1 Revert zero-width non-joiner insertion in text shaping (#41043)
Reverts parts of https://github.com/zed-industries/zed/pull/39928
Closes https://github.com/zed-industries/zed/issues/40987

Release Notes:

- Fixed some fonts rendering with absurd spacing on MacOS
2025-10-23 19:22:28 +00:00
Devdatta Talele
435eab6896 Fix ESLint linebreak-style errors by preserving line endings in LSP communication (#38773)
Closes https://github.com/zed-industries/zed/issues/38453

Current `Buffer` API only allows getting buffer text with `\n` line
breaks — even if the `\r\n` was used in the original file's text.

This it not correct in certain cases like LSP formatting, where language
servers need to have original document context for e.g. formatting
purposes.

Added new `Buffer` API, replaced all buffer LSP registration places with
the new one and added more tests.

Release Notes: 

- Fixed ESLint linebreak-style errors by preserving line endings in LSP
communication

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-10-23 19:11:48 +00:00
Sean Hagstrom
55bc679c19 docs: Ensure macOS and Linux keybindings are escaped in HTML (#39802)
Closes #39654

Release Notes:

- Fixed the formatting of macOS and Linux keybindings in the Zed docs to
escape the backslash character when templating.
2025-10-23 14:13:35 -04:00
Lukas Wirth
6aaf19f276 multi_buffer: Split multi_buffer into more modules (#41033)
There are a of separate APIs in this, partially interleaved making it
difficult to grasp.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-23 17:57:52 +00:00
Marshall Bowers
d83ed4e03e docs: Update docs for theme_overrides setting (#41038)
This PR updates the docs to reference the `theme_overrides` setting
instead of the old `experimental.theme_overrides` setting.

Release Notes:

- N/A
2025-10-23 17:52:35 +00:00
Bennet Fenner
11eba64e68 Rename assistant_context crate to assistant_text_thread (#41024)
Previously we had `Context` and `ContextStore` in both `agent_ui` (used
to store context for the inline assistant) and `assistant_context` (used
for text threads) which is confusing.
This PR makes it so that the `assistant_context` concepts are now called
`TextThread*`, the crate was renamed to `assistant_text_thread`

Release Notes:

- N/A
2025-10-23 17:17:41 +00:00
Cole Miller
63fe1eae59 Fix overly noisy direnv error notification (#41029)
Updates #40531, restoring the previous behavior which didn't surface an
error when no direnv binary was found.

Release Notes:

- N/A
2025-10-23 17:03:55 +00:00
Cole Miller
8b6f3ec647 Fix the project diff sometimes missing updates (#40662)
This PR does two related things:

- First, it gets rid of the undifferentiated `RepositoryEvent::Updated`
in favor of three new events that have clearer definitions:
`BranchChanged`, `StashEntriesChanged`, and `StatusesChanged`. An
implication of this is that we no longer emit a `RepositoryEvent` unless
some git state changed; previously we would emit `RepositoryUpdated`
after doing a git status scan even if no statuses changed.
- Second, it changes the subscription strategy of the project diff to
make it update more robustly. Previously, the project diff only
subscribed to the `GitStore`, so it relied on getting a `GitStoreEvent`
when some buffer's diff hunks changed, even if the git status of the
buffer's file didn't change (e.g. a second hunk in a file that was
already modified). After this PR, it also subscribes to the individual
`BufferDiff` entities for buffers that have a git status, so the
`GitStore` is freed from that responsibility. This also fixes some real
cases where the previous strategy was not effective in keeping the
project diff up to date (captured in a test).

Release Notes:

- Fixed some cases where the project diff would fail to update in
response to git events.
2025-10-23 16:46:27 +00:00
Lukas Wirth
a66098b485 gpui: Revert reuse_prepaint change of #40767 (#41025)
c95ae84d91 (r2455674159)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-23 16:23:35 +00:00
Lukas Wirth
b519ab2758 rope: Improve chunk slicing panic messages (#41023)
We still see a bunch of panics here but the default slicing panic
doesn't tell which side of the range is bad

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-23 16:17:11 +00:00
Jakub Konka
023ac1b649 Revert "Use ShellKind::try_quote whenever we need to quote shell args" (#41022)
Reverts zed-industries/zed#40912

Closes https://github.com/zed-industries/zed/issues/41010
2025-10-23 16:06:47 +00:00
Lukas Wirth
738e248109 gpui: Small perf optimizations (#40767)
Some random findings based on profiling

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-23 13:26:27 +00:00
Kirill Bulatov
4f0a44896a Fix anchor-related panic when gathering applicable inlay chunks (#41002)
Before, inlay chunks were retrieved from the cache based on actualized
anchor ranges, but using an old buffer snapshot. Now, update all chunks
and snapshot to the actual before returning the applicable ones.

Follow-up of https://github.com/zed-industries/zed/pull/40183

Release Notes:

- N/A
2025-10-23 12:51:07 +00:00
Viraj Bhartiya
9a6397fb17 Add keybindings for menu navigation in vim.json (#40877)
- Added "ctrl-p" for selecting the previous menu item
- Added "ctrl-n" for selecting the next menu item

Closes #40619 

Release Notes:
- Ctrl+P now moves to the previous result; Ctrl+N moves to the next.
2025-10-23 13:21:32 +02:00
paneutral
93ef1947b5 vim: Fix cursor movement after entering Helix normal mode (#40528)
Closes #40009 

Release Notes:

- `vim::NormalBefore` now enters `helix_normal` correctly.
2025-10-23 11:15:12 +00:00
Abderrahmane TAHRI JOUTI
8c1b4cb1cd Re-order Helix keymaps and add alt-o/i/p/n (#40527)
Release Notes:

- helix: Re-ordered `helix_normal || helix_select` keybindings to follow the
same order as the keymap on the helix-editor
[documentation](https://docs.helix-editor.com/keymap.html).
- helix: Added `alt-o` & `alt-i` to Select larger and smaller syntax node
respectively
- helix: Added `alt-p` & `alt-n` to Select Next Syntax Node and Previous Syntax
Node respectively



--- 

The new main helix normal & select context looks like follows

```jsonc
{
    "context": "(vim_mode == helix_normal || vim_mode == helix_select) && !menu",
    "bindings": {
      // Movement
      "h": "vim::WrappingLeft",
      "left": "vim::WrappingLeft",
      "l": "vim::WrappingRight",
      "right": "vim::WrappingRight",
      "t": ["vim::PushFindForward", { "before": true, "multiline": true }],
      "f": ["vim::PushFindForward", { "before": false, "multiline": true }],
      "shift-t": ["vim::PushFindBackward", { "after": true, "multiline": true }],
      "shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }],
      "alt-.": "vim::RepeatFind",
      
      // Changes
      "shift-r": "editor::Paste",
      "`": "vim::ConvertToLowerCase",
      "alt-`": "vim::ConvertToUpperCase",
      "insert": "vim::InsertBefore",
      "shift-u": "editor::Redo",
      "ctrl-r": "vim::Redo",
      "y": "vim::HelixYank",
      "p": "vim::HelixPaste",
      "shift-p": ["vim::HelixPaste", { "before": true }],            
      ">": "vim::Indent",
      "<": "vim::Outdent",
      "=": "vim::AutoIndent",
      "d": "vim::HelixDelete",
      "c": "vim::HelixSubstitute",
      "alt-c": "vim::HelixSubstituteNoYank",
      
      // Selection manipulation
      "s": "vim::HelixSelectRegex",
      "alt-s": ["editor::SplitSelectionIntoLines", { "keep_selections": true }],
      ";": "vim::HelixCollapseSelection",
      "alt-;": "vim::OtherEnd",
      ",": "vim::HelixKeepNewestSelection",
      "shift-c": "vim::HelixDuplicateBelow",
      "alt-shift-c": "vim::HelixDuplicateAbove",
      "%": "editor::SelectAll",
      "x": "vim::HelixSelectLine",
      "shift-x": "editor::SelectLine",
      "ctrl-c": "editor::ToggleComments",
      "alt-o": "editor::SelectLargerSyntaxNode",
      "alt-i": "editor::SelectSmallerSyntaxNode",
      "alt-p": "editor::SelectPreviousSyntaxNode",
      "alt-n": "editor::SelectNextSyntaxNode",

      // Goto mode
      "g e": "vim::EndOfDocument",
      "g h": "vim::StartOfLine",
      "g l": "vim::EndOfLine",
      "g s": "vim::FirstNonWhitespace", // "g s" default behavior is "space s"
      "g t": "vim::WindowTop",
      "g c": "vim::WindowMiddle",
      "g b": "vim::WindowBottom",
      "g r": "editor::FindAllReferences", // zed specific
      "g n": "pane::ActivateNextItem",
      "shift-l": "pane::ActivateNextItem",      
      "g p": "pane::ActivatePreviousItem",
      "shift-h": "pane::ActivatePreviousItem",
      "g .": "vim::HelixGotoLastModification", // go to last modification
      
      // Window mode
      "space w h": "workspace::ActivatePaneLeft",
      "space w l": "workspace::ActivatePaneRight",
      "space w k": "workspace::ActivatePaneUp",
      "space w j": "workspace::ActivatePaneDown",
      "space w q": "pane::CloseActiveItem",
      "space w s": "pane::SplitRight",
      "space w r": "pane::SplitRight",
      "space w v": "pane::SplitDown",
      "space w d": "pane::SplitDown",

      // Space mode
      "space f": "file_finder::Toggle",
      "space k": "editor::Hover",
      "space s": "outline::Toggle",
      "space shift-s": "project_symbols::Toggle",
      "space d": "editor::GoToDiagnostic",
      "space r": "editor::Rename",
      "space a": "editor::ToggleCodeActions",
      "space h": "editor::SelectAllMatches",
      "space c": "editor::ToggleComments",
      "space p": "editor::Paste",
      "space y": "editor::Copy",

      // Other
      ":": "command_palette::Toggle",
      "m": "vim::PushHelixMatch",
      "]": ["vim::PushHelixNext", { "around": true }],
      "[": ["vim::PushHelixPrevious", { "around": true }],
      "g q": "vim::PushRewrap",
      "g w": "vim::PushRewrap",
      // "tab": "pane::ActivateNextItem",
      // "shift-tab": "pane::ActivatePrevItem",
    }
  }
  ```
2025-10-23 12:55:26 +02:00
Kirill Bulatov
3bb4c94ed4 Revert "Round the scroll offset in editor to fix jumping text (#40401)" (#40982)
This reverts commit 3da4cddce2.

The scrolling is ~30% less for the same gesture, and I'm not using
anything lodpi:


https://github.com/user-attachments/assets/b19521fc-9e29-4bfd-9660-dc1e4c8ae846


Release Notes:

- N/A
2025-10-23 09:25:36 +00:00
Lukas Wirth
16f7bd0a2e editor: Translate utf16 to utf8 offsets in copy_highlight_json (#40981)
Fixes ZED-2FM

Release Notes:

- Fixed panic in copy highlight json action
2025-10-23 08:46:50 +00:00
Lukas Wirth
c529a066bf gpui: Arc GlobalElementId (#40979)
This shrinks it from roughly a ~kilobyte to 8 byte, removing a bunch of
memmoves emitted by the compiler. Also `Arc`'s it instead of boxing as
we do clone it a couple times here and there, making that also a fair
bit cheaper

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-23 07:58:33 +00:00
Lukas Wirth
278032c6b8 extension_host: Run extensions on the tokio threadpool (#40936)
Fixes ZED-12D

`wasmtime_wasi` might call into tokio futures (to sleep for example)
which requires access to the tokio runtime. So we are required to run
these extensions in the tokio thread pool

Release Notes:

- Fixed extensions causing zed to occasionally panic
2025-10-23 09:41:05 +02:00
Anthony Eid
5a05986479 debugger: Fix debug scenario picker not showing language subtitles (#40977)
### Before 
<img width="544" height="403" alt="Screenshot 2025-10-23 at 2 58 44 AM"
src="https://github.com/user-attachments/assets/f5a69d27-e54a-4c1e-80f7-5cfff5b0bd47"
/>

### After
<img width="550" height="372" alt="Screenshot 2025-10-23 at 3 08 59 AM"
src="https://github.com/user-attachments/assets/33dd9c5e-054e-4ed1-ba1e-16746a5a697a"
/>

I also changed the debug picker to use a material list to cover the edge
case where there isn't a subtitle for an entry

Release Notes:

- debugger: Fix debug scenario picker not showing language subtitles
2025-10-23 07:37:37 +00:00
Anthony Eid
05c2cc0254 settings_ui: Enable editing project settings for worktrees without setting file (#40971)
I made three significant changes in this PR. 

1. `SettingsWindow::fetch_files` now creates
`SettingsUiFile::Project(..)` for any worktree that contains no project
settings.
2. `update_settings_file` now creates an empty settings file if a
worktree doesn't contain one.
3. `open_current_settings_file` also creates a settings file if the
current one doesn't exist.

Release Notes:

- settings ui: Enable editing project settings for worktrees that don't
have a project setting file.
2025-10-23 02:23:12 -04:00
Anthony Eid
1edb1b3896 settings ui: Update file headers when adding or removing projects (#40968)
This PR gets the `SettingsWindow` struct to subscribe to all
`Entity<Project>` events and any future project entities that are
created. When a project emits an event that signals a worktree has been
added or removed, the settings window refetches all settings files it
can find.

This fixes a bug where the settings ui would notice some project
settings that were created or opened after the `SettingsWindow` has been
initialized.

I also renamed `LOCAL` file mask to `PROJECT` to be inline with the
`SettingsFile` naming convention.

Release Notes:

- settings ui: Fix bug where project setting files wouldn't be detected
if they were created or opened after while an active settings window is
open
2025-10-23 00:49:36 -04:00
Jakub Konka
8f4646d6c3 Use ShellKind::try_quote whenever we need to quote shell args (#40912)
Using `shlex` unconditionally is dangerous as it assumes the underlying
shell is POSIX which is not the case for PowerShell, CMD, or Nushell.
Therefore, whenever we want to quote the args we should utilise our
helper `util::shell::ShellKind::try_quote` which takes into account
which shell is being used to actually exec/spawn the invocation.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-23 06:44:42 +02:00
Cole Miller
18daa9a839 Simplify environment loading code (#40531)
This is a refactoring PR to simplify our environment loading code by:

- Getting rid of `EnvironmentErrorMessage` in favor of using
`anyhow::Result` everywhere, with a separate `mpsc` channel to
communicate statuses that will be shown in the activity indicator
- Inlining some functions that were only called once to reduce
indirection
- Removing the separate `direnv` module

Release Notes:

- N/A
2025-10-23 03:57:33 +00:00
Cole Miller
bf63ff2b91 Fix path for vscode-html-language-server when found on PATH (#40832)
Don't prepend the worktree root when using an absolute path from
`Worktree::which`, since that does the wrong thing when running in
wasmtime given two Windows absolute paths. Also don't pass this path to
`node`, since when npm installed it's a sh/cmd wrapper not a JS file.

Part of #39153, also needs a fix on the vscode-langservers-extracted
side (missing shebang for the vscode-html-language-server script).

Release Notes:

- Fixed Zed failing to run the HTML language server in some cases.
2025-10-22 22:44:25 -04:00
Danilo Leal
f9e0642a72 settings_ui: Adjust warning banner design (#40952)
Just tidying this up a bit. Really have to fix this Banner component at
some point 😅 Having to add some spacing hacks to make it perfect here
that are not ideal and should be baked into the component.

Release Notes:

- N/A
2025-10-23 00:23:51 +00:00
Danilo Leal
bada88c5b3 Make the rules library window more consistent with the settings UI (#40948)
Now that we have two surface areas that open as separate windows, it's
important they're consistent with one another. This PR make the settings
UI and rules library windows more similar by having them use the same
minimum window size and similar styles for their navbar given they have
fundamentally the same design (nav on the left and content on the
right).

Release Notes:

- N/A
2025-10-22 20:57:01 -03:00
Moo, Kachon
6b8f8592ea agent_ui: Remove ellipses from some menu entries (#40858)
<img width="335" height="236" alt="image"
src="https://github.com/user-attachments/assets/5e09e9ed-f0f3-48df-ac22-032edfc6c114"
/>

Release Notes:
This PR fixes inconsistent use of trailing ellipsis (…) in the MCP
Server menu.
Previously, some menu items (like Add Custom Server…) used hardcoded
ellipses even though they didn’t trigger additional dialogs or steps.
This change removes unnecessary ellipses to align with standard UI/UX
conventions used across Zed’s menus.

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2025-10-22 23:54:24 +00:00
Mikayla Maki
4fd4cbbfb7 gpui: Add focus-visible selector support (#40940)
Release Notes:

- N/A

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 23:36:18 +00:00
Lukas Wirth
044701e3a5 rope: Implement Rope::is_char_boundary via chars bitmap (#40945)
Slightly more efficient. No new tests as we already have tests
verifiying this.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-22 23:05:43 +00:00
Smit Barmase
a96bf504e0 theme: Fix entry could appear transparent on hover with certain themes (#40944)
Follow-up: https://github.com/zed-industries/zed/pull/34655  

We should use an opaque fallback color for `panel.overlay_hover`. This
helps when a custom theme doesn’t provide it, nor `element.hover`. For
example, VSCode’s default modern dark theme doesn’t include an
`element.hover` color after import.

Release Notes:

- Fixed an issue where the project panel’s sticky entry could appear
transparent on hover with certain themes.
2025-10-23 04:23:25 +05:30
Lukas Wirth
c16f2a1a29 project: Normalize Path env var to PATH in shell env on windows (#40720)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-22 22:47:16 +00:00
Anthony Eid
ca4103246f settings_ui: Fix file header from showing duplicate display names (#40943)
After clicking on the file drop-down and selecting a file, both the
selected file and the first drop-down entry would be the same file name
instead of overwriting a file name.

Release Notes:

- settings ui: Fix bug where duplicate file names showed in the header
files
2025-10-22 22:33:45 +00:00
Danilo Leal
731237222e agent_ui: Focus the message editor after regenerating a user message (#40938)
Release Notes:

- agent: Improved the editing previous messages UX by focusing in the
agent panel's message editor after regenerating a prompt, instead of
moving focus to the nearest regular buffer.
2025-10-22 19:29:35 -03:00
Smit Barmase
2096f256f2 editor: Reduce selection opacity when editor is not focused (#40925)
Focus:
<img width="420" alt="image"
src="https://github.com/user-attachments/assets/97b0c7ed-8ad4-400c-9f36-01d8bd9b362d"
/>

Unfocus:
<img width="420" alt="image"
src="https://github.com/user-attachments/assets/19805293-b419-4669-8a93-e9cf41900403"
/>

Release Notes:

- Reduced selection opacity when the editor is out of focus to make
inactive states clearer.
2025-10-23 03:57:10 +05:30
Ted Robertson
7880e2b961 docs: Clarify providers in edit-prediction.md (#39655)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-22 21:09:34 +00:00
Joseph T. Lyons
ab22478ed4 Update extension docs to mention BSD 3-Clause is a valid license (#40934)
Release Notes:

- N/A
2025-10-22 20:34:38 +00:00
Ben Kunkle
6ed9c0271d Don't migrate empty formatter array (#40932)
Follow up for #40409
Fix for
https://github.com/zed-industries/zed/issues/40874#issuecomment-3433759849

Release Notes:

- Fixed an issue where having an empty formatter array in your settings
`"formatter": []` would result in an erroneous prompt to migrate
settings
2025-10-22 20:01:45 +00:00
Joseph T. Lyons
93136a9aaa Update extension docs to mention GNU GPLv3 is a valid license (#40933)
Merge after: 

- https://github.com/zed-industries/extensions/pull/3641

Release Notes:

- N/A
2025-10-22 15:59:39 -04:00
Finn Evers
f393138711 Fix keybind hints flickering in certain scenarios (#40927)
Closes #39172

This refactors when we resolve UI keybindings in an effort to reduce
flickering whilst painting these: Previously, we would always resolve
these upon creating the binding. This could lead to cases where the
corresponding context was not yet available and no binding could be
resolved, even if the binding was then available on the next presented
frame. Following that, on the next rerender of whatever requested this
keybinding, the keybind for that context would then be found, we would
render that and then also win a layout shift in that process, as we went
from nothing rendered to something rendered between these frames.

With these changes, this now happens less often, because we only look
for the keybinding once the context can actually be resolved in the
window.

| Before | After | 
| --- | --- |
|
https://github.com/user-attachments/assets/adebf8ac-217d-4c7f-ae5a-bab3aa0b0ee8
|
https://github.com/user-attachments/assets/70a82b4b-488f-4a9f-94d7-b6d0a49aada9
|

Also reduced cloning in the keymap editor in this process, since that
requiered changing due to this anyway.

Release Notes:

- Fixed some cases where keybinds would appear with a slight delay,
causing a flicker in the process
2025-10-22 19:52:38 +00:00
Kirill Bulatov
ed5b9a4705 Rework inlay hints system (#40183)
Closes https://github.com/zed-industries/zed/issues/40047
Closes https://github.com/zed-industries/zed/issues/24798
Closes https://github.com/zed-industries/zed/issues/24788

Before, each editor, even if it's the same buffer split in 2, was
querying for inlay hints separately, and storing the whole inlay hint
twice, in `Editor`'s `display_map` and its `inlay_hint_cache` fields.

Now, instead of `inlay_hint_cache`, each editor maintains a minimal set
of metadata (which area was queried by what task) instead, and all LSP
inlay hint data had been moved into `LspStore`, both local and remote
flavors store the data.
This allows Zed, as long as a buffer is open, to reuse the inlay hint
data similar to how document colors and code lens are now stored and
reused.

Unlike other reused LSP data, inlay hints data is the first one that's
possible to query by document ranges and previous version had issue with
caching and invalidating such ranges already queried for.
The new version re-approaches this by chunking the file into row ranges,
which are queried based on the editors' visible area.

Among the corresponding refactoring, one notable difference in inlays
display are multi buffers: buffers in them are not
[registered](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didOpen)
in the language server until a caret/selection is placed inside their
excerpts inside the multi buffer.

New inlays code does not query language servers for unregistered
buffers, as servers usually respond with empty responses or errors in
such cases.

Release Notes:

- Reworked inlay hints to be less error-prone

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-22 22:34:15 +03:00
Finn Evers
5738bde3ce gpui: Make Empty request layout with Display::None by default (#40900)
Release Notes:

- N/A
2025-10-22 20:54:29 +02:00
Bennet Fenner
6622902964 agent: Only show compatible tools in profile selector (#40917)
In practice this just hides the web search tool when not using the Zed
provider

Release Notes:

- Fixed an issue where the web search tool would show up in the profile
selector even when not using a model via Zed Pro
2025-10-22 18:17:33 +00:00
Ben Kunkle
cb7881ec0b Fix migration from #40409 for users who haven't been migrated yet (#40916)
Closes #40874

Release Notes:

- Fixed an issue where migrating settings after v0.208.5+ would
spuriously enable prettier. This fix only affects those who have not
updated or migrated yet. For those who have already updated to version
v0.208.5 or later, placing `"formatter": []` in your settings in the
affected languages will fix the issue.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2025-10-22 18:17:01 +00:00
Bennet Fenner
c60343af71 eval: Port to agent2 (#40704)
Release Notes:

- N/A
2025-10-22 17:55:26 +00:00
Marshall Bowers
4a93719b6b Upgrade async-tar to v0.5.1 (#40911)
This PR switches us back to the upstream version of `async-tar` and
upgrades to v0.5.1.

This version has the patch we need:
0c18195639.

Release Notes:

- N/A
2025-10-22 17:13:28 +00:00
Remco Smits
d558005058 markdown: Add support for colspan and rowspan for HTML tables (#39898)
Closes https://github.com/zed-industries/zed/issues/39837

This PR adds support for `colspan` feature that is only supported for
HTML tables. I also fixed an edge case where the right side border was
not applied because it didn't match the total column count.

**Before**
<img width="725" height="179"
alt="499166907-385cc787-fc89-4e6d-bf06-c72c3c0bd775"
src="https://github.com/user-attachments/assets/69586053-9893-4c92-aa89-7830d2bc7a6d"
/>

**After**
<img width="1165" height="180" alt="Screenshot 2025-10-21 at 22 51 55"
src="https://github.com/user-attachments/assets/f40686e7-d95b-45a6-be42-e226e2f77483"
/>

```html
<table>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>
```

**TODO**:
- [x] Add tests for rending logic
- [x] Test all the tables again

cc @bennetbo

Release Notes:

- Markdown: Added support for `colspan` and `rowspan` for HTML tables

---------

Co-authored-by: Zed AI <ai@zed.nl>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-10-22 13:10:37 -04:00
Donnie Adams
96a0db24d9 Add comment injections for gowork and gomod (#40842)
Release Notes:

- Add comment injections for go.mod and go.work

Signed-off-by: Donnie Adams <donnie@thedadams.com>
2025-10-22 11:07:20 -06:00
Affonso, Guilherme
23e9e32d65 emacs: Improve default keymap to better match the emacs behavior (#40631)
Hello,
I am having a great time setting up the editor, but with a few problems
related to the Emacs keymap.

In this PR I have compiled changes in the default `emacs.json` that I
believe make the onboarding smoother for incoming emacs users.
This includes points that may need further discussion and some breaking
changes, although nothing that cannot be reverted with a quick
`keymap.json` overwrite.

(Please let me know if it is better to split up the PR)

### 1. Avoid fallbacks to the default keymap
all platforms:
- `ctrl-g` activating `go_to_line::Toggle` when there is nothing to
cancel

linux / windows:
- `ctrl-x` activating `editor::Cut` on the 1 second timeout
- `ctrl-p` activating `file_finder::Toggle` when the cursor is on the
first character of the buffer
- `ctrl-n` activating `workspace::NewFile` when the cursor is on the
last character of the buffer

### 2. Make all move commands operate on full words
In the current Zed implementation some commands run on full words and
others on subwords.
Although ultimately a matter of user preference, I think it is sensible
to use full words as the default, since that is what is shipped with
emacs.

### ~~3. Cancel selections after copy/cut commands~~ Moved to #40904
Canceling the selection is the default emacs behavior, but the way to
achieve it might need some brushing.
Currently I am using `workspace::SendKeystrokes` to copy ->
cancel(`ctrl-g`), but this has the following problems:
- can only be used in the main buffer (since `editor::Cancel` would
typically close secondary buffers)
- may cause problems downstream if the user overwrites the `ctrl-g`
binding

### ~~4. Replace killring with normal cut/paste commands~~ Moved to
#40905
Ideally Zed would support emacs-like killrings (#25270 and #22490).
However, I understand that making an emacs emulator is not a project
goal, and the Zed team should have a bunch of tasks with higher
priority.

By using a unified clipboard and standard cut/paste commands, we can
provide an experience that is closer to the out-of-the-box emacs
behavior (#33351) while also avoiding some pitfalls of the current
killring implementation (#28715).

### 5. Promote some bindings to workspace commands
- `alt-x` as `command_palette::Toggle`
- `ctrl-x b` and `ctrl-x ctrl-b` as `tab_switcher::Toggle`

---

Release Notes:

- emacs: Fixed a problem where keys would fallback to their default
keymap binding on certain conditions
- emacs: Changed `alt-f` and `alt-b` to operate on full words, as in the
emacs default
- emacs: `alt-x`, `ctrl-x b`, and `ctrl-x ctrl-b` are now Workspace
bindings
2025-10-22 10:37:00 -06:00
Finn Evers
b207da5a71 gpui: Re-land uniform list scroll fixes (#40899)
Re-lands https://github.com/zed-industries/zed/pull/40719, fixes the
bugs that were discovered with it and improves some more stuff in that
area

Release Notes:

- Fixed a rare issue where the extension page would stutter while
scrolling.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-10-22 16:33:16 +00:00
Danilo Leal
a24601903a agent: Improve discoverability of the quote selection action (#40897)
This PR renames the `agent::QuoteSelection` to
`agent::AddSelectionToThread` _and_ adds it as a menu item in both the
right-click context menu within regular buffers as well as the
"Selection" app menu.

We've received feedback in the past about how hard to discover this
feature is, and after watching [the Syntax podcast
crew](https://www.youtube.com/watch?v=bRK3PeVFfVE) recently struggle
with doing so—and then naturally looking for it in the context menu and
not finding it—it felt like time to push a change. I think the rename +
the availability in these places could help bringing it to surface more.

The same action can be done in Cursor through the `cmd-l` keybinding,
but in Zed, that triggers `editor::SelectLine`, which I don't want to
override by default. However, if you're using Cursor's keymap, then
`cmd-l` does trigger this action, as expected.

<img width="500" height="1812" alt="Screenshot 2025-10-22 at 12  01@2x"
src="https://github.com/user-attachments/assets/dfc2c41c-8d0a-4a1a-8ea1-1bd5d1aa1171"
/>


Release Notes:

- agent: Improves discoverability of the previously called "quote
selection" action—which allows to add a text selection in a buffer as
context within the agent panel—by renaming it to "add selection to
thread" and making it available from the right-click editor context menu
as well as the "Selection" app menu.
2025-10-22 12:56:11 -03:00
David Kleingeld
3a12122d1b Revert "keymaps: Update defaults for inline assist and signature help" (#40903)
Reverts zed-industries/zed#39587
2025-10-22 11:27:37 -04:00
Lukas Wirth
d0398da099 editor: Fix singleton multibuffer titles not being replicated (#40896)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-22 14:59:30 +00:00
Joseph T. Lyons
69b2ee7bf0 Bump Zed to v0.211 (#40895)
Release Notes:

- N/A
2025-10-22 14:50:29 +00:00
Ajani Bilby
88bac4d5fc docs: Change tab character representation in docs (#40667)
The suggested `→` appears tiny, and almost looks like just a dot on my
monitor, and I got quite confused for a while thinking the
`whitespace_map.tab` setting wasn't working properly.
<img width="630" height="105" alt="Image"
src="https://github.com/user-attachments/assets/98feced2-39b3-4734-83e4-b4573b4e52c2"
/>

I think it would be really helpful if `⟶` was suggested instead since
that displays properly.
<img width="625" height="104" alt="Image"
src="https://github.com/user-attachments/assets/176886ab-cf88-4079-90a8-91a8e8182092"
/>

---

I am using `Fira Code` as my font on windows, however when I remove that
config to get the default font, it also still appears the same size. So
I don't believe this is just a font issue on my machine.
Thought I am using Windows, so I would be willing to believe this a
render issue specific to windows

Release Notes:

- N/A
2025-10-22 14:04:29 +00:00
Finn Evers
d53efe4e91 Revert "gpui: Fix uniform list scrolling with vertical padding present" (#40891)
Reverts zed-industries/zed#40719

This unveiled some bigger issues with the UniformList size computations,
which are more crucial than what was fixed here.

Release Notes:

- NOTE: BUGFIX "Fixed a rare issue where the extension page would
stutter while scrolling." was reverted due to some other issues
2025-10-22 13:35:25 +00:00
localcc
14b41b122f Fix JumpHost on Windows (#40713)
Closes #39382 

Release Notes:

- Fixed Windows specific ssh jumphost connection issues
2025-10-22 12:04:30 +00:00
Cameron Mcloughlin
98c7e018ae Add new action and handler for opening a specific setting (#40739)
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-22 11:25:50 +00:00
Lukas Wirth
c81ffaffb6 editor: Use unbounded shifts for chunk bitmaps (#40879)
This simplifies some code and is also more correct in some others (I
believe some of these might've overflowed causing panics in sentry)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-22 11:05:32 +00:00
Nia
bd69124f2b Add option to disable crash handler (#40799)
Extra info needed for #39289. To be tested out next nightly build...

Release Notes:

- N/A

Co-authored-by: Cole Miller <m@cole-miller.net>
2025-10-22 11:04:58 +00:00
Samuel Oldham
77dbe08d9d project_panel: Fix buffer focus when canceling filename edit (#40747)
Closes #37726

Release Notes:

- Fixed an issue where the buffer would not regain focus when clicked
while a filename edit was in progress in the project panel.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-22 15:50:09 +05:30
Owen Law
252b75e493 Disable slang-server for verilog extension (#40442)
Should be merged with
https://github.com/zed-industries/extensions/pull/3584, which adds
`slang-server` as a new language server, but should be disabled by
default due to an issue with it not initializing on Windows and being a
relatively new language server in general.

Release Notes:

- N/A
2025-10-22 11:54:54 +02:00
Kirill Bulatov
bc0bace81f Add basic ico support (#40822)
Closes https://github.com/zed-industries/zed/discussions/40763

<img width="867" height="1088" alt="Screenshot 2025-10-21 at 23 14 47"
src="https://github.com/user-attachments/assets/d691fb2a-afc6-4445-a335-054ef164e0d3"
/>

Also improves error handling on image open failure:

<img width="864" height="1083" alt="Screenshot 2025-10-21 at 23 14 30"
src="https://github.com/user-attachments/assets/d5388b61-995f-441b-b375-ad5136d1533b"
/>


Release Notes:

- Added basic ico support, improved unsupported image handling
2025-10-22 12:07:32 +03:00
Joseph T. Lyons
8ceb2f2c61 Add more tweaks to the troubleshooting docs (#40870)
Release Notes:

- N/A
2025-10-22 09:04:05 +00:00
Joseph T. Lyons
25de2acfdb Correct workspace db directory paths (#40868)
Release Notes:

- N/A
2025-10-22 08:27:59 +00:00
Joseph T. Lyons
8bad2cbd83 Add another informational blog post to docs (#40865)
Release Notes:

- N/A
2025-10-22 07:58:03 +00:00
Joseph T. Lyons
762af0982c Add more troubleshooting information (#40864)
Release Notes:

- N/A
2025-10-22 07:55:49 +00:00
Be
3d3e9130a8 collab: Pin sea-orm-macro crate version together with sea-orm (#40846)
Currently running `cargo update` on Zed will break the collab crate
because the versions of sea-orm and sea-orm-macros will not match. This
results in a bunch of noisy warnings from rust-analyzer.

Release Notes:

- N/A
2025-10-22 07:37:20 +00:00
Joseph T. Lyons
fd9c2e32f3 Organize release docs (#40860)1
Release Notes:

- N/A
2025-10-22 00:53:44 -04:00
Mikayla Maki
08d95ad9d3 chore: Bump gpui to 0.2.2 (#40856)
Release Notes:

- N/A
2025-10-22 03:43:32 +00:00
Alvaro Parker
d096132888 docs: Add git stash to git.md (#40834)
Closes #ISSUE

Release Notes:

- Added git stash documentation
2025-10-21 23:22:20 -04:00
Mikayla Maki
d7c855550c Update async-tar dependency for GPUI (#40850)
Release Notes:

- N/A
2025-10-22 03:07:02 +00:00
Mikayla Maki
9c71a7f43c Revert arm64 runners (#40852)
Release Notes:

- N/A
2025-10-21 20:03:02 -07:00
John Tur
221637ea82 Fix code signing for Windows installer (#40847)
Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-21 20:21:43 -06:00
Max Brunsfeld
e468edd389 Fix extraction of font runs from text runs (#40840)
Fixes a bug in https://github.com/zed-industries/zed/pull/39928

The bug caused all completions to appear in bold-face

Release Notes:

- Fixed a bug where bold-face font was applied to the wrong characters
in items in the autocomplete menu

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-10-22 01:55:54 +00:00
John Tur
2903a06e5c Fix nightly upload on Windows (#40843)
Release Notes:

- N/A
2025-10-22 01:55:02 +00:00
Be
2338164c10 Revert "title_bar: Add configurable window controls position (#38834)" (#40839)
This reverts commit b479d1ef49.

This PR was accidentally merged prematurely.
https://github.com/zed-industries/zed/pull/38834#issuecomment-3424186051

cc @danilo-leal

Release Notes:

- N/A
2025-10-22 00:54:46 +00:00
Nia
2deafd8706 project_panel: Don't show trash dialog on remote connections (#40838)
In remote connections, we don't detect whether trashing is possible and
generally shouldn't assume it is. This also fixes up some incomplete
logic that was attempting to do that.

Closes #39212

Release Notes:

- No longer show trash option in remote projects
2025-10-22 00:24:38 +00:00
Ben Kunkle
0c13403fa5 settings_ui: Add broken file warning banner (#40823)
Closes #ISSUE

Release Notes:

- settings_ui: Added a warning banner when the settings file you are
actively editing is in a broken or invalid state.
2025-10-21 19:09:49 -04:00
Danilo Leal
8f3da5c5cd settings_ui: Add pickers for theme and icon themes (#40829)
In the process of adding pickers for the theme and icon themes fields in
the settings UI, I felt like there was an improvement opportunity in
regards to where some of these components are stored. The `ui_input`
crate originally was meant only for the text field-like component, which
couldn't be in the regular `ui` crate due to the dependency with
`editor`. Given we had also added the number field there—which is
similar in also having the same dependency—it made sense to think of
this crate more like a home for form-like components rather than for
only one component.

However, we were also storing some settings UI-specific stuff in that
crate, which didn't feel right. So I ended up creating a new directory
within the `settings_ui` for components and moved all the pickers and
the custom input field there. I think this makes it for a cleaner
structure.

Release Notes:

- settings_ui: Added the ability to search for theme and icon themes in
their respective fields.
2025-10-21 19:58:43 -03:00
Martin Pool
b519f53b3e Rope benchmarks: Generate random strings measured in bytes, not chars (#39951)
Follows on from https://github.com/zed-industries/zed/pull/39949.

Again I'm not 100% sure of the intent but I think this is a fix:

`generate_random_string(rng, 4096)` would previously give you a string
of 4096 *chars* which could be anywhere between 4kB and 16kB in bytes.
This seems probably not what was intended, because Ropes generally work
in bytes not chars, including for the offsets used to index into them.

This seems to possibly cause a _regression_ in benchmark performance,
which is surprising because it should generally cause smaller test data.
But, possibly it's doing better at exercising different paths?

cc @mrnugget 

Release Notes:

- N/A
2025-10-22 00:42:05 +02:00
Piotr Osiewicz
50d184b6a6 Revert "search: New old search implementation (#39956)" (#40831)
This reverts commit 7c4fb5a899.

Closes #40792

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-21 22:15:20 +00:00
John Tur
2bba3358b8 Add Windows Arm64 builds to CI (#40821)
Closes https://github.com/zed-industries/zed/issues/40378

Release Notes:

- N/A

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-21 14:51:54 -07:00
Marshall Bowers
fcecf379dc Switch to fork of async-tar (#40828)
This PR switches to our own fork of `async-tar`.

Release Notes:

- N/A
2025-10-21 21:49:29 +00:00
Kirill Bulatov
256fe6e45c Fix task terminal split (#40824)
Before:


https://github.com/user-attachments/assets/efe2aeb6-94bb-46b6-944f-5a6345c072b4


After:


https://github.com/user-attachments/assets/61a7f699-6b4d-465f-add1-07774068420c


Release Notes:

- Fixed task terminal split not working correctly
2025-10-21 21:08:56 +00:00
Jakub Konka
e49edfac74 python: Init venv/virtualenv activation scripts during list/resolve (#40816)
This means that existence of activation scripts for venv/virtualenv will
be checked locally either on the host if editing locally, or the remote
by the remote proxy if editing a remote project.

Closes https://github.com/zed-industries/zed/issues/40263

Release Notes:

- N/A
2025-10-21 22:57:31 +02:00
Marshall Bowers
fd10017837 docs: Add model prices for Claude Haiku 4.5 (#40820)
This PR adds the model prices for Claude Haiku 4.5 to the docs.

Release Notes:

- N/A
2025-10-21 19:44:01 +00:00
Delvin
4b429033e7 settings_ui: Correct stepper increment and enforce max value for Centered Layout Padding (#40751)
Closes #40748

This PR improves the Centered Layout Padding in settings ui by limiting the numeric stepper to be within valid values and adding a custom schema generated to improve the JSON LSP completions and warnings when editing the setting field manually.

Release Notes:

- settings ui: limit stepper increment for centered padding between 0 and 0.4 and increment by 0.05 now

---------

Co-authored by: Anthony Eid <anthony@zed.dev>
2025-10-21 19:20:42 +00:00
Joseph T. Lyons
a398f80ba6 Add an action to reveal log file in system file manager (#40815)
We document the location of the log file in many places, we should just
make it easy to open directly within your file browser. The one thing
here is naming. We use dynamic naming for "reveal" actions in the
project panel, to reflect the right file manager name per OS, but for a
command palette action, I dont think we want to have dynamic code for
the action name, just going with finder at the moment.

Release Notes:

- Added a `zed: reveal log in file manager` action to the command
palette.
2025-10-21 14:38:11 -04:00
Danilo Leal
a71cc6a1e7 settings_ui: Add some design tweaks (#40818)
- Improves the UI for subfields of dynamic items
- Makes description writing more consistent (add period at the end of
every sentence, fix capitalization of proper names, ensure description
is always in sentence case)
- Other small details, mostly around spacing/padding

Release Notes:

- N/A
2025-10-21 15:27:44 -03:00
Danilo Leal
2764c51af1 extensions_ui: Increase affordance of download button in cards (#40795)
Hopefully, this will make the install/configure/uninstall buttons in the
right stand out a bit more and make their presence a bit more obvious
for newcomers.

| Before | After |
|--------|--------|
| <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10 
58@2x"
src="https://github.com/user-attachments/assets/b76115e1-0be2-4d5b-a677-525663d86c7c"
/> | <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10 
53@2x"
src="https://github.com/user-attachments/assets/9e563b71-b11a-4b69-b687-c0b469ca4eec"
/> |

Release Notes:

- Increased affordance of the download button in each extension card in
the extensions page.
2025-10-21 13:55:42 -03:00
Dong
641ae90cd6 settings_ui: Fix IEEE 754 floating point error when serializing value to JSON (#40677)
Closes #40556

Release Notes:

- settings-ui: Fixed an issue where modifying floating point number fields could result in the values written to the settings file containing IEEE 754 floating point error

> [!Note]
> Seems like there's another pull request fixing the centered layout in
#40661 by normalizing the whole `settings.json` file when updating it.
Not sure which is the better way to handle this issue.

## Description

This pull request solves the IEEE 754 floating point error when
serializing values from settings-ui into `settings.json` by creating a
two `serde_helper` to convert the problematic f32 into a formatted two
decimal placed f32.

Fields currently exists the IEEE 754 error:
- Appearance → Unnecessary Code Fade
- Editor → Drop Size Target
- Window & Layout → Centered Layout Left/Right Padding
- Window & Layout → Inactive Opacity

## How to verify

### Unnecessary Code Fade

As Is | To Be
--- | ---
<video
src="https://github.com/user-attachments/assets/1bf4bad2-63c5-4b03-ac29-8b6b59569e16"
/> | <video
src="https://github.com/user-attachments/assets/dadcd4a1-651b-43dd-913f-edae073ceb68"
/>

### Drop Size Target

As Is | To Be
--- | ---
<video
src="https://github.com/user-attachments/assets/9d5b4173-fcac-44d0-b7fc-772a2e426ef1"
/> | <video
src="https://github.com/user-attachments/assets/4b5adeaf-e678-494d-bd1b-6c1d55824c43"
/>

### Centered Layout Left/Right Padding

As Is | To Be
--- | ---
<video
src="https://github.com/user-attachments/assets/33b4e1ff-7ab2-44f7-9e9b-8abad1565d9a"
/> | <video
src="https://github.com/user-attachments/assets/63d8de9e-28d1-4bd7-a6c9-02452e105486"
/>

### Inactive Opacity

As Is | To Be
--- | ---
<video
src="https://github.com/user-attachments/assets/a7fe2e72-deb6-41dc-82f3-e2649503b8a4"
/> | <video
src="https://github.com/user-attachments/assets/993c314f-b6f6-4dcd-8f74-fa357ab063e9"
/>

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-21 16:45:40 +00:00
Ruangyot Nanchiang
fa550de922 Fix Git UI truncation for long branch names (#40598)
Closes #40524

Release Notes:
- Fixed branch names not truncating properly in git branch picker.

Please review if you have time.

PS. I’m not fully sure if this completely fixes the issue, but I’ve
tested it on my local build and it seems to work fine.

Before Fix:
<img width="773" height="799"
alt="502782621-91ac0578-9f55-4fb3-b0da-49a49e862a33"
src="https://github.com/user-attachments/assets/a9597949-c46a-47d0-a9ef-eddd637a9dc7"
/>

After Fix:
<img width="545" height="766" alt="FixedRound2"
src="https://github.com/user-attachments/assets/0d9770dc-a9da-46cd-a69a-4c8de2ca1abd"
/>
2025-10-21 16:42:43 +00:00
Joseph T. Lyons
ce5d597efa Centralize Zed.log documentation (#40808)
Just wanted a single location to point people to for telling them where
to find their log file. I left duplicate text in GitHub Issue templates,
as it seems annoying to have to follow a link when making an issue.

Release Notes:

- N/A
2025-10-21 16:39:10 +00:00
Ben Kunkle
cf8422f7fd settings_ui: Fix focus bugs (#40806)
Closes #40608


Release Notes:

- settings_ui: Fixed an issue where tabbing to the nav bar from the
search bar while the nav bar was scrolled would result in the first
_visible_ nav entry being selected, instead of the literal first nav
entry
- settings_ui: Fixed an issue where scrolling the selected nav entry off
screen would cause the keyboard shortcut hint for the focus nav / focus
content binding to dissapear
- settings_ui: Fixed an issue where text input controls could not be
focused via the keyboard
2025-10-21 12:25:07 -04:00
Jason Lee
d7ffc37b14 editor: Improve text color in document color highlight (#39372)
Release Notes:

- Improved text color in LSP document color highlight.

----

Because highlight ranges are implemented using a paint background,
there's no way to control the text color.

I've been thinking about this problem for a long time, want to solve it.

~~Today, I come up with a new idea. Re-rendering the document color text
at the top should solve this problem.~~

#### Update 10/6: 

> The previous version is not good, when we have soft wrap text, that
version will not work correct.

Now use exists `bg_segments_per_row` feature to fix text color.

## Before

<img width="563" height="540" alt="image"
src="https://github.com/user-attachments/assets/99722253-0cab-4d2a-a5d1-7f28393bcaed"
/>


## After

<img width="544" height="527" alt="image"
src="https://github.com/user-attachments/assets/a1bf6cdb-0e9c-435d-b14a-6ee9159a63d9"
/>
2025-10-21 21:35:40 +05:30
Lukas Wirth
b79837695e fs: Implement FileHandle::current_path for windows (#40804)
Release Notes:

- Fixed worktree renames not working on windows
2025-10-21 15:48:40 +00:00
Lukas Wirth
69025f3bf4 Add linux_repo_snapshot got .gitignore (#40802)
It keeps popping up in my project searches ... This prevents that. Not
like we are planning on editing that file again.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-21 15:31:40 +00:00
Tim Vermeulen
981fa288eb editor: Hide the git blame popover on escape (#40549)
Release Notes:

- Added way to hide git blame popover by pressing the escape key.
2025-10-21 20:34:13 +05:30
Lukas Wirth
854d1ec4dc acp_thread: Fix panic when following acp agents across buffers (#40798)
Fixes ZED-2D7

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-21 14:37:16 +00:00
Smit Barmase
10b9ae5e44 multi_buffer: Assert char boundary for panic due to point_to_buffer_offset (#40777)
In an attempt to figure out what's wrong with `point_to_buffer_offset`
for crash https://github.com/zed-industries/zed/issues/40453. We want to
know which branch among these two is the bad one.

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-10-21 19:01:35 +05:30
Smit Barmase
cad06011c5 language: Fix hang when editing certain tailwind class names (#40791)
Closes #36223

Upsteam issue to track:
https://github.com/tailwindlabs/tailwindcss-intellisense/issues/1479

Release Notes:

- Fixed an issue where Zed hanged when editing certain Tailwind class
names.
2025-10-21 19:00:02 +05:30
Lukas Wirth
0eccdfe61f project: Spawn terminal process on background executor (#40774)
We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.

Release Notes:

- Improved startup time on systems with slow process spawning
capabilities
2025-10-21 13:10:21 +00:00
Lukas Wirth
0be70e24d6 persistence: More error contexts (#40787)
Release Notes:

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

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-21 11:29:43 +00:00
Dino
3d4abde55a vim: Fix hang in visual block motion (#40723)
The `vim::visual::Vim.visual_block_motion` method was recently updated
(https://github.com/zed-industries/zed/pull/39355) in order to jump
between buffer rows instead of display rows. However, with this now
being the case, the `break` condition was never met when the motion was
horizontal rather than vertical and soft wrapped lines were used. As
such, this commit udpates the condition to ensure it's always reached,
preventing the hanging from happening.

Release Notes:

- Fixed hang in Vim's visual block motions when updating selections

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-10-21 12:23:00 +01:00
Piotr Osiewicz
2bfbe031c6 python: Bump version & get rid of explicit deps specifications for PET (#40785)
Release Notes:

- N/A
2025-10-21 12:50:56 +02:00
Agus Zubiaga
12d912114f ci: Update typos versions and fix new occurrences (#40784)
I noticed we had some typos that were getting through CI, but it looks
like the new version of `typos` catches them. So I updated it and fixed
them.

Release Notes:

- N/A
2025-10-21 10:43:22 +00:00
Agus Zubiaga
b487d2cfe0 zeta2 inspector: Feedback box (#40732)
Adds a way to submit feedback about a zeta2 prediction from the
inspector. The telemetry event includes:
- project snapshot (git + unsaved buffer state)
- the full request and response
- user feedback kind and text 

Release Notes:

- N/A
2025-10-21 10:30:21 +00:00
Piotr Osiewicz
977887b65f ci: Bump max target directory size on Mac to 300GB (#40778)
I did not bump it for Linux as some machines have smaller disks (~300GB
or so); with Mac, we have at least 1TB on all of our boxes

Release Notes:

- N/A
2025-10-21 11:24:22 +02:00
Finn Evers
0721c7873a Make kotlin-lsp the default language server (#40776)
Following a conversation with the maintainer/owner of
kotlin-language-server, he recommended switching to the official
language server, which is better in many aspects and also more actively
maintained.

Release Notes:

- Made the official Kotlin Language Server the default language server
for Kotlin.
2025-10-21 09:03:12 +00:00
Finn Evers
0aa7b7c773 editor: Toggle diff hunk based on current mouse position (#40773)
This fixes an issue where we would search for the hovered diff hunk
based on the mouse hit test computed during (or prior) editor paint
instead of the mouse hit test computed prior to the mouse event
invocation.

That in turn could lead to cases where moving the mouse from the editor
to the project panel and then clicking a file shortly after would expand
a diff hunk when actually nothing should happen in that case.

Release Notes:

- Fixed an issue where diff hunks would sometimes erroneously toggle
upon mouse clicks.
2025-10-21 08:38:40 +00:00
Piotr Osiewicz
1b544b9e19 ci: Run slow tests first (#40769)
Tests are hand-picked based on yours truly's preference

Release Notes:

- N/A
2025-10-21 09:58:26 +02:00
Julia Ryan
ea6e6dbda1 Add log message on first render (#40749)
Having this in our logs with a timestamp should help when users submit
issues with logs about slow startup time.

Release Notes:

- N/A
2025-10-21 00:17:26 -07:00
Piotr Osiewicz
a56122e144 ci: Do not use full debug info in CI builds (#40764)
For good backtraces in tests 'limited' is all we need.

Closes #ISSUE

Release Notes:

- N/A
2025-10-21 06:53:45 +00:00
Dario Griffo
04a45e3501 Add debian community repository (#40698)
I maintain this repository that contains several developer tools like
- ghostty
- zig
- yazi

all of them are updated usually the same day as upstream.

Release Notes: 

- N/A
2025-10-21 09:50:57 +03:00
Mateo Noel Rabines
4b489f4ce9 cli: Add --reuse flag for replacing workspace in existing window (#38131)
Closes #ISSUE 

it is was still in
[discussion](https://github.com/zed-industries/zed/discussions/37983)

Release Notes:

- Added: `--reuse` (`-r`) CLI flag to replace the workspace in an
existing window instead of opening a new one

This PR adds a new `--reuse` (`-r`) CLI flag that allows users to
replace the workspace in an existing Zed window instead of opening a new
one or adding files to the current workspace.

### What it does

The `--reuse` flag finds an available local workspace window and
replaces its workspace with the newly specified paths. This provides a
third workspace opening mode alongside the existing `--add` and `--new`
flags.

### Implementation Details

- **CLI Flag**: Added `--reuse` (`-r`) flag with proper mutual exclusion
with `--add` and `--new`
- **Window Replacement**: Uses the existing `replace_window` option in
`workspace::OpenOptions`
- **Window Selection**: Reuses the first available local workspace
window
- **Fallback Behavior**: When no existing windows are found, creates a
new window
- **Test Coverage**: Added comprehensive test for the reuse
functionality

### Behavior

- `zed -r file.txt` - Replaces the workspace in an available window with
`file.txt`
- If no windows are open, creates a new window (same as default
behavior)
- Mutually exclusive with `-a/--add` and `-n/--new` flags
- Works with multiple files and directories

### Files Changed

- `crates/cli/src/cli.rs` - Added `reuse` field to `CliRequest::Open`
- `crates/cli/src/main.rs` - Added CLI argument definition and parsing
- `crates/zed/src/zed/open_listener.rs` - Implemented reuse logic and
added tests
- `crates/zed/src/zed/windows_only_instance.rs` - Updated for Windows
compatibility

### Testing

-  Unit tests pass
-  Manual testing confirms expected behavior:
  - Works when no windows are open
  - Replaces workspace in existing window
  - Maintains compatibility with existing `-a` and `-n` flags
  - Proper help text display


## Manual testing

#### In this first video we do a couple of tests: 

* **1**: What happens if we use the -r flag when there are no windows
open?
        - works as expected. It opens the files in a new window.
        
* **2**: Does it work as expected if there is already a window open.
Does it overrides the workspace?
- yes it does. When opening a different file it overrides the current
window instead of creating a new one.
        
* **3**: Does the -n flag still works as expected?
        - yes, it creates the project in a new window

* **4**: What about the -a flag?
       - yes, on the last accessed page 
       
* **5**: we do the replace command. It overrides the first opened
window, do we want this behavior?
- It is good enough that it overrides one of the opened windows with the
new project. It still makes the user automatically go to the window with
the specified files

* **6**: we use the -r command again replacing the workspace with a new
one.
       - this indeed worked as expected


https://github.com/user-attachments/assets/f1cd7f4b-f4af-4da2-a755-c0be7ce96c0d


#### In here the we check how the --help flag now displays the new
command. (Description was later updated)


https://github.com/user-attachments/assets/a8a7a288-d926-431b-a9f9-a8c3d909a2ec
2025-10-20 22:41:13 -06:00
Willy Hetland
71ea133d72 Theme-able Vim Mode wrapper (#39813)
Closes [#14093](https://github.com/zed-industries/zed/issues/14093)
Builds on [#32279](https://github.com/zed-industries/zed/pull/32279) by
making it theme dependent.
Discussion
[#37816](https://github.com/zed-industries/zed/discussions/37816)

Wraps the mode label indicator in a div and makes the wrapper and label
theme-able. Label weight to medium
Mode indicator will render like previously if not theme colors have been
set. (i.e., they match zed default- and fallbacks)
Really helps with visual confirmation of current mode.

_Did not investigate further if there is a way to keep the leading and
trailing -- if no theme var given._

Can be applied either by a theme itself or using `theme_overrides` in
settings.json

Theme colors applied via `theme_overrides`
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 08"
src="https://github.com/user-attachments/assets/a00d9ae4-b6db-46a0-84e2-98d2691a11ad"
/>
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 16"
src="https://github.com/user-attachments/assets/f27fddab-524d-43c4-9307-46b6a656cd35"
/>
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 23"
src="https://github.com/user-attachments/assets/7e477fff-7a40-4c01-95a7-fbd40fff6caa"
/>

No theme applied
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 31"
src="https://github.com/user-attachments/assets/8b7b2c75-007b-4074-a552-181c53f31213"
/>
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 36"
src="https://github.com/user-attachments/assets/7a708d81-2033-4d72-a844-57607a0434ea"
/>
<img width="233" height="34" alt="Screenshot 2025-10-08 at 23 01 40"
src="https://github.com/user-attachments/assets/526f9d10-4d0f-4bc5-af89-31fcca538ce4"
/>



https://github.com/user-attachments/assets/d0d71d4d-504f-4d18-bbd9-83d3a4b2adb7


Release Notes:

- Vim make mode indicator themeable

---------

Co-authored-by: willyHetland <willy.hetland@zeekit.no>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-21 04:30:30 +00:00
Cole Miller
917f22f884 Don't auto-release preview (#40728)
This feels a bit dangerous as long as we have the split releases problem

Release Notes:

- N/A
2025-10-20 21:29:19 -04:00
vipex
36c006828e pane: Ignore max tabs on terminal pane (#40740)
Closes #39901

I'm unsure as to which direction the team wants to go with this, but
this is the behavior of VSCode which is what this feature is based off
so i'm going with this.

Changes: 

1. Introduced a new argument to the `new` method on the Pane called
`ignore_max_tabs` that forces the `max_tabs` to None if it's true.
2. Added a new test `test_bypass_max_tabs_limit`.

Release Notes:

- Fixed: `max_tabs` Setting affecting the terminal pane.

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2025-10-20 21:19:40 -04:00
Bartosz Kaszubowski
a2c42813c4 markdown_preview: Apply few appearance tweaks for tables (#39190)
# Why

Refs:
*
https://github.com/zed-industries/zed/pull/39101#issuecomment-3350557981

# How

Apply suggested appearance changes in the comment mentioned above. I
have also retained the different background for header rows, since it
feels to me that it is something that GitHub styling lacks.

I have also attempted to shrink the table table element, to fit the
content width (so it does not span for the full width of preview), but I
have failed on those attempts. Tried to use many various GPUI
attributes, but only thing that worked was setting the exact width on
table container, also tried to reuse `max_lengths` values, but those are
counting characters, not the rendered width. I would like to explore
this a bit more, and try to follow up on those changes in a separate PR.

Release Notes:

- Improved table elements styling in Markdown Preview

# Preview

<img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 30"
src="https://github.com/user-attachments/assets/4f1517cb-9046-4e09-a1e1-5223421efb71"
/>
<img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 23"
src="https://github.com/user-attachments/assets/61303160-2b62-4213-80fc-ee8432cdf1fa"
/>
<img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 15"
src="https://github.com/user-attachments/assets/059a447e-574d-4545-870a-93f1c00b3bb8"
/>
<img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 42"
src="https://github.com/user-attachments/assets/8e7c6f9b-672f-4943-aded-1b644d2ff750"
/>
<img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 34"
src="https://github.com/user-attachments/assets/6d31f7f3-d0ea-4987-bf8c-78f6b307a2b3"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-21 00:38:47 +00:00
Julia Ryan
267052f891 Editor end of input context (#40735)
This is needed for #38914 and seems generally useful to have for
contextual keybindings.

Release Notes:

- N/A

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-20 17:08:51 -07:00
Dmitry Nefedov
62516e8f1f themes: Improve Gruvbox scrollbar colors (#38145)
Changes that I made:
- add "scrollbar.thumb.active_background" to all themes
- for dark themes: scrollbar.thumb.background is darker than hover (fg4
from palette for background and fg0 for hover)
- for light themes: scrollbar.thumb.background is lighter than hover
(fg4 for background and fg0 for hover like in dark theme case)

Those changes is consistent with VSCode gruvbox theme and other
applications.
For active_background I chose orange color, but we can use cyan color to
match vscode theme.

UPDATE: decided to use blue for active scrollbar as this color is used
as accent in other parts of gruvbox themes

Release Notes:

- Improved scrollbar colors for Gruvbox theme

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-20 21:05:54 -03:00
Akira Sousa
b479d1ef49 title_bar: Add configurable window controls position (#38834)
## 🎯 Description
Adds configurable window control buttons (minimize, maximize, close)
positioning for Linux, allowing users to choose between macOS-style
(left side) or Windows-style (right side) placement.

##  Features
- New `title_bar.window_controls_position` setting with `"left"` and
`"right"` options
- Left positioning: macOS style (Close → Minimize → Maximize)
- Right positioning: Windows style (Minimize → Maximize → Close)
- Fixed transparent background issues for window controls
- Maintains consistent styling with Zed's theme

## 🔧 Technical Changes

### Settings System
- Added `WindowControlsPosition` enum in `settings_content.rs`
- Extended `TitleBarSettingsContent` with `window_controls_position`
field
- Updated `TitleBarSettings` to include the new configuration

### Title Bar Layout
- Modified `platform_title_bar.rs` to use setting for layout positioning
- Added conditional logic for `justify_start()` vs `justify_between()`
based on position
- Fixed transparent container background by adding `bg(titlebar_color)`

### Window Controls
- Updated `platform_linux.rs` to reorder buttons based on position
setting
- Changed button background from `ghost_element_background` to
`title_bar_background`
- Implemented proper button sequencing for both positions

## 🧪 How to Test
1. Add to your Zed settings:
   ```json
   {
     "title_bar": {
       "window_controls_position": "left"
     }
   }
   ```
   or
   ```json
   {
     "title_bar": {
       "window_controls_position": "right"
     }
   }
   ```
2. Restart Zed
3. Verify buttons are positioned correctly
4. Check that background is not transparent
5. Test button functionality (minimize, maximize, close)

## �� Expected Behavior
- **Left position**: Buttons appear on the left side of the title bar in
Close → Minimize → Maximize order
- **Right position**: Buttons appear on the right side of the title bar
in Minimize → Maximize → Close order
- **Background**: Solid background matching Zed's theme (no
transparency)

## 🔍 Files Changed
- `crates/settings/src/settings_content.rs` - Added enum and setting
- `crates/title_bar/src/title_bar_settings.rs` - Updated settings struct
- `crates/title_bar/src/platform_title_bar.rs` - Modified layout logic
- `crates/title_bar/src/platforms/platform_linux.rs` - Updated button
ordering and styling

## 🎨 Design Rationale
This feature provides Linux users with the flexibility to choose their
preferred window control button layout, improving the user experience by
allowing them to match their desktop environment's conventions or
personal preferences.

##  Checklist
- [x] Code compiles without errors
- [x] Settings are properly serialized/deserialized
- [x] Background transparency issues resolved
- [x] Button ordering works correctly for both positions
- [x] Layout adapts properly based on configuration
- [x] No breaking changes to existing functionality

## 🔗 Related
This addresses the need for customizable window control positioning on
Linux, providing consistency with user expectations from different
desktop environments.


![demo2](https://github.com/user-attachments/assets/7333db34-d54e-427c-ac52-140925363f91)
2025-10-21 00:00:56 +00:00
ofetch
684f4dced9 settings_ui: Fix typo (#40743)
Fixes #40742

Release Notes:

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

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-20 23:04:00 +00:00
Jose Garcia
de6750d3f4 Add line_endings_button in VSCode settings to fix semantic merge conflict (#40745)
I have partially solved a problem caused by a structure in commit:
f7a0971d2b

Release Notes:

- N/A

Before:
<img width="723" height="480" alt="image"
src="https://github.com/user-attachments/assets/6600e0af-36cf-4aec-ace1-7ee4921e001e"
/>

After: 
<img width="764" height="217" alt="image"
src="https://github.com/user-attachments/assets/52111c27-c67a-4224-82bd-782cc6e07f97"
/>
2025-10-20 22:31:04 +00:00
Anthony Eid
4f5f299265 settings ui: Autoscroll content during keyboard navigation (#40734)
Closes #40608

This fixes tabbing in both the settings ui nav bar and page content
going off screen instead of scrolling the focused element into a visible
view.

The bug occurred because `gpui::list` and `gpui::uniform_list` only
render visible elements, preventing non visible elements in a view from
having their focus handle added to the element tree. Thus making the tab
stop map skip over those elements because they weren't present.

The fix for this is scrolling to reveal non visible elements and then
focus the selected element on the next frame.

Release Notes:

- settings ui: Auto scroll to reveal items in navigation bar and window
when tabbing

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-20 17:53:47 -04:00
Kirill Bulatov
32a442d522 Fix inlay hint cleanup on excerpts removal (#40738)
A cherry-pick of
f5188d55fb

This fixes a hard-to-reproduce crash caused excerpts removal not
updating previous snapshot data after corresponding inlay data was
removed.
Same branch has a test:
8783a9eb4f
that does not fail on `main` due to different way inlays are queried, it
will be merged later.

Release Notes:

- N/A
2025-10-20 21:43:33 +00:00
kitt
f7a0971d2b Add line endings indicator in status bar (#39609)
Closes #5294

This PR adds a line ending indicator to the status bar, hidden by
default as discussed in
https://github.com/zed-industries/zed/issues/5294.

### Changes

- 8b063a22d8700bed9c93989b9e0f6a064b2e86cf add the indicator and
`status_bar.line_endings_button` setting.

- ~~9926237b709dd4e25ce58d558fd385d63b405f3b changes
`status_bar.line_endings_button` from a boolean to an enum:~~
  <details> <summary> show details </summary>

   - `always`     Always show line endings indicator.
- `non_native` Indicate when line endings do not match the current
platform.
   - `lf_only`    Indicate when using unix-style (LF) line endings only.
- `crlf_only` Indicate when using windows-style (CRLF) line endings
only.
   - `never`      Do not show line endings indicator.
   
I know this many options might be overdoing it, but I was torn between
the pleasant default of `non_native` and the simplicity of `lf_only` /
`crlf_only`.

My thinking was if one is developing on a project which exclusively uses
one line-ending style or the other, it would be nice to be able to
configure no-indicator-in-the-happy-case behavior regardless of the
platform zed is running on. But I'm not really familiar with any
projects that use exclusively CRLF line endings in practice. Is this a
scenario worth supporting or just something I dreamed up?

   </details>

- 01174191e4cf337069e7a31b0f0432ae94c52515 rename the action context for
`line ending: Toggle` -> `line ending selector: Toggle`.
When running the action in the command palette with the old name I felt
surprised to be greeted with an additional menu, with the new name it
feels more predictable (plus now it matches
`language_selector::Toggle`!)

### Future work

Hidden status bar items still get padding, creating inconsistent spacing
(and it kind of stands out where I placed the line-endings button):

<img alt="the gap after the indicator is larger than for other buttons"
src="https://github.com/user-attachments/assets/24a346d4-3ff6-4f7f-bd87-64d453c2441a"
/>

I started a new follow-up PR to address that:
https://github.com/zed-industries/zed/pull/39992

Release Notes:

- Added line ending indicator to the status bar (disabled by default;
enabled by setting `status_bar.line_endings_button` to `true`)
2025-10-20 15:24:41 -06:00
Lukas Wirth
ed82233030 gpui: Box Window instances (#40733)
We very frequently move this in and out of the windows slot map on
`update_window_id` calls (and we call this a lot!). This alone showed up
as `memmove`s at roughly 1% perf in Instruments when scrolling a buffer
which makes sense, `Window` itself is 4kb in size. The fix is simple,
just box the `Window` instances, moving a pointer is cheap in
comparison.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 21:03:28 +00:00
Alex Miller
ec0efc9360 git_ui: Close branch selector as soon as branch is selected (#39725)
I noticed that branch picker doesn't close until the checkout operation
is completed.
While normally it's not an issue, it becomes obvious if there are longer
running post checkout hooks. In that case selecting a branch makes it
feel like nothing has happened (there's a small indicator in the footer)
so it's possible to click it multiple times. Closing the modal before
the operation completes leads to the error modal saying `Failed to
change branch. entity released. Please try again.` even though the
checkout was successful.

The new behavior is to close the branch picker as soon as the branch is
selected. This also aligns with the existing behavior in `create_branch`
where `cx.emit(DismissEvent);` is called without waiting for
`repo.update`.
And as I mentioned before there an indicator in the footer saying `git
switch <branch_name>` with a spinner thingy.

I also added a check in the picker's `open` function where it first
checks if there's currently an active job and does not show the picker
in that case.

If this generally makes sense I can add the tests as well if needed.

P.S I checked how it works in VSCode and yes it also closes the branch
picker as soon as the branch is selected. The only difference is that
they show the loading indicator right next to the branch name (with a
new branch) but in our case the current branch and activity indicator
are located in different places.

<details><summary>Before</summary>


https://github.com/user-attachments/assets/adf08967-d908-45fa-b3f6-96f73d321262

</details>

<details><summary>After</summary>


https://github.com/user-attachments/assets/88c7ca41-7b39-42d6-a98b-3ad19da9317c

</details>

Release Notes:

- The branch picker now closes immediately after a branch is selected,
instead of waiting for the branch switch to complete.
2025-10-20 16:55:44 -04:00
Coenen Benjamin
1c639da8a8 file_finder: Include worktree root name in multi-worktrees workspace (#40415)
Closes #39865

Release Notes:

- Fixed file finder display when searching for files in history if you
had several worktrees opened in a workspace. It now displays the
worktree root name to avoid confusion if you have several files with
same name in different worktrees.

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-10-20 23:54:56 +03:00
Ben Kunkle
ebaefa8cbc settings_ui: Add maybe settings (#40724)
Closes #ISSUE

Adds a `Maybe<T>` type to `settings_content`, that makes the distinction
between `null` and omitted settings values explicit. This unlocks a few
more settings in the settings UI

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 16:25:20 -04:00
Jose Garcia
33bc586ed1 theme: Change the icon used for JSONC files (#40726)
Closes #40683 

Release Notes:

- Changed jsonc files' icon
2025-10-20 23:23:24 +03:00
Finn Evers
853d7c3f92 gpui: Fix uniform list scrolling with vertical padding present (#40719)
Closes #40267

Release Notes:

- Fixed a rare issue where the extension page would stutter while
scrolling.
2025-10-20 18:57:00 +00:00
Ben Brandt
79ada634ac acp: Fix following for agents that only provide locations (#40710)
We were dropping the entities once we created the buffers, so the weak
entities could never be upgraded. This treats new locations we see the
same as we would for a read/write call and stores the entity so that we
can follow like we normally would.

Release Notes:

- acp: Fix following not working with certain tool calls.
2025-10-20 18:49:05 +00:00
Josh Piasecki
057c3c1206 Add dock state to workspace context (#40454)
I love keybindings.

I spend way to much time thinking about them.

I also REALLY like working in Zed. 

so far, however, I have found the key context system in Zed to be less
flexible than in VSCode.
the HUGE context that is available in VSCode helps you create
keybindings for very specific targeted scenarios.

the tree like structure of the Zed key context means you loose some
information as focus moves throughout the application.
For example, it is not currently possible to create a keybinding in the
editor that will only work when one of the Docks is open, or if a
specific dock is open.

this would be useful in implementing solutions to ideas like #24222 
we already have an action for moving focus to the dock, and we have an
action for opening/closing the dock, but to my knowledge (very limited
lol) we cannot determine if that dock *is open* unless we are focused on
it.

I think it is possible to create a more flexible key binding system by
adding more context information to the higher up context ancestors.
while:
``` 
Workspace right_dock=GitPanel
    Dock
        GitPanel
            Editor
```
may seem redundant, it actually communicates fundamentally different
information than:
```
Workspace right_dock=GitPanel
    Pane
        Editor
```  

the first says "the GitPanel is in the right hand dock AND IT IS
FOCUSED",
while the second means "Focus is on the Editor, and the GitPanel just
happens to be open in the right hand dock"

This change adds a new set of identifiers to the `Workspace` key_context
that will indicate which docks are open and what is the specific panel
that is currently visible in that dock.

examples:
- `left_dock=ProjectPanel`
- `bottom_dock=TerminalPanel`
- `right_dock=GitPanel`

in my testing the following types of keybindings seem to be supported
with this change:
```jsonc
// match for any value of the identifier
"context": "Workspace && bottom_dock"
"context": "Workspace && !bottom_dock"
// match only a specific value to an identifier
"context": "Workspace && bottom_dock=TerminalPanel"
// match only in a child context if the ancestor workspace has the correct identifier
"context": "Workspace && !bottom_dock=DebugPanel > Editor"
```

some screen shots of the context matching in different circumstances:
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 34"
src="https://github.com/user-attachments/assets/116d0575-a1ae-4577-95b9-8415cda57e52"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 57"
src="https://github.com/user-attachments/assets/000fdbb6-80bd-46e9-b668-f4b54ab708d2"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 37"
src="https://github.com/user-attachments/assets/7b1c82da-b82f-4e14-a97c-3cd0e71bbca0"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 52"
src="https://github.com/user-attachments/assets/1fd4b65a-09f7-47a9-a9b7-fdce4252aec3"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 22 38"
src="https://github.com/user-attachments/assets/f4c2ac5c-e6f9-4e0e-b683-522b237e3328"
/>


the persistent_name values for `ProjectPanel` and `OutlinePanel` needed
to be updated to not have a space in them in order to pass the
`Identifier` check. all the other Panels already had names that did not
include spaces, so it just makes these conform with the other ones.

I think this is a great place to start with adding more context
identifiers and i think this type of additional information will make it
possible to create really dynamic keybindings!

Release Notes:

- Workspace key context now includes the state of the 3 docks
2025-10-20 18:23:46 +00:00
Josh Piasecki
13fe9938c2 CollapseAllDiffHunks action for editor (#40668)
This PR adds a new action `editor::CollapseAllDiffHunks`
which will allow the user to choose any keybinding for hiding the
Expanded Diff Hunks.
2025-10-20 18:18:01 +00:00
Lukas Wirth
78bfda5045 gpui: Improve some log_err calls in windows backend (#40717)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 18:01:46 +00:00
Lukas Wirth
d8f4293ac3 sum_tree: Implement recursive Sumtree::find, use it over Cursor::seek if possible (#40700)
Reduces peak stack usage in these functions and should generally be a
bit performant.

Display map benchmark results
```
To tab point/to_tab_point/1024
                        time:   [531.40 ns 532.10 ns 532.97 ns]
                        change: [-2.1824% -2.0054% -1.8125%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

To fold point/to_fold_point/1024
                        time:   [530.81 ns 531.30 ns 531.80 ns]
                        change: [-2.0295% -1.9054% -1.7716%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 17:20:09 +00:00
Ben Kunkle
b6fb1d0a19 settings_ui: Add more settings (#40708)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 12:37:55 -04:00
Mikayla Maki
0a17f91923 chore: Fix displayed git command (#40548)
Too small for release notes IMO

Release Notes:

- N/A
2025-10-20 09:25:34 -07:00
Lukas Wirth
7aa0626098 editor: Refresh document highlights when expanding excerpts (#40715)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 16:19:57 +00:00
ming_jiang
ea5f3e6086 Fix PATH lookup to handle Windows case sensitivity (#40711)
Closes #40448

On Windows, PATH might be "Path" instead of "PATH"

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 16:12:05 +00:00
Alvaro Parker
db404fc2e3 git: Add diff view for stash entries (#38280)
Continues the work from #35927 to add a git diff view for stash entries.

[Screencast From 2025-09-17
19-46-01.webm](https://github.com/user-attachments/assets/ded33782-adef-4696-8e34-3665911c09c7)

Stash entries are [represented as
commits](https://git-scm.com/docs/git-stash#_discussion) except they
have up to 3 parents:

```
       .----W (this is the stash entry)
      /    /|
-----H----I |
           \|
            U
```

Where `H` is the `HEAD` commit, `I` is a commit that records the state
of the index, and `U` is another commit that records untracked files
(when using `git stash -u`).

Given this, I modified the existing commit view struct to allow loading
stash and commits entries with git sha identifier so that we can get a
similar git diff view for both of them.

The stash diff is generated by comparing the stash commit with its
parent (`<commit>^` or `H` in the diagram) which generates the same diff
as doing `git stash show -p <stash entry>`. This *can* be
counter-intuitive since a user may expect the comparison to be made
between the stash commit and the current commit (`HEAD`), but given that
the default behavior in git cli is to compare with the stash parent, I
went for that approach.

Hoping to get some feedback from a Zed team member to see if they agree
with this approach.

Release Notes:

- Add git diff view for stash entries
- Add toolbar on git diff view for stash entries
- Prompt before executing a destructive stash action on diff view
- Fix commit view for merge commits  (see #38289)
2025-10-20 11:47:15 -04:00
Agus Zubiaga
eda7a49f01 zeta2: Max retrieved definitions option (#40515)
Release Notes:

- N/A
2025-10-20 15:26:41 +00:00
Rian Drake
8bef4800f0 workspace: Add NewFileSplit action with direction (#39726)
Add new `workspace::NewFileSplit` action which expects a
`SplitDirection` argument, allowing users to programmatically control
the direction of the split in keymaps, for example:

```json
{
    "context": "Editor",
    "bindings": {
        "ctrl-s ctrl-h": ["workspace::NewFileSplit", "left"],
        "ctrl-s ctrl-j": ["workspace::NewFileSplit", "down"],
        "ctrl-s ctrl-k": ["workspace::NewFileSplit", "up"],
        "ctrl-s ctrl-l": ["workspace::NewFileSplit", "right"]
    }
}
```

Release Notes:

- Added `workspace::NewFileSplit` action, which can be used to
programmatically split the editor in the provided direction.

Co-authored-by: Rian Drake <rian.drake@rocketwerkz.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-20 16:01:26 +01:00
Lukas Wirth
67b9d480b4 project: Make textDocument/signatureHelp implementation lsp compliant (#40707)
The parameter label offsets are utf16 offsets, not utf8. Additionally we
now validate the language server output.

Closes https://github.com/zed-industries/zed/issues/40578

Companion bug on rust-analyzer side
https://github.com/rust-lang/rust-analyzer/pull/20876

Release Notes:

- Fixed `textDocument/signatureHelp` implementation not being LSP
compliant
2025-10-20 14:57:23 +00:00
Smit Barmase
30f3152e65 settings_ui: Use window controls on Linux (#40706)
Closes #40657

Release Notes:

- Added window controls to the settings window on Linux.
2025-10-20 20:23:49 +05:30
Piotr Osiewicz
7c4fb5a899 search: New old search implementation (#39956)
This is an in-progress work on changing how task scheduler affects
performance of project search. Instead of relying on tasks being
executed at a discretion of the task scheduler, we want to experiment
with having a set of "agents" that prioritize driving in-progress
project search matches to completion over pushing the whole thing to
completion. This should hopefully significantly improve throughput &
latency of project search.

Release Notes:

- Improved project search performance

---------

Co-authored-by: Smit Barmase <smit@zed.dev>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-20 16:40:02 +02:00
Ben Brandt
85c2aa7325 Update to acp 0.5 (#40701)
Release Notes:

- N/A
2025-10-20 13:52:05 +00:00
Donnie Adams
08ecaa3931 Add comment language injection for supported languages (#39884)
Release Notes:

- Added comment language injections for builtin languages. This enables
highlighting of `TODO`s and similar notes with the comment extension
installed.

Signed-off-by: Donnie Adams <donnie@thedadams.com>
2025-10-20 14:45:51 +02:00
Alex Zeier
96415e2d19 languages: Separate control flow keywords for JS/TS/TSX (#39801)
Related to #9461, inspired by #39683

`await` and `yield` both seem somewhat debatable on whether they should
be considered the be control flow keywords.

For now I went with:
- `await`: no – The control flow effect of `await` is at a level does
not seem relevant for syntax highlighting.
- `yield`: yes – `yield` directly affects the output of a generator, and
is also included for consistency with Rust (#39683).
 
 Happy to change these either direction.

<img width="1151" height="730" alt="SCR-20251008-izus"
src="https://github.com/user-attachments/assets/533ea670-863a-4c5c-aaa5-4a9bfa0bf0dd"
/>

--- 

Release Notes:

- Improved granularity of keyword highlighting for JS/TS/TSX: Themes can
now specify `keyword.control` for control flow keywords like `if`,
`else`, `return`, etc.
2025-10-20 14:40:05 +02:00
Danilo Leal
9a3c7945a9 docs: Add section about MCP servers with external agents (#40658)
Adding this content after seeing people ask about how to make MCP
servers installed from Zed be picked up by external agents. At the
moment, this varies depending on the agent, and felt relevant to be
documented.

Release Notes:

- N/A
2025-10-20 09:11:11 -03:00
localcc
cc21089736 Fix default window size on small displays (#40398)
Fixed: #40039
Fixed: #40404
Fixed: #40272
Fixed: #40666

Release Notes:

- N/A
2025-10-20 14:09:36 +02:00
Lukas Wirth
bdb7c642a1 clock: Bump the min collaborator ID (#40694)
This allows us to play with IDs < 8 without having to do another
redeploy

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 11:59:35 +00:00
Danilo Leal
b827d8cfc0 ai onboarding: Add dismiss button to the sign in banner (#40660)
Release Notes:

- N/A
2025-10-20 08:35:28 -03:00
Hayashi Mikihiro
9a72453a2b Highlight control flow in Rust/C/C++ (#39683)
part of https://github.com/zed-industries/zed/issues/9461


Release Notes:
- Added the ability to seperately highlight control flow keywords for
Rust, C and C++ for users and theme authors via the `keyword.control`
syntax property
<img width="805" height="475" alt="スクリーンショット 2025-10-07 22 21 59"
src="https://github.com/user-attachments/assets/40ed03ea-a129-44ce-b6d8-284656b9f3ba"
/>
2025-10-20 13:28:54 +02:00
Lukas Wirth
43a9368dff clock: Cleanup ReplicaId, Lamport and Global (#40600)
- Notable change is the use of a newtype for `ReplicaId`
- Fixes `WorktreeStore::create_remote_worktree` creating a remote
worktree with the local replica id, though this is not currently used
- Fixes observing the `Agent` (that is following the agent) causing
global clocks to allocate 65535 elements
- Shrinks the size of `Global` a bit. In a local or non-collab remote
session it won't ever allocate still.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-20 13:26:20 +02:00
Piotr Osiewicz
37e264ab99 fs: Reintroduce benchmarks crate (#40689)
It was erroenously removed in #40216

Release Notes:

- N/A
2025-10-20 10:30:06 +00:00
Daniel Wargh
94c28ba14a Improve TS and JS symbol outline (#39797)
Added more granular symbols for ts and js in outline panel. This is a
bit closer to what vscode offers.

<details><summary>Screenshots of current vs new</summary>
<p>
New:
<img width="1723" height="1221" alt="image"
src="https://github.com/user-attachments/assets/796d3b59-fffa-4a66-9986-f7c75e618103"
/>

Current:
<img width="1714" height="1347" alt="image"
src="https://github.com/user-attachments/assets/f7cff463-de2a-4d86-b1a6-e19f4fd8dc6e"
/>

Current vscode (cursor):
<img width="1710" height="1177" alt="image"
src="https://github.com/user-attachments/assets/31902d52-becf-4d3f-960d-7e054e00e32d"
/>

</p>
</details> 

I have never touched scheme before, and pair-programmed this with ai, so
please let me know if there's any glaring issues with the
implementation. I just miss the outline panel in vscode very much, and
would love to see this land.
Happy to help with tsx/jsx as well if this is the direction you guys
were thinking of taking the outline impl.

Doesn't fully close https://github.com/zed-industries/zed/issues/20964
as there is no support for chained class method callbacks or
`Class.prototype.method = ...` as mentioned in
https://github.com/zed-industries/zed/issues/21243, but this is a step
forward.

Release Notes:

- Improved typescript and javascript symbol outline panel
2025-10-20 12:22:07 +02:00
Maël Nison
36210e72af Make the Yarn SDK path relative to the worktree (#40062)
Let's say you run this:

```
cd ~/proj-a
zed ~/proj-b
```

The `zed` process will execute with `current_dir() = ~/proj-a`, but a
`worktree_root_path() = ~/proj-b`. The old detection was then checking
if the Yarn SDK was installed in `proj-a` to decide whether to set the
tsdk value or not. This was incorrect, as we should instead check for
the SDK presence inside `proj-b`.

Release Notes:

- Fixed the Yarn SDK detection when the Zed pwd is different from the
opened folder.
2025-10-20 11:46:34 +02:00
Sylvain Brunerie
e3297cdcae Add "Setting up Xdebug" section in PHP docs (#40470)
The page about PHP in the docs doesn’t explain how to use Xdebug. I had
a lof of trouble setting it up the first time, then recently had another
headache trying to get it to work again, because the value for `adapter`
had changed from `PHP` to `Xdebug`.

It’s likely that my example config isn’t perfect or has redundant stuff
or whatever, feel free to amend it.

I also took the liberty to set the Phpactor and Intelephense headings to
level 3 because I felt like they were part of "Choosing a language
server."

Release Notes:

- N/A
2025-10-20 11:44:58 +02:00
Smit Barmase
92ff29fa7d Add Vue language server v3 support (#40651)
Closes https://github.com/zed-extensions/vue/issues/48

Migration guide:
https://github.com/vuejs/language-tools/discussions/5456

PR to remove tdsk: https://github.com/zed-extensions/vue/pull/61

Release Notes:

- Added support for Vue language server version 3. Know more
[here](https://github.com/vuejs/language-tools/releases/tag/v3.0.0).

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-10-20 13:32:31 +05:30
Julia Ryan
1d3bf9789e Add DelayMs type for settings (#40659)
Closes #40610

Release Notes:

- N/A
2025-10-20 04:34:55 +00:00
Bartosz Kaszubowski
59b87d5c71 git_ui: When no changes, disable stage/unstage toolbar buttons (#39909)
# Why

While working on recent PR I have spotted that "Stage" and "Unstage"
buttons in "Uncommited Changes" toolbar are always active, even when
there is no changes made locally.

<img width="1628" height="656" alt="Screenshot 2025-10-10 at 00 49 06"
src="https://github.com/user-attachments/assets/6bdb9ded-17c8-4f84-8649-b297162c1992"
/>

# How

Re-use already existing button states for managing the disabled state of
"Uncommited Changes" toolbar buttons when changeset is empty.

Release Notes:

- Added disabled state for "Uncommited Changes" toolbar buttons when
there are no changes present

# Preview

<img width="1728" height="772" alt="Screenshot 2025-10-10 at 08 40 14"
src="https://github.com/user-attachments/assets/ff41d852-974e-4ce1-9163-ecd30e17d5d8"
/>
2025-10-19 22:21:21 -04:00
Joseph T. Lyons
fd4682c8d1 Remove Windows beta issue template (#40650)
Release Notes:

- N/A
2025-10-19 19:29:09 +00:00
Smit Barmase
f2b966b139 remote: Use SFTP over SCP for uploading files and directories (#40510)
Closes #37322

Uses SFTP if available, otherwise falls back to SCP for uploading files
and directories to remote. This fixes an issue on older macOS versions
where outdated SCP can throw an ambiguous target error.

Release Notes:

- Fixed an issue where extensions wouldn’t work when SSHing into a
remote from older macOS versions.
2025-10-20 00:01:43 +05:30
Bennet Fenner
4507110981 settings: Remove unused stream_edits setting in agent (#40640)
This setting is unused (we always stream edits)

Release Notes:

- N/A
2025-10-19 15:52:28 +00:00
Lukas Wirth
1b43a632dc fs: Fix RealFs::open_handle implementation for directories on windows (#40639)
Release Notes:

- Fixed worktree names not updating when renaming the root folder on
windows
2025-10-19 15:25:13 +00:00
Xiaobo Liu
8f3f7232fb gpui: Add exit in tab title update loop (#40628)
Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-19 16:52:16 +02:00
Finn Evers
5f13ce6d7d docs: Update section about installing extensions locally (#40636)
Release Notes:

- N/A
2025-10-19 14:30:01 +00:00
Cameron Mcloughlin
57387812dc terminal_ui: Terminal failed to spawn UI (#40246)
Co-authored-by: Piotr piotr@zed.dev
Co-authored-by: Lukas lukas@zed.dev
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-19 15:26:41 +01:00
Bartosz Kaszubowski
197d244378 image_viewer: Use buffer font in breadcrumbs (#40601)
# Why

Spotted that image path in editor breadcrumb uses regular (UI) font in
comparison to paths of any other code-related files.

<img width="842" height="214" alt="Screenshot 2025-10-18 at 19 32 55"
src="https://github.com/user-attachments/assets/07823fd2-778a-4341-a647-3ab50192c8fa"
/>

# How

Use buffer font for image path in Image Viewer breadcrumbs.

Release Notes:

- Aligned appearance of path displayed by Image Viewer breadcrumbs with
other panes.

# Preview

### Before

<img width="842" height="214" alt="Screenshot 2025-10-18 at 19 26 17"
src="https://github.com/user-attachments/assets/921df27f-c104-457e-908c-e4beaea3a27e"
/>

### After

<img width="842" height="214" alt="Screenshot 2025-10-18 at 19 24 17"
src="https://github.com/user-attachments/assets/112ce5f3-1a2b-40e4-bf4f-e258f3518812"
/>
2025-10-18 22:00:28 -07:00
Joseph T. Lyons
6d975984ee Register rules files as Markdown (#40614)
Release Notes:

- `.rules`, `.cursorrules`, `.windsurfrules`, and `.clinerules` are now
syntax highlighted as Markdown files.
2025-10-19 01:47:17 +00:00
Joseph T. Lyons
3aee14378d python: Only enable basedpyright and ruff by default (#40604)
Though we ship with `basedpyright`, `ruff` and a few other laps for
python, we run them all at once.

Release Notes:

- Only enable `basedpyright` and `ruff` by default when opening Python
files. If you prefer one of the other.
2025-10-18 22:52:11 +00:00
Kirill Bulatov
02b15f0062 Add Windows path into custom theme docs (#40599)
Closes https://github.com/zed-industries/zed/issues/40584
Closes https://github.com/zed-industries/zed/issues/40057

Release Notes:

- N/A
2025-10-18 16:53:19 +00:00
Xiaobo Liu
8d48f9cdae gpui: Simplify tab group lookup logic in SystemWindowTabController (#40466)
Refactor the find_tab_group method to use the question mark operator for
cleaner error handling, replacing the explicit if-else pattern with a
more concise chained approach.

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-18 15:04:40 +00:00
Andrew Farkas
41994452f2 Fix extension keymap context for single file worktree (#40425)
Closes #40353

Release Notes:

- Fixed `extension` in keymap context being empty for single file
worktree

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-18 14:57:59 +00:00
Smit Barmase
89be2635d4 project_panel: Fix double-click on blank area to create a new file (#40503)
Regressed in https://github.com/zed-industries/zed/pull/38008

Release Notes:

- Fixed an issue where double-clicking empty space in the project panel
wouldn’t create a new file.
2025-10-18 18:14:41 +05:30
Bedis Nbiba
35664461c6 docs: Add deno.jsonc to JSON LSP settings (#40563)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-18 12:08:00 +02:00
Joseph T. Lyons
219ae05d1f Add a doc on crafting release notes (#40557)
Release Notes:

- N/A
2025-10-18 05:09:27 +00:00
Julia Ryan
e702df21a4 Fix Rust macro_invocation injections (#40534)
Closes #40317

Release Notes:

- N/A
2025-10-18 01:33:00 +00:00
joel
3d6722be9a Fix Right Alt key not working in keybindings on Windows (#40536)
### Problem
On Windows, the right Alt key was not working in keybindings (e.g.,
`Ctrl+Right Alt+B`), while the left Alt key worked correctly. This was
due to overly aggressive AltGr detection that treated any `right Alt +
left Ctrl` combination as AltGr, even on US keyboards where AltGr
doesn't exist.

### Root Cause
Windows internally represents AltGr (Alt Graph) as `right Alt + left
Ctrl` pressed simultaneously. The previous implementation always
excluded this combination from being treated as regular modifier keys to
support international keyboards. However, this broke keybindings using
right Alt on US/UK keyboards where users expect right Alt to behave
identically to left Alt.

### Solution
Implemented keyboard layout-aware AltGr detection:

1. Added `uses_altgr()` method to `WindowsKeyboardLayout` that checks if
the current keyboard layout is known to use AltGr (German, French,
Spanish, Polish, etc.)
2. Modified `current_modifiers()` to only apply AltGr special handling
when the keyboard layout actually uses it
3. Added explicit checking for both `VK_LMENU` and `VK_RMENU` instead of
relying solely on the generic `VK_MENU`

### Behavior
- **US/UK keyboards**: Right Alt now works identically to left Alt in
keybindings. `Ctrl+Right Alt+B` triggers the same action as `Ctrl+Left
Alt+B`
- **International keyboards** (German, French, Spanish, etc.): AltGr
continues to work correctly for typing special characters and doesn't
trigger keybindings
- **All keyboards**: Both Alt keys are detected symmetrically, matching
the behavior of left/right Windows keys

### Testing
Manually tested on Windows with US keyboard layout:
-  `Ctrl+Left Alt+B` triggers keybinding
-  `Ctrl+Right Alt+B` triggers keybinding  
-  Both Alt keys work independently in keybindings


Release Notes:
- Fixed Right Alt key not working in keybindings on Windows
2025-10-18 02:27:45 +02:00
Delvin
47c6ae7b1f settings_ui: Fix stepper buttons to Inactive Opacity to 0.1 increment adjustments (#40477)
Closes #40279

Release Notes:

- Fix stepper buttons (+/-) to the Inactive Opacity setting for 0.1
increment adjustments on settings UI

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-17 23:12:05 +00:00
David
9984614f3d settings_ui: Fix misplaced comma in autoclose setting description (#40519)
Release Notes:

- Fixed misplaced comma in the autoclose description from:
"when you type (, Zed will ...)"
to 
"when you type, (Zed will ...)"

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-17 19:45:44 -03:00
Bartosz Kaszubowski
287314f415 markdown_preview: Improve the link decoration logic (#39905)
Closes #39838

Refs:
*
https://github.com/zed-industries/zed/pull/39149#issuecomment-3383015060

# How

After digging a bit more to find out why raw links are not colored in
Markdown renderer I have found a simpler approach to applying color
decoration, which also fixed the lack of colors on raw links mentioned
in issue and comment above.

Release Notes:

- Improved decoration logic for links in Markdown

# Preview

<img width="1712" height="820" alt="Screenshot 2025-10-09 at 23 39 09"
src="https://github.com/user-attachments/assets/3864cb6c-3fc6-4110-8067-6158cd4b58f5"
/>
2025-10-17 19:43:44 -03:00
Conrad Irwin
63e719fadf Disallow rename/copy/delete on unshared files (#40540)
Release Notes:

- Disallow rename/delete/copy on unshared files

Co-Authored-By: Cole <cole@zed.dev>
2025-10-17 22:33:08 +00:00
Cole Miller
1e69e5d844 Set the minimum log level to info for the remote server (#40543)
`env_logger` defaults to only showing error-level logs, but we show
info-level logs and above for the main Zed process, so I think it makes
sense for the remote server to behave the same way.

Release Notes:

- N/A
2025-10-17 18:32:52 -04:00
Max Brunsfeld
30c4434b70 Ignore flaky ignored_dirs_events test (#40546)
Release Notes:

- N/A
2025-10-17 22:28:43 +00:00
Mikayla Maki
d7e193caf3 Show telemetry for adding all items (#40541)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 22:11:36 +00:00
Nia
438c890816 perf: Add on search + fixups (#40537)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 22:11:09 +00:00
Max Brunsfeld
4dd463f8ac Fix repo path to project path conversion in git panel (#40535)
Closes https://github.com/zed-industries/zed/issues/40422
Closes https://github.com/zed-industries/zed/issues/40379
Closes https://github.com/zed-industries/zed/issues/40307

Release Notes:

- Fixed an issue where the project diff view did not work for multi-repo
projects on Windows when using WSL or SSH remoting
2025-10-17 14:57:03 -07:00
Kirill Bulatov
22fd91d490 Re-register buffers on server stop (#40504)
Follow-up of https://github.com/zed-industries/zed/pull/40388

Release Notes:

- N/A
2025-10-17 21:04:08 +00:00
Seeni
a660a39ae8 docs: Update cpp.md to indicate GDB version requirements (#40027)
Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-10-17 21:02:53 +00:00
Seivan
60285459e8 gpui: Update link to Ownership and data flow section (#40457)
Fixed broken link to `Ownership and data flow section`.
2025-10-17 14:26:10 -06:00
Remco Smits
7e97fcaacb Reduce display_map snapshot creation (#39354)
Re-applies https://github.com/zed-industries/zed/pull/30840

This PR re-applies the initial
[PR](https://github.com/zed-industries/zed/pull/30840). As it was closed
because it was hard to land, because of the many conflicts. This PR
re-applies the changes for it.

In several cases we were creating multiple display_map
snapshots within the same root-level function call.
Creating a display_map snapshot is quite slow, and in some
cases we were creating the snapshot multiple times.

Release Notes:

- N/A
2025-10-17 21:56:57 +02:00
Julia Ryan
ef5b8c6fed Remove workspace-hack (#40216)
We've been considering removing workspace-hack for a couple reasons:
- Lukas ran into a situation where its build script seemed to be causing
spurious rebuilds. This seems more likely to be a cargo bug than an
issue with workspace-hack itself (given that it has an empty build
script), but we don't necessarily want to take the time to hunt that
down right now.
- Marshall mentioned hakari interacts poorly with automated crate
updates (in our case provided by rennovate) because you'd need to have
`cargo hakari generate && cargo hakari manage-deps` after their changes
and we prefer to not have actions that make commits.

Currently removing workspace-hack causes our workspace to grow from
~1700 to ~2000 crates being built (depending on platform), which is
mainly a problem when you're building the whole workspace or running
tests across the the normal and remote binaries (which is where
feature-unification nets us the most sharing). It doesn't impact
incremental times noticeably when you're just iterating on `-p zed`, and
we'll hopefully get these savings back in the future when
rust-lang/cargo#14774 (which re-implements the functionality of hakari)
is finished.

Release Notes:

- N/A
2025-10-17 18:58:14 +00:00
Ben Kunkle
375a404132 settings_ui: Fix missing list state reset causing panic (#40497)
Closes #40467

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 14:56:20 -04:00
Lukas Wirth
27dcdb5841 multi_buffer: Reduce RefCell::borrow_mut calls to the bare minimum (#40522)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 18:17:34 +00:00
Conrad Irwin
1fbe1e3512 VSCode settings import refactor (#40513)
A small follow-up to the settings refactor of a few weeks ago to move
all the VSCode settings imports
to one place.

This should make it easier to spot missing imports, and easier to test
the importer.

Release Notes:

- N/A
2025-10-17 17:47:05 +00:00
Marshall Bowers
62858f6a5c Restore Oxford comma in README (#40518)
We use Oxford commas in this household.

Release Notes:

- N/A
2025-10-17 17:28:19 +00:00
Bennet Fenner
3f1319162a Remove agent1 code (#40495)
Release Notes:

- N/A
2025-10-17 18:49:11 +02:00
Jakub Konka
73e028c01c dap: Allow user to pass custom envs to adapter via project settings (#40490)
It is now possible to configure logging level of CodeLLDB adapter via
envs specified in project settings like so:

```
{
    "dap": {
        "CodeLLDB": {
            "envs": {
                "RUST_LOG": "debug"
            }
        }
    }
}
```

Release Notes:

- N/A
2025-10-17 16:48:00 +00:00
Agus Zubiaga
c1e87c8a00 zeta2: Feature flag (#40505)
Release Notes:

- N/A
2025-10-17 15:52:42 +00:00
Agus Zubiaga
1449d1cdb9 zeta2: Report accepted predictions (#40500)
Release Notes:

- N/A
2025-10-17 15:52:11 +00:00
Lukas Wirth
83bfe2ff7b multi_buffer: Make anchor_in_excerpt fallible for bad text anchors (#40496)
`MultiBuffer::anchor_in_excerpt` currently just wraps the given text
anchor in a multibuffer anchor. This allows one to get a multibuffer
anchor that points outside its excerpt which is basically never what one
wants. This PR now does a bounds check and returns `None` if the given
text anchor is not within the bounds of the excerpt.

Release Notes:

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

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-10-17 15:40:37 +00:00
Gaauwe Rombouts
7f9898a90b Add Amplitude tracking to docs (#40494)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 17:10:59 +02:00
Lukas Wirth
b27fd3b8d7 worktree: Don't attempt to watch non-existing global gitignore (#40476)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 13:19:38 +00:00
Ben Kunkle
9056d77604 settings_ui: Add dynamic setting fields (#40443)
Closes #ISSUE

Includes the start of how we can get rid of most of the `.unimplemented`
"Edit in JSON" buttons in the settings UI. For now only Theme selection
is implemented, follow ups will add more settings

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 09:13:34 -04:00
Lukas Wirth
b7112320bb file_finder: Fix open path prompt creating wrong highlight indices (#40488)
Fixes ZED-28R

Release Notes:

- Fixed open path prompt panicking on certain inputs
2025-10-17 12:41:09 +00:00
Lukas Wirth
b59a3bbd49 gpui: Remove some unnecessary unsafe code (#40483)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 14:20:13 +02:00
happy wang
eb3f9b0ea3 Fix command for changing inside brackets in vim.md (#40184)
Fix bindings used in the vim documentation example for both
`MiniBrackets` and `MiniQuotes`.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-17 11:24:53 +00:00
Lukas Wirth
dd32bb6c74 title_bar: Render chevron if show_user_picture is disabled (#40474)
Closes https://github.com/zed-industries/zed/issues/40460

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-17 11:03:29 +00:00
Julia Ryan
568bb02759 Bind ctrl-c and ctrl-v in the windows terminal (#40426)
Fixes #40034

Release Notes:

- `ctrl-c` (when you have a selection) and `ctrl-v` are now bound to
copy and paste by default in the windows terminal.

Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-17 11:02:12 +00:00
Lukas Wirth
ca1f843a0b remote: Support line and column numbers for remote paths (#40410)
Closes #40297
Closes https://github.com/zed-industries/zed/issues/40367

Release Notes:

- Improved line and column number handling for paths in remotes

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-10-17 10:50:22 +00:00
ThomasNow Productions
45a0d08535 Update README.md grammar (#40461)
Fixes a grammar issue in the readme.

Release notes:
- N/A
2025-10-17 09:15:00 +00:00
Fadhil Yusuf
d5a156b774 remote: Exclude port-forward flags in scp commands (#40402)
Closes #36454

Release Notes:

- Exclude port-forward flags in `scp` commands for file and directory
uploads
2025-10-17 08:41:35 +00:00
Jason Lee
6c3a7f6ddb gpui: Fix text wrapping for URLs (#35724)
Close #35715

Release Notes:

- Fixed to wrap long URLs in editor.

<img width="836" height="740" alt="image"
src="https://github.com/user-attachments/assets/635ce792-5f19-4c76-b131-0d270d09b103"
/>

I remember when I was working on CJK line wrapping support in the early
days, I considered making `\` a line wrapping character, but for some
reason it was on the list of characters that were not allowed to wrap.

In reference to VS Code, it looks like `&`, `/`, `?` should wrap, so I
removed all of them.

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-10-16 23:06:14 -07:00
Julia Ryan
e67065f2a3 Fix "select toolchain path" in WSL with python virtual environments (#40447)
Closes #39596

Release Notes:

- N/A
2025-10-16 23:02:49 -07:00
Julia Ryan
d99fdc60fd Fix path separator in toolchain selector (#40449)
Closes #40310

Release Notes:

- N/A
2025-10-16 22:35:51 -07:00
kitt
038041cc87 Fix spacing around hidden status bar items (#39992)
This is a follow-up PR to
https://github.com/zed-industries/zed/pull/39609, and attempts to
address hidden status bar items still contributing to the layout and
creating extra spacing.

![before using display:none theres extra spaces, afterwords the buttons
are always evenly
spaced](https://github.com/user-attachments/assets/3bd07837-5f6f-4ca1-8985-9f3cb8b6893d)

- 203cbd634bfb1489b8afa4952d9594615a956b77 Adds a `.none()` method to
the `gpui::Styled` helper trait, so that status items can set their
display type to none inside their `render` method.

- 249f06e3de63b0ab32814f20e7105d8e2b642f02 Applies `.none()` to all the
status items.

- ~~499f564906c88336608c81615b11ebc9ab43d832~~ At first I was adding an
`is_visible` method to the `StatusBarView` trait, which would be used to
skip status bar items which would just render an empty div anyway, but I
felt duplicating the conditions for hiding the buttons between the
status items `is_visible` and `render` methods could be an attraction
for bugs, so I tried to find another approach. This commit contains
those changes, reverted immediately (if the `is_visible` approach is
preferred I can bring it back!)

- f37cb75f0519ceea1f3e1cc4f97087a5cb34b0fd (bonus!) Adds a condition to
the vim mode indicator to avoid a leading space when there are no
pending keys.

Release Notes:

- N/A
2025-10-17 02:26:39 -03:00
AidanV
0cbab311a1 vim: Add vim command filename autocomplete (#36332)
Release Notes:

- Adds filename autocomplete for vim commands:
  - write
  - edit
  - split
  - vsplit
  - tabedit
  - tabnew
- Makes command palette interceptor async
<img width="1382" height="634" alt="image"
src="https://github.com/user-attachments/assets/e7bf01c5-e9cd-4a7d-b38c-12fc3df5069f"
/>

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-17 04:19:01 +00:00
Mikayla Maki
908ae95cf8 docs: Improve debug adapter documentation (#40441)
docs. docs. docs.

Release Notes:

- N/A
2025-10-17 00:36:47 +00:00
Mikayla Maki
4fa3331bf2 Make python adapter error message a bit better (#40440)
Release Notes:

- N/A
2025-10-16 23:44:32 +00:00
Affonso, Guilherme
cdc9728391 emacs: Support more default keybindings (#40101)
Hello,

Thanks for the great work.
I am adding some more bindings for the emacs keymap:
- `command_palette::Toggle` as replacement for the emacs command
dispatcher
- other default aliases for existing move / delete commands
  - e.g. `alt-left` to move to previous word and `alt-del` to delete it
- some missing `SelectTo` equivalents for move commands on selection
mode

Release Notes:
- Added bindings for the Emacs keymap
2025-10-16 23:32:06 +00:00
Ivan Trubach
aec3c2fbb7 workspace: Move panes to span the entire border in Vim mode (#39123)
Currently, <kbd>⌃w</kbd> + <kbd>HJKL</kbd> keystrokes swap active pane
with another pane in that direction. Also, if there is no pane to swap
with, nothing happens.

This does not match the expected Vim behavior: moving the split to span
the entire border.

See
ca6a260ef1/runtime/doc/windows.txt (L527-L549)

This change adds `MovePane{Up,Down,Left,Right}` actions that do exactly
that and updates default Vim keymap.

<table>
<tr>
  <th>Before</th>
  <th>After</th>
<tr>
<td><video
src="https://github.com/user-attachments/assets/5d3a25bf-e8b6-46c1-9fbb-004f0194e0dd">
<td><video
src="https://github.com/user-attachments/assets/5276f115-5063-411e-b141-5d268a79581b">
<tr>
  <th>Vim</th>
<tr>
<td><video
src="https://github.com/user-attachments/assets/df9fbf83-d0de-42c0-8fb0-b134be833bde">
</table>

Release Notes:

- Changed `ctrl+w` + `shift-[hjkl]` in Vim mode to move the split to
span the entire border, aligning with Vim‘s behavior.

Signed-off-by: Ivan Trubach <mr.trubach@icloud.com>
2025-10-16 17:09:04 -06:00
Janko Marohnić
620df0c722 Remove unnecessary languages mapping in Tailwind for Ruby example (#40299)
The built-in Tailwind language already maps `HTML+ERB` to `erb`, and it
seems that `Ruby` files work as well just from enabling the language
server, so we can remove the unnecessary mapping.

Release Notes:
- N/A
2025-10-17 01:00:24 +02:00
kingananas20
cd51efad9e Fixed nushell error when creating new folder when uploading wsl-remote-server (#40432)
Closes #40269 

Release Notes:

- N/A
2025-10-16 22:46:30 +00:00
Piotr Osiewicz
e85c060625 fs: Replace a bunch of uses of smol::fs with manual impls (again) (#40433)
Follow-up after #40417, which should've fixed hangs.

smol::fs uses a separate threadpool, which is a bit yuck.

This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.

Release Notes:

- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-17 00:29:22 +02:00
Martin Pool
65acf125fb Fix use of PRNG in Rope benchmarks (#39949)
Using a seeded PRNG to produce consistent test data and reduce
variability makes sense.

However, the way it was used previously, by always cloning the RNG,
means that every generated string is the same, and every offset is the
same. After this change, the tested value stream should still be the same on
each run of the benchmark, but the values within each run will vary.

The `generate_random_text` measured in chars also seems possibly
inconsistent with later comments about it being a number of bytes.

Release Notes:

- N/A
2025-10-17 00:15:28 +02:00
versecafe
2adc023094 anthropic: Haiku 4.5 support (#40298)
Release Notes:

- Added Claude Haiku 4.5

<img width="1512" height="919" alt="Screenshot 2025-10-15 at 5 23 37 PM"
src="https://github.com/user-attachments/assets/fd3eb8e7-ddd8-4d38-a171-400949c0cef4"
/>
2025-10-16 15:59:12 -06:00
Piotr Osiewicz
3780fe3b8e gpui: Do not use a single shared parker within a Dispatcher (#40417)
This caused issues with #40172, as it made Zed execute and block on tad
few more background tasks. Parker is ~cheap to create, hence we should
be ok to just create it at the time it is needed.

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-16 21:52:09 +00:00
Cole Miller
59991e9c4d Fix compilation on main (#40428)
Updates #40420 

Release Notes:

- N/A
2025-10-16 21:22:35 +00:00
Morrow Shore
e1618994c7 Mention Windows support in README (#40421)
probably a good idea to close the windows issue here
https://github.com/zed-industries/zed/issues/5394 and many other dead
issues.

Release Notes:

- Edited the readme to actually mention Windows.
2025-10-16 20:35:39 +00:00
Andrew Farkas
c288f9b1e6 Remove unused indices in mac/text_system (#40420)
just simplifying the code a bit

Release Notes:

- N/A

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-16 20:28:36 +00:00
Cole Miller
b26491f570 Fix crash when opening files with a BOM on macOS (#40419)
Closes #40359

We were segfaulting when opening a UTF-8 file starting with a byte order
mark due to a mismatch in our UTF-16 indexing calculations caused by
Core Foundations `replace_str` stripping the BOM internally. This PR
fixes the crash by replacing one of our manual calculations by calling
the Core Foundations API to get the length of a string.

Release Notes:

- Fixed a crash on macOS when opening a file that starts with a UTF-8
byte order mark (BOM).

Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
2025-10-16 20:04:41 +00:00
Bartosz Kaszubowski
738dcd0c3a ui_input: Adjust step values for Font Weight stepper (#40408)
# Why

While playing with new Settings UI I have spotted that changing font
weight requires a lot of clicks. This is also a bit more annoying due to
lack of ability to enter the desired value by hand.

# How

Adjust step values for Font Weight stepper, the default increment has
been changed from 10 to 50, to cover (defined in spec `950` weight)
which some fonts might use, small step has been changed from 5 to 10,
and large step from 50 to 100.

Release Notes:

- Adjusted default step values for number input UI element used for
changing Font Weight in Settings UI.
2025-10-16 16:20:54 -03:00
Ben Kunkle
81425bef72 Revert deprecate code actions on format (#40409)
Closes #40334

This reverts the change made in #39983, and includes a replacement
migration that will transform formatter settings values consisting of
only `code_action` format steps into the previously deprecated
`code_actions_on_format` in an attempt to restore the behavior to what
it was before the migration that deprecated `code_actions_on_format`.

This PR will result in a modified order in the `code_actions_on_format`
setting if it existed, however the decision was made to explicitly
ignore this for now, as this PR is primarily targeting users who have
already had the deprecation migration run, and no longer have the
`code_actions_on_format` key

Release Notes:

- Fixed an issue with a settings migration that deprecated the
`code_actions_on_format` setting. The `code_actions_on_format` setting
has been un-deprecated, and affected users will have the bad migration
rolled back with an updated migration

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
2025-10-16 14:11:20 -04:00
Piotr Osiewicz
04f0805502 Revert "fs: Replace a bunch of uses of smol::fs with manual impls" (#40406)
Reverts zed-industries/zed#40172
2025-10-16 20:08:53 +02:00
jneem
58ff46962d Add a helix-specific substitute method (#38735)
`vim::Substitute` is a little different from the helix behavior, so this
PR adds helix versions. The most important difference (for my usage, at
least) is that if you're selecting whole lines then helix drops the `\n`
from the selection (much like vim's lines mode, except that helix bases
this behavior on the selection instead of having a different mode).

Release Notes:

- N/A
2025-10-16 17:23:09 +00:00
localcc
c5a67d85ab Add WSL distro labels to open recent (#40375)
Closes #40358 

Release Notes:

- Windows: improved recently open folders in WSL
2025-10-16 19:07:36 +02:00
localcc
3da4cddce2 Round the scroll offset in editor to fix jumping text (#40401)
Release Notes:

- Improved editor font rendering on lodpi displays

Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-16 19:07:07 +02:00
fantacell
25172f990b helix: Change selection cloning (#38090)
Closes #33637
Closes #37332
and solves part of
https://github.com/zed-industries/zed/discussions/33580#discussioncomment-14195506

This improves the "C" and "alt-C" actions to work like helix.
It also adds "," which removes all but the newest cursors. In helix the
one that's left would be the primary selection, but I don't think that
has an equivalent yet, so this simulates what would be the primary
selection if it was never cycled with "(" ")".

Release Notes:

- Improved multicursor creation and deletion in helix mode

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-10-16 16:36:31 +00:00
Agus Zubiaga
23a0b6503c zeta2: Include a single unified diff for the edit history (#40400)
Instead of producing multiple code blocks for each edit history event,
we now produce a continuous unified diff.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-10-16 16:03:15 +00:00
Julia Ryan
923e880150 Add winget release job (#40293)
This will automatically open PRs against the winget package registry to
bump our version there when we do a release.

Release Notes:

- N/A
2025-10-16 08:13:58 -07:00
Kirill Bulatov
de8dd9bea5 Rework editors to register and query buffers on scroll (#40388)
Preparation to https://github.com/zed-industries/zed/pull/40183
Moves https://github.com/zed-industries/zed/pull/22958 further: now,
instead of selection, scrolling the buffer into view is enough to get
registered and, later, be queried for its LSP data such as inlay hints,
diagnostics and document colors.

This effectively undoes https://github.com/zed-industries/zed/pull/28855
as now we try to register whatever's visible more aggressively, instead
of implicitly via inlay hints.

Release Notes:

- Reworked editors to register and query buffers on scroll
2025-10-16 15:13:23 +00:00
Ben Brandt
c77cc9b0eb Revert "acp: Don't collapse tool calls by default" (#40395)
Reverts zed-industries/zed#40164

Release Notes:

- N/A
2025-10-16 15:13:17 +00:00
Dino
3950f5af29 keymaps: Update defaults for inline assist and signature help (#39587)
Update the keybindings used in the default keymaps to better align with
VSCode's defaults, with the following changes:

* Windows & Linux
* `ctrl-enter` has been replaced by `ctrl-i` for
`assistant::InlineAssist`
* `ctrl-shift-space` maps to `editor::ShowSignatureHelp` instead of
`editor::ShowWordCompletions`
* MacOS
* `ctrl-enter` has been replaced by `cmd-i` for
`assistant::InlineAssist`
* `cmd-i` has been replaced by `cmd-shift-space` for
`editor::ShowSignatureHelp`

Closes #39278 

Release Notes:

- Changed the keybinding for `assistant: inline assist` from
`ctrl-enter` to `ctrl-i` for both Linux and Windows, and `cmd-i` for
MacOS. If you'd like to restore the old behavior, update your keymap
file with:
  ```
  {
    "context": "!ContextEditor > Editor && mode == full",
    "bindings": {
      "ctrl-enter": "assistant::InlineAssist"
    }
  }
  ```
- Changed the action dispatched by `ctrl-shift-space` from
`editor::ShowWordCompletions` to `editor::ShowSignatureHelp` on both
Linux and Windows. If you'd like to restore the old behavior, update
your keymap file with:
  ```  {
    "context": "Editor",
    "bindings": {
      "ctrl-shift-space": "editor::ShowWordCompletions"
    }
  }
  ```
- Changed the keybinding for `editor: show signature help` on MacOS from
`cmd-i` to `cmd-shift-space`. If you'd like to restore the old behavior,
update your keymap file with:
  ```  {
    "context": "Editor",
    "bindings": {
      "cmd-i": "editor::ShowSignatureHelp"
    }
  }
  ```

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-10-16 16:07:10 +01:00
Lukas Wirth
1ee6ef5e1a gpui: Properly surface errors in gpui build script (#40381)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-16 16:58:05 +02:00
Lukas Wirth
87adc96e0f editor: Fix invalid excerpt panic in Editor::hover_links (#40387)
Fixes ZED-17N
Fixes ZED-26Z

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-16 14:32:46 +00:00
Agus Zubiaga
fba7f4d8cc zeta2: Update prompts to match training more closely (#40383)
Release Notes:

- N/A
2025-10-16 14:13:19 +00:00
ozer
ae25baad02 settings_ui: Fix settings popup process alive (#39790)
Closes #39786

Release Notes:

- Fixed: Settings popup no longer keeps the process alive when closing
Zed on Windows

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2025-10-16 14:12:58 +00:00
Lukas Wirth
cf49194819 markdown_preview: Fix alt text causing mismatched highlighting runs (#40374)
Fixes ZED-277

Release Notes:

- Fixed alt text in markdown preview creating inconsistent highlighting
2025-10-16 13:42:10 +00:00
Ben Kunkle
ea6853d35c Fix code actions migration (#40303)
Closes #40270

Release Notes:

- Fixed an issue with the settings migration to flatten `code_actions`
format steps where comments would cause enabled code actions to be
omitted from the migrated settings. If you were effected, restoring the
settings file backup and allowing the migration to re-run will result in
a valid settings file
- Fixed an issue where automated settings and keymap file updates would
occasionally assume 4-space indentation
2025-10-16 09:13:34 -04:00
Piotr Osiewicz
c37a2f885a fs: Replace a bunch of uses of smol::fs with manual impls (#40172)
smol::fs uses a separate threadpool, which is a bit yuck.

This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.
Release Notes:

- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-16 14:49:34 +02:00
Ben Brandt
9c70ba7dcc Fix split Claude Code docs (#40369)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-16 12:46:50 +00:00
Dino
5c4f1e6b85 editor: Ignore soft wrapped lines when adding selection above or below (#40190)
- Add `skip_soft_wrap` field to both `AddSelectionAbove` and
`AddSelectionBelow` actions. When set to `true`, which is now 
the default this will skip soft wrapped lines when extending the 
selections.
- Move the `start_of_relative_buffer_row` function from the
`vim::motion` module to the `editor::display_map::DisplaySnapshot`
implementation as a method.
- Update the default behavior for both `editor: add selection above` and
`editor: add selection below` commands in order to skip over soft
wrapped lines by default, mirroring VS Code's default behavior.
- Update existing keymaps to specify this `skip_soft_wrap` value for
both `AddSelectionAbove` and `AddSelectionBelow` actions.

Closes #16979 

Release Notes:

- Updated both the `editor: add selection above` and `editor: add
selection below` commands to ignore soft wrapped lines. If you wish to
restore the old behavior, add the following to your keymap file:
  ```
  {
    "context": "Editor",
    "bindings": {
"cmd-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": false
}],
"cmd-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": false
}]
    }
  }
  ```

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-16 11:56:57 +01:00
Ben Brandt
86ce4ef3ab acp: Add nicer WSL warning for Codex (#40354)
Moves the Codex warning into the thread so that we can render it nicer,
as well as provide an option to open the folder in WSL.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-16 12:37:37 +02:00
Lukas Wirth
9948778e96 util: Fix shell environment fetching failing with nu (#40275)
Release Notes:

- Fixed shell environment fetching failing with nu shell
2025-10-16 10:21:31 +00:00
Lukas Wirth
c2ace408d9 languages: Fix go completion labels creating out of bounds highlight runs (#40355)
Fixes ZED-26Q

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-16 10:20:14 +00:00
Lukas Wirth
e016c05959 windows: Fix panic when quitting dialogs that do not have a cancel button (#40348)
`TaskDialogIndirect` may return `IDCANCEL` when the user quits the
dialog via escape or alt+f4, so we need to account for that.

Fixes ZED-25H

Release Notes:

- Fixed panic when hitting escape in dialogs on windows
2025-10-16 09:44:44 +00:00
Jakub Konka
f2e8d0cc08 dap: Enable info level logs for CodeLLDB adapter (#40345)
Trim whitespace/newline when committing the logs in Zed.

Release Notes:

- N/A
2025-10-16 11:27:02 +02:00
Jason Lee
e406ac6db9 markdown_preview: Fix block quote last child bottom padding (#40343)
Release Notes:

- Fixed block quote last child bottom padding in Markdown preview.

| Before | After |
| --- | --- |
| <img width="577" height="665" alt="image"
src="https://github.com/user-attachments/assets/f2ff9fff-b4a6-44ed-b83c-6811e13fb3b8"
/> | <img width="612" height="634" alt="SCR-20251016-okfv"
src="https://github.com/user-attachments/assets/b4c5b706-49aa-4348-9553-22b0eb98e201"
/> |
2025-10-16 10:44:58 +02:00
zeld-a
546715634c project_panel: Add open_file_on_paste setting to configure auto opening of file on paste (#40331)
Closes #40234

Release Notes:

- Added `open_file_on_paste` setting to configure auto opening of file
on paste in the project panel.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-16 14:08:48 +05:30
Lukas Wirth
db4b86e0c8 windows: Fix occasional RefCell already mutably borrowed panic (#40336)
Release Notes:

- Fixed occasional `RefCell already mutably borrowed` panic in windows
event handling
2025-10-16 07:50:41 +00:00
Pranav Joglekar
35f5eb1fe7 vim: Add gt and gT bindings for Markdown preview mode (#39854)
### What does this PR do?
- Adds default keybindings `gt` for navigating to the next tab and `gT`
for navigating to the previous tab in markdown viewer mode

### Why do we need this change?
- While previewing markdown files, the default vim bindings (`gt` and
`gT`) do not work for navigating between tabs. These bindings work
everywhere else, which provides a non-consistent experience for the
user.

### How do we do this change?
- Update the vim mode bindings to explicitly add handling for this mode

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-16 05:31:12 +00:00
Julia Ryan
5939cae6fa Fix mkdir nushell flags (#40306)
Closes #40269

Release Notes:

- N/A
2025-10-15 19:38:08 -07:00
Jason Lee
83f9f9d9e3 gpui: Add more default font fallbacks (#35086)
Release Notes:

- N/A

---

- Set `.SystemUIFont` as the GPUI default font.
- Add `Arial` to font fallback list.
- Add `Adwaita Sans` to default fallback list for Gnome.
- Move `Ubuntu` font to front of Gnome to make sure Ubuntu System takes
priority over `Ubuntu` font.

Our application get some crash report:

```
panicked at /Users/admin/.cargo/git/checkouts/zed-a70e2ad075855582/f1db3b4/crates/gpui/src/text_system.rs:150:9:
failed to resolve font 'Helvetica' or any of the fallbacks: Zed Plex Mono, Helvetica, Segoe UI, Cantarell, Ubuntu, Noto Sans, DejaVu Sans
```

This change to add `Arial` to fallback list, this font was included in
macOS and Windows.
Ref link (search "Arial"):

> Mac OS X (now known as [macOS](https://en.wikipedia.org/wiki/MacOS))
was the first Mac OS version to include Arial;
> https://en.wikipedia.org/wiki/Arial

- macOS Sequoia: https://support.apple.com/en-us/120414
- Windows 10:
https://learn.microsoft.com/en-us/typography/fonts/windows_10_font_list
- Gnome: https://developer.gnome.org/hig/guidelines/typography.html
2025-10-15 16:33:26 -07:00
Danilo Leal
43baa5d8b8 title bar: Remove chevron to the side of the avatar when logged in (#40287)
Having the chevron to the side of the avatar is arguably unnecessary at
this point; most apps out there (Reddit, YouTube, etc.), including here
on GitHub, have the avatar without any icon, pointing to how there
doesn't seem to be a problem with knowing that there's a menu behind it.
Therefore, figured we could simplify the UI a bit more here.

This also looks better on platforms where the window controls are on the
right (Linux/Windows).

Release Notes:

- N/A
2025-10-15 19:50:57 -03:00
Danilo Leal
f4609c04eb agent: Improve pickers and their triggers styles in the panel (#40284)
Making all triggers have the same style when the picker is open
(including changing the icon when the picker opens on top of the
trigger). Also removed the footer from the ACP model selector given
there's nothing to consider when that's the case; users can only
configure LLM providers when using Zed's built-in agent.

Release Notes:

- N/A
2025-10-15 19:50:44 -03:00
Cole Miller
28e14a361d windows: Unpin Gemini CLI (#40288)
Updates #40212

v0.9.0 is now stable and contains the fix for the line endings bug, so
we can return to installing from the stable channel as usual. This also
bumps the minimum version on Windows to v0.9.0 so that anyone on v0.8.x
or v0.9.0-preview.4 will be upgraded automatically.

Release Notes:

- N/A
2025-10-15 17:51:56 -04:00
David Kleingeld
77933f83e5 Decouple cloud provider from Model in Zed (#40281)
Release Notes:

- N/A

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-10-15 20:54:57 +00:00
Anthony Eid
186237bb1a settings ui: Improve rendering performance (#40001)
This PR improves the rendering performance of the Settings UI window by
using `gpui::list` to render only the visible contents of a settings
page, instead of rendering the full content of a page. This fixes a lag
that the editor page has in debug builds.

I also added a new field `measuring_behavior` to `ListState` that has
`Visible` and `Measured` variances. `Visible` only measures and caches
the bounds of visible items plus the overdraw pixel offset. `Measure`
will cache all items’ bounds on the first layout phase, which fixes
problems with the scrollbar size/position being miscalculated.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-15 16:48:21 -04:00
Ben Kunkle
500acc9511 settings_ui: Scale window size based on UI font size (#40257)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 15:21:51 -04:00
Abdelhakim Qbaich
49acfd2602 repl: List kernelspecs of the current worktree (#40154)
Closes #25564

Release Notes:

- Fix virtual env REPLs not showing up
2025-10-15 20:17:56 +02:00
Danilo Leal
ecb016081a agent: Update message editor placeholder for Codex (#40264) 2025-10-15 14:25:36 -03:00
Jakub Konka
bb0cc1059c dap: Enable adapter logs for StdioTransport delegate (#40262)
This is the first towards better logs for adapter binaries. Next up I
intend to somehow allow `codelldb` adapter in Zed to permit simple log
level so that we can pass `RUST_LOG=level` when spawning the child
process.

Release Notes:

- N/A
2025-10-15 19:01:19 +02:00
Danilo Leal
3e2680d650 settings ui: Adjust project dropdown design a bit (#40260)
Makes the dropdown trigger button styling consistent with the other
buttons and allows to add a tooltip in the trigger through the popover's
`trigger_with_tooltip` method.

Release Notes:

- N/A
2025-10-15 13:55:57 -03:00
Tim Vermeulen
35595fe3c2 search: Dismiss modal view when running search action (#39446)
Currently, using cmd-f or cmd-shift-f to search while a modal is active
(e.g. after cmd-t or cmd-p) doesn't do anything — you need to first
close the modal manually before initiating a search. This PR allows
these actions to run regardless of whether a modal is active.

Some context: VSCode lets you do this too, and for me it's quite common
to do a symbol search with cmd-t immediately followed by a regular
search with cmd-shift-f if I don't find what I'm looking for, so having
to close the modal first is slightly disruptive. cmd-t followed by cmd-p
does dismiss the project symbols modal in order to display the file
search modal, so it makes sense to me to also allow search actions to
dismiss an active modal.

Maybe this blunt fix has unintended consequences? If some types of
modals shouldn't be dismissed when running cmd-f, or some actions
shouldn't dismiss a currently active modal, then we'll have to go about
it differently.

Release Notes:

- Added the ability to run search actions when a modal is currently
active
2025-10-15 19:50:49 +03:00
Coenen Benjamin
ce2259ce51 file_finder: Display single files already opened (#39911)
Closes https://github.com/zed-industries/zed/issues/24670

(Follow up of https://github.com/zed-industries/zed/pull/36856) cc
@ConradIrwin Thanks for your help

Release Notes:

Fixed: Keep non project files when filtering in File finder

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2025-10-15 19:50:37 +03:00
Katie Geer
6f97d74ff9 Docs windows update (#39501)
Updating Zed Docs for Windows

---------

Co-authored-by: Kate <work@localcc.cc>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-10-15 09:27:54 -07:00
Jakub Konka
d6c9d00a4c dap: Wrap Child directly in a mutex rather than through Option<_> (#40192)
Release Notes:

- N/A
2025-10-15 17:14:04 +02:00
Lukas Wirth
85c2dc909d rope: Improve panic message for out of bounds anchor_at_offset (#40256)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 14:36:58 +00:00
Conrad Irwin
c814b99fcb Bump collab min version (#40198)
Release Notes:

- Prevent using Zed before the auto-update bug when collaborating.
2025-10-15 08:30:58 -06:00
localcc
07ccff217a Fix duplicate WSL entries (#40255)
Release Notes:

- N/A
2025-10-15 16:11:18 +02:00
Lukas Wirth
8ab52f3491 editor: Fix SelectionsCollection::disjoint not being ordered correctly (#40249)
We've been seeing the occasional `cannot seek backwards` panic within
`SelectionsCollection` without means to reproduce.

I believe the cause is one of the callers of
`MutableSelectionsCollection::select` not passing a well formed
`Selection` where `start > end`, so this PR enforces the invariant in
`select` by swapping the fields and setting `reversed` as required as
the other mutator functions already do that as well.

We could also just assert this instead, but it callers usually won't
care about this so its the less user facing annoyance to just fix this
invariant up internally.

Fixes ZED-253
Fixes ZED-ZJ
Fixes ZED-23S
Fixes ZED-222
Fixes ZED-1ZV
Fixes ZED-1SN
Fixes ZED-1Z0
Fixes ZED-10E
Fixes ZED-1X0
Fixes ZED-12M
Fixes ZED-1GR
Fixes ZED-1VE
Fixes ZED-13X
Fixes ZED-1G4

Release Notes:

- Fixed occasional panics when querying selections
2025-10-15 13:55:00 +00:00
localcc
ecf410e57d Improve musl libc detection (#40254)
Release Notes:

- N/A
2025-10-15 15:44:47 +02:00
Lukas Wirth
ec0eeaf69d rope: Assert utf8 boundary of start of Chunks::new range (#40253)
We seem to run into panics in related code, so better assert early

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 13:28:51 +00:00
Agus Zubiaga
376335496d zeta2: Numbered lines prompt format (#40218)
Adds a new `NumberedLines` format which is similar to `MarkedExcerpt`
but each line is prefixed with its line number.

Also fixes a bug where contagious snippets wouldn't get merged.

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Co-authored-by: Michael <michael@zed.dev>
2025-10-15 09:35:39 -03:00
Ben Brandt
4f656cedfa acp: Fix /logout for agents that support it (#40248)
We were clearing the message editor too early. We only want to clear the
message editor if we are going to short circuit and return early before
submitting.
Otherwise, the agents that can handle this themselves won't have the
ability to do so.

Release Notes:

- acp: Fix /logout not working for some agents
2025-10-15 12:33:17 +00:00
Ben Brandt
0e9ee3cb55 docs: Add section for configuring Codex (#40250)
Release Notes:

- N/A
2025-10-15 14:29:01 +02:00
Lukas Wirth
bbe764794d agent_servers: Honor terminal settings provided shell when fetching shell env (#40243)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 10:32:03 +00:00
Lukas Wirth
3882323f79 language: Assert CodeLabel text ranges are correct (#40242)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 10:16:56 +00:00
Lukas Wirth
b0b83ef5aa markdown_preview: Fix markdown parser producing invalid link highlights (#40239)
Fixes ZED-1YC
Fixes ZED-1YK

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 08:54:39 +00:00
Ben Brandt
7beae757b8 acp: Allow updating default mode for Codex (#40238)
Release Notes:

- acp: Save default mode for codex
2025-10-15 08:46:47 +00:00
Lukas Wirth
a6e99c1c16 project: Always use shell env in LocalLspAdapterDelegate::which (#40237)
Windows not having a default shell does not matter here, we might still
have an environment from other means (by being spawned from the cli for
example).

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-15 08:06:37 +00:00
Julia Ryan
6d8d2e2989 Make help docs platform specific (#40194)
No need to clutter the `--help` docs with default directories for
platforms other than the current one.

Release Notes:

- N/A

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-15 07:35:50 +00:00
Djordje
877790a105 docs: Remove duplicate Grok 4 Fast entry in models.md (#40232)
Release Notes:

- N/A
2025-10-15 07:32:01 +00:00
Conrad Irwin
0c08bbca05 Avoid gap between titlebar and body on linux (#40228)
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-15 04:44:00 +00:00
Cole Miller
ba0b68779d Fix triggers for debugger thread and session lists not rendering (#40227)
Release Notes:

- N/A
2025-10-15 04:36:04 +00:00
Cole Miller
45af5e4239 Fix a couple of bugs in remote browser debugging implementation (#40225)
Follow-up to #39248 

- Correctly forward ports over SSH, including the port from the debug
scenario's `url`
- Give the companion time to start up, instead of bailing if the first
connection attempt fails

Release Notes:

- Fixed not being able to launch a browser debugging session in an SSH
project.
2025-10-14 23:05:19 -04:00
Mikayla Maki
01f9b1e9b4 chore: VSCode -> VS Code (#40224)
Release Notes:

- N/A
2025-10-15 02:21:37 +00:00
Mikayla Maki
635b71c486 chore: Delete main.py (#40221)
Release Notes:

- N/A
2025-10-15 01:32:46 +00:00
Mikayla Maki
c4a7552a04 Bump Zed to v0.210 (#40219)
Release Notes:

- N/A
2025-10-15 01:10:56 +00:00
Mikayla Maki
918aee550c docs: Update releases.md (#40220)
Release Notes:

- N/A
2025-10-15 00:55:40 +00:00
Ben Kunkle
5c194f7cdc settings_ui: Last minute cleanup (#40217)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2025-10-14 23:51:03 +00:00
Cole Miller
54df5812d9 windows: Add some trace-level logging to help dig into missing FS update bugs (#40200)
Related to https://github.com/zed-industries/zed/issues/38109

Release Notes:

- N/A
2025-10-14 23:12:30 +00:00
Mikayla Maki
0d84651f14 Implement 3+ file switcher (#40214)
Release Notes:

- N/A
2025-10-14 23:08:15 +00:00
Cole Miller
06af052e6d windows: Temporarily use preview release of Gemini CLI (#40212)
Workaround for disagreement about line endings that's fixed in the
v0.9.0 series

Release Notes:

- N/A
2025-10-14 18:07:51 -04:00
Jakub Konka
f1786b3b5f terminal: Simplify task_summary processing (#40201)
Release Notes:

- N/A
2025-10-14 21:32:07 +02:00
John Tur
f348240a8c Don't probe for local workspaces pointing to WSL filesystem on startup (#40142)
We automatically delete a local workspace if the folders comprising it
no longer exist.
If a local workspace points to folders in the WSL filesystem, checking
whether those folders exist will make us wait for the WSL VM and file
server to boot up. This can block Zed startup for many seconds.

Supported scenarios use remote workspaces, so delete these local
workspaces to ensure that we don't try to access their folders on the
startup path.

Release Notes:

- N/A
2025-10-14 14:24:03 -04:00
AidanV
762fa9b3c7 vim: Decrease max vim count (#40059)
Release Notes:

- Fixes bug were typing `9999999999999999999j` (19 9's) would go up
instead of down
- Max Vim count is now isize::MAX - 1
2025-10-14 12:07:26 -06:00
Agus Zubiaga
1bd34e0db0 zeta2 cli: Export retrieval stats data frame (#40145)
Retrieval stats will now use polars to build a big data frame for
references with the cartesian product of LSP declarations and retrieved
declaration candidates (with all their score components) and rebuilds
the stats summary on top of it.

This data frame is written to a `.parquet` file, which we can load into
advanced analytics tools (such as Metabase), so we can explore our
scoring distributions and find ways to improve retrieval, and then train
the decision tree.

Release Notes:

- N/A
2025-10-14 13:34:07 -03:00
Conrad Irwin
ce696c18ed Remove ping/unwrap from crash handler (#39870)
Release Notes:

- N/A

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-14 16:32:25 +00:00
Xiaobo Liu
9d23527663 util: Respect user-defined SHELL environment variable (#40181)
Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.

Closes https://github.com/zed-industries/zed/issues/40171

Release Notes:

- Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-14 15:48:24 +00:00
Bennet Fenner
fc2b3b2e45 agent: Remove unused HistoryStore (#40187)
Release Notes:

- N/A
2025-10-14 15:23:47 +00:00
Yordis Prieto
8c7fb26af0 acp tools: Add button to copy all observed messages (#40076)
Added a "Copy All Messages" button to the ACP logs toolbar that copies
all messages in the watched stream to the clipboard as structured JSON.

## Motivation

When troubleshooting ACP protocol implementations, it's helpful to
provide the entire message thread to an LLM for analysis. Previously, I
had to copy individual messages one at a time, which was tedious and
time-consuming. This feature allows copying the entire conversation
history in a single click.

Release Notes:

- Added: Copy All Messages button to ACP logs view

---------

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-10-14 15:10:45 +00:00
Danilo Leal
867b5df070 settings_ui: Only allow to reset a setting to default in the file in which it was customized (#40182)
Plus some other tiny visual adjustments.

Release Notes:

- N/A
2025-10-14 14:14:16 +00:00
localcc
c5bbd556ea Add rust-analyzer support for musl linux (#40108)
Release Notes:

- Added rust-analyzer support for musl remotes
2025-10-14 15:48:05 +02:00
Delvin
4a84b78093 collab_ui: Make collaboration panel label responsive on resize (#40157)
Closes #40156

Release Notes:

- Fixed collaboration panel label responsive on resize
<img width="350" height="829" alt="Screenshot 2025-10-14 at 2 52 58 pm"
src="https://github.com/user-attachments/assets/94e21f1b-83a2-44f0-9f15-44a85155fda9"
/>
2025-10-14 13:38:27 +00:00
Abdelhakim Qbaich
fd63d432e9 Remove obsolete contents tool and add open to write profile (#40131)
`contents` doesn't exist anymore.
`open` was only set for `ask` and not `write`.

Release Notes:

- N/A
2025-10-14 10:18:52 -03:00
Bartosz Kaszubowski
ab70555a8a git_ui: Apply accented color to links in Blame tooltip (#40124)
# Why

Follow up to:
* #39905

# How

Apply accented color to links in message content inside Blame tooltip,
to match appearance in Markdown Preview panel.

Release Notes:

- Improved appearance of links in message content inside Blame tooltip.

# Preview

### Before

<img width="1186" height="798" alt="Screenshot 2025-10-13 at 19 33 37"
src="https://github.com/user-attachments/assets/33ab4fb5-7910-4d28-9152-c692d6ddeaa6"
/>

### After

<img width="1186" height="798" alt="Screenshot 2025-10-13 at 19 33 10"
src="https://github.com/user-attachments/assets/38082c5c-50d6-4fb3-90ca-410accff9aad"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-14 13:16:05 +00:00
Bartosz Kaszubowski
474eb8db77 git_ui: Layout/spacing tweaks for Blame tooltip (#40130)
# Why

Spotted that spacing of different Blame tooltip elements are spaced
uneven, also the fact that message content disappears on scroll before
reaching border felt a bit odd.

# How

Layout/spacing tweaks for Blame tooltip.

Release Notes:

- Improved appearance of Git Blame tooltip.

# Preview

### Before

<img width="1034" height="702" alt="Screenshot 2025-10-13 at 20 01 07"
src="https://github.com/user-attachments/assets/0c2715d5-d8fa-41dc-b891-a320a74d6fb0"
/>

<img width="1006" height="410" alt="Screenshot 2025-10-13 at 20 06 15"
src="https://github.com/user-attachments/assets/8c16f6dc-58e5-46cc-83fb-dd71a63e7557"
/>


### After

<img width="1034" height="672" alt="Screenshot 2025-10-13 at 20 00 33"
src="https://github.com/user-attachments/assets/e22e0e42-676e-411a-8773-2e57cdaaab17"
/>

<img width="1006" height="370" alt="Screenshot 2025-10-13 at 20 06 55"
src="https://github.com/user-attachments/assets/761995a9-153a-4e5d-923b-e7fbd73dc475"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-14 13:13:19 +00:00
Bennet Fenner
da5f25d9b0 acp: Hide completion menu when typing slash command argument (#40126)
Release Notes:

- acp: Fix an issue where the completion menu would still be active
after confirming a slash command
2025-10-14 13:02:03 +00:00
Cole Miller
83ba05eb32 windows: Revert "windows: Fix ascent/descent calculations (#40103)" (#40175)
This reverts commit f1db1f3a3c.

This seems to have affected the vertical positioning of text that
doesn't contain emojis in a way that was unintended.

Release Notes:

- N/A
2025-10-14 12:32:16 +00:00
Piotr Osiewicz
da583e5943 Revert "fs: Replace a bunch of uses of smol::fs with manual impls" (#40170)
Reverts zed-industries/zed#39906

This PR should not have landed prior to Wednesday.
2025-10-14 11:04:40 +00:00
Piotr Osiewicz
9ad6196150 fs: Replace a bunch of uses of smol::fs with manual impls (#39906)
smol::fs uses a separate threadpool, which is a bit yuck.

Release Notes:

- N/A
2025-10-14 10:38:26 +00:00
Smit Barmase
d4cc4f8ca7 editor: Fix highlight and selection overlap causing flicker while selecting (#40168)
Regressed in https://github.com/zed-industries/zed/pull/39857, only on
Nightly.

Release Notes:

- N/A
2025-10-14 16:05:21 +05:30
Ben Brandt
c61429e166 acp: Pass through experimental capability for terminal output (#40165)
Release Notes:

- N/A
2025-10-14 09:02:34 +00:00
Ben Brandt
4c70d55546 acp: Don't collapse tool calls by default (#40164)
Previously, if a tool call's output was just text, it would be collapsed
with no way to open it.

Now we track the collapsed cards instead of the expanded ones to allow
all tool calls to be expanded by default, and only collapse the ones
required by settings changes

Release Notes:

- acp: Fix tool call markdown output unintentionally being collapsed by
default
2025-10-14 08:55:34 +00:00
Lukas Wirth
025938b4a5 remote: Wrap uname invocation in sh for nu shell (#40084)
Closes https://github.com/zed-industries/zed/pull/39994

Release Notes:

- Fixed remoting not working when nushell is set as the default shell on
the remote target
2025-10-14 06:51:08 +00:00
Mikayla Maki
cc9af8d036 gpui 0.2.1 (#40158)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-14 05:05:55 +00:00
Mikayla Maki
ee60d5855c gpui: Update dependency package names (#40143)
This moves some of the changes made in
https://github.com/zed-industries/zed/pull/39543 to the `publish_gpui`
script.

This PR also updates that script to use `gpui_` instead of `zed-` (where
possible)

Release Notes:

- N/A
2025-10-14 04:43:28 +00:00
Cole Miller
97f398e677 windows: Prefer Git Bash for external agent terminals (#40150)
This applies the same change as #39466 to the terminal codepath for
external agents.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-10-13 23:41:22 +00:00
Max Brunsfeld
6a2bad4e11 Load env vars from login shell in remote server (#40148)
Fixes a bug mentioned in
https://github.com/zed-industries/zed/issues/38891

Release Notes:

- Fixed a bug where environment variables like `NODE_EXTRA_CA_CERTS`
were not loaded from the user's shell initialization scripts in WSL or
SSH remote projects.

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-13 16:09:53 -07:00
Danilo Leal
ad4a53c71c agent: Fix review button not working while not focused in the message editor (#40144)
This PR fixes a bug where the review icon button wouldn't properly open
the review tab if you weren't focused in the agent panel's message
editor. The solution was to register the action also at the workspace
level.

Release Notes:

- agent: Fixed a bug where the review icon button wouldn't work to open
the review tab if focus weren't in the panel's message editor.
2025-10-13 18:55:31 -03:00
Ben Kunkle
160fca029c settings_ui: Move LSP & tool settings from Editor to Language page (#40140)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-13 17:40:44 -04:00
Cole Miller
6a1648825c windows: Detect when python3 is not usable and notify the user (#40070)
Fixes #39998

Debugpy and pylsp are installed in a Zed-global venv with pip. We need a
Python interpreter to create this venv when it doesn't exist and one of
these tools needs to be installed, and sometimes we attempt to use
`python3` from `$PATH`. This can cause issues on Windows, where out of
the box `python3` is a sort of shim that opens the Microsoft Store app.

This PR changes the debugpy installation path to create the Zed-global
venv using the Python interpreter from a venv in the project, and only
use python3 from `$PATH` if that fails. That matches how pylsp
installation already works. It also tightens up how we search for a
global Python installation by doing a basic sanity check (`python3 -c
'print(1 + 2)`) before accepting it, which should catch the Windows
shim.

Release Notes:

- windows: improved the behavior of Zed in situations where no global
Python installation exists.
2025-10-13 21:11:33 +00:00
Ben Kunkle
f0d097c66a settings_ui: Implement reset to default button (#40135)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-13 16:24:45 -04:00
0x2CA
a3bcf6fe21 windows: Fix shader rotation order for pattern rendering (#39993)
old

<img width="1076" height="1008" alt="image"
src="https://github.com/user-attachments/assets/e1cd8238-e869-4abb-98b4-4790467c59d1"
/>


new

<img width="989" height="1004" alt="image"
src="https://github.com/user-attachments/assets/42b7fd59-0038-4490-82a7-979983da5416"
/>


Release Notes:

- N/A
2025-10-13 22:12:58 +02:00
Danilo Leal
ac8e2f0576 Add .ZedSans as a possible fallback font (#40129)
Closes https://github.com/zed-industries/zed/issues/40121

Release Notes:

- Fixes a bug where users couldn't return the UI font family to the
default value through the UI.
2025-10-13 15:23:41 -03:00
Piotr Osiewicz
5c4649bd37 workspace: Fix auto-reveal-in-project-panel for Images, Notebooks and.. Terminals? (#40128)
This regressed in #39199

Release Notes:

- Fixed image files not getting auto-revealed in project panel.
2025-10-13 18:19:00 +00:00
Ben Kunkle
bd13c90acc settings_ui: Dynamic languages list (#40123)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-13 13:47:14 -04:00
Ben Kunkle
997f6c6a19 settings: Make "auto" and "language_server" valid format steps (#40113)
Follow up for: #39983 and
https://github.com/zed-industries/zed/pull/40040#issuecomment-3393902691

Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
      "formatter": ["auto", "language_server"]
}
```

Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:

```json
{
      "formatter": [{"code_action": ...}, "auto"]
}
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-13 12:56:40 -04:00
Abdelhakim Qbaich
8dfbafd345 Fix inconsistent font size in toolbar code actions (#40120)
Release Notes:

- N/A

<img width="695" height="254" alt="before"
src="https://github.com/user-attachments/assets/7b180fb8-a6d3-409a-a0ee-1def447e8235"
/>
<img width="695" height="254" alt="after"
src="https://github.com/user-attachments/assets/3a035be0-3b74-433b-b0e7-5766b67bfcc1"
/>
2025-10-13 16:49:42 +00:00
John Tur
677d6acc9d Use DwmFlush unconditionally for Windows vsync (#39913)
Closes #36934

I'm still experiencing bugs with the
`DCompositionWaitForCompositorClock` API. Let's back out the support for
now until the fixes are identified and widely available.

`DwmFlush` does various things that aren't just waiting for VSync, so
it's not ideal, but it's not bad enough that it's worth a bigger
refactor right now.

Release Notes:

- N/A
2025-10-13 12:40:00 -04:00
Jakub Konka
96add6c9de remote: Check if remote can --exec, fall back to spawning shell otherwise (#40112)
Bonus: fix passing env vars to the proxy server in WSL setting.

Closes #39710
Supersedes #39893

Release Notes:

- N/A
2025-10-13 18:38:31 +02:00
Lukas Wirth
f76eecd758 terminal: Bump sysinfo crate (#39681)
Release Notes:

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

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-13 16:31:00 +00:00
Bennet Fenner
bec2bfeb8b acp: Clear message editor after running /login (#40116)
Release Notes:

- N/A
2025-10-13 16:09:42 +00:00
Cole Miller
9edf1f8f04 Add a comment about the use of shell_kind in terminal.rs (#40114)
Release Notes:

- N/A

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-10-13 15:36:40 +00:00
Bennet Fenner
23fe74ebc5 acp: Fix slash command hint showing up after sending message (#40109)
Release Notes:

- N/A
2025-10-13 17:20:16 +02:00
CharlesChen0823
46fff9979d remove_server: Add function to delete wsl project (#40105)
As title say, could delete wsl project in `open remote` delegate.

Release Notes:

- Added ability to delete wsl projects from remote picker
2025-10-13 17:19:39 +02:00
Danilo Leal
e7b19ab0b1 settings_ui: Add some AI settings (#40111)
There's a lot of AI settings that will require custom UI for them to be
part of the settings window, but many don't (simple booleans and
dropdown) and can be moved right away. In consequence, the whole
"General Settings" section in the agent panel's settings view can be
removed given all of those items are now part of the settings window.

Release Notes:

- N/A
2025-10-13 12:19:17 -03:00
Danilo Leal
ce8d5e41a5 settings_ui: Make arrow keys up and down activate page content (#40106)
Release Notes:

- settings ui: Navigating the settings navbar with arrow keys up and
down now also activates the page, allowing users to more quickly see the
content for a given page before moving focus to the page itself.
2025-10-13 12:19:05 -03:00
Cole Miller
dac5725246 windows: Fix semantic merge conflict with ShellKind::new (#40107)
Release Notes:

- N/A
2025-10-13 14:30:40 +00:00
Cole Miller
f1db1f3a3c windows: Fix ascent/descent calculations (#40103)
This applies the same fix as #39886 for Windows.

Previously we were using `GetLineMetrics` to determine the ascent and
descent values for each line. It seems like this has the same behavior
as `GetTypographicBounds` on macOS, which is to return the minimum
ascent and descent for the current state of the `TextLayout` object.
This causes the ascent/descent to be unstable when adding or removing an
emoji because a font fallback is triggered when an emoji is present on
the line.

The issue is fixed by switching to `font.GetMetrics` to get the ascent
and descent, which should always return stable values for the main font,
instead of changing when there's a fallback. This also should support
situations where we have multiple explicit fonts on the same line,
although that probably can't be triggered in Zed right now.

Release Notes:

- windows: Fixed a vertical shift in text layout when inserting or
removing an emoji.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-13 09:49:07 -04:00
Marco Mihai Condrache
02bdba80a4 util: Fix shell kind in windows based on program path (#39696)
Closes #39614

The `ShellKind` struct is built on Windows' side, meaning that when
connecting to remotes, we fall back to PowerShell construction, even if
the shell program we are spawning is a unix program.

This broke tasks creation since we are using the shell kind to construct
args:


d04ac864b8/crates/project/src/terminals.rs (L149)

In normal terminals this only affected activation scripts (only place
where shell kind is used)

I don't have a Windows machine to test it, so I would appreciate any
help with testing!

Release Notes:

- Fixed an issue where tasks could not be executed in Windows WSL

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2025-10-13 15:45:46 +02:00
Lukas Wirth
af0cd30a9c editor: Fix delete line moving the cursor too far (#40102)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-13 13:40:45 +00:00
Lukas Wirth
3ea4b30e8d gpui: Do not render ligatures between different styled text runs (#39928)
This relands https://github.com/zed-industries/zed/pull/37175 as
https://github.com/zed-industries/zed/pull/39886 fixed the jiggling
issue.

Currently when we render text with differing styles adjacently we might
form a ligature between the text, causing the ligature forming
characters to take on one of the two styles. This can especially become
confusing when a ligature is formed between actual text and inlay hints.

Annoyingly, the only ways to prevent this with core text is to either
render each run separately, or to insert a zero-width non-joiner to
force core text to break the ligatures apart, as it otherwise will merge
subsequent font runs of the same fonts.

We currently do layouting on a per line basis and it is unlikely we want
to change that as it would incur a lot of complexity and annoyances to
merge things back into a line, so this goes with the other approach of
inserting ZWNJ characters instead.

Note that neither linux nor windows seem to currently render ligatures,
so this only concerns macOS rendering at the moment.

Closes https://github.com/zed-industries/zed/issues/23194

Release Notes:

- Fixed ligatures forming between real text and inlay hints on macOS
2025-10-13 15:35:28 +02:00
Ben Brandt
fdf801d90f acp: Add tooltips for auth methods with descriptions when available (#40098)
Release Notes:

- acp: Provide auth method descriptions in the UI when available

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-10-13 12:35:03 +00:00
Piotr Osiewicz
ff50f48980 lsp: Handle dynamic registration of workspace diagnostic capabilities (#40095)
Workspace diagnostics in Zed have a dedicated background task that
handles querying the language server based on workspace diagnostics
refresh requests issued by both Zed and language server itself.
We only spawned that task when language server declared support for
workspace diagnostics on boot-up. This made workspace diagnostics
unavailable
when a language server (say, Ty) declared support via a capability
registration.
Originally reported in
https://github.com/zed-industries/zed/issues/39144#issuecomment-3370320004

Release Notes:

- python: Fixed workspace diagnostics not working with Ty.
2025-10-13 12:30:26 +00:00
Smit Barmase
af52cbacf9 settings_ui: Fix garbage value for terminal font size (#40093)
Closes #40086

Release Notes:

- Fixed garbage value shown for terminal font size in the settings UI
when no font size is defined in `settings.json`.
2025-10-13 11:54:48 +00:00
Smit Barmase
785cb41565 gpui: Make image auto sizing work with Rems too (#40089)
Closes #39981

Here both images of the left should be identical to the right, since
180px is the same as 11.25rem.

Before:

<img width="1457" height="847" alt="image"
src="https://github.com/user-attachments/assets/59f571d1-8d66-4f41-b9b0-e9826110cf0c"
/>

After:

<img width="1457" height="626" alt="image"
src="https://github.com/user-attachments/assets/a0c629a9-5916-453a-85a2-b3053ab2e613"
/>

Release Notes:

- N/A
2025-10-13 16:52:33 +05:30
Finn Evers
ce20e71abf theme_selector: Fix mouse clicks not updating the theme properly (#40090)
Closes https://github.com/zed-industries/zed/issues/40080

Follow-up to https://github.com/zed-industries/zed/pull/39720

We were already doing this for icon themes, but not for normal themes. 

Issue here is that we would only update the `cx.theme()` on the next
frame. On mouse confirmation, we would override the theme and confirm it
on the same frame, yet the global would only be peropely updated on the
next frame and then instantly reset to the new settings file, which
would again be the old theme. This caused a flicker and the selection to
not persist.. Keyboard interactions worked still, because there would be
a rendered frame inbetween selection and confirmation.

Release Notes:

- N/A
2025-10-13 10:55:02 +00:00
Elliot Thomas
237474a889 Fix worktree ordering with PathList (#39944)
The recent introduction of PathList removed some of the ordering logic
resulting in paths always being alphabetised.

This change restores the previous logic for sorting worktrees in a
project using the newer PathList type.

Closes #39934

Release Notes:

- Fixed manual worktree reordering

<details>

<summary>Screen recording of it retaining the order</summary>


https://github.com/user-attachments/assets/0197d118-6ea7-4d2d-8fec-c917fcb9d277

</details>

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-10-13 12:41:42 +02:00
William Fleurant
f6630ed736 docs: Add Mesa GPU selection and XWayland fallback instructions (#39930)
Related #35948

Should document it.. re:
- Added documentation for Mesa GPU device selection using environment
variables
- Added instructions for XWayland fallback when using Wayland


Release Notes:

- N/A

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-10-13 09:58:36 +00:00
Finn Evers
81cd435e08 Improve loading times for extension themes (#40015)
This PR primarily does two things:
- replace `serde_json::from_reader` with `serde_json::from_slice`, as
the latter is much much faster, even with loading the file into memory
first.
- runs the initial loading of themes and icon themes coming from
extensions in parallel instead of sequential.

Measuring the `eager_load_active_theme_and_icon_theme` method, this
drastically improves the speed at which this happens (tested this method
primarily with debug builds on my MacBook Pro, but the `Before`
measurement was also confirmed against a `release-fast` build):
- Before: ~260ms on average (in one run, it even took 600ms)
- After: ~20ms on average

Which reduces the time this method takes to load these by around ~92%.

Given that we block on this during the initial app startup, this should
drastically improve Zeds initial startup loading time. Yet, it also
improves responsiveness when installing theme extensions and trying
these.

I also replaced all other `serde_json::from_reader` implementations with
`serde_json::from_slice` and added the former to `disallowed_methods`,
given
https://github.com/serde-rs/json/issues/160#issuecomment-253446892.

Release Notes:

- Improved Zed startup speed when using themes provided by extensions
2025-10-13 11:53:19 +02:00
Xiaobo Liu
47a66c938f editor: Optimize selection overlap checking with binary search (#39773)
Replace O(n²) linear search with O(log n) binary search for checking
selection overlaps when finding next selection range. Pre-sort selection
ranges and use binary search to significantly improve performance when
working with many selections.

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-13 10:54:53 +02:00
Finn Evers
1ca2f9871e Improve logging of extension manifest parsing errors (#40082)
Due to using anyhow here, we otherwise lose the relevant error and just
surface a fairly useless error message.

Intentionally not doing this for `extension.json` parsing since that is
deprecated.

Release Notes:

- N/A
2025-10-13 08:27:00 +00:00
Smit Barmase
52cc71e380 image_viewer: Make preview background checkered cover only the image size (#40078)
This makes it easier to see the image bounds for images with transparent
backgrounds.

<img width="2560" height="1377" alt="png"
src="https://github.com/user-attachments/assets/e1555576-39a2-4240-b9d3-67574df76f0d"
/>

Release Notes:

- Updated image preview background checkboxes to match the actual image
size, making it easier to see the bounds of images with transparent
backgrounds.
2025-10-13 13:13:25 +05:30
Tim Vermeulen
7a8a328d3c editor: Preserve the selection granularity when extending a selection (#39759)
Currently when extending a selection using shift-click, the selection
granularity (or `SelectMode`) is based on the click count when extending
the selection, not on the click count of the initial selection. For
example, selecting a word with double-click followed by shift-click uses
a character granularity:


https://github.com/user-attachments/assets/13c78bb9-9c31-45d4-97de-99c30c7425a7

This PR changes this behavior to be more in line with other editors that
I'm familiar with by preserving the granularity of the initial selection
(unless the extension has a higher click count, i.e. the behavior of a
single click selection by a shift-double-click extension is unchanged):


https://github.com/user-attachments/assets/92e69e95-7ea2-4f76-b0a4-e4b9efa1947b

Release Notes:

- Extending a selection using shift-click now preserves the
character/word/line granularity of the initial selection

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-10-13 07:23:37 +00:00
Finn Evers
eeaf0b5fec docs: Update basedpyright section (#40079)
Follows up the report #39794

Release Notes:

- N/A
2025-10-13 07:21:33 +00:00
versecafe
95780e5baf typescript: Runners support for bun:test & node:test (#39238)
Closes #21132

Release Notes:

- JavaScript/TypeScript: Added support for detecting `node:test` and `bun:test` test runners
2025-10-13 09:05:04 +02:00
Cole Miller
92e765b5d2 windows: Add support for fetching shell environment in remote projects (#39831)
Closes #39216

Note that this affects all platforms, I'm just using the prefix to make
auto-cherry-picking easier.

Release Notes:

- Fixed shell commands run by agents failing to find installed programs
in some cases.
2025-10-12 23:31:40 +00:00
Cole Miller
abc1e67221 Make ZED_BUILD_REMOTE_SERVER opt-out for dev builds (#39653)
Also removes the option to build with cross.

Release Notes:

- N/A
2025-10-12 19:25:50 -04:00
Ryan Hawkins
68bda24bc1 Allow viewing DAP logs in remote projects (#39744)
It looks like a `.is_local()` check got left in from the original
debugger implementation. I was able to view remote logs just fine after
removing it.

Release Notes:

- Fixed DAP logs being unviewable on remote projects.
2025-10-13 01:21:28 +02:00
Remco Smits
3f3d894c8b lsp colors: Reduce flickering while typing (#40055)
Closes #40019

Follow-up https://github.com/zed-industries/zed/pull/40025

This PR reduces/removes the flickering of inlay colors. This is done by
adding a debounce, and not detaching the task that fetches the new
colors.

**Result**


https://github.com/user-attachments/assets/5dae278b-b821-4e64-8adb-c4d8376ba1df

Release Notes:

- Lsp colors: Reduce flickering while typing.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-10-12 18:59:12 +00:00
Tim Vermeulen
83f0a36733 editor: Fix behavior of clickable line numbers navigation in multibuffer (#39447)
Repro:
- Open a multibuffer
- Click on a line number to jump to the corresponding file
- Click the back button
- Click the forward button, nothing happens
- Click the forward button again, now it works

Double clicking the code to jump to the file (with
`"double_click_in_multibuffer": "open"`) doesn't exhibit this bug, so I
just changed the logic when clicking on a line number in a multibuffer
to match that behavior.


https://github.com/user-attachments/assets/31c0d64d-fdb8-44d6-b0f3-a337ca53de30

Release Notes:

- Fixed bug that could cause navigation to break when clicking on a line
number in a multibuffer
2025-10-12 21:08:24 +03:00
Jakub Konka
bbb6783fb8 windows: Get more tests passing (#39984)
Still got one more test in `project_tests.rs` to investigate...

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-12 18:13:40 +02:00
Smit Barmase
998fece3af project_panel: Add ability to hide hidden files (#39843)
Closes #5185

Release Notes:

- Added an option to hide hidden files in the project panel by setting
`hide_hidden` in the project panel settings.

---------

Co-authored-by: Gaauwe Rombouts <gromdroid@gmail.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
2025-10-12 18:31:55 +05:30
Ben Kunkle
abe1fd5e16 docs: Validate JSON snippets (settings, keymap, tasks, etc) (#40043)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-12 00:19:57 -04:00
Ben Kunkle
deef58bef7 docs: Remove/fix mentions of code_actions_on_format post #39983 (#40040)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-11 23:55:57 +00:00
Katie Geer
e11e39f9b4 settings ui: Rearrange sections (#39978)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-11 19:40:51 -04:00
Danilo Leal
6dc3e643b4 onboarding: Add some UI improvements (#40016)
Includes improvements in button padding, ways we space elements out,
more consistent use of some components, and cleaning up redundant
buttons styles. Pretty much nothing changes in the design, though.

Release Notes:

- N/A
2025-10-11 13:32:20 +00:00
Finn Evers
d4b5bb9f17 ui: Change scrollbar hitbox insertion (#40008)
Closes #39974

Since the thumb hitboxes themselves do not propagate events, we need to
paint the normal parent hitbox on top of the other ones. This also
caused hover detection to fail, which caused the issue linked.

Release Notes:

- Fixed an issue where hovering scrollbars in hovers would dismiss
these.
2025-10-11 10:00:03 +00:00
Vitaly Slobodin
74d92fd733 ruby: Rename HTML/ERB to HTML+ERB (#40000)
Hi! In https://github.com/zed-extensions/ruby/issues/162 we renamed
embedded template languages:

- `HTML/ERB` to `HTML+ERB`
- `YAML/ERB` to `YAML+ERB`
- `JS/ERB` to `JS+ERB`

This pull request updates the Ruby extension documentation to reflect
that change. Thanks!

Release Notes:

- N/A
2025-10-11 11:17:20 +02:00
Kirill Bulatov
7d260bf4ef cargo update ammonia (#40003)
Deals with https://github.com/zed-industries/zed/security/dependabot/68
security warning

Release Notes:

- N/A
2025-10-11 08:55:30 +00:00
Ned Zimmerman
89bb2de450 docs: Fix link/reference in CSS language doc (#39952)
Looking at
5698636c92/crates/languages/src/css.rs (L19)
it appears that the vscode-css-languageservice is used so I think this
was a typo.

Release Notes:

- N/A
2025-10-11 07:38:13 +00:00
Martin Pool
3d4d8ef6a8 Remove unnecessary clone from Rope::append (#39960)
The previous code clones all the rope chunks, but the rope is passed by
value so the chunks are about to be dropped anyhow.

I thought this may slightly help performance but it has no very
noticeable effect, with a mix of small changes up and down probably
attributable to noise on my machine?

I wonder if the benchmarks might just not hit this path well? I'm
looking into that separately (see #39949, #39951), but this seemed clear
enough to be worth proposing by itself.

Incidentally it surprised me this did not generate a warning already,
but I think it's because we're taking only one field from the struct
that's about to be dropped:
https://github.com/rust-lang/rust-clippy/issues/7429.

<details>

```

     Running benches/rope_benchmark.rs (target/release/deps/rope_benchmark-4c5c71666e7c1729)
push/4096               time:   [362.58 µs 366.40 µs 370.69 µs]
                        thrpt:  [10.538 MiB/s 10.661 MiB/s 10.773 MiB/s]
                 change:
                        time:   [+0.0646% +1.2362% +2.4681%] (p = 0.04 < 0.05)
                        thrpt:  [-2.4086% -1.2211% -0.0646%]
                        Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
  7 (7.00%) high mild
  3 (3.00%) high severe
Benchmarking push/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.4s, enable flat sampling, or reduce sample count to 50.
push/65536              time:   [1.6185 ms 1.6353 ms 1.6557 ms]
                        thrpt:  [37.747 MiB/s 38.219 MiB/s 38.616 MiB/s]
                 change:
                        time:   [+1.9135% +2.9548% +3.9838%] (p = 0.00 < 0.05)
                        thrpt:  [-3.8312% -2.8700% -1.8776%]
                        Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
  5 (5.00%) high mild
  1 (1.00%) high severe

append/4096             time:   [1.1052 µs 1.1104 µs 1.1162 µs]
                        thrpt:  [3.4177 GiB/s 3.4354 GiB/s 3.4516 GiB/s]
                 change:
                        time:   [-2.5075% -0.3430% +1.5095%] (p = 0.76 > 0.05)
                        thrpt:  [-1.4871% +0.3441% +2.5720%]
                        No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
  7 (7.00%) high mild
  1 (1.00%) high severe
append/65536            time:   [12.404 µs 12.444 µs 12.487 µs]
                        thrpt:  [4.8881 GiB/s 4.9049 GiB/s 4.9204 GiB/s]
                 change:
                        time:   [-0.1408% +0.5573% +1.2016%] (p = 0.10 > 0.05)
                        thrpt:  [-1.1874% -0.5542% +0.1410%]
                        No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

slice/4096              time:   [32.963 µs 33.185 µs 33.466 µs]
                        thrpt:  [116.72 MiB/s 117.71 MiB/s 118.51 MiB/s]
                 change:
                        time:   [-6.4303% -5.1234% -3.6394%] (p = 0.00 < 0.05)
                        thrpt:  [+3.7769% +5.4000% +6.8722%]
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
slice/65536             time:   [668.67 µs 670.49 µs 672.65 µs]
                        thrpt:  [92.916 MiB/s 93.215 MiB/s 93.469 MiB/s]
                 change:
                        time:   [+0.0846% +0.5573% +1.0199%] (p = 0.02 < 0.05)
                        thrpt:  [-1.0096% -0.5542% -0.0845%]
                        Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
  6 (6.00%) high mild
  4 (4.00%) high severe

bytes_in_range/4096     time:   [5.1513 µs 5.1594 µs 5.1674 µs]
                        thrpt:  [755.95 MiB/s 757.12 MiB/s 758.31 MiB/s]
                 change:
                        time:   [-4.9410% -4.2051% -3.3835%] (p = 0.00 < 0.05)
                        thrpt:  [+3.5020% +4.3897% +5.1978%]
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) low mild
  3 (3.00%) high severe
bytes_in_range/65536    time:   [139.87 µs 140.17 µs 140.55 µs]
                        thrpt:  [444.67 MiB/s 445.89 MiB/s 446.85 MiB/s]
                 change:
                        time:   [-0.6267% -0.0474% +0.4635%] (p = 0.87 > 0.05)
                        thrpt:  [-0.4614% +0.0475% +0.6306%]
                        No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
  7 (7.00%) high mild
  2 (2.00%) high severe

chars/4096              time:   [1.0243 µs 1.0250 µs 1.0257 µs]
                        thrpt:  [3.7190 GiB/s 3.7217 GiB/s 3.7243 GiB/s]
                 change:
                        time:   [+4.0106% +4.5396% +5.3062%] (p = 0.00 < 0.05)
                        thrpt:  [-5.0388% -4.3425% -3.8559%]
                        Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
  2 (2.00%) high mild
  8 (8.00%) high severe
chars/65536             time:   [17.540 µs 17.576 µs 17.614 µs]
                        thrpt:  [3.4652 GiB/s 3.4727 GiB/s 3.4797 GiB/s]
                 change:
                        time:   [+2.5201% +3.3922% +4.1639%] (p = 0.00 < 0.05)
                        thrpt:  [-3.9974% -3.2809% -2.4581%]
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe

clip_point/4096         time:   [58.857 µs 59.162 µs 59.490 µs]
                        thrpt:  [65.662 MiB/s 66.026 MiB/s 66.368 MiB/s]
                 change:
                        time:   [+1.6900% +2.8088% +3.8521%] (p = 0.00 < 0.05)
                        thrpt:  [-3.7092% -2.7321% -1.6619%]
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
clip_point/65536        time:   [1.8609 ms 1.8633 ms 1.8660 ms]
                        thrpt:  [33.494 MiB/s 33.543 MiB/s 33.585 MiB/s]
                 change:
                        time:   [+0.0577% +0.2579% +0.4495%] (p = 0.01 < 0.05)
                        thrpt:  [-0.4474% -0.2572% -0.0577%]
                        Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
  3 (3.00%) high mild
  2 (2.00%) high severe

point_to_offset/4096    time:   [19.246 µs 19.287 µs 19.331 µs]
                        thrpt:  [202.07 MiB/s 202.54 MiB/s 202.97 MiB/s]
                 change:
                        time:   [+1.1073% +2.9754% +5.3818%] (p = 0.00 < 0.05)
                        thrpt:  [-5.1069% -2.8894% -1.0951%]
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe
Benchmarking point_to_offset/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.6s, enable flat sampling, or reduce sample count to 60.
point_to_offset/65536   time:   [741.87 µs 743.28 µs 744.74 µs]
                        thrpt:  [83.922 MiB/s 84.086 MiB/s 84.247 MiB/s]
                 change:
                        time:   [+5.0577% +5.6751% +6.3133%] (p = 0.00 < 0.05)
                        thrpt:  [-5.9384% -5.3703% -4.8142%]
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe

cursor/4096             time:   [27.407 µs 27.483 µs 27.600 µs]
                        thrpt:  [141.53 MiB/s 142.13 MiB/s 142.53 MiB/s]
                 change:
                        time:   [-7.1479% -6.2928% -5.6378%] (p = 0.00 < 0.05)
                        thrpt:  [+5.9747% +6.7154% +7.6981%]
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  1 (1.00%) high mild
  8 (8.00%) high severe
cursor/65536            time:   [848.91 µs 849.70 µs 850.59 µs]
                        thrpt:  [73.478 MiB/s 73.555 MiB/s 73.624 MiB/s]
                 change:
                        time:   [+0.0281% +0.3487% +0.6686%] (p = 0.04 < 0.05)
                        thrpt:  [-0.6642% -0.3475% -0.0281%]
                        Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

```
</details>

Release Notes:

- N/A
2025-10-11 10:29:54 +03:00
Danilo Leal
42365df12f settings_ui: Fix content page title (#39987)
Follow up to https://github.com/zed-industries/zed/pull/39979. The
previous PR made it the title would change even if you were on a
non-root tree view item. This PR fixes that by fixating the title to
show only the root tree view item.

Release Notes:

- N/A
2025-10-10 20:56:18 -03:00
Ben Kunkle
201124e13f Cleanup default.json (#39986)
Closes #ISSUE

Annotated our `default.json` with `$schema` to get diagnostics, then
fixed the non-language not installed warnings.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-10 23:21:59 +00:00
Ben Kunkle
3ba4b84107 Deprecate code actions on format setting (#39983)
Closes #ISSUE

Release Notes:

- settings: Deprecated `code_actions_on_format` in favor of specifying
code actions to run on format inline in the `formatter` array.

Previously, you would configure code actions to run on format like this:

```json
{
  "code_actions_on_format": {
    "source.organizeImports": true,
    "source.fixAll.eslint": true
  }
}
```

This has been migrated to the new format:

```json
{
  "formatter": [
    {
      "code_action": "source.organizeImports"
    },
    {
      "code_action": "source.fixAll.eslint"
    }
  ]
}
```

This change will be automatically migrated for you. If you had an
existing `formatter` setting, the code actions are prepended to your
formatter array (matching the existing behavior). This migration applies
to both global settings and language-specific settings
2025-10-10 19:01:07 -04:00
Ben Kunkle
f7e7a304e0 settings_ui: Expand nav entries by default when searching (#39980)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-10 18:39:16 -04:00
warrenjokinen
65a38a27a9 auto_update: Improve error message when rsync was not found (#39791)
Reworded the error message when the `rsync` utility could not be found.

Release Notes:

- N/A
2025-10-10 23:44:32 +02:00
Cyandev
d6becab3be gpui: Fix broken rendering with nested opacity (#35407)
Rendering breaks when both an element and its parent have opacity set.
The following code reproduces the issue:

```rust
struct Repro;

impl Render for Repro {
    fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
        fn make_box(bg: impl Into<Fill>) -> impl IntoElement {
            div().size_8().bg(bg).hover(|style| style.opacity(0.5))
        }

        div()
            .flex()
            .items_center()
            .justify_center()
            .size(px(500.0))
            .hover(|style| style.opacity(0.5))
            .child(make_box(gpui::red()))
            .child(make_box(gpui::green()))
            .child(make_box(gpui::blue()))
    }
}
```

Before (broken behavior):


https://github.com/user-attachments/assets/2c5c1e31-88b2-4f39-81f8-40060e3fe958

The child element resets its parent and siblings' opacity, which is an
unexpected behavior.

After (fixed behavior):


https://github.com/user-attachments/assets/48527033-b06f-4737-b6c3-0ee3d133f138

Release Notes:

- Fixed an issue where nested opacity is rendered incorrectly.
2025-10-10 23:17:20 +02:00
Danilo Leal
924e7e61a5 settings_ui: Add page title label (#39979)
Release Notes:

- N/A
2025-10-10 17:29:30 -03:00
Danilo Leal
18405dece8 Rename settings and keymap actions (#39970)
This PR renames the following actions to make it easier and prioritize
the UI version of interacting with them:

| Before | After |
|--------|--------|
| `OpenSettingsEditor` | `OpenSettings` |
| `OpenSettings` | `OpenSettingsFile` |
| `OpenKeymapEditor` | `OpenKeymap` |
| `OpenKeymap` | `OpenKeymapFile` | 

Release Notes:

- Rename actions to open settings (UI/window and JSON file) as well as
to open the keymap (editor tab and JSON file).
2025-10-10 17:29:20 -03:00
Ben Kunkle
120faadef8 settings_ui: Use bm25 search (#39967)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-10 15:51:40 -04:00
Agus Zubiaga
6a9639f62f zeta2 cli: Split retrieval stats module (#39977)
Refactors zeta2 cli a bit. Merging this by itself to prevent conflicts.

Release Notes:

- N/A
2025-10-10 19:35:51 +00:00
Agus Zubiaga
a696e829ac zeta2: Boost declarations included by others (#39975)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <michael@zed.dev>
2025-10-10 19:06:43 +00:00
Shoghy Martinez
eb8510cb39 docs: Fix grammar in sentence about overridden dev extension (#39968)
Added missing comma after "After installing" and removed duplicated
"that" in developing-extensions.md.

Release Notes:

- N/A
2025-10-10 19:21:18 +02:00
localcc
a54cf3c74e Initial layout rounding implementation (#39712)
Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2025-10-10 16:45:38 +00:00
Ben Kunkle
41cac5e032 settings_ui: Improve search by fuzzy matching on words (#39961)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-10 12:40:23 -04:00
David Kleingeld
59c109f77f Gpui use readme as docs (#39966)
Removes the duplication between `gui.rs` doc comments and the `README.md` file.

Release Notes:

- N/A
2025-10-10 16:39:07 +00:00
Ben Kunkle
5e78fb0f94 settings_ui: Refactor item renderers to render entire field (#39959)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-10 12:35:40 -04:00
Kevin Rambaud
63032f6c66 Fix redirect stdin command for fish shell (#39963)
This fixes an issue introduced via
[v0.208.0-pre](https://github.com/zed-industries/zed/releases/tag/v0.208.0-pre)
and reported via
https://github.com/zed-industries/zed/issues/34530#issuecomment-3386042577
where, when using fish shell as the default shell and using a Claude
Code thread in Zed, all command were failing because `(command)` in fish
is for command substitution. Using it creates this type of error:

```
fish: command substitutions not allowed in command position. Try var=(your-cmd) $var ...
(npm ci) </dev/null
^~~~~~~~~~~~^
```

or in the editor itself:

<img width="1624" height="1060" alt="image"
src="https://github.com/user-attachments/assets/64fc3126-2cdd-450e-bc85-ef91c56b3705"
/>


Using the appropriate syntax to redirect to stdin for fish fixes the
issue.

Release Notes:

- Fixed redirect stdin command for fish shell
2025-10-10 16:21:48 +00:00
Cole Miller
5f857ffbb1 Fix menu navigation in remote projects modal (#39965)
Previously we were always adding a `Navigable` entry for the "new WSL
connection" option in this modal, even though we don't have the
corresponding button on non-Windows. This was causing `menu::SelectNext`
to behave incorrectly (focusing the center pane instead) when `Connect
New Server` was selected on macOS and Linux.

Release Notes:

- Fixed a bug with keyboard navigation in the remote project modal.
2025-10-10 16:07:35 +00:00
Cave Bats Of Ware
a78b560b8b Improve GPU selection on Windows (#39264)
Closes #39263

Release Notes:
- N/A 

from
https://github.com/zed-industries/zed/issues/39263#issuecomment-3358220988

> 
> > If you replace that code with
> > 
> > let adapter: IDXGIAdapter1 = unsafe { 
> >    dxgi_factory.EnumAdapters(adapter_index) 
> > }?.cast()?; 
> > 
> > does it not select the right GPU?
>  
> @reflectronic That does seem to select the active gpu for me, meaning
whichever GPU is currently connected. This is a much simpler solution
than the one I have here
(https://github.com/zed-industries/zed/pull/39264 - updated) and while
I'm sure I could imagine someone wanting to choose their GPU to render
Zed on, that may not be something that the application really needs to
support.
> 
> I have a branch with just this as the only change that I can push to
that PR if the simpler solution is preferred.
> 
> ```rust
>         let adapter: IDXGIAdapter1 = unsafe {
>             dxgi_factory.EnumAdapters(adapter_index)?.cast()?
>         };
> ```
2025-10-10 11:47:57 -04:00
morgankrey
b9a6660b93 Grok docs (#39962)
Adds docs for Zed hosted Grok models

Release Notes:

- N/A
2025-10-10 10:46:12 -05:00
Agus Zubiaga
a693d44553 zeta2 cli: Resumable LSP declarations gathering (#39828)
Gathering LSP declarations in zeta_cli can take a really long time for
big repos and has to be started from scratch if interrupted.

Instead of writing the cache file once we have walked the whole
worktree, we'll now do so incrementally as we complete each file. On
subsequent runs, we'll load as many valid declarations as has been
previously written to the cache, and then continue to request the rest
from the LSP which will append to the existing file as it makes
progress. If the last cache entry is incomplete, we'll truncate the
cache file to the end of the last valid line and continue from there, so
we can just `ctrl-c` without breaking resumability.

Release Notes:

- N/A
2025-10-10 12:44:36 -03:00
Dino
41ee92e5f2 agent_ui: Improve quote selections to consider message being edited (#39947)
- Update `AcpThreadView.insert_selections` to take into account whether
the user is currently editing an existing message and, if it is, insert
the selection into that message instead of the thread's message editor
- Update Window's default keymap to use the `agent::QuoteSelection`
action instead of the deprecated `assistant::QuoteSelection` action
- Introduce `AcpThreadView.active_editor` to allow callers to retrieve
either the thread view's message editor or the editor for the message
being edited, in case `AcpThreadView.editing_message` is not `None`
- Improve `AcpThreadView.focus_handle` to focus on the message being
currently edited in case the user navigates back to the editor and then
to the thread view again, all while editing a message
- Add tests for `AcpThreadView.insert_selections`, ensuring that the
selection is inserted in the message being currently edited, if a
message is being edited, or the thread view's message editor if no
message is being edited

Closes #39693 

Release Notes:

- Improved `agent: quote selection` to also work for a message that was
already sent but is being edited

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-10-10 16:35:37 +01:00
Joseph T. Lyons
a9eb480f3c Remove feedback modal (#39954)
The feedback modal did not match our keyboard-driven design. We can
revisit this later if we want, but for now, removing it makes sense. All
actions have been inlined in the `Help` menu to maintain
discoverability.

Additionally, not all feedback-based actions in the command palette were
namespaced under `feedback:`, and now they are, so they can all be found
there easily.

Release Notes:

- Notice: The `Give Feedback` modal has been removed. The options to
file bug reports, feature requests, email us, and open the Zed
repository can now be found within the `Help` menu directly. The command
palette actions have undergone the following changes:

- `feedback: give feedback` (removed)
- `feedback: file bug report` (no change)
- `zed: request feature` → `feedback: request feature`
- `zed: email zed` → `feedback: email zed`
- `zed: open zed repo` → `contribute: open zed repo`
2025-10-10 15:14:37 +00:00
localcc
5698636c92 Change windows asset name to match other platforms (#39936) 2025-10-10 15:44:48 +02:00
localcc
bbd735905f Fix settings window on Linux/Windows being immovable (#39939) 2025-10-10 15:44:31 +02:00
Bennet Bo Fenner
3d5ddcccf0 ollama: Resolve context window size via API (#39941)
Previously we were guessing the context window size here:
8c3f09e31e/crates/ollama/src/ollama.rs (L22)

This is inaccurate and must be updated manually. This PR ensures that we
extract the context window size from the request in the same way that
the Ollama CLI does when running `ollama show <model-name>` (Relevant
code is
[here](3d32249c74/cmd/cmd.go (L860)))

The format looks like this:

```json
{
  "model_info": {
    "general.architecture": "llama",
    "llama.context_length": 132000
  }
}
```

Once this PR is merged we could technically remove the old code
8c3f09e31e/crates/ollama/src/ollama.rs (L22)
I decided to keep it for now, as it is unclear if the necessary fields
are available via the API on older Ollama versions.

Release Notes:

- Fixed an issue where Ollama models would use the wrong context window
size
2025-10-10 12:59:52 +00:00
Smit Barmase
4dae3a15cc gpui: Fix uniform list scroll to offset for Top and Bottom strategies (#39938)
Closes #39863

Regressed in https://github.com/zed-industries/zed/pull/36653

Release Notes:

- Fixed an issue where clicking a sticky item in the project panel
wouldn’t correctly scroll the view to show its start.
2025-10-10 18:19:58 +05:30
Xiaobo Liu
c6373cc26d Enable test_remote_git_diffs_when_recv_update_repository_delay on Windows (#39866)
Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-10 09:09:24 +02:00
Cole Miller
a4ec693e34 windows: Don't throw an error when the settings file is empty (#39908)
Closes #39585 

Release Notes:

- N/A
2025-10-09 23:00:16 +00:00
Joseph T. Lyons
08a2b6898b Add a non-beta Windows issue template (#39904)
The beta template will be removed after Windows launch, the new url will
be:


https://github.com/zed-industries/zed/issues/new?template=07_bug_windows.yml

Release Notes:

- N/A
2025-10-09 21:35:16 +00:00
Danilo Leal
13b17b3a85 ui: Make tree view item styles more consistent with similar components (#39892)
This is a small step toward a future where all tree view item-like
elements in Zed can actually use this component.

Release Notes:

- N/A
2025-10-09 16:54:37 -03:00
Anthony Eid
e4f0fbbf80 settings_ui: Fix page scroll bar lagging behind when jumping to a section (#39897)
The issue was caused by the scroll handle taking a couple of frames to
update its offset correctly after calling
`ScrollHandle::scroll_to_top_of_item`. The fast fix is forcing 3 frames
to render back-to-back.

In the future, we should look into `ScrollHandle` and see if there's any
way to update its state outside of paint.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-10-09 19:24:02 +00:00
Mikayla Maki
98d4c34199 settings_ui: Restore settings UI keybinding hint (#39896)
Now that the toggle nav focus works well, we can advertise it!

Release Notes:

- N/A
2025-10-09 11:58:44 -07:00
Andrew Farkas
c24f365b69 Fix Git permalinks not being URL-escaped (#39895)
Closes #39875

Release Notes:

- Fixed "open/copy permalink to line" paths not being URL-escaped

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-09 18:33:05 +00:00
Ben Kunkle
2dfde55367 settings_ui: Fix tab and ID bugs (#39888)
Closes #39883

Release Notes:

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

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-10-09 13:54:26 -04:00
Remco Smits
e946a06efe markdown: Add Support for HTML img tags in text (#38107)
Re-adds: https://github.com/zed-industries/zed/pull/37264

This PR re-adds basic support for showing HTML images, without touching
the display mode for images.
The initial PR changed the `div().flex().flex_col()` to
`h_flex().flex_wrap()` but this broke the text wrapping in almost all
cases.

**Note**: This does not add support for showing the images inline,
because we haven't figured out how they correctly do this.
I'm working on adding the CSS `inline` display feature support to taffy
that hopefully allows us to correctly show images/other elements inline
without breaking the text wrapping.

**Before (nightly) and after (dev) for the README file inside Zed.
(nothing has changed, which is good)**
<img width="3440" height="1380" alt="Screenshot 2025-09-13 at 12 49 08"
src="https://github.com/user-attachments/assets/9cbdcb07-dbe9-4236-9d20-e59acc0e955e"
/>

**Result**
<img width="1717" height="1314" alt="Screenshot 2025-09-13 at 12 51 54"
src="https://github.com/user-attachments/assets/1c0f8507-c63d-472e-8e82-a654a63f7153"
/>

cc @SomeoneToIgnore

Release Notes:

- markdown preview: Added support for HTML `img` tags inside paragraphs
2025-10-09 19:11:42 +02:00
Bennet Bo Fenner
75067c94ad gpui: Fix ascent/descent calculation on macOS (#39886)
As you can see in the image, we were previously returning different
`ascent`s/`descent`s when a line would/would not contain an Emoji.

<img width="104" height="36" alt="image"
src="https://github.com/user-attachments/assets/436aeda0-87c0-4dee-943b-6da83681d466"
/>

---
CoreTexts `CTLineGetTypographicBounds` seems to return a different
ascent/descent depending on if an Emoji is there or not AFAIK it is not
documented if this is intended behaviour or not. For us it is
undesirable, as typing an Emoji causes the line to be shifted to the
bottom, see here:


https://github.com/user-attachments/assets/2ad1c82e-6297-48ac-a522-fb382ea56eea

--- 
Instead of using `CTLineGetTypographicBounds` to resolve the
ascent/descent, we look at every run and choose the maximum
ascent/descent. This matches how it [works on
Linux](f1d17fcfbe/crates/gpui/src/platform/linux/text_system.rs (L452))

Release Notes:

- Fixed an issue on macOS where typing an emoji on a line would cause
the line to shift downwards by a few pixels
2025-10-09 18:43:37 +02:00
Ben Brandt
d7143009fc Remove codex feature flag (#39878)
Release Notes:

- N/A
2025-10-09 16:17:49 +00:00
Francisco Gonzalez
a22c29c5f9 gpui: Fix partial dashed border rendering (#38190)
Closes #38189 

- Fixed border dashed for diverse scenarios, as demonstrated in the
images below.
- This change has no impact on the rendering of solid borders, as it was
implemented inside an if block for dashed styles

Release Notes:
  - N/A

## Before Images
<details><summary>click to expand (small top border, medium right
border, large bottom border)</summary>
<img width="289" height="95" alt="Screenshot From 2025-09-15 13-28-14"
src="https://github.com/user-attachments/assets/5226cd0a-49c2-43b8-9df9-f64390e3759e"
/>
</details>
<details><summary> click to expand (Same size pairs of borders)
</summary>
<img width="289" height="95" alt="Screenshot From 2025-09-15 13-32-22"
src="https://github.com/user-attachments/assets/603e7b49-e8b1-45a4-ac35-1b3aedf52bca"
/>
<img width="289" height="95" alt="Screenshot From 2025-09-15 13-33-24"
src="https://github.com/user-attachments/assets/4243786c-4c9d-4419-91d6-4594b5ee4390"
/>
</details>

## After Images

<details><summary>click to expand (small top border, medium right
border, large bottom border)</summary>

<img width="289" height="95" alt="Screenshot From 2025-09-15 13-17-28"
src="https://github.com/user-attachments/assets/e2652b38-1c24-432e-b7fd-c6f4d4c71de6"
/>

</details>


<details><summary> click to expand (same size pairs of
borders)</summary>
<img width="289" height="95" alt="Screenshot From 2025-09-15 13-37-59"
src="https://github.com/user-attachments/assets/05228431-4a91-4531-adcd-d70acd2c3b44"
/>

<img width="289" height="95" alt="Screenshot From 2025-09-15 13-36-34"
src="https://github.com/user-attachments/assets/6da946b8-1ccd-4ed1-9b38-539eba4edf42"
/>
</details>
2025-10-09 17:26:23 +02:00
Ben Kunkle
c543709d5f settings_ui: Add terminal settings (#39874)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-09 10:59:08 -04:00
Dino
c58931ac04 git_ui: Fix open diff for untracked files when sorting by path enabled (#39862)
Fixes the `Open Diff` action for untracked files when the `sort_by_path`
setting is enabled. The `ProjectDiff` wasn't correctly moving the
multibuffer's cursor to the untracked file because, when that setting is
enabled, it's sort prefix is changed to the tracked files sort prefix, and that
wasn't accounted for in `move_to_entry`.

Before these changes, the `sort_prefix` field for `PathKey` was called `namespace`, it was renamed to be clearer what its purpose is.

Closes #39529 

Release Notes:

- Fixed 'Open Diff' action for untracked files when `sort_by_path` is
enabled

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-09 14:34:52 +00:00
Ben Brandt
dd5da592f0 Provide codex as an option on remote sessions (#39774)
Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-09 16:10:56 +02:00
Ben Brandt
f1d17fcfbe acp: Simplify auth check and allow for custom /logout commands (#39867)
- Prefer agent-specific logout handling to allow state reset 
- Treat any auth method as supported; remove provider-specific filter 
- Avoid prompting auth when issuing /logout and agent supports it

Release Notes:

- N/A
2025-10-09 12:58:59 +00:00
Sunli
ccfc1ce387 gpui: Fix drawing rotated SVGs (#33288)
Fixes: https://github.com/longbridge/gpui-component/issues/994

1. When SVG is rotated, incorrect graphics are drawn.

For example: the original aspect ratio of the SVG is 1:1, if the bounds
used to render the SVG are 400x200 (aspect ratio 2:1),
[here](21f985a018/crates/gpui/src/svg_renderer.rs (L91))
the width is used as the scaling factor, causing the rendered SVG to
only have half the height. This PR ensures the complete SVG image is
always rendered.

2. The clipping region has no transformation applied, I added a function
called `distance_from_clip_rect_transformed` in the shader.

3. Fixed `monochrome_sprite_fragment` in `shader.metal` not applying
clipping region.

### Before:


https://github.com/user-attachments/assets/8f93ac36-281e-4837-96cd-c308bfbf92d1

### After:


https://github.com/user-attachments/assets/f52b67a6-4cb9-4d6c-b759-bbb91b59c1cf

Release Notes:

- N/A

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-10-09 14:53:36 +02:00
Dino
3d4f488d46 vim: Update change surrounds to match vim's behavior (#38721)
These changes refactor the whitespace handling logic for Vim's change
surrounds command (`cs`), making its behavior closely match
[tpope/vim-surround](https://github.com/tpope/vim-surround), following
[this
discussion](https://github.com/zed-industries/zed/issues/38169#issuecomment-3304129461).

Zed's current implementation has two main differences when compared to
[tpope/vim-surround](https://github.com/tpope/vim-surround):

- It only considers whether a single space should be added or removed,
instead of all the space that is between the surrounding character and
the content
- It only takes into consideration the new surrounding characters in
order to determine whether to add or remove that space

A review of
[tpope/vim-surround](https://github.com/tpope/vim-surround)'s behavior
reveals these rules for whitespace:

* Quote to Quote
    * Whitespace is never changed
* Quote to Bracket
    * If opening bracket, add one space
    * If closing bracket, do not add space
* Bracket to Bracket
    * If opening to opening, keep only one space
    * If opening to closing, remove all space
    * If closing to opening, add one space
    * If closing to closing, do not change space
* Bracket to Quote
    * If opening, remove all space
    * If closing, preserve all space

Below is a table with examples for each scenario. A new test has also
been added to specifically check the scenarios outlined above,
`vim::surrounds::test::test_change_surrounds_vim`.

| Type              | Before      | Command | After         |
|-------------------|-------------|---------|---------------|
| Quote → Quote     | `'   a   '` | `cs'"`  | `"   a   "`   |
| Quote → Quote     | `"   a   "` | `cs"'`  | `'   a   '`   |
| Quote → Bracket   | `'   a   '` | `cs'{`  | `{    a    }` |
| Quote → Bracket   | `'   a   '` | `cs'}`  | `{   a   }`   |
| Bracket → Bracket | `[   a   ]` | `cs[{`  | `{ a }`       |
| Bracket → Bracket | `[   a   ]` | `cs[}`  | `{a}`         |
| Bracket → Bracket | `[   a   ]` | `cs]{`  | `{    a    }` |
| Bracket → Bracket | `[   a   ]` | `cs]}`  | `{   a   }`   |
| Bracket → Quote   | `[   a   ]` | `cs['`  | `'a'`         |
| Bracket → Quote   | `[   a   ]` | `cs]'`  | `'   a   '`   |

These changes diverge from
[tpope/vim-surround](https://github.com/tpope/vim-surround) when
handling newlines. For example, with the following snippet:

```rust
fn test_surround() {
    if 2 > 1 {
        println!("place cursor here");
    }
};
```

Placing the cursor inside the string and running any combination of
‎`cs{[`, ‎`cs{]`, ‎`cs}[`, or ‎`cs}]` would previously remove newline
characters. With these changes, using commands like ‎`cs}]` will now
preserve newlines.

Related to #38169
Closes #39334

Release Notes:

- Improved Vim’s change surround command to closely match
[tpope/vim-surround](https://github.com/tpope/vim-surround) behavior.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-09 12:18:48 +01:00
Piotr Osiewicz
ba2337ffb9 project search: Reduce hangs on main thread (#39857)
This takes the idea that @RemcoSmitsDev started on in
https://github.com/zed-industries/zed/pull/39354. We did away with
grabbing a snapshot of the display map when buffer coordinates were
sufficient.
Closes #37267

Release Notes:

- Reduced micro-stutters in project search with large multi-buffer
contents.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-09 13:11:11 +02:00
Merlin04
37d676e2c6 Add support for xonsh shell (#39834)
Closes #39506

Release Notes:

- Fixed environment variable capture when login shell is
[xonsh](https://xon.sh/)

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-10-09 12:00:22 +02:00
Mikayla Maki
1bb6752e3e gpui: Fix typo in publish script (#39836)
Release Notes:

- N/A
2025-10-09 05:11:11 +00:00
Mikayla Maki
8c9b42dda8 gpui 0.2.0 (#39835)
Release Notes:

- N/A
2025-10-09 04:58:59 +00:00
Mikayla Maki
15c4aadb57 Add bump gpui script (#39833)
Release Notes:

- N/A
2025-10-09 04:15:37 +00:00
Ben Kunkle
3d200a5466 settings_ui: Improve keyboard nav (#39819)
Closes #ISSUE

From notes:

```markdown
  - [x] Clicking on the disclsoure icon button in the root-level tree view item should steal focus and move it to the root item (not the icon button)
  - [x] [@ben] Allow left/right arrow keys to expand/collapse root tree view items in the nav
    - [x] With this, make enter/space work the same as clicking (activate page, don't expand root items, focus moves to the content and leaves nav — becomes consistent with mouse interaction)
  - [x] Smart cmd-shift-e: toggling focus should take you to the selected item
  - [x] [@ben] pageup + pagedown in nav -> jump between root items
  - [x] [@ben] home + end buttons should work
    - in nav:
      - home always goes to first section header
      - end always goes to last _visible_ item (does not expand)
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-08 23:22:02 -04:00
Matthijs Kok
e077b63915 settings_ui: Correct "File Icons" description (#39805)
Align with
cd656485c8/crates/settings/src/settings_content/workspace.rs (L490)

By the way, LOVE the settings UI! <3 Great job so far :)


Release Notes:

- N/A
2025-10-08 20:47:55 -03:00
John Tur
ef839cc207 Improve importing font-family settings from VS Code (#39736)
Closes https://github.com/zed-industries/zed/issues/39259

- Fixes import of `editor.fontFamily` (we were looking for the wrong
key)
- Adds basic support for the CSS font-family syntax used by VS Code,
including font fallback

Release Notes:

- N/A
2025-10-08 19:19:48 -04:00
Michael Sloan
3d0312f4c7 zeta2 inspector: Sort by scores and add score components tooltip (#39821)
Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
2025-10-08 23:14:40 +00:00
Tom Planche
c1e3958c26 editor: Fix duplicate and copy line newlines (#39610)
Closes #34797 and its child #39508.


![zed-#34797-#39508](https://github.com/user-attachments/assets/48a0fe28-8b8a-480d-bffc-6abc7ff310ff)

Release Notes:

- Fixed `editor::DuplicateLineUp` duplicating the last line onto itself
when the line doesn't end with a newline (#39508)
- Fixed line copy not including a newline at end of buffer, causing
paste to occur on the same line (#34797)
2025-10-08 22:56:25 +00:00
Andrew Farkas
ba937d16e7 Onboarding refactor (#39724)
<img width="1648" height="976" alt="Screenshot 2025-10-07 at 6 57 20 PM"
src="https://github.com/user-attachments/assets/ae7289c0-8820-4fdf-ae28-84fb6bd64942"
/>

Fixes #39347

Release Notes:

- Improved onboarding UI by collapsing it to a single page

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-10-08 22:47:25 +00:00
Kirill Bulatov
4dbd186485 Do not deselect in terminal on copy by default (#39814)
Release Notes:

- Flips `terminal.keep_selection_on_copy` default to `true`
2025-10-08 18:01:44 -04:00
Cole Miller
88887fd292 debugger: Add support for remote browser debugging (#39248)
This PR adds support for browser debugging in SSH and WSL projects. We
use the vscode-js-debug-companion extension, repackaged as a standalone
CLI (https://github.com/zed-industries/js-debug-companion-cli).

Closes #38878

Release Notes:

- debugger: Browser debugging is now supported in SSH and WSL projects.

---------

Co-authored-by: Nia <nia@zed.dev>
2025-10-08 21:57:57 +00:00
ozer
31e75b2235 git_ui: Add repository search and alphabetical sorting (#39351)
Closes #38778

Release Notes:

- Added: Search functionality to repository selector
- Improved: Repositories now display in alphabetical order
2025-10-08 17:51:20 -04:00
robert7k
681c19899f Allow adding files to .gitignore (#38089)
This feature allows users to add a new, untracked file to `.gitignore`
by using the context menu in the git panel.

<img width="300" alt="Demo screen shot"
src="https://github.com/user-attachments/assets/3f2402fb-9337-42f8-939f-dac12ca09518"
/>

Release Notes:

- Added feature to add a new file to `.gitignore`
2025-10-08 17:49:06 -04:00
Jakub Konka
439add3d23 terminal: Clear shell after activating (#39798)
Two tweaks were required to ensure we correctly clear the shell after
running an activate script(s):
1. PowerShell upon receiving `\r\n` input, will enter the continuation
mode (>>). To avoid this, we send an "enter" key press instead `\x0d`.
2. In order to clear the terminal _after_ issuing all activation
commands, we need to take into account the asynchronous nature of the
activation process:
   - We write the command to run the script to PTY
- We send "enter" (It is now being processed by the shell) At this point
we need to wait for the shell to finish executing before we clear the
terminal. Otherwise we will create a race where we might clear the
terminal _before_ the shell finished executing the activation script(s).
   - Write `clear`/`cls` command to PTY
- Send "enter" This way we guarantee that we clear the terminal _after_
all scripts were executed.

Closes #38474 

Release Notes:

- N/A
2025-10-08 23:28:11 +02:00
Lev Zakharov
81b98cdd4d go: Add ability to run testable examples (#39390)
See related discussion #39381.

<img width="724" height="488"
src="https://github.com/user-attachments/assets/4a69e13e-783f-45d7-99f4-e23c0415a781"
/>

Release Notes:

- Added ability to run Go Testable Examples
2025-10-08 22:55:26 +02:00
Agus Zubiaga
ca89a40df2 zeta2 inspector: Plan prompt locally (#39811)
Plans and displays the prompt locally before the response arrives.
Helpful while debugging prompt planning.

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-10-08 20:47:35 +00:00
Maksim Bondarenkov
f5884e99d0 audio: Move log::info into a global import (#39810)
I didn't find a commit, but it's now required for all platforms, I got
this compile error with 0.207.3 tag

``` 
  error: cannot find macro `info` in this scope
     --> crates\audio\src\audio.rs:121:13
      |
  121 |             info!("Output stream: {:?}", output_handle);
      |             ^^^^
      |
  help: consider importing this macro
      |
    1 + use log::info;
      |
  
  error: could not compile `audio` (lib) due to 1 previous error
```

Closes #ISSUE

Release Notes:

- N/A
2025-10-08 20:30:27 +00:00
Agus Zubiaga
fce931144e zeta2 inspector: Display prediction request immediately (#39809)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-10-08 20:23:48 +00:00
Piotr Osiewicz
ef423148fc lsp: Serialize LSP notifications on background threads (#39403)
This should reduce hiccups when opening large files.

Release Notes:

- N/A
2025-10-08 19:48:40 +00:00
Danilo Leal
cd656485c8 settings ui: Fix some layout regressions (#39804)
Release Notes:

- N/A
2025-10-08 15:56:22 -03:00
Alvaro Parker
1e149b755f gpui: Add support for floating windows (#39702)
Closes #ISSUE

This allows new windows like the Rules library or the Settings UI window
to appear floating on window managers like hyprland:


https://github.com/user-attachments/assets/628db7f9-4459-4601-85f1-789923831182

Left is with `WindowKind::Floating` and right is with
`WindowKind::Normal`

Release Notes:

- Added support for floating windows on x11 and wayland
2025-10-08 20:48:17 +02:00
Bartosz Kaszubowski
e0eeda11ed inspector_ui: Align with title bar, other visual tweaks (#39697)
# How

Few tweaks for the GPUI Inspector panel, including toolbar align with
title bar, buffer font for source link, few other layout, spacing and
wording tweaks.

Release Notes:

- N/A

# Preview

### Before

<img width="1286" height="602" alt="Screenshot 2025-10-07 at 19 33 20"
src="https://github.com/user-attachments/assets/515ddcdf-a2c8-4f5f-b37e-b1668df2147f"
/>

### After

<img width="1286" height="542" alt="Screenshot 2025-10-07 at 19 09 24"
src="https://github.com/user-attachments/assets/3a777974-3427-4545-afda-37fabcb012ba"
/>
2025-10-08 12:10:53 -06:00
Michael Sloan
bcef3b5010 zeta2: Parse imports via Tree-sitter queries + improve zeta retrieval-stats (#39735)
Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Oleksiy <oleksiy@zed.dev>
2025-10-08 12:04:06 -06:00
David
5fd187769d Add Codestral edit predictions provider (#34371)
Release Notes:

- Added Codestral edit predictions provider which can be enabled by adding an API key in the Mistral section of agent settings.

![2025-07-13 11 35
33](https://github.com/user-attachments/assets/8bf599d7-33c7-4556-b878-6c645d69661f)


## Config

Get API key from https://console.mistral.ai/codestral and add it in the Mistral section of the agent settings. 

```
  "features": {
    "edit_prediction_provider": "codestral"
  },
  "edit_predictions": {
    "codestral": {
      "model": "codestral-latest",
      "max_tokens": 150
    }
  },
```

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
2025-10-08 12:02:21 -06:00
Munish Mummadi
096930817b Make FoldAtLevel commands discoverable in command palette (#39422)
## Description
Fixes #39376

Add individual FoldAtLevel1-9 actions so users can find fold commands in
the command palette while keeping existing keybindings.

Migrating user keymaps is necessary to have the keybinds show in the command palette.

Closes #39376 

### Changes
- `crates/editor/src/actions.rs` - Added FoldAtLevel1-9 action structs
- `crates/editor/src/editor.rs` - Implemented fold_at_level_1-9 handler
methods
- `crates/editor/src/element.rs` - Registered new actions
- `assets/keymaps/*.json` - Updated keybindings to use new individual
actions

### Other Approaches considered
- Adding #[serde(default)] to existing FoldAtLevel(u32) - wouldn't make
it discoverable
- Creating a single action with enumerated variants - idk about this
that well.

### Release Notes
Release Notes:
- Added Fold At Level 1-9 actions to the command palette

---------

Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
2025-10-08 17:28:46 +00:00
Xiaobo Liu
c7d5afedc5 docs: Add missing docs for CommandInterceptResult fields (#39676)
Document the `string` and `positions` fields to resolve TODO comments.

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-08 20:20:50 +03:00
Bartosz Kaszubowski
d6b1801fb3 inspector_ui: Split out size from bounds string (#39703)
# How

Tweak the way in which inspected element bounds and size are printed to
improved readability of GPUI Inspector data.

> [!note]
> It looks like the only place in the workspace where bounds are used
within formatted print is GPUI Inspector panel, but I decided to do not
alter [GPUI `geometry.rs` default
format](a7e7f46020/crates/gpui/src/geometry.rs (L1579-L1587)),
since adding multiline output and additional labels in there does not
feel like the beast approach, but maybe I'm wrong?

Release Notes:

- N/A

# Preview

<img width="1168" height="224" alt="Screenshot 2025-10-07 at 20 08 35"
src="https://github.com/user-attachments/assets/97753fc1-68d7-4cf8-ad92-afe85319f3d8"
/>

<img width="1168" height="228" alt="Screenshot 2025-10-07 at 20 09 24"
src="https://github.com/user-attachments/assets/beed2a92-0817-4ed2-bb62-4d7b931e8709"
/>
2025-10-08 11:17:11 -06:00
Conrad Irwin
7c55f7181d Fix configuring shell in project settings (#39795)
I mistakenly broke this when refactoring settings

Closes #39479

Release Notes:

- Fixed a bug where you could no longer configure `terminal.shell` in
project settings
2025-10-08 16:49:44 +00:00
Jakub Konka
4684d6b50e terminal: Fix escaping arguments when using CMD as the shell (#39701)
A couple of caveats:
- We should not auto-escape arguments with Alacritty's `escape_args`
option if using CMD otherwise, the generated command will have way too
many escaped characters for CMD to parse correctly.
- When composing a full command for CMD, we need to put it in double
quotes manually: `cmd /C "activate.bat& pwsh.exe -C do_something"` so
that CMD executes the entire string as a sequence of commands.
- CMD requires `&` as a chaining operator for commands (`;` for other
shells).

Release Notes:

- N/A
2025-10-08 16:44:04 +00:00
Ben Kunkle
578e7e4cbd settings_ui: Focus content controls when opened from nav bar (#39792)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-08 12:42:52 -04:00
Danilo Leal
a960db6a43 keymap editor: Adjust the "edit in keymap.json" button (#39789)
Making its visuals and positioning more consistent with the same button
in the settings UI.

Release Notes:

- N/A
2025-10-08 13:03:15 -03:00
Marshall Bowers
5a0f796a44 agent2: Expand auto-retries for completion errors (#39787)
This PR expands our automatic retry behavior for certain classes of
completion errors (e.g., rate limit errors).

Previously this was only available when using burn mode.

We now auto-retry when:

- Using the Zed provider while on a token-based plan
- Using the Zed provider while on a legacy plan with burn mode enabled
- Using a non-Zed provider

Release Notes:

- Expanded automatic retry behavior for errors in the Agent. Errors
classified as "retryable" (such as rate limit errors) will now
automatically be retried when:
  - Using the Zed provider while on a token-based plan
  - Using the Zed provider while on a legacy plan with burn mode enabled
  - Using a non-Zed provider

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-08 15:52:06 +00:00
Dino
604d56659d file_finder: Fix path matching on starting slash (#39480)
These changes update the way the file finder decides wether to only look
for an absolute path or for a relative path too.

When the provided query started with a slash (`/`) the file finder would
assume this to be an absolute path so would always try to find an
absolute path and return no matches if none was found. This is meant to
support situtations where, for example, a CLI tool might output the
absolute path of a file and the user can copy and paste that in the file
finder.

However, it's should be possible to use slash (`/`) at the start of the
query to specify that only relative files inside a folder should be
matched, which would not work in this scenario.

With these changes, the file finder will first check if the path is
absolute and, if it is and no absolute matches were found, it'll still
try to find relative matches, otherwise it'll simply look for relative
matches.

Closes #39350

Release Notes:

- Fixed project files matches when using slash (`/`) at the start in
order to consider relative paths

---------

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-10-08 16:42:39 +01:00
Conrad Irwin
1d1c799b4b Reland "Remove cx from ThemeSettings" (#39720)
- **Reapply "Remove cx from ThemeSettings (#38836)" (#39691)**
- **Fix theme loading races**

Closes #ISSUE

Release Notes:

- N/A
2025-10-08 17:36:52 +02:00
Danilo Leal
70af11ef2a settings ui: Add a handful of design tweaks (#39784)
Release Notes:

- N/A
2025-10-08 12:27:22 -03:00
Piotr Osiewicz
5fa4b3bfe8 windows: Do not exit from app in dev builds when cli is not found (#39768)
Release Notes:

- N/A
2025-10-08 17:14:58 +02:00
Joseph T. Lyons
93a5dffea1 Bump Zed to v0.209 (#39781)
Release Notes:

- N/A
2025-10-08 15:14:54 +00:00
Finn Evers
9ac010043c settings_ui: Add fallback for agent_ui_font_size (#39782)
Closes https://github.com/zed-industries/zed/issues/39775

Release Notes:

- N/A
2025-10-08 15:08:39 +00:00
Ben Brandt
dd3b65f707 acp: Don't display failed terminal call on display only terminals (#39780)
We don't get an ExitStatus from a remote terminal, so this check was
failing.

Ideally we move all of this to just needing an exit code, but we will
have to revisit that later.

Release Notes:

- N/A
2025-10-08 14:17:37 +00:00
Dino
057b7b1543 vim: Fix % motion edge case (#39620)
Update Vim's `%` motion to first attempt finding the exact matching
bracket/tag under the cursor, then fall back to the previous
nearest-enclosing logic if none is found. This prevents accidentally
jumping to nested pairs in languages like TSX and Svelte where `<>`,
`</>`, and `/>` are also treated as brackets.

Closes #39368 

Release Notes:

- Fixed an edge case with the `%` motion in vim, where the cursor could
end up in a closing HTML tag instead of the matching bracket
2025-10-08 13:49:55 +01:00
Dino
a9455eb947 migrator: Avoid attempting to migrate empty content (#39771)
This commit fixes an issue where opening zed using `--user-data-dir`
with an empty directory would cause the first run to display a "Failed
to migrate settings" error.

This was caused by the migrator attempting to migrate an empty string,
so if that's the case, we'll simply return `Ok(None)` and avoid
attempting to migrate anything at all.

Relates to #39400

Release Notes:

- N/A

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-08 13:38:26 +01:00
Finn Evers
db3c186af0 language_model: Add image decoding support for BMP and TIFF image formats (#39767)
Related: #39745

Release Notes:

- Added support for pasting TIFF and BMP images in the agent panel.
2025-10-08 11:53:32 +00:00
Xiaobo Liu
71856706c7 agent2: Fix test_save_load_thread for Windows paths (#39753)
Use path! macro for platform-specific path formatting in test
assertions, fixing hardcoded Unix-style paths that failed on Windows.

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-10-08 12:47:43 +02:00
Mikayla Maki
4ec24ebe01 Fix more settings UX problems (#39760)
And remove the feature flag for now.

Release Notes:

- N/A
2025-10-08 10:34:06 +00:00
Remco Smits
4152942a8e markdown: Add support for HTML block quotes (#39755)
This PR adds support for HTML block quotes, that also allows you to have
nested variant of it.

<img width="1441" height="804" alt="Screenshot 2025-10-08 at 10 25 57"
src="https://github.com/user-attachments/assets/4e1da766-fb54-4e87-8654-1ea14330bc97"
/>

Code example used in screenshot:

```html
<blockquote>
    <p>
        Words can be like X-rays, if you use them properly—they’ll go through
        anything. You read and you’re pierced.
    </p>
    <blockquote>
        <p>
            lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.
        </p>
    </blockquote>
</blockquote>
```

Release Notes:

- Markdown: Added support for `HTML` block quotes
2025-10-08 11:33:42 +02:00
Mikayla Maki
bbf4bfad6f Implement the unimplemented setting (#39747)
Release Notes:

- N/A
2025-10-08 07:15:40 +00:00
Mikayla Maki
989d172cfc Add edit JSON button (#39732)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-08 06:23:43 +00:00
Danilo Leal
1265b229a9 Update doc comments for agent_buffer_font_size (#39743)
Follow up to https://github.com/zed-industries/zed/pull/39468.

Unlike `agent_ui_font_size`, the `agent_buffer_font_size` setting does
have a default value, which means it does not fall back to the regular
UI font size, but rather to its default value.

Release Notes:

- N/A
2025-10-08 06:14:18 +00:00
Danilo Leal
294ca25f44 settings ui: Add another batch of UX fixes and improvements (#39742)
Release Notes:

- N/A
2025-10-08 06:11:34 +00:00
Ben Kunkle
5c7907ad2f settings_ui: Pre preview launch cleanup (#39733)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-10-07 22:41:48 -04:00
Ben Kunkle
f652c3a14d settings_ui: Filter to get project settings (#39730)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-10-07 21:36:40 -04:00
Mikayla Maki
69ac003bc9 Add escape to settings window (#39699)
Release Notes:

- N/A
2025-10-08 00:36:33 +00:00
Danilo Leal
d615525771 ui: Rename and simplify NumberField component (#39731) 2025-10-07 21:35:51 -03:00
Danilo Leal
8bf37dd130 settings ui: Add more UX improvements (#39700)
Release Notes:

- N/A
2025-10-07 20:01:52 -03:00
Smit Barmase
8cb67ec91c remote: Fix opening a remote terminal failing on certain systems (#39715)
Closes #38538

Release Notes:

- Fixed an issue where opening a remote terminal failed on systems like
BusyBox, Alpine, Amazon Linux 2, some CentOS images, etc., due to an
invalid option 'C'.
2025-10-08 03:04:32 +05:30
Ben Kunkle
cd67941598 settings_ui: Preserve selected nav entry when changing files (#39721)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-07 21:28:47 +00:00
Anthony Eid
669db62e33 settings ui: Move selected nav bar entry on scroll (#39633)
This PR makes selecting a sub-entry in the settings UI nav bar scroll to
that section in the settings page. It also updates the selected
sub-entry when scrolling through a settings page to match what a user is
viewing on the page.

I also added a new helper method to `ScrollHandle` type called
`scroll_to_top_of_item` that scrolls until an item is the top element
visible.

Release Notes:

- N/A
2025-10-07 17:16:39 -04:00
Smit Barmase
41f1835bbe project_panel: Fix clicking away to create file or directory doesn't create it (#39716)
Closes #38919

Now, when unfocusing the filename editor while creating a file or
directory in the project panel, it will create it by default unless the
name is empty or already exists.

Release Notes:

- Improved behavior where unfocusing while creating a new file or
directory in the project panel now creates it instead of discarding it.
2025-10-08 02:23:44 +05:30
Ben Kunkle
791ba9ce4c settings_ui: Soft fail on no default & fix language default loading (#39709)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-07 20:27:42 +00:00
Marshall Bowers
e60a61f7e7 languages: Add comment injections for Rust (#39714)
This PR adds comment injections for Rust.

Release Notes:

- Rust: Added comment injections.
2025-10-07 20:26:05 +00:00
Ben Kunkle
b8a6180b82 settings_ui: Title Case Enums (#39711)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-07 19:44:45 +00:00
Bartosz Kaszubowski
dfce57c7f8 Remove unused blake3 dependency (#39677)
Did not found any code reference or direct dependants of this package in
the workspace.

Release Notes:

- N/A
2025-10-07 15:35:01 -04:00
Antal Szabó
15580a867b windows: Fix handling of AltGr to avoid conflicts (#38925)
The previous modifier detection treated `AltGr` presses as `Ctrl+Alt`,
which broke entering characters produced by AltGr. For example, on a
Hungarian layout `{` is typed with `AltGr+B`; our code saw that as
`Ctrl+Alt+B` and the keybind took precedence, so the character couldn’t
be entered.

On Windows, AltGr isn’t a first-class modifier. It’s emulated as a
combination of `Right Alt (VK_RMENU)` plus a synthetic `Left Ctrl
(VK_LCONTROL)` press. When users press AltGr, `GetKeyState` reports both
Ctrl and Alt as down, which makes AltGr indistinguishable from a real
`Ctrl+Alt` chord if we only look at aggregate modifier state.

Fix: detect the AltGr pattern by checking `VK_RMENU && VK_LCONTROL`.
When that pattern is present, treat it as text-entry intent and suppress
`control` and `alt` in `current_modifiers()`. This prevents
AltGr-produced characters from colliding with `Ctrl+Alt` keybinds while
keeping other modifiers intact.

Limitation: there is no Windows API to tell whether the active layout
actually has AltGr. As a result, on non-AltGr layouts (e.g. US),
pressing `Right Alt + Left Ctrl` will be interpreted as AltGr and will
not trigger `Ctrl+Alt` keybinds. This is an acceptable trade-off to
ensure AltGr layouts can reliably enter characters; users can still
invoke `Ctrl+Alt` keybinds using `Left Alt` or by choosing bindings that
avoid common AltGr pairs.

I based this on https://github.com/zed-industries/zed/pull/36115 after
trying other different approaches, but this one is a bit more specific.

Does this approach make sense, or is slightly breaking US input in favor
of fixing international input a no-go? I think the benefit - being able
to type certain characters _at all_ - outweighs the shortcomings.
Otherwise, there's a way to detect if the keyboard layout uses AltGr or
not, but it's quite hacky, and involves reading the registry to find the
current layout dll's name, opening that dll, manually declaring struct
layouts that it uses, then parsing out the AltGr flag from a function
call result. I don't think that's worth it, but if needed, I can give
that a shot, let me know.


Release Notes:

- windows: Fixed handling of AltGr to avoid keybinds preventing
character input
2025-10-07 21:28:50 +02:00
Anthony Eid
f7bb22fb83 settings ui: Add missing setting elements (#39644)
Added the following settings to the UI

Editor Page - Scrollbar Section (9 settings)
- Show
- Cursors
- Git Diff
- Search Results
- Selected Text
- Selected Symbol
- Diagnostics
- Horizontal Scrollbar
- Vertical Scrollbar

 Editor Page - Minimap Section (6 settings)
- Show
- Display In
- Thumb
- Thumb Border
- Current Line Highlight
- Max Width Columns

Editor Page - Editor Behavior Section (3 settings)
- Expand Excerpt Lines
- Excerpt Context Lines
- Minimum Contrast For Highlights

 Debugger Page (7 settings)
- Stepping Granularity
- Save Breakpoints
- Timeout
- Dock
- Log DAP Communications
- Format DAP Log Messages
- Button

 Panels Page - Git Panel Section (3 settings)
- Button
- Dock
- Default Width

Collaboration Page - Experimental Section (4 settings)
- Auto Microphone Volume
- Auto Speaker Volume
- Denoise
- Legacy Audio Compatible

Release Notes:

- N/A
2025-10-07 19:20:33 +00:00
Lukas Wirth
7db7ad93a2 Revert "gpui: Assert validity of text runs for StyleText" (#39708)
Reverts zed-industries/zed#39581

This has done its job uncovering incorrect constructions of the
highlight ranges pretty fast. Reverting this to prevent this from
spilling into preview until I can fix the call sites next week
2025-10-07 19:08:33 +00:00
Lukas Wirth
642643de01 language: Fix HighlightedText::first_line_preview creating incorrect highlight ranges (#39705)
Fixes ZED-1XW

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-07 18:52:59 +00:00
Ben Kunkle
391e304c9f settings_ui: Keyboard navigation (#39652)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2025-10-07 18:23:11 +00:00
Jakub Konka
3106472bf3 terminal: Escape strings with backticks rather than backslashes in PowerShell (#39657)
Closes #39007 

Strings should be escaped with backticks in PowerShell, so the following

```
\"pwsh.exe -C pytest -m \\\"some_test\\\"\"
```

becomes

```
\"pwsh.exe -C pytest -m `\"some_test`\"\"
```

Otherwise PowerShell will misinterpret the invocation resulting in
weirdness all-around such as the issue linked above.

Release Notes:

- N/A
2025-10-07 19:30:09 +02:00
Cole Miller
d04ac864b8 Don't construct an agent panel when disable_ai is set (#39689)
Follow-up to #39649, possible fix for #39669

This implements an alternate strategy for showing/hiding the agent panel
in response to `disable_ai`. We don't load the panel at all if AI is
disabled at startup, and when the value of `disable_ai` changes, we load
the panel or destroy it as needed.

Release Notes:

- N/A
2025-10-07 12:48:37 -04:00
Vinicius da Motta
f9a2724a8b Remove empty line when collapsing diagnostics (#39459)
Closes #39028

Fixed empty lines appearing when collapsing files with diagnostic
messages in the diagnostics panel.

Added a flag to track when processing a `FoldedBuffer` and skip
`Near/Below` blocks (diagnostic messages) that immediately follow it.
This prevents diagnostics from rendering as empty lines when their file
is collapsed.

Before:
<img width="1489" height="429" alt="before"
src="https://github.com/user-attachments/assets/5e233290-1f6e-403c-a6b3-a65107586d01"
/>

After:
<img width="981" height="270" alt="after"
src="https://github.com/user-attachments/assets/a877b651-6b7f-4441-805c-38ea41e73a18"
/>

Release Notes:
- Fixed empty lines when collapsing files with diagnostics in the
diagnostics panel
2025-10-07 16:38:35 +00:00
Finn Evers
ded73c9d56 Fix an issue where scrollbars would capture too many events (#39690)
This PR fixes an issue where scrollbars would overagressively capture
some events, which could lead to clicks being lost in the process. Also
improves how hovering of the parent is detected to lead to less false
positives.

Release Notes:

- Fixed a rare issue where scrollbars would react to and capture events
they should not react to.
2025-10-07 16:10:36 +00:00
Conrad Irwin
41cf114d8a Revert "Remove cx from ThemeSettings (#38836)" (#39691)
This reverts commit a2a7bd139a.

This caused themes to not load correctly on startup, you needed to edit
your settings.

Release Notes:

- N/A
2025-10-07 15:45:20 +00:00
Marshall Bowers
e765818487 agent: Remove some unused code from the Thread (#39688)
This PR removes some unused code from the Agent1 `Thread`.

Release Notes:

- N/A

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-07 15:36:53 +00:00
Danilo Leal
84f488879c settings ui: Review available items ordering & writing (#39682)
Release Notes:

- N/A
2025-10-07 11:54:13 -03:00
Bennet Bo Fenner
85985fe960 git: Fix panic in git panel when sort_by_path is true (#39678)
Fixes ZED-1NX

This panic could occur when an `bulk_staging` was set to `Some(...)` and
`sort_by_path` was set to `true`.
When setting `sort_by_path: true`, we call `update_visible_entries(...)`
which then checks if `bulk_staging ` is `Some(...)` and calls
`entry_by_path`. That function accesses `entries`, which still consists
of both headers and entries. But the code
(`entry.status_entry().unwrap()`) assumes that there are no headers in
the entry list if `sort_by_path: true`.

```rust
if GitPanelSettings::get_global(cx).sort_by_path {
    return self
        .entries
        .binary_search_by(|entry| entry.status_entry().unwrap().repo_path.cmp(path)) //This unwrap() would panic
        .ok();
}
```

This has now been fixed by clearing all the entries when `sort_by_path`
changes, as this is the only case where our assumptions are invalid. I
also added a test which 1) actually tests the sort_by_path logic 2)
ensures that we do not re-introduce this panic in the future.


Release Notes:

- Fixed a panic that could occur when using `sort_by_path: true` in the
git panel
2025-10-07 13:05:13 +00:00
Piotr Osiewicz
3bec885536 relpaths: Fix repeated usages of RelPath::unix on static paths (#39675)
- **paths: Cache away results of static construction of RelPath**
- **agent: Cache away results of converting rules file names into
relpaths**

This PR fixed a regression from relpath PR where we've started doing
more work when working with static (Rel-)Paths.

Release Notes:

- N/A
2025-10-07 12:23:31 +00:00
Lukas Wirth
9a5034ea6d Improve command logging and log_err module paths (#39674)
Prior we only logged the crate in `log_err`, which is not too helpful.
We now assemble the module path from the file system path.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-07 12:11:15 +00:00
Alvaro Parker
64eec67a81 Fix floating file chooser (#39154)
Closes #39117 

Some window managers (example: hyprland
https://github.com/hyprwm/Hyprland/issues/11229) still won't open a
floating file chooser because they don't support the XDG foreign
protocol yet: https://wayland.app/protocols/xdg-foreign-unstable-v2

Release Notes:

- Fixed file chooser not floating

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-07 14:06:48 +02:00
Lukas Wirth
ffff56f7fe Revert "search: Introduce more yield points in project search pending_search task" (#39672)
Reverts zed-industries/zed#39624

This seems to have had the opposite effect
2025-10-07 11:58:58 +00:00
Finn Evers
b02b130b7c extensions_ui: Fix uneven horizontal padding (#39627)
This fixes an issue where the horizontal padding on the extensions page
was uneven and where the padding on the right side would be much larger.

| Before | After |
| --- | --- |
| <img width="2550" height="1694" alt="Bildschirmfoto 2025-10-06 um 19
26 56"
src="https://github.com/user-attachments/assets/cf05b77b-4a9e-4ad9-8fa7-381f9b6b45af"
/> | <img width="2546" height="1694" alt="Bildschirmfoto 2025-10-06 um
19 25 49"
src="https://github.com/user-attachments/assets/493ba188-534a-4e7a-b2c1-2b1380be7150"
/> |

Release Notes:

- Improved the horizontal padding on the extensions tab.
2025-10-07 13:23:02 +02:00
Piotr Osiewicz
41ac6a8764 windows: Use nc-esque ssh askpass auth for remoting (#39646)
This lets us avoid storing user PW in ZED_ASKPASS_PASSWORD env var.
Release Notes:

- N/A
2025-10-07 09:48:03 +02:00
Danilo Leal
963204c99d settings ui: Add new batch of settings (#39650)
Release Notes:

- N/A
2025-10-07 00:27:58 -03:00
Cole Miller
f6f11eb544 Avoid spawning external agent process when AI is disabled at startup (#39649)
Closes #39645 

Release Notes:

- Fixed external agent servers sometimes being spawned when Zed started
even when AI was disabled.
2025-10-07 01:01:17 +00:00
Ben Kunkle
c1e917165d settings_ui: Language settings UI (#39640)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 19:56:23 -04:00
Conrad Irwin
a2a7bd139a Remove cx from ThemeSettings (#38836)
Before this change the active theme and icon theme were retrofitted onto
the ThemeSettings.

Now they're in their own new global (GlobalTheme::theme(cx) and
GlobalTheme::icon_theme(cx))

This lets us remove cx from the settings traits, and tidy up a few other
things along the way.

Release Notes:

- N/A
2025-10-06 23:06:50 +00:00
Marco Mihai Condrache
4de13e06ec askpass: Fix cli path when executed in a remote server (#39475)
Closes #39469
Closes #39438
Closes #39458

I'm not able to test it, i would appreciate if somebody could do it. I
think this bug was present also for SSH remote projects

Release Notes:

- Fixed an issue where zed bin was not found in remote servers for
askpass

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2025-10-07 00:49:06 +02:00
Cole Miller
e680dfb0a0 git_ui: Update project diff more aggressively (#39642)
This fixes a regression in #39557--for the project diff, we rely on
getting an event when a path inside a git repository changes, even if
the git state of the repository didn't change as a result (e.g. a new
modification to a file that already had the "modified" status).

I've also changed this code to send the `UpdateRepository` proto message
even when the git state didn't change, since otherwise we have the same
problem in SSH and collab projects.

Release Notes:

- N/A
2025-10-06 17:52:23 -04:00
Cole Miller
31544d294d ci: Show output of failed tests at the end too (#39643)
This makes it a bit easier to read GHA logs of failed CI runs.

Release Notes:

- N/A
2025-10-06 17:40:45 -04:00
Anthony Eid
4e932297a4 settings ui: Fix panic from reading BufferLineHeight custom variant (#39631)
The panic happened when a user had a settings file with a buffer line
height custom variant, because the drop-down renderer only took into
account the two named variants.

The fix for this will be creating a custom element that allows a user to
manually input a line height greater than one or select either
Comfortable or Standard.

Release Notes:

- N/A
2025-10-06 20:39:05 +00:00
John Tur
b2f0b1b168 Fix Ctrl+C not working when Zed is launched from CLI (#39482)
Closes https://github.com/zed-industries/zed/issues/38383
Closes https://github.com/zed-industries/zed/issues/39330

Release Notes:

- N/A
2025-10-06 20:35:44 +00:00
Ben Kunkle
94f1faffa7 settings_ui: Make unimplemented helper (#39639)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 19:35:40 +00:00
Anthony Eid
075104a529 settings ui: Move settings data out of settings window (#39638)
Moved `user_settings_data` and `project_settings_data` into their own
module because those functions just represent static data.

Release Notes:

- N/A
2025-10-06 19:29:36 +00:00
Andrew Farkas
c80d213227 Fix infinite loop when worktree is deleted (#39637)
Closes #39442

Release Notes:

- Fixed infinite loop when worktree is deleted

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-06 19:20:01 +00:00
Cole Miller
fe9895d112 node_runtime: Bump minimum version for system node to match copilot's requirement (#39632)
Copilot now requires 22.x. See the last min node version bump:
https://github.com/zed-industries/zed/pull/27912

Closes #39461

<img width="1040" height="97" alt="image"
src="https://github.com/user-attachments/assets/8f0490e3-b9b5-45fd-b7f1-321691b862f0"
/>

Release Notes:

- Zed will no longer use `node` from your `$PATH` if it's older than
22.x (previously, the minimum version was 20.x). Instead, it will fall
back to its bundled `node`. This fixes being unable to use Copilot if an
older `node` was installed system-wide.
2025-10-06 18:38:30 +00:00
Conrad Irwin
24bc52a15a Remove chat from docs (#39623)
Updates #37789

Release Notes:

- N/A
2025-10-06 18:33:54 +00:00
David Kleingeld
a65a8bea43 Revert YankEndOfLine default (part of PR #39143) (#39626)
Release Notes:

- N/A
2025-10-06 17:06:35 +00:00
Anthony Eid
ea60a7b172 settings ui: Use font picker element from onboarding instead of editor for font components (#39593)
The font picker from onboarding is a lot friendlier to interact with and
makes it impossible for a user to select an invalid font from the
settings ui.

I also moved the font picker from the onboarding crate to the ui_input
crate

## New Look
<img width="1136" height="812" alt="image"
src="https://github.com/user-attachments/assets/7436682c-6a41-4860-a18b-13e15b8f3f31"
/>

Release Notes:

- N/A
2025-10-06 13:04:43 -04:00
warrenjokinen
a67a55d81a docs: Fix Tree-sitter casing in vim.md (#39527)
The AI here in GitHub helped me find the creative ways that Tree-sitter
was incorrectly typed in the document vim.md

<img width="704" height="196" alt="Tree-sitter-bg"
src="https://github.com/user-attachments/assets/90924405-0961-4436-b6b8-2066de527ddc"
/>

Release Notes:

- N/A
2025-10-06 19:01:48 +02:00
Hexorg
1a9f9ccc29 Add note about inode/directory to Zed desktop entry (#39076)
Release Notes:

- N/A
2025-10-06 18:26:11 +02:00
localcc
6da5945cd2 Optimize fs_watcher to use less RAM by doing less work (#39602)
mac_watcher already does this so it would make more sense to also do
this on Windows and it saves ~500-600mb of ram on the chromium project.

This does not improve memory usage on linux because inotify cannot do
recursive directory monitoring

Release Notes:

- N/A
2025-10-06 18:24:28 +02:00
Lukas Wirth
354cc65daa search: Introduce more yield points in project search pending_search task (#39624)
This should help with project search lagging I believe

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 16:09:00 +00:00
Lukas Wirth
2c6a8634cc remote: Fix wsl failing to start on some setups (#39612)
Closes https://github.com/zed-industries/zed/issues/39433

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 17:40:05 +02:00
Danilo Leal
84ec865c44 agent: Fix gradient overlay in file list within the activity bar (#39619)
Release Notes:

- N/A
2025-10-06 15:32:08 +00:00
Smit Barmase
80727a03bf editor: Limit snippet query range instead of collecting from buffer start (#39617)
Fixes hang when computing query for snippet completions when working
with really large buffers.

Release Notes:

- N/A
2025-10-06 20:54:42 +05:30
ozer
e7339fbd42 project_panel: Focus project panel when clicking empty space (#39489)
Closes #39486

Release Notes:

- Fixed: Project Panel now properly focuses when clicking empty space,
allowing keyboard shortcuts to work as expected
2025-10-06 20:50:56 +05:30
Danilo Leal
db5b1a31b5 settings ui: Add some UX adjustments (#39615)
Release Notes:

- N/A
2025-10-06 12:12:35 -03:00
Ratazzi
bc39ed2575 editor: Preserve font features for vim block cursor (#39474)
## Summary

Fixes an issue where font features (like ligatures) were not applied to
text under the vim block cursor. The cursor would inherit the font
family from the character at the cursor
position, but would use default font features instead of the editor's
configured font features.

## Changes

- Make the font mutable when rendering the vim block cursor
- Apply the editor's text style font features to the cursor font

This ensures that text under the block cursor renders with the same
visual appearance as the rest of the editor content.

Closes #39471

Release Notes:

- Fixed vim block cursor not respecting font features (like ligatures)
2025-10-06 08:58:46 -06:00
Danilo Leal
1764337a5d agent: Fix plan summary text overflow in Claude Code threads (#39603)
| Before | After |
|--------|--------|
| <img width="700" height="764" alt="Screenshot 2025-10-06 at 9  43@2x"
src="https://github.com/user-attachments/assets/faf7e93f-f0d8-4bea-9f8d-272c83b41b18"
/> | <img width="700" height="394" alt="Screenshot 2025-10-06 at 9  43
2@2x"
src="https://github.com/user-attachments/assets/3f404e69-de3a-44c2-8111-0212d5d91199"
/> |

Release Notes:

- agent: Fixed a bug in Claude Code threads where the plan summary text
would overflow beyond its container.
2025-10-06 11:40:01 -03:00
Lev Zakharov
3707102702 title_bar: Show git status indicator icon in the title bar (#38029)
See related discussion #37046.

<details>

<summary>Screenshots</summary>

**No Changes**
<img
src="https://github.com/user-attachments/assets/e814da6e-bc9b-4edd-b37a-6bb4680d5bb3"
/>

**Added**
<img
src="https://github.com/user-attachments/assets/07ffdf90-08cb-43f4-b2bd-9966a21e08de"
/>

**Changed**
<img
src="https://github.com/user-attachments/assets/7e13b999-83b3-41ea-b2ab-baaa1541b169"
/>

**Deleted**
<img
src="https://github.com/user-attachments/assets/a77fc7e3-a026-419a-87bd-7146c3ca46a9"
/>

**Conflicts**
<img
src="https://github.com/user-attachments/assets/17e7e35c-d81b-4660-808d-08e12107ea2d"
/>

</details>

Release Notes:

- Show git status indicator icon in the title bar
2025-10-06 09:43:22 -04:00
Marco Mihai Condrache
5263f51432 terminal: Fix terminal cloning on WSL (#39552)
Should close #39428

The working directory of the `wsl.exe` program is set to a Linux path,
which is invalid on the Windows side, causing the terminal to crash. The
first spawn works because there is no active terminal view, allowing a
new shell (which checks for the remote) to be created. I cannot explain
why it works on SSH remote clients, but I may be missing something in
the remote connection implementation.

I don't have a Windows machine to test this, so I would appreciate
someone testing it. 🙏🏼

Release Notes:

- Fixed an issue where WSL terminals could not be splitted

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2025-10-06 13:18:27 +00:00
Lukas Wirth
93cd10aaa8 terminal: Re-enable activation scripts on windows (#39604)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 13:07:15 +00:00
Smit Barmase
2c1cc01b81 linux: Fix enter key triggering newline instead of commiting input (#39599)
Closes #31337 #35537

Release Notes:

- Fixed an issue on Linux X11 where pressing Enter added a new line
instead of confirming English input.
2025-10-06 18:22:02 +05:30
Lukas Wirth
81ada92306 editor: Fix clangd switch source header action failing on wsl (#39598)
Closes https://github.com/zed-industries/zed/issues/39180

Release Notes:

- Fixed clangd switch source header action failing on wsl
2025-10-06 12:36:12 +00:00
Lukas Wirth
4bd7ef8bad acp_thread: If available, use git bash over powershell in terminal tool (#39466)
Release Notes:

- When git bash is installed, agents will now use that over powershell
when invoking terminal commands
2025-10-06 13:39:19 +02:00
Lukas Wirth
d1e2a1f20c gpui: Assert validity of text runs for StyleText (#39581)
Should help with figuring out the char boundary panic in text shaping on
windows

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 13:04:45 +02:00
Danilo Leal
79a8986cb7 settings ui: Add scrollbar and other design details (#39504)
Release Notes:

- N/A
2025-10-06 08:00:47 -03:00
Anthony Eid
d2b91eb2bc settings ui: Add numeric steppers to settings UI (#39491)
This PR adds the numeric stepper component to the settings ui and
implements some settings that rely on this component as well.

I also switched {buffer/ui}_font_weight to the `gpui::FontWeight` type
and added a manual implementation of the Schemars trait. This allows Zed
to send min, max, and default information to the JSON LSP when a user is
manually editing the settings file.

The numeric stepper elements added to the settings ui are below:
- ui font size
- ui font weight
- Buffer font size
- Buffer font weight 
- Scroll sensitivity
- Fast scroll sensitivity
- Vertical scroll margin
- Horizontal scroll margin
- Inline blame padding 
- Inline blame delay
- Inline blame min column
- Unnecessary code fade
- Tab Size
- Hover popover delay

Release Notes:

- N/A
2025-10-06 10:06:33 +00:00
Bartosz Kaszubowski
c26937a848 zed: Show GPUI Inspector item in Dev build menus (#39287)
# Why

I have find out that this tool exists by browsing Keymap Editor. I think
it would be nice for its discoverability to show it in the app menus in
Dev builds.

# How

Add "GPUI Inspector" app menu item conditionally for Dev builds only.

Release Notes:

- N/A

# Preview

<img width="1014" height="948" alt="Screenshot 2025-10-01 at 14 36 48"
src="https://github.com/user-attachments/assets/c0409e67-1f4d-44f3-90b3-293ad4fe5c73"
/>
2025-10-06 12:21:48 +03:00
Lukas Wirth
da82eec4cb editor: Fix utf8 boundary panic in process_completion_for_edit (#39561)
Fixes ZED-1WH

Release Notes:

- Fixed panic when requesting completions after a multibyte character
2025-10-06 08:39:51 +00:00
Lukas Wirth
2bfcd60b88 editor: Shrink DisplayMapSnapshot from 824 to 256 bytes (#39568)
We have unnecessary clones for the fields here as most of the snapshots
contain the others hierarchically.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-06 08:08:49 +00:00
Ratazzi
9c7369f54d terminal: Fix rendering of zero-width combining characters (#39526)
Add support for rendering Unicode combining characters (diacritics) in
the terminal's batched text runs.

- Add append_zero_width_chars() to handle combining marks
- Integrate zero-width chars into all batching code paths
- Update cell extras tracking logic
- Add test for combining character rendering

Fixes display of é, ñ, ô and other diacritics.

Closes #39525

Release Notes:

- Fixed: NFD/NFKD normalized text (e.g., é as e + ◌́) not rendering in
integrated terminal

Before:

<img width="874" height="688" alt="SCR-20251004-udnj"
src="https://github.com/user-attachments/assets/8d9f9c9f-dac4-4382-92c2-8b6c1d817abd"
/>

After:

<img width="873" height="686" alt="SCR-20251004-ulsw"
src="https://github.com/user-attachments/assets/fbd5cdc7-fdd6-44dc-8b05-cc425644f1a0"
/>
2025-10-06 10:02:27 +02:00
Anthony Eid
5160510ed0 chore: Remove unused settings ui module (#39580)
The editor settings control module was the first prototype of what a
settings UI could look like in Zed, but the code is outdated now and is
no longer used. So this PR removes it for cleanup.

Release Notes:

- N/A
2025-10-06 07:32:08 +00:00
Mikayla Maki
ee557fb7ea Add window close keybindings for Settings UI (#39578)
Closes #ISSUE

Release Notes:

- N/A
2025-10-06 07:27:54 +00:00
Mikayla Maki
f9919f9214 Swap the start building and login buttons (#39576)
New onboarding screen:

<img width="1027" height="700" alt="Screenshot 2025-10-05 at 10 38
57 PM"
src="https://github.com/user-attachments/assets/5dc49e53-68e7-4559-8ce0-1bada629781d"
/>


This PR also adds a new telemetry event: `Welcome Start Building
Clicked`

Release Notes:

- N/A
2025-10-06 05:55:57 +00:00
Mikayla Maki
0f0974f105 Add script to bump GPUI version (#39573)
This script successfully published the [0.2.0-test.4 GPUI
prerelease](https://crates.io/crates/gpui/0.2.0-test.4).

Release Notes:

- N/A
2025-10-06 01:42:17 +00:00
Mikayla Maki
e317d98915 Prep crates for GPUI on crates.io (#39543)
Release Notes:

- N/A
2025-10-05 13:44:31 -07:00
Kirill Bulatov
dada318be7 Remove iterations from the slow FS tests (#39564)
Follow-up to https://github.com/zed-industries/zed/pull/39557

Release Notes:

- N/A
2025-10-05 19:47:34 +00:00
Lukas Wirth
b53f9c8863 editor: Fix panic in delete_line with multibyte characters (#39560)
Fixes ZED-1TG

Release Notes:

- Fixed panic in `delete line` when following line contains multibyte
characters
2025-10-05 19:26:27 +00:00
Martin Pool
5b0a2f1ab6 Add more unit tests for Rope (#39426)
I was looking at the rope implementation and some of the existing bugs
that crash in there, and I ran cargo-mutants to inspect test coverage. I
was motivated by bugs like
https://github.com/zed-industries/zed/issues/38556 but this doesn't fix
it and the bug may well be at a higher layer.

This PR adds coverage for a few functions that aren't tested today. I
didn't find any actual bugs yet.

I can see this tree is pretty sparse on docstrings so if you think these
are too verbose I can take them out or drop the whole PR.

Release Notes:

- N/A
2025-10-05 21:42:27 +03:00
Lukas Wirth
d5a4890142 remote: Keep full shell path on wsl (#39555)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-05 20:29:58 +02:00
Be
cd61bfbd42 docs: Fix path of language extensions on Linux (#39425)
Release Notes:

- N/A
2025-10-05 18:21:48 +00:00
Kirill Bulatov
469ecfbe13 Emit less update events for odd FS events (#39557)
When running flycheck, I've noticed that scrolling starts to lag:


https://github.com/user-attachments/assets/b0bef0a3-ccbd-479d-a385-273398086d38

When checking the trace, it is notable that project panel updates its
entire tree multiple times during flycheck:

<img width="2032" height="1136" alt="image"
src="https://github.com/user-attachments/assets/d1935e77-3b00-4be5-a12a-8a17a9d64202"
/>


[scrolling.trace.zip](https://github.com/user-attachments/files/22710852/scrolling.trace.zip)

Turns out, `target/debug` directory is loaded by Zed (presumably,
reported by langserver as there are sources generated by bindgen and
proto that need to be loaded), and `target/debug/build` directory
received multiple events of a `None` kind for Zed, which trigger the
rescans.

Rework the logic to omit the `None`-kind events in Zed, and to avoid
excessive repo updates if not needed.


Release Notes:

- Improved worktree FS event emits in gitignored directories

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-05 17:34:55 +00:00
Remco Smits
46b6adadf9 markdown: Add HTML table element support (#38605)
Follow-up: https://github.com/zed-industries/zed/pull/38590

**Note**: this PR contains changes from the [previous
PR](https://github.com/zed-industries/zed/pull/38590), when that PR gets
merged we should see the real changes.
This PR fixes 4 things in order to make:

1. Add html/markdown minifier to remove all the **\t** and **\n**
characters. This is needed as you cannot create new lines with markdown
by just adding an enter to the source file.
2. The event Event::HTML only contained a chunk of the real html for
multiline HTML code. I fixed this by storing the currently watched HTML
inside a buffer and at the end we parse it into the right elements.
Instead of trying to parse a chunck into multiple elements which would
always fail before.
3. Add support for html tables.
4. Fixed panic that occured when table does not have an header.

I also decided to keep the html minifier inside Zed, because making it a
dependency for just a few 100 lines seems to be an overkill. The
original crate had a few cve in their dependencies, so figured this
would be the best.

**Html table support**
<img width="1439" height="801" alt="Screenshot 2025-09-27 at 12 19 07"
src="https://github.com/user-attachments/assets/a884cc6f-cf47-45a2-81fa-91300c7bbf3f"
/>

**Before & after Zed's README (no changes)**
<img width="3440" height="1378" alt="Screenshot 2025-09-27 at 12 34 47"
src="https://github.com/user-attachments/assets/1273b094-fb24-4abd-bffa-56ef3b44670c"
/>

Release Notes:

- Markdown: Added support for html tables
2025-10-05 13:31:17 +02:00
Lukas Wirth
1a9e9c5faa workspace: Add Close Multibuffers pane context menu entry (#39199)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-05 10:50:36 +02:00
Lukas Wirth
eb64ca8758 askpass: Don't log error when user cancels askpass prompt (#39544)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-05 07:50:34 +00:00
Ngonidzashe Mangudya
68e6d55596 terminal: Fix terminal split pane opening in wrong directory (#39537)
## Problem
When splitting a terminal pane, the new pane opens in the root directory
(`/`) instead of preserving the current working directory of the
original terminal.

For example, when working in `/Users/modestnerd/Developer/Projects/zed`
(my pc) and splitting the terminal pane, the new pane would open in `/`
instead of staying in the current directory.

## Solution
Restructured the fallback logic in
`new_pane_with_cloned_active_terminal` (terminal_panel.rs:452-456) to
ensure `default_working_directory(workspace, cx)` is called as a
fallback even when a terminal view exists but its `working_directory()`
returns `None`.

The fix changes the nested `and_then` to use `or_else` for the fallback,
ensuring the working directory is always properly resolved before
entering the async block.

Release Notes:

- Fixed terminal split pane opening in wrong directory instead of
preserving the current working directory
2025-10-05 07:08:17 +00:00
Richard Feldman
bcd2d269e2 Fix CRLF handling in display-only terminals (#39538)
## Before

<img width="558" height="739" alt="Screenshot 2025-10-03 at 11 08 43 PM"
src="https://github.com/user-attachments/assets/5dae7f9d-03b6-48eb-826d-e2be60320546"
/>

## After

<img width="551" height="843" alt="Screenshot 2025-10-04 at 8 29 51 PM"
src="https://github.com/user-attachments/assets/2b06dcec-7758-42ad-acf0-c32a7f50f1b1"
/>

No release notes because we aren't using display-only terminals anywhere
yet (`codex-acp` will be the first to use them, and it's still
feature-flagged right now).

Release Notes:

- N/A
2025-10-05 02:43:46 +00:00
Richard Feldman
b32075cdcb Decouple agent reregistration from settings changes (#39528)
Fixes a `--release`-only bug in feature-flagged agents where the feature
flag isn't picked up in some situations (unless there was a settings
change to go with it - due to an early return when settings didn't
change).

Release Notes:

- N/A
2025-10-04 17:19:27 +00:00
Richard Feldman
21e75b8221 Pass through cwd from ACP extension (#39511)
If we get a `cwd` from ACP (because e.g. `codex-acp` is driving the
terminal rather than our own PTY) then use that to display the `cwd` of
the terminal process.

Release Notes:

- N/A
2025-10-04 00:50:14 -04:00
Richard Feldman
978951b79a Don't use PTY in the display-only terminal (#39510)
This only affects `codex-acp` for now.

Not using the PTY in display-only terminals means they don't display the
login prompt (or spurious `%`s) at the end of terminal output
renderings.

Release Notes:

- N/A
2025-10-04 04:49:33 +00:00
Ben Kunkle
6b980ecad3 settings_ui: Dynamic navbar filtering (#39494)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-04 03:29:28 +00:00
Mansoor Ahmed
d9c7f44b0b Add ability to hide status bar (#39430)
This pull request adds the ability to configure the setting to hide or
show the status bar, as described in discussion:
https://github.com/zed-industries/zed/discussions/38591

The original [PR
#38974](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879)
was merged but reverted due to hidden conflicts. As per @ConradIrwin 's
[request](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879),
I am recreating the PR on top of updated main branch.

Release Notes:

- Added an experimental setting `"status_bar": { "experimental.show":
false}` to hide the status bars.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-03 20:11:21 -06:00
John Tur
55e68553a4 Fix caption buttons going off-screen (#39502)
https://github.com/user-attachments/assets/27bf58df-b8c4-4730-856b-d62ec639a552

Previously the caption buttons (minimize, maximize, close) would
disappear off the right side of the title bar.

Release Notes:

- N/A

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-03 23:25:54 +00:00
John Tur
9fe46dc8d2 Fix double-clicking on non-empty title bar area (#39500)
Closes #38685 



Release Notes:

- N/A

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-03 19:25:15 -04:00
Cole Miller
aced13bc9f Fix ordering of multibuffer excerpts (#39476)
The ordering of path-based excerpts in multibuffers regressed with
#38744, because we changed the `path` field of `PathKey` to be a string
(from `std::path::Path`) and used the derived `Ord` implementation,
which doesn't agree with the path-based order of worktree traversals.
This PR fixes that by using `RelPath` for `PathKey`. Instead of using
`File::full_path`, which can be absolute, we always use `File::path` and
distinguish different worktrees using their ID.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-03 22:17:31 +00:00
Lukas Wirth
2859cbdba9 Make ShellBuilder::new not branch on a remote shell (#39493)
Release Notes:

- Fixed claude code agent login on remotes

Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-03 23:23:09 +02:00
Marshall Bowers
4443f61c16 x_ai: Add support for Grok 4 Fast (#39492)
This PR adds support for Grok 4 Fast.

Release Notes:

- Added support for Grok 4 Fast models.

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-03 16:00:09 -04:00
Ben Kunkle
f0f0beb42f settings_ui: Implement sub pages (#39484)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-03 19:59:46 +00:00
Finn Evers
6707ff3b50 Make outline modal work in channel notes (#39481)
This fixes an issue where the outline modal would not work in editors
that had no explicit workspace attached to them.

Release Notes:

- Enabled the outline modal to work in channel notes.
2025-10-03 19:20:51 +00:00
Finn Evers
93770e8314 Bring CI back up (#39485)
Release Notes:

- N/A
2025-10-03 19:01:30 +00:00
Max Brunsfeld
f8c617303a Build Windows installer for all releases (#39414)
Release Notes:

- N/A
2025-10-03 10:57:39 -07:00
Anthony Eid
e5f05a21ce settings ui: Improve numeric stepper component interface (#36513)
This is the first step to allowing users to type into a numeric stepper
to set its value. This PR makes the numeric stepper take in a generic
type `T` where T: `NumericStepperType`

```rust
pub trait NumericStepperType:
    Display
    + Add<Output = Self>
    + Sub<Output = Self>
    + Copy
    + Clone
    + Sized
    + PartialOrd
    + FromStr
    + 'static
{
    fn default_format(value: &Self) -> String {
        format!("{}", value)
    }
    fn default_step() -> Self;
    fn large_step() -> Self;
    fn small_step() -> Self;
    fn min_value() -> Self;
    fn max_value() -> Self;
}
```

This allows setting of step sizes and min/max values as well as making
the component easier to use.

cc @danilo-leal 

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
2025-10-03 17:35:30 +00:00
Danilo Leal
f499504b13 agent: Introduce agent_buffer_font_size setting (#39468)
Closes https://github.com/zed-industries/zed/issues/39406
Follow up to https://github.com/zed-industries/zed/pull/38726

This PR introduces the `agent_buffer_font_size` setting and renames
`agent_font_size` to `agent_ui_font_size`. This allows whoever wants
`buffer_font_size` and `agent_buffer_font_size` to match, as well as
folks who want a slightly smaller size only in the agent panel (which...
also looks just better by default!).

Release Notes:

- agent: Introduced the `agent_buffer_font_size` setting and renamed
`agent_font_size` to `agent_ui_font_size`, allowing for granular buffer
font size control in the agent panel vs. regular editors.
2025-10-03 14:23:23 -03:00
Marshall Bowers
504216cbbf settings: Fix JSON schema for ExtensionCapabilityContent (#39478)
This PR fixes the JSON schema for the `ExtensionCapabilityContent`.

Having the nested structs in the variants caused the `kind` property to
not be generated properly. Inlining the fields into the variants fixes
this.

Release Notes:

- N/A
2025-10-03 16:58:47 +00:00
Marshall Bowers
3bf71c690f extension_host: Load granted extension capabilities from settings (#39472)
This PR adds the ability to control the capabilities granted to
extensions by the extension host via the new
`granted_extension_capabilities` setting.

This setting is a list of the capabilities granted to any extension
running in Zed.

The currently available capabilities are:

- `process:exec` - Grants extensions the ability to invoke commands
using
[`zed_extension_api::process::Command`](https://docs.rs/zed_extension_api/latest/zed_extension_api/process/struct.Command.html)
- `download_file` - Grants extensions the ability to download files
using
[`zed_extension_api::download_file`](https://docs.rs/zed_extension_api/latest/zed_extension_api/fn.download_file.html)
- `npm:install` - Grants extensions the ability to install npm packages
using
[`zed_extension_api::npm_install_package`](https://docs.rs/zed_extension_api/latest/zed_extension_api/fn.npm_install_package.html)

Each of these capabilities has parameters that can be used to customize
the permissions.

For instance, to only allow downloads from GitHub, the `download_file`
capability can specify an allowed `host`:

```json
[
  { "kind": "download_file", "host": "github.com", "path": ["**"] }
]
```

The same capability can also be granted multiple times with different
parameters to build up an allowlist:

```json
[
  { "kind": "download_file", "host": "github.com", "path": ["**"] },
  { "kind": "download_file", "host": "gitlab.com", "path": ["**"] }
]
```

When an extension is not granted a capability, the associated extension
APIs protected by that capability will fail.

For instance, trying to use `zed_extension_api::download_file` when the
`download_file` capability is not granted will result in an error that
will be surfaced by the extension:

```
Language server phpactor:

from extension "PHP" version 0.4.3: failed to download file: capability for download_file https://github.com/phpactor/phpactor/releases/download/2025.07.25.0/phpactor.phar is not granted by the extension host
```

Release Notes:

- Added a `granted_extension_capabilities` setting to control the
capabilities granted to extensions.
2025-10-03 15:55:01 +00:00
Smit Barmase
456ba32ea7 macOS: Fix keyboards shortcuts does not work until mouse clicked inside Zed (#39467)
Closes #38258

Regressed in https://github.com/zed-industries/zed/pull/33334
 
Release Notes:

- Fixed an issue on macOS where keyboard shortcuts wouldn’t work until
you clicked inside Zed.
2025-10-03 20:38:29 +05:30
Andrew Farkas
9aeb617a89 Keep folds at cursor open for "fold at level" (#39396)
Closes #39308

Also fixes a possible bug in `apply_selected_diff_hunks()` caused by
reversed selections.

Release Notes:

- Fixed "editor: fold at level" closing regions containing selections

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-03 15:06:46 +00:00
Ben Kunkle
fd8bae9b72 docs: Document ctrl-b to toggle left dock not working in Vim mode on Linux and Windows (#39464)
Closes #39370

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-03 10:26:04 -04:00
Ben Kunkle
f71c9122ca settings_ui: Write local settings files (#39408)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-03 10:05:44 -04:00
Dino
8441aa49b2 vim: Fix visual block handling of wrapped lines (#39355)
These changes fix an issue with vim's visual block mode when soft
wrapping is enabled. In this situation, if one was to move the cursor
either up or down, the selection would be updated to include visual
(wrapped) rows, instead of only the buffer rows. For example, take the
following contents:

```
1 | And here's a very long line that is wrapping
    at this exact point.
2 | And another very long line that is will also
    wrap at this exact point.
```

If one was to place the cursor at the start of the first line, character
`A`, trigger visual block mode with `ctrl-v` and then move down one line
with `j`, the selection would end up as (with [X] representing the
selected characters):

```
1 | [A]nd here's a very long line that is wrapping
    [a]t this exact point.
2 | [A]nd another very long line that is will also
    wrap at this exact point.
```

Instead of the expected:

```
1 | [A]nd here's a very long line that is wrapping
    at this exact point.
2 | [A]nd another very long line that is will also
    wrap at this exact point.
```

With the changes in this commit, `Vim.visual_block_motion` will now
leverage buffer rows in order to navigate to the next or previous row.

Release Notes:

- Fixed handling of soft wrapped lines in vim's visual block mode
2025-10-03 15:58:34 +02:00
Danilo Leal
7b96e1cf1a agent: Add profile description in docs aside (#39412)
This improves the design of the profile picker a bit by making every
item on it have the same height; it also makes it more consistent with
the model selector.

Release Notes:

- N/A
2025-10-03 10:16:33 -03:00
Lukas Wirth
86322a186f worktree: Prevent background scanner from trying to scan file worktrees (#39277)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-03 13:12:24 +00:00
Joseph T. Lyons
1b94d74dc3 Clarify extension license detection in docs (#39456)
Release Notes:

- N/A
2025-10-03 12:32:24 +00:00
Lukas Wirth
db825c1141 remote: Do not allocate pseudo terminal for ssh commands (#39451)
Closes https://github.com/zed-industries/zed/issues/25382

Release Notes:

- Fixed ssh remote not working if the default shell profile prints to
stdout
2025-10-03 11:33:44 +00:00
Tim Vermeulen
f3abd1dab5 Fix rust-analyzer startup issue in single-file worktrees (#39441)
I'm not sure about the exact conditions for reproducing this issue, but
whenever I build Zed locally and have it open a single-file worktree on
launch, the rust-analyzer language server fails to start up because Zed
attempts to run `rust-analyzer --help` on a path that is not a
directory. This fixes that by running the command on the parent path in
the case of a single-file worktree.

Release Notes:

- Fixed rust-analyzer startup issue in single-file worktrees
2025-10-03 12:42:46 +02:00
Richard Feldman
662ec9977f Detect new releases of codex-acp (#39388)
Now we use GitHub Releases to detect when there's a new version of
codex-acp out, and we notify the user in the same way we do for the
other external agents.

This also moves `github_download.rs` out of the `languages` crate and
into `http_client`, because now we're not just using it for language
servers anymore, we're also using it for external agents.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-03 12:10:40 +02:00
Lukas Wirth
3ab5103de1 multi_buffer: Fix ExcerptId::max() handling in summaries_for_anchors (#39436)
Closes https://github.com/zed-industries/zed/issues/39333

Release Notes:

- Fixed IME inputs breaking when typing at the end of an editor

Co-authored-by: Smit Barmase <smit@zed.dev>
2025-10-03 09:48:26 +00:00
Jacob
39bd03b92d file_icons: Add support for multiple file extensions (#36342)
Currently most icon theme extensions already support file types like
stories.tsx and stories.svelte. However within Zed itself these file
type overrides are not supported yet. This change adds support for those

Release Notes:

- Added support for icons on file extensions such as stories.tsx and
stories.svelte
2025-10-03 11:41:59 +02:00
Be
1fffcb99ba docs: Remove outdated mention about Vulkan on Asahi Linux (#39423)
Vulkan is now supported running Linux on ARM Macs
https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/

Release Notes:

- N/A
2025-10-03 07:17:21 +00:00
Conrad Irwin
e4f90b5da2 Fix race-condition in autosave (#39409)
This removes a long-standing thing we've done, which is send a `DidSave`
notification to the language server for the clean parts of a
multi-buffer. However, it seems like the intent of that notification is
to tell the language server to reload the file from disk.

As we didn't actually write those files to disk, it seems clearer to not
send this notification; and just remove this whole code-path.

Release Notes:

- Fixed a race where autosave in a multibuffer could cause unsaved
buffers to appear saved
2025-10-02 22:14:12 -06:00
Richard Feldman
dc6fad9659 Display-only ACP terminals (#39419)
Codex needs (and future projects are anticipated to need as well) a
concept of display-only terminals. This refactors terminals to decouple
the PTY part from the display part, so that we can render terminal
changes based on a series of events - regardless of whether they're
being driven from a PTY inside Zed or from an outside source (e.g.
`codex-acp`).

Release Notes:

- N/A
2025-10-03 02:50:32 +00:00
Richard Feldman
64c289a9a2 Fix Claude Code login regression (#39413)
This was added for Codex, but had undesirable consequences for Claude
Code (on Nightly, never made it to Preview). We're going to address this
in `codex-acp` instead.

Release Notes:

- N/A
2025-10-03 00:26:22 +00:00
Marshall Bowers
a08897ff30 collab: Add token_spend_in_cents column to billing_subscriptions table (#39404)
This PR adds a `token_spend_in_cents` and associated
`token_spend_in_cents_updated_at` column to the `billing_subscriptions`
table.

Release Notes:

- N/A
2025-10-02 22:04:57 +00:00
Piotr Osiewicz
d359a814f8 editor: Represent scroll offset with more precision (#39367)
Closes #5355

Release Notes:

- Fixed rendering glitches with files with more than 16 million lines
(that occured due to floating number rounding errors).

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-02 23:04:31 +02:00
Ben Kunkle
4c35274b6e Don't allow formatters in format on save (#39400)
Closes #ISSUE



Release Notes:

- settings: Removed support for having format steps in both the
`format_on_save` and `formatter` settings for languages.
`format_on_save` is now restricted to the values of `"on"` and `"off"`,
and all format steps should be set under the `formatter` key. If you
were using `format_on_save` but not `formatter` this will be migrated
for you, otherwise it will require a manual migration.

---------

Co-authored-by: Smit <smit@zed.dev>
2025-10-02 20:34:31 +00:00
Lukas Wirth
bf48a95344 acp_thread: Respect terminal settings shell for terminal tool environment (#39349)
When sourcing the project environment for the terminal tool, we will now
do so by spawning the shell specified by the users `terminal.shell`
setting (or as usual fall back to the login shell).

Closes #37687 

Release Notes:

- N/A
2025-10-02 22:10:55 +02:00
Ben Kunkle
7c3a21f732 JSON based migrations (#39398)
Closes #ISSUE

Adds the ability to create settings and keymap migrations by mutating
`serde_json::Value`s instead of using tree-sitter queries. This
(hopefully) will make complicated migrations far simpler to implement.

Release Notes:

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

---------

Co-authored-by: Smit <heysmitbarmase@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
2025-10-02 16:07:26 -04:00
Cole Miller
af630be7ca git: Use environment from login shell to search for system git binary, and prefer it to the bundled binary (#39302)
Closes #38571

Release Notes:

- git: Fixed git features not working when git was installed in an
unusual location.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-02 14:22:10 -04:00
Finn Evers
dbd8efe129 ui: Implement graceful autohiding for scrollbars (#39225)
How it looks:


https://github.com/user-attachments/assets/9a355807-5461-4e8d-b7a8-9efb98cea67a

Idea behind this is to reduce flickering in areas where nothing is
happening - whenever these hide, the user is specifically not
interacting with them, hence it can be distracting to have something
flicker in the side of your eye. This PR tackles this.


Release Notes:

- Added graceful autohiding to scrollbars outside of the editor

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2025-10-02 17:11:46 +00:00
Marco Mihai Condrache
3afbe836a1 file_finder: Fix history items not using worktree path (#39304)
Closes #39283

Release Notes:

- Fixed: In multi-repo workspaces, files with the same name are no
longer hidden in the file picker after one is opened

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2025-10-02 18:36:09 +02:00
Finn Evers
d8709f2107 docs: Re-add context for lsp_highlight_debounce (#39391)
Release Notes:

- N/A
2025-10-02 16:30:54 +00:00
Finn Evers
df7bc8200d docs: Add coverage for named directory icon support (#39387)
Also updates the link to the new schema version which now includes named
directory icons.

Release Notes:

- N/A
2025-10-02 18:21:21 +02:00
David Kleingeld
8575972a07 Show display name in collab panel (#39384)
Release Notes:

- Improved Collab panel by showing display names and github handles

Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-02 16:17:27 +00:00
Richard Feldman
40c417f9c3 Subscribe to CodexAcpFeatureFlag (#39380)
Otherwise Codex doesn't work on first launch.

Release Notes:

- N/A
2025-10-02 12:16:51 -04:00
Conrad Irwin
7c2cf86dd9 Revert "Add ability to hide status bar (#38974)"
This reverts commit 126ed6fbdd.
2025-10-02 10:08:54 -06:00
Mansoor Ahmed
126ed6fbdd Add ability to hide status bar (#38974)
This pull request adds the ability to configure the setting to hide or
show the status bar, as described in discussion:
https://github.com/zed-industries/zed/discussions/38591

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-02 10:02:57 -06:00
Lukas Wirth
6f4381b39d remote(wsl): Execute commands on wsl without spawning a shell (#39357)
Closes https://github.com/zed-industries/zed/issues/39091

Release Notes:

- Fixed wsl connection failing if user's shell prints to stdout on
startup
2025-10-02 14:49:05 +00:00
Ben Kunkle
6fbbdb3512 settings: Flatten code actions formatters object (#39375)
Closes #ISSUE

Release Notes:

- settings: Changed code action format in `formatter` and
`format_on_save` settings.

**Previous format:**
```
{
  "code_actions": {
    "source.organizeImports": true,
    "source.fixAll": true
  }
}
```

**New format:**
```
[
  {"code_action": "source.organizeImports"},
  {"code_action": "source.fixAll"}
]
```

After #39246, code actions run sequentially in order. The structure now
reflects this and aligns with other formatter options (e.g., language
servers).

Both the `formatter` and `format_on_save` settings will be
auto-migrated.
2025-10-02 14:48:15 +00:00
Nomad
179fb21778 git_ui: Expand commit editor hitbox by setting min_lines = max_lines (#38587)
Closes #26527

The commit editor hitbox was too small since min_lines < max_lines,
making it grow only when typing more lines.

Release Notes:

- N/A


https://github.com/user-attachments/assets/e026d688-594f-40b6-a971-6c92e3fdb496
2025-10-02 14:44:18 +00:00
Joseph T. Lyons
6584fb23e3 Add extension licensing documentation (#39373)
Release Notes:

- N/A
2025-10-02 14:43:19 +00:00
rufevean
d8698dffe3 project: Change Git repo automatically with change in file buffer (#36796)
### Summary

* Auto-activates the active repository when opening a buffer.
* Prepares branching for future support of a user choice (e.g.,
`auto_activate_repo_on_open` flag).

### Release Notes

* **Improved**: Opening a buffer now automatically updates the active
repository.
2025-10-02 10:42:08 -04:00
Junseong Park
bf44dc5ff5 Add missing GEMINI.md rule file for gemini-cli (#38885)
This pull request adds the missing **`GEMINI.md`** file, which will
serve as the rule/configuration file for **`gemini-cli`**.

Currently, the repository includes several rule files such as
**`.clinerules`**, **`.cursorrules`**, **`.rules`**, and
**`.windsurfrules`**. Adding **`GEMINI.md`** standardizes the
configuration structure and ensures that the specific rules for the
`gemini-cli` are properly documented alongside the others.


Release Notes:

- N/A
2025-10-02 09:47:29 -04:00
Bennet Bo Fenner
d85b6a1544 zeta2: Fix panic when running Zed without any worktrees (#39365)
Release Notes:

- N/A
2025-10-02 13:34:13 +00:00
localcc
702e618bba Fix local to WSL path conversion (#39301)
Release Notes:

- N/A
2025-10-02 15:20:48 +02:00
Ben Brandt
1029d3c301 acp: Alphabetize the external agents list (#39363)
Makes it a bit easier to find what you are looking for.
Also makes sure all of them are available in the settings bar.

Release Notes:

- N/A
2025-10-02 13:16:30 +00:00
Cole Miller
97f552876c agent: Fix Claude Code terminal login on Windows (#39325)
Remove the ad-hoc quoting we were doing before, which only works for
POSIX shells, in favor of using `Shell::WithArguments`.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-02 12:58:40 +00:00
Jason Lee
63c081d456 editor: Improve inlay color border (#39353)
Release Notes:

- Improved inlay color border to more clearly.

---

It was used `border_color`, that variable is often gray, which makes the
border look blurred when mixed with other inlay color backgrounds.

## Before

<img width="590" height="516" alt="SCR-20251002-qrkt"
src="https://github.com/user-attachments/assets/733a9a49-55ac-49aa-83fa-ebcfeece8129"
/>
<img width="590" height="516" alt="SCR-20251002-qrlt"
src="https://github.com/user-attachments/assets/34fa92bb-c754-4587-9e02-f3901dbc2fd6"
/>
<img width="590" height="516" alt="SCR-20251002-qrmw"
src="https://github.com/user-attachments/assets/b7f7abd8-e2c9-415d-9522-0801575b41c7"
/>
<img width="590" height="516" alt="SCR-20251002-qroa"
src="https://github.com/user-attachments/assets/8106d4c5-9bcd-4997-9644-ba680feadbce"
/>
<img width="590" height="516" alt="SCR-20251002-qrsf"
src="https://github.com/user-attachments/assets/6c9f5e58-e3a5-4363-a2d3-d6e5c4f40d17"
/>
<img width="590" height="516" alt="SCR-20251002-qsaw"
src="https://github.com/user-attachments/assets/706171be-af4f-4f19-ba97-ca2dab6ca15e"
/>

## After

<img width="663" height="541" alt="SCR-20251002-qqci"
src="https://github.com/user-attachments/assets/d586b5c3-2a10-4c8d-8403-2707e1e6c8bd"
/>
<img width="663" height="541" alt="SCR-20251002-qqdl"
src="https://github.com/user-attachments/assets/4adbc2a1-3763-4c6f-b1ef-61ef30652079"
/>
<img width="663" height="541" alt="SCR-20251002-qqev"
src="https://github.com/user-attachments/assets/d7d9dcfa-82db-4e3d-ae99-add493b3ebc2"
/>
<img width="663" height="541" alt="SCR-20251002-qqfs"
src="https://github.com/user-attachments/assets/4e910140-9de1-4a10-b2ca-aa0a8b335fad"
/>
<img width="663" height="541" alt="SCR-20251002-qqhb"
src="https://github.com/user-attachments/assets/ea16baee-3015-4899-af99-afed2a5b1dd3"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-10-02 12:49:41 +00:00
Bartosz Kaszubowski
6970ab2040 markdown_preview: Stylize links using accented text color (#39149)
# How

Emphasize links in Markdown Preview text using accented text color. 

> [!note]
> I have chosen the accent color for links since it was looking fine
with all bundled by default themes, but I'm happy to alter the color to
use different theme value, if you have better candidates.

Release Notes:

- Stylize links using accented text color in Markdown Preview

# Preview

### Before

<img width="1606" height="1066" alt="Screenshot 2025-09-29 at 22 19 38"
src="https://github.com/user-attachments/assets/59b6ee72-4523-42fb-a468-9c694d30b5df"
/>

### After
<img width="1652" height="1066" alt="Screenshot 2025-09-29 at 22 18 20"
src="https://github.com/user-attachments/assets/e00e3742-6435-4c1d-aaaa-e6332719db17"
/>
<img width="1652" height="1066" alt="Screenshot 2025-09-29 at 22 18 47"
src="https://github.com/user-attachments/assets/a1b76f4a-c4d2-4ca8-ae3c-fc4dc5d55e01"
/>

**Release notes**

<img width="2090" height="582" alt="Screenshot 2025-09-29 at 22 36 33"
src="https://github.com/user-attachments/assets/81d6df12-83bd-4794-b71e-5a1fd40f0140"
/>
<img width="2090" height="582" alt="Screenshot 2025-09-29 at 22 40 41"
src="https://github.com/user-attachments/assets/aa820767-b82b-42a5-aa5b-b0d3d22ac5e3"
/>
2025-10-02 09:39:18 -03:00
Enger Jimenez
e42dfb4387 Add more selection options to app menus (#39262)
## Summary

The purpose of this pull request is to add new menu items for the menu
bar as mentioned on this [discussion or feature
request](https://github.com/zed-industries/zed/discussions/28153#discussion-8169826).

The actions are already supported by the command palette, but not
available on the `MenuBar`.

## Screenshot

<img width="498" height="392" alt="image"
src="https://github.com/user-attachments/assets/8ad0e836-8295-4b46-a67a-0edf1408ad59"
/>

Release Notes:

- Added `SelectPrevious` and `SelectAllMatches` items to the `Selection`
app menu.
2025-10-02 11:21:25 +02:00
Anthony Eid
ec202a26c8 settings ui: Add basic setting page fields to UI (#39343)
This PR starts the process of adding each setting field manually to
their respective page in the UI and organizes user/project fields as
well. The next major step is implementing a numeric stepper component,
and handling discriminate union enums as well.

I also did some minor polish in this PR as well
- Switches now use accent color
- Fixed text input rendering with zero width 
- Made setting pages scrollable 
- Set drop down context menu style to outline

Release Notes:

- N/A

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-02 09:04:02 +00:00
Ben Brandt
f17096879c agent: Update shell path in system prompt to match the terminal we give it (#39344)
In the ACP changes, we changed how terminals are created for the agent,
and so the system prompt was putting in the system shell instead of the
default one, potentially causing confusion for the model.

These are now in sync, so this will hopefully alleviate issues people
were seeing, as well as use a more standard shell to increase the
likelihood of successful model tool calls.

Release Notes:

- agent: Align default shell path in system prompt with the actual path
it is given
2025-10-02 09:01:47 +00:00
Mario Kozjak
fb343a7743 Add support for macOS' "Do Nothing" window setting (#39311)
Fixes titlebar double-click behavior to properly handle the macOS system
setting when "Do Nothing" is selected in System Settings > Desktop &
Dock > "Double-click a window's title bar to".

Closes https://github.com/zed-industries/zed/issues/39102

Release Notes:

- Fixed macOS Do Nothing window double click setting not being
respected.
2025-10-02 08:51:10 +02:00
Piotr Osiewicz
a49b2d5bf8 project panel: Make updates asynchronous (#38881)
Closes #ISSUE

Release Notes:

- project panel: Revamped how project panel entries are refreshed, which
should lead to a significantly smoother experience when working in large
projects.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-10-02 11:40:09 +05:30
Michael Sloan
b5d57598b6 Add an action for that runs a sequence of actions (#39261)
Thanks to @Zertsov for #37932 which caused me to consider this
implementation approach.

One known issue with this is that it will not wait for actions that do
async work to complete. Supporting this would require quite a lot of
code change. It also doesn't affect the main usecase of sequencing
editor actions, since few are async.

Another caveat is that this is implemented as an action handler on
workspace and so won't work in other types of windows. This seems fine
for now, since action sequences don't seem useful in other window types.
The command palette isn't accessible in non-workspace windows.

Alternatives considered:

* Add `cx: &App` to `Action::build`. This would allow removal of the
special case in keymap parsing. Decided not to do this, since ideally
`build` is a pure function of the input json.

* Build it more directly into GPUI. The main advantage of this would be
the potential to handle non-workspace windows. Since it's possible to do
outside of GPUI, seems better to do so. While some aspects of the GPUI
action system are pretty directly informed by the specifics of Zed's
keymap files, it seems to avoid this as much as possible.

* Bake it more directly into keymap syntax like in #37932. While I think
it would be good for this to be a primitive in the JSON syntax, it seems
like it would better fit in a more comprehensive change to provide
better JSON structure. So in the meantime it seems better to keep the
structure the same and just add a new action.

- Another reason to not bake it in yet is that this provides a place to
document the caveat about async actions.

Closes #17710

Release Notes:

- Added support for action sequences in keymaps. Example:
`["action::Sequence", [ ["editor::SelectLargerSyntaxNode",
"editor::Copy", "editor::UndoSelection"]`

---------

Co-authored-by: Mitchel Vostrez <mitch@voz.dev>
2025-10-02 00:06:53 -06:00
Richard Feldman
b9d9602074 Add codex acp (#39327)
Behind a feature flag for now.

<img width="576" height="234" alt="Screenshot 2025-10-01 at 9 34 16 PM"
src="https://github.com/user-attachments/assets/f4e717cf-3fba-4256-af69-e3ffb5174717"
/>

Release Notes:

- N/A
2025-10-02 03:52:06 +00:00
Alvaro Parker
cc19f66ee1 Fix background on rules library panel (#39319)
Closes #39318 

The rules panel on the rules library window was rendering a black
background when the `panel.background` property on the active theme had
some level of transparency (for example `1917264D` on `nightfox` theme).

<img width="1650" height="889" alt="image"
src="https://github.com/user-attachments/assets/6a8d124a-38da-4d01-817a-c289926bd39c"
/>

Left is before, right is after. The bug can be replicated by using
`theme_overrides` on settings:

```json
  "experimental.theme_overrides": {
    "panel.background": "#00000000",
    "background": "#ffffff"
  },
```

Release Notes:

- Fix "secondary" background on rules panel
2025-10-02 00:40:14 -03:00
Danilo Leal
62f90fec77 settings ui: Use the tree view item component and other design tweaks (#39329)
An initial pass at some foundational styles.

Release Notes:

- N/A
2025-10-02 03:35:10 +00:00
Danilo Leal
86ebb1890d ui: Add a TreeViewItem component (#39253)
A new (and very simple, for now) `TreeViewItem` component in the set.

<img width="500" height="1712" alt="Screenshot 2025-10-01 at 8  59@2x"
src="https://github.com/user-attachments/assets/c2de1585-7b42-4d20-a749-30d93898ae37"
/>

Release Notes:

- N/A
2025-10-02 01:19:11 +00:00
Jakub Konka
dd5099ac28 terminal: Log selected shell (#39295)
It is useful to double check in the logs which shell program is used by
Zed's terminal.

Release Notes:

- N/A
2025-10-02 02:48:58 +02:00
morgankrey
c95b88d546 Trial notes (#39321)
Closes #ISSUE

Release Notes:

- N/A
2025-10-01 16:10:47 -05:00
Joseph T. Lyons
c217f6bd36 Disable automation sending release notes to Kit (#39320)
These are now being crafted by hand, using the social media content we
do each Wednesday. I'm keeping the action around because we may want to
use this to automate publishing the hand-crafted emails in the future.

Release Notes:

- N/A
2025-10-01 20:41:17 +00:00
Anthony Eid
3314de8175 settings ui: Fix panic that occurred when changing the selected settings file (#39293)
The panic happened because navbar index wasn't updated when changing
files.

Release Notes:

- N/A

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-10-01 14:54:06 -04:00
Danilo Leal
6b907bd102 docs: Improve description on some agent settings (#39306)
Just a small wording refinement.

Release Notes:

- N/A
2025-10-01 14:44:36 -03:00
Danilo Leal
3cb933ddb1 docs: Update agent settings content (#39303)
Removes the preview note of the `buffer_font_size` used for agent panel
buffers, now that's available in stable as of 206.6. Also ended up
removing the "available in agent settings UI" thing because... that will
very soon not be needed to be called out.

Release Notes:

- N/A
2025-10-01 14:11:36 -03:00
Joseph T. Lyons
cf5362ffd1 Bump Zed to v0.208 (#39298)
Release Notes:

- N/A
2025-10-01 16:15:20 +00:00
Nia
74ac5ece6a perf: Functionality for CI integration (#39297)
Release Notes:

- N/A
2025-10-01 15:44:45 +00:00
Smit Barmase
f107708de3 title_bar: Show app menu even when signed out (#39296)
Partially closes #39271

Regressed in https://github.com/zed-industries/zed/pull/35375

<img width="282" height="188" alt="image"
src="https://github.com/user-attachments/assets/7e39d819-458a-47a1-96ca-e29797602e73"
/>

Release Notes:

- Fixed the top-right dropdown not showing when you're not signed in.
2025-10-01 21:13:00 +05:30
Max Brunsfeld
4940e53d23 Remove obsolete extensions and avoid loading or downloading them (#39254)
Release Notes:

- N/A
2025-10-01 08:42:51 -07:00
Nia
ab79fa440d gpui: Add a doc module with use examples (#39282)
cc @dvdsk 

Release Notes:

- N/A

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-10-01 17:03:08 +02:00
Smit Barmase
c9b7df4113 Revert "gpui: Respect macOS 'Do Nothing' window double-click setting" (#39291)
Reverts zed-industries/zed#39235

This broke double-click to zoom, even though it is configured in
settings.
2025-10-01 14:25:18 +00:00
localcc
f2df49764e Fix remote ping timing out (#39114)
Closes #38899 

Release Notes:

- N/A
2025-10-01 14:15:34 +02:00
Kirill Bulatov
77cc55656e Make test_terminal_eof less flaky and faster (#39281)
Release Notes:

- N/A
2025-10-01 12:14:06 +00:00
Alvaro Parker
1c85995ed7 Enable vim mode within the rules editor (#39244)
Release Notes:

- Enable vim mode on rule editor
2025-10-01 12:45:38 +02:00
Andreas Johansson
d1543f75b6 prompts: Improve inline assist prompt to reduce garbage from smaller models (#38278)
Closes #24412 and #19471

I tested both insertion and replacing with o3-mini and it failed with
the current prompt. With the updated prompt it does no longer return
`<document><rewrite_this>` or `{{REWRITTEN_CODE}}`

I have ensured the LLM Worker works with these prompt changes.

Release Notes:

- Improved prompting for the inline assistant
2025-10-01 09:07:57 +00:00
Lukas Wirth
fc0b249136 multi_buffer: Fix handling of ExcerptId::max() (#38887)
This removes a hack from `MultiBuffer::anchor_at` that works around
missing logic for handling `ExcerptId::max()` by implementing that said
missing logic.

Generally, `ExcerptId::min()` is already being handled correctly due to
how `Cursor` seeking works, we tend to seek to or beyond a seek target,
meaning `min` will always match the first excerpt as expected. `max` on
the other hand will always seek beyond the last excerpt resulting in no
excerpt being found, so any code path dealing with the excerpt sumtree
will have to specially check for this special excerpt ID to work
correctly.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-10-01 07:43:22 +00:00
Miao
01dbc68f82 editor: Preserve grapheme identity during rewrap (#39223)
Closes #39207

Release Notes:

- N/A
2025-10-01 09:37:23 +02:00
Mario Kozjak
e111acad33 gpui: Respect macOS 'Do Nothing' window double-click setting (#39235)
Fixes titlebar double-click behavior to properly handle the macOS system
setting when "Do Nothing" is selected in System Settings > Desktop &
Dock > "Double-click a window's title bar to".

Closes #39102

Release Notes:

- Fixed macOS `Do Nothing` window double click setting not be respected
2025-10-01 07:02:33 +00:00
Michael Sloan
c61409e577 zeta_cli: Avoid unnecessary rechecks in retrieval-stats (#39267)
Before this change, it would save every buffer and wait for diagnostics.
For rust analyzer this would cause a lot of rechecking and greatly slow
down the analysis

Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
2025-10-01 06:31:27 +00:00
Conrad Irwin
1659fb81e7 Remove panic/crash reporting from collab (#39249)
Crashes have been going to Sentry since v0.201.x

Release Notes:

- N/A
2025-09-30 23:10:13 -06:00
Cole Miller
dd6c653fe9 agent: Fix terminal tool on Windows (#39260)
Seems like we don't want to escape the dollar sign in `$null`.

Release Notes:

- N/A
2025-09-30 23:19:32 -04:00
Ben Kunkle
a13e84a108 Fix bug in code action formatter handling (#39246)
Closes #39112

Release Notes:

- Fixed an issue when using code actions on format where specifying
multiple code actions in the same code actions block that resolved to
code actions from different language servers could result in conflicting
edits being applied and mangled buffer text.
2025-09-30 19:13:20 -04:00
Danilo Leal
1cac3e3e40 agent: Only show profile manage list item selection keybinding on the focused item (#39242)
Small update here that makes the UI simpler; there's no need to see the
keybinding in all the items you're not focused in.

| Before | After |
|--------|--------|
| <img width="1112" height="720" alt="Screenshot 2025-09-30 at 5  25@2x"
src="https://github.com/user-attachments/assets/e0362f98-889a-4007-a50d-8006dfb91787"
/> | <img width="1112" height="732" alt="Screenshot 2025-09-30 at 5  25
2@2x"
src="https://github.com/user-attachments/assets/b536b6ba-ef61-4891-8b2f-c27c40c70e4e"
/> |

Release Notes:

- N/A
2025-09-30 19:39:12 -03:00
David
9abe5811a5 agent: Make the profile switcher a picker (#39218)
Split off from https://github.com/zed-industries/zed/pull/39175

Adds a search bar to the 'profile' panel, so that we can switch profiles
without having to use the mouse or `tab` a few times

![2025-09-30 13 32
55](https://github.com/user-attachments/assets/2fc1f32b-9e25-4059-aae1-d195334a5fdb)

Release Notes:

- agent: Added the ability to search profiles in the agent panel's
profile picker.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-30 19:39:02 -03:00
Jakub Konka
97bd2846e9 windows: Fix breakpoints in WSL (#39196)
Release Notes:

- Fixed breakpoints not being hit in the debugger in WSL (or any
POSIX-target from WIndows host)
2025-10-01 00:17:45 +02:00
versecafe
e9244d50a7 docs: Remove macOS Tahoe runtime shaders callout (#39241)
@ConradIrwin No longer needed the issue appears to be fully resolved
after moving to MacOS Tahoe as the latest instead of only in dev beta

Release Notes:

- N/A
2025-09-30 15:47:01 -06:00
Conrad Irwin
83e5a3033e Don't run MCP servers for remote projects (#39243)
Closes #39213

Release Notes:

- Fixed a bug where we tried to run MCP servers in the remote project's
working directory on the local machine
2025-09-30 21:34:42 +00:00
Anthony Eid
94a4c0c352 settings ui: Fix bug with navbar index to page index translation (#39245)
This happened when search results completely filtered out a page above
the selected page index.

The old index was calculated based on the nav bar entry's position and
the count of root entries above it, this was wrong because root entries
could be filtered out with a search. Now the page index is saved when
building the navbar

Release Notes:

- N/A
2025-09-30 17:25:49 -04:00
Mikayla Maki
0f8693386a Update blade dependencies to the newest versions (#39233)
Release Notes:

- N/A
2025-09-30 13:51:09 -07:00
warrenjokinen
ed269b4467 Correct button label on basics_page.rs (Jetbrains to JetBrains) (#39240)
Correct typo, Jetbrains to JetBrains

Thanks for the opportunity to participate!

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-30 20:41:30 +00:00
Cole Miller
34ddf5466f agent: Remove stray separator in edited files UI (#39237)
Release Notes:

- N/A
2025-09-30 20:12:45 +00:00
Anthony Eid
a701388cb7 settings ui: Implement settings search (#38989)
Get a basic search implementation working in the settings ui and fix nav
bar toggling bugs.

Search functionality works by passing in each page and its items into
our fuzzy search crate and filtering out any non-matches. A page is a
match if any of its items are a match and an item is a match if its
title or description has a fuzzy score greater than zero.

In the future, a page section header will be filtered out if none of its
children has a match or it will show all its children on a match. The
team still has to decide what to do in that edge case, but that's the
last step until search is fully implemented for our initial launch.

Finally, I found some bugs in our nav bar toggling that occurred because
we weren't taking into account the index change that occurred when
toggling an element with children that is above the selected nav bar
entry. I added tests to cover those edge cases as well.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-09-30 16:12:13 -04:00
Bennet Bo Fenner
29afc0412e worktree: Remove unwrap in BackgroundScanner::update_ignore_status (#39191)
We've seen this panic come up in the last two weeks, which might be
caused by #33592. However, we are not sure what paths can cause this
`unwrap()` to fail. Therefore adding some logging around this, so that
the next time someone opens a bug report we can further diagnose the
issue.

Fixes ZED-1F6

Release Notes:

- Fixed an issue where Zed could crash when including specific paths in
a global `.gitignore` files
2025-09-30 22:01:45 +02:00
Kirill Bulatov
e65a9291ef Add basic shell tests (#39232)
Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-30 22:45:36 +03:00
Lukas Wirth
a53faff412 terminals: Remove (now) incorrect alacritty workaround for task spawning (#39230)
Closes #39228

Release Notes:

- Fixed venv activation failing with powershell
2025-09-30 18:36:20 +00:00
Lukas Wirth
074cb88036 acp_thread: Skip git pagination on windows (#39229)
Release Notes:

- Fixed agents running git commands with pagination enabled

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-30 18:10:04 +00:00
Lukas Wirth
67ebb1f795 task: Fix ShellBuilder::redirect_stdin_to_dev_null constructing invalid commands on windows (#39227)
Release Notes:

- Fixed agents not being able to use the terminal tool with powershell

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-30 17:55:46 +00:00
Anthony Eid
ace617037f debugger: Fix python debug scenario not showing up in code actions (#39224)
The bug happened because the Python locator was checking for a quote
before the ZED task variable. Removing that part of the check fixed the
issue.

Closes #39179 

Release Notes:

- Fix Python debug tasks not showing up in code actions or debug picker
2025-09-30 13:38:01 -04:00
Mikayla Maki
43061b6b16 Add SettingsFile APIs to SettingsStore (#39129)
Closes #ISSUE

Adds a couple functions to the `SettingsStore`:
- `get_value_from_file`: Gets a value from a given settings file
(`Local`, `User`, etc) and if the value isn't found in the requested
file, walks the known settings files in the order in which they are
merged to find the settings value in lower precedence settings files
(i.e. if value not set anywhere will always return default value)
- `get_overrides_for_field`: Returns a list of settings files where a
given setting is set that have higher precedence than the passed in
file. e.g. passing in user will result in project settings files where
the value is set being returned.

Additionally changes the default for the `project_name` setting to
uphold the rules we are attempting to enforce on the settings, namely:
- All settings fields should be of the form `Option<T>`
- `None` (or `null` in JSON) should never be a meaningful value

Follow up PRs will handle implementing a function to write to an
arbitrary settings file, and passing through metadata to the above
functions to control how overrides are determined for more complicated
cases like `SaturatingBool` (`disable_ai`) and `ExtendingVec`

Release Notes:

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

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
2025-09-30 17:08:06 +00:00
Ben Brandt
e23e976e58 acp: Bump minimum Claude Code version (#39217)
There was an issue with login after the migration to the new anthropic
package. This makes sure folks are migrated to a known working version
(though the latest version also now works on old versions)

Release Notes:

- N/A

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-09-30 15:37:22 +00:00
Tim Vermeulen
0266a995aa Use the alt modifier when going to a definition with cmd-click (#38148)
I don't totally follow how the `cmd_click_reveal_task` function works,
but it branches on whether `self.hovered_link_state` exists and contains
any links, and in case it doesn't, it doesn't use `modifiers.alt` for
deciding where to navigate. This PR addresses that.

The problem I've been having is that cmd-alt-click sometimes behaves as
cmd-click, i.e. it navigates to the definition in the current pane. This
appears to happen whenever I cmd-alt-click while the symbol I'm hovering
over isn't underlined, possibly when I click too quickly?

An alternative way to reliably reproduce this is to cmd-alt-click on a
symbol without letting go of cmd and alt and without moving the cursor.
Now the symbol is no longer underlined (and the hover preview has
disappeared as well), so clicking again (while still holding cmd and
alt) goes to the definition in the current pane:


https://github.com/user-attachments/assets/34003e01-fd95-4741-8a7d-6240d1c5a495

Release notes:

- Fixed a bug that caused cmd-alt-click to sometimes go to the
definition in the current pane

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2025-09-30 11:35:18 -04:00
Danilo Leal
9741e9ab8b rules library: Improve delineation of default and non-default rules (#39209)
Closes https://github.com/zed-industries/zed/issues/39183

This PR adds UI improvements to clarify the concept of "default rules"
and how they separate from regular rules. This is mostly motivated by
the issue linked above, where it clarified that the star icon was
communicating a "favoriting" affordance, which is not correct with how
rules work in Zed. When you tag/attach a rule as default, it will always
be included in every prompt, together with the agent's system prompt and
project rules (if they exist).

Hopefully, this will make understanding better. Here's how it looks like
now?


https://github.com/user-attachments/assets/435d3af7-e8a6-4646-8f00-94a409bd5f42

Release Notes:

- Improve rules library UI to better communicate the concept of default
rules vs. regular rules.
2025-09-30 12:27:23 -03:00
Danilo Leal
3f31fc2874 agent: Fix keybinding to deny running a command (#39214)
Despite how great `cmd-d` as a keybinding is, that was not working as it
was conflicting with an editor keybinding:


https://github.com/user-attachments/assets/2ea8665b-7008-4f0a-9426-8d31d379ee1c

This PR changes it to `cmd-alt-z`, which is the best "remove/fix"-type
of keybinding I could find that doesn't conflict with anything else.
Ideally, we'd use either the D, N, or R letters for "deny", "no", and
"reject", but unfortunately, none of them are nicely available in this
context...


Release Notes:

- agent: Fix keybinding to deny running a command
2025-09-30 12:27:09 -03:00
Conrad Irwin
6c50fd6de9 Remove "integer" from font size docs (#39215)
Fixes #38765

Release Notes:

- N/A
2025-09-30 15:15:40 +00:00
Agus Zubiaga
df43a2d3b1 zeta2 cli: Include section ranges in new full output format (#39203)
Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-09-30 14:30:13 +00:00
Ben Brandt
35749e99e5 acp: Notify of latest agent version only after successful download (#39201)
Before we would notify the user even if the download failed. We also
we're overwriting the directory, which means a user could be stuck in a
loop if a previous download failed

Release Notes:

- acp: Fix user seeing update prompt in a loop because of a previous
failed download
2025-09-30 13:46:09 +00:00
Joseph T. Lyons
e965c43703 Remove issue response action (#39200)
This action has consistently failed to run for many months on end, so we
haven't been relying on it.

Release Notes:

- N/A
2025-09-30 13:14:55 +00:00
张小白
14fc726cae windows: Fix ssh reporting wrong password even it's actually correct (#38263)
Closes #34393

Currently, we’re using `zed.exe --askpass` kind of like an `nc`
substitute, it prints out the SSH password to stdout with something like
`println!("user-pwd")`. `ssh.exe` then reads the password from stdout so
it can establish the connection.

The problem is that in release builds we set `subsystem=windows` to
avoid Windows spawning a black console window by default. The side
effect is that `zed.exe` no longer has a stdout, so `ssh.exe` can’t read
the password.

Through testing, I confirmed that neither allocating a new console for
`zed.exe` nor attaching it to the parent process’s stdout resolves the
issue. As a result, this PR updates the implementation to use `cli.exe
--askpass` instead.

TODO:

- [ ] Check that the `cli` path is correct on macOS
- [ ] Check that the `cli` path is correct on Linux

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-09-30 21:03:06 +08:00
张小白
4f95186b53 windows: Fix auto-update for conpty.dll (#39178)
This PR is a follow-up to #39090 and addresses two issues:

* Moves `conpty.dll` and `OpenConsole.exe` out of the `bin` folder to
prevent other programs from using them.
* Updates these files only after Zed exits, avoiding update failures due
to file locks.


Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-30 21:02:46 +08:00
Sergei Zharinov
33f44009de gpui: Respect font smoothing on macOS (#39197)
- Closes #38847
- See also: #37622 and #38467

Release Notes:

- Fonts are now rendered in accordance with the `AppleFontSmoothing`
setting.
2025-09-30 13:01:25 +00:00
Lukas Wirth
9d895c5ea7 git_ui: Fix blame avatars using wrong config (#39195)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-30 12:32:48 +00:00
Lukas Wirth
0811d48a7a diagnostics: Reduce cloning of DiagnosticEntry (#39193)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-30 11:41:49 +00:00
Remco Smits
d8cafdf937 markdown: Add support for HTML heading elements (#38590)
This PR adds support for HTML heading (h1, h2, h3, h4, h5, h6) elements.

**Before**
<img width="1440" height="556" alt="Screenshot 2025-09-21 at 11 05 18"
src="https://github.com/user-attachments/assets/6e7241a5-be1c-4018-ba04-f29058f97941"
/>

**After**
<img width="1436" height="598" alt="Screenshot 2025-09-21 at 10 58 12"
src="https://github.com/user-attachments/assets/3f74b5f7-6c35-41db-989b-fcaaede264b5"
/>

cc @SomeoneToIgnore

Release Notes:

- Markdown: Added support for HTML `heading` elements
2025-09-30 12:39:22 +02:00
Kirill Bulatov
95190a2034 Add a test on a with_timeout util function (#39187)
Release Notes:

- N/A

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-30 10:07:23 +00:00
hrou0003
49335d54be Pane tabs: Scroll entire new tab into view (#36827)
The state of the child bounds is not up-to-date when `scroll_to_item`
gets triggered, causing the new tab to not scroll completely into view.

Closes #36317 

Release Notes:

- Fix an issue where a new tab is only partially visible on creation.
2025-09-30 11:04:34 +02:00
Kirill Bulatov
624e448492 Remove bold inlay hints style from all other theme variants (#39177)
Follow-up of https://github.com/zed-industries/zed/pull/39105

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-30 08:27:24 +00:00
Piotr Osiewicz
bf9dd6bbef python: Fix user settings not getting passed on for Ty (#39174)
Closes #39144

Release Notes:

- python: Fixed user settings not being respected with Ty language
server.
2025-09-30 08:19:23 +00:00
Michael Sloan
6af385235d zeta_cli: Add retrieval-stats command for comparing with language server symbol resolution (#39164)
Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
2025-09-30 08:06:31 +00:00
Lukas Wirth
cc19387853 git_ui: Render avatars in git blame gutter (#39168)
Release Notes:

- Added setting to render avatar in blame gutter
2025-09-30 06:55:09 +00:00
Dmitry Nefedov
5922f4adce themes: Fix Ayu theme comment colors (#39131)
Closes https://github.com/zed-industries/zed/issues/39122

Currently comment colors in Ayu theme do not work as expected and hard
to differentiate. In my understanding something is really wrong how zed
interprets rgba hex color codes, for example:

|  #5c677300 | #5c6773ff |
| ------------- | ---------- |
| <img width="134" height="38" alt="image"
src="https://github.com/user-attachments/assets/c9f1f618-958e-4fe9-a44a-636681d2f418"
/> | <img width="117" height="32" alt="image"
src="https://github.com/user-attachments/assets/78eac6b3-aecd-4be1-83d4-42590604c3a6"
/> |

This PR works around this by using comment color codes from
[ayu-vim](https://github.com/ayu-theme/ayu-vim). Maybe I am not
understanding how RGBA works, but in my opinion underlying issue should
be solved.

Release Notes:

- N/A
2025-09-29 20:50:03 -03:00
Dino
cac920d992 vim: Add support for ignorecase and noignorecase options (#37459)
Update the list of supported options in vim mode so that the following
are now available:

- `:set ignorecase`
- `:set noignorecase`
- `:set ic`
- `:set noic`

This controls whether the case-sensitive search option is disabled or
enabled when using the buffer and project searches, with `ignorecase`
disabling the search option and `noignorecase` enabling it.

Release Notes:

- Added support for `:set ignorecase` and `:set noignorecase` in vim
mode

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-29 22:43:05 +00:00
Michael Sloan
773850f477 zeta2: Use bounded parallelism for tree-sitter indexing + await completion in zeta_cli (#39147)
Also skips indexing files that don't have a suffix that indicates a
known language, and skips when the language doesn't have an outline
grammar.

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
2025-09-29 22:15:00 +00:00
AidanV
9c60bc3837 vim: Add vim counts and vim shortcuts to project_panel (#36653)
Closes #10930 
Closes #11353

Release Notes:

- Adds commands to project_panel
  - `ctrl-u` scrolls the project_panel up half of the visible entries
  - `ctrl-d` scrolls the project_panel down half of the visible entries
  - `z z` scrolls current selection to center of window
  - `z t`  scrolls current selection to top of window
  - `z b` scrolls current selection to bottom of window
  - `{num} j` and `{num} k` now move up and  down with a count
2025-09-29 15:53:59 -06:00
warrenjokinen
fbb4dcf2b1 Update a Help menu item in app_menus.rs with "Locally" (#39151)
Add the single word "Locally" to clarify where the info is coming from,
(and that you don't need to be online.)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 21:21:53 +00:00
Nia
2ccadc7f65 perf: Doc fixes (#39150)
Release Notes:

- N/A
2025-09-29 21:16:00 +00:00
Nia
80989d6767 treesitter: Bump to 0.25.10 and fix Go tests (#39138)
Closes #29827

Release Notes:

- Fixed tree-sitter possibly crashing on certain grammars
2025-09-29 20:58:05 +00:00
David Kleingeld
719013dae6 Add YankEndOfLine action (#39143)
Since 2021 Neovim remaps Y to $y (1). DO the same in zed through a new action `YankToEndOfLine`. 

1: https://github.com/neovim/neovim/pull/13268

Release Notes:

- Added vim::YankToEndOfLine action which copies from the cursor to the end of the line excluding the newline. We bind it to Y by default in the vim keymap.
2025-09-29 20:32:57 +00:00
Jakub Konka
8af3f583c2 Better conpty (#39090)
Closes #22657
Closes #37863

# Background

Several users have noted that the terminal shipped with Zed on Windows
is either misbehaving or missing several features including lack of
consistent clearing behaviour. After some investigation which included
digging into the Microsoft Terminal project and VSCode editor, it turns
out that the pseudoconsole provided by Windows OS is severely outdated
which manifests itself in problems such as lack of clearing behaviour,
etc. Interestingly however, neither MS Terminal nor VSCode exhibit this
limitation so the question was why. Enter custom `conpty.dll` and
`OpenConsole.exe` runtime. These are updated, developed in MS Terminal
tree subprojects that aim to replace native Windows API as well as
augment the `conhost.exe` process that runs by default in Windows. They
also fix all the woes we had with the terminal on Windows (there is a
chance that ctrl-c behaviour is also fixed with these, but still need to
double check that this is indeed the case). This PR ensures that Zed
also benefits from the update pseudoconsole API.

# Proposed approach

It is possible to fork MS Terminal and instrument the necessary
subprojects for Rust-awareness (using `cc-rs` or otherwise to compile
the C++ code and then embed it in Rust-produced binaries for easier
inclusion in projects) but it comes at a cost of added complexity,
maintenance burden, etc. An alternative approach was proposed by
@reflectronic to download the binary from the official Nuget repo and
bundle it for release/local use. This PR aims to do just that.

There are two bits to this PR:
1. ~~when building Zed locally, and more specifically, when the `zed`
crate is being built, we will strive to download and unpack the binaries
into `OUT_DIR` provided by `cargo`. We will then set
`ZED_CONPTY_INSTALL_PATH=${OUT_DIR}/conpty` and use it at runtime in Zed
binary to tweak the loader's search path with that additional path. This
effectively ensures that Zed built from source on Windows has full
terminal support.~~ EDIT: after several discussions offline, we've
decided that keeping it minimal will serve us best, meaning: when
developing locally it is up to the developer of Zed to install
`conpty.dll` and put it in the loader's search path.
2. when bundling Windows release, we will download and unpack the nuget
package into Zed's bundle which will ensure it is installed in the same
directory as Zed by the installer.

**Note** I realise that 1. may actually not be needed - instead we could
leave that bit for the user who wants to run Zed from source to ensure
that they have `conpty.dll` in the loader's search path. I'd love to
hear opinions on this!

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-29 22:08:35 +02:00
Conrad Irwin
f1d80b715a Fix panic in UnwrapSyntaxNode (#39139)
Closes #39139
Fixes ZED-1HY

Release Notes:

- Fixed a panic in UnwrapSyntaxNode in multi-buffers
2025-09-29 14:01:34 -06:00
Tim Vermeulen
42ef3e5d3d editor: Make cmd-alt-click behavior more consistent (#38733)
Fixes two inconsistencies around the behavior of cmd-alt-click that mess
with my VSCode muscle memory:
- The definition is opened in a pane to the right of the current pane,
unless there exists an adjacent pane to the left and not to the right,
in which case it's opened in the pane on the left
- In case Go to Definition needs to open a multibuffer, cmd-alt-click
does not open it in an existing pane to the right of the current pane,
it always creates a new pane directly to the right of the current pane

This PR irons out this behavior by always going to the definition in the
pane directly to the right of the current one, creating one only if one
doesn't yet exist.

If changing `Workspace::adjacent_pane` to not consider an existing pane
to the left is undesirable then that logic could be moved somewhere
else, or we can make it user configurable if necessary. Also happy to
split this PR up if either of these changes is controversial 🙂

Before:


https://github.com/user-attachments/assets/395754cd-6ecb-40bf-ae61-ee8903eed4ae

After:


https://github.com/user-attachments/assets/002797b1-51a7-48e5-a8d0-100d3a5049eb

Release Notes:

- Made the behavior of cmd-alt-click more consistent

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2025-09-29 19:30:06 +00:00
Miao
90ea252c82 vim: Disregard non-text content on system clipboard for yanking (#39118)
Closes #39086

Release Notes:

- Fixed the vim problem that image clipboard content overrides the
unnamed register and produces an empty paste.
2025-09-29 13:25:45 -06:00
warrenjokinen
6e5ff6d091 Update onboarding_modal.rs with https protocol (#39136)
Update onboarding_modal.rs with https protocol

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 19:18:57 +00:00
warrenjokinen
04216a88f3 Update http link to https in onboarding_modal.rs (#39135)
Use https protocol

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 19:15:22 +00:00
Richard Feldman
3ae65153db Default to Sonnet 4.5 in BYOK (#39132)
<img width="381" height="204" alt="Screenshot 2025-09-29 at 2 29 58 PM"
src="https://github.com/user-attachments/assets/c7aaf0b0-b09b-4ed9-8113-8d7b18eefc2f"
/>


Release Notes:

- Claude Sonnet 4.5 and 4.5 Thinking are now the recommended Anthropic
models
2025-09-29 18:56:03 +00:00
mgabor
ffc9060607 Fix file path quoting in Deno test task configuration (#39134)
Closes https://github.com/zed-extensions/deno/issues/14

Release Notes:

- N/A
2025-09-29 20:44:49 +02:00
Richard Feldman
4fc4707cfc Add Sonnet 4.5 support (#39127)
Release Notes:

- Added support for Claude Sonnet 4.5 for Bring-Your-Own-Key (BYOK)
2025-09-29 14:21:58 -04:00
morgankrey
8662025d12 Add Sonnet 4.5 to docs (#39125)
Closes #ISSUE

Release Notes:

- N/A
2025-09-29 12:17:49 -05:00
Finn Evers
ceddd5752a docs: Remove debugger cal.com link (#39124)
Closes #39094

Release Notes:

- N/A
2025-09-29 19:08:20 +02:00
David Kleingeld
20166727a6 Revert "Replace linear resampler with fft based one" (#39120)
Reverts zed-industries/zed#39098

robot voices all over
2025-09-29 16:50:17 +00:00
George Waters
6e80fca0d5 Order venvs by distance to worktree root (#39067)
This is a follow up to #37510 and is also related to #38910.

Release Notes:

- Improved ordering of virtual environments, sort by distance to
worktree root.
2025-09-29 16:25:41 +00:00
George Waters
778ca84f85 Fix selecting and deleting user toolchains (#39068)
I was trying to use the new user toolchains but every time I clicked on
one I had added, it would delete it from the picker. Ironically, it
wouldn't delete it permanently when I tried to by clicking on the trash
can icon. Every time I reopened the workspace all user toolchains were
there.

Release Notes:

- Fixed selecting and deleting user toolchains.
2025-09-29 18:08:47 +02:00
Lukas Wirth
ebdc0572c6 zed: Add binary type to sentry crash tags (#39107)
This allows to filter by main zed binary or remote server crashes, as
well as easily tell whether a crash happened in a remote-server binary
or not.

Release Notes:

- N/A
2025-09-29 09:03:00 -07:00
Bennet Bo Fenner
cda48a3a1c zeta2: Allow provider to suggest edits in different files (#39110)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-09-29 15:48:58 +00:00
Bennet Bo Fenner
b7f9fd7d74 zeta2: Do not include empty edit events (#39116)
Release Notes:

- N/A
2025-09-29 15:45:23 +00:00
Lukas Wirth
98ab118526 git: Work around windows command length limit message fetching (#39115)
Release Notes:

- Fix git blame failing on windows for files with lots of blame entries
2025-09-29 15:29:42 +00:00
tsjason
1e70a1a4ce Improve recent projects search result ordering (#38795)
Previously, search results were sorted solely by candidate_id
(preserving original order from the database), which could result in
less relevant matches appearing before better ones.

This change sorts results primarily by fuzzy match score (descending),
with candidate_id as a tiebreaker for equal scores. This ensures that
better matches appear first while preserving recency order among items
with identical scores.

Example improvement:
- Searching for 'pica' will now rank 'picabo' higher than scattered
matches like 'project-api, project-chat'
- Consecutive character matches are prioritized over scattered matches
across multiple path segments

Release Notes:
- Improved project search relevance by ranking results using match score
instead of insertion order.
2025-09-29 17:15:47 +02:00
AidanV
163219af35 editor: Make kill ring cut at EOF a no-op (#39069)
Release Notes:

- Emacs's kill ring cut at the end of the last line of the file will now
no-op instead of cutting the entire line
2025-09-29 08:55:38 -06:00
Miao
f96fd928d7 git: Fix git modal and panel amend tooltip (#39008)
Closes #38783

Release Notes:

- Fixed the amend button tooltip shortcut in Git panel and modal.
2025-09-29 19:58:14 +05:30
Ben Kunkle
9aa5817b85 Fix panic due to ThemeRegistry::global call in remote server (#39111)
Fixes ZED-1PV

Note: Nightly only panic

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 14:24:17 +00:00
David Kleingeld
28cc39ad56 Replace linear resampler with fft based one (#39098)
Replaces the use of Rodio's basic linear resampler with an fft based
resampler from the rubato crate. As we are down-sampling to the minimal
(transparent) sample rate for human speech (16kHz) any down-sampling
artifact will be noticeable.

This also refactors the rodio_ext module into sub-models as it was
getting quite long.

Release Notes:

- N/A
2025-09-29 16:22:45 +02:00
warrenjokinen
0da3f9ffda docs_preprocessor: Update deprecated actions message (#39062)
Minor correction to label (string) used when generating big table of
actions.

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 10:11:48 -04:00
Lukas Wirth
f2efe78feb editor: Shrink size of Inlay slightly (#39089)
And some other smaller cleanup things I noticed while reading through
some stuff

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 15:33:21 +02:00
Danilo Leal
ed7217ff46 ui prompt: Adjust UI and focus visibility (#39106)
Closes https://github.com/zed-industries/zed/issues/38643

This PR adds some UI improvements to the Zed replacement of the system
dialog/prompt, including better visibility of which button is currently
focused.

One little design note, though: because of a current (and somewhat
annoying) constraint of button component, where we're only drawing a
border when its style is outlined, if I kept them horizontally stacked,
there'd be a little layout shift now that I'm toggling styles for better
focus visibility. So, for this reason, I changed them to be vertically
stacked, which matches the macOS design and avoids this problem. Maybe
in the future, we'll revert it back to being `flex_row` because that
ultimately consumes less space.


https://github.com/user-attachments/assets/500c840b-6b56-4c0c-b56a-535939398a7b

Release Notes:

- Improve focus visibility of the actions within Zed's UI system prompt.
2025-09-29 10:09:31 -03:00
Lukas Wirth
f9fb389f86 themes: Set font_weight to null for syntax.hint (#39105)
Since https://github.com/zed-industries/zed/pull/36219 we now render
inlay hints as bold due to this.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-29 12:54:12 +00:00
Bartosz Kaszubowski
632e569c5f markdown_preview: Improve table elements appearance (#39101)
# How

Eliminate double borders between Markdown rows and cells, restyle
headers relying on background color alteration instead of thicker pixel
border.

Release Notes:

- Improved table elements appearance in Markdown Preview

# Preview

### Before

<img width="1206" height="594" alt="Screenshot 2025-09-29 at 13 28 23"
src="https://github.com/user-attachments/assets/9fe2b8a8-13e1-4052-9e97-34559b44f2d0"
/>

### After

<img width="1206" height="578" alt="Screenshot 2025-09-29 at 13 28 40"
src="https://github.com/user-attachments/assets/0b627ada-f287-436b-9448-92900d4bff59"
/>
2025-09-29 09:41:41 -03:00
Smit Barmase
0c71aa9f01 Bump tree-sitter-python to 0.25.0 (#39103)
- The fork with the patch is now included in 0.25.0
(7ff26dacd7).
- We no longer need `except*` as a keyword, which was added in
https://github.com/zed-industries/zed/pull/21389. It now highlights
correctly without explicitly mentioning it after
1b1ca93298.

Release Notes:

- N/A
2025-09-29 17:57:11 +05:30
Jowell Young
92a09ecf25 x_ai: Add support for tools and images with custom models (#38792)
After the change, we can add "supports_images", "supports_tools" and
"parallel_tool_calls" properties to set up new models. Our
`settings.json` will be as follows:
```json
  "language_models": {
     "x_ai": {
       "api_url": "https://api.x.ai/v1",
       "available_models": [
         {
           "name": "grok-4-fast-reasoning",
           "display_name": "Grok 4 Fast Reasoning",
           "max_tokens": 2000000,
           "max_output_tokens": 64000,
           "supports_tools": true,
           "parallel_tool_calls": true,
         },
         {
           "name": "grok-4-fast-non-reasoning",
           "display_name": "Grok 4 Fast Non-Reasoning",
           "max_tokens": 2000000,
           "max_output_tokens": 64000,
           "supports_images": true,
         }
       ]
     }
   }

```

Closes https://github.com/zed-industries/zed/issues/38752

Release Notes:

- xAI: Added support for for configuring tool and image support for
custom model configurations
2025-09-29 11:38:55 +00:00
Ben Brandt
bad96776cd acp: Add NO_PROXY if not set otherwise to not proxy localhost urls (#39100)
Since we might run MCP servers locally for an agent, we don't want to
use the proxy for those.
We set this if the user has set a proxy, but not a custom NO_PROXY env
var.

Closes #38839

Release Notes:

- acp: Don't run local mcp servers through proxy, if set
2025-09-29 11:34:52 +00:00
Kirill Bulatov
aa14980523 Mention pure style changes in the contributing docs (#39096)
Release Notes:

- N/A
2025-09-29 11:02:47 +00:00
warrenjokinen
12aba6193e docs: Fix minor typos in configuring-zed.md (#39048)
Fixed numbering under heading  Bottom Dock Layout

Closes #ISSUE

Release Notes:

- N/A
2025-09-29 13:12:07 +03:00
Bartosz Kaszubowski
720971e47b git_ui: Fix last commit UI glitching on panel resize (#39059)
# Why

Spotted that on Git Panel resize last commit UI part could glitch due to
commit message being wrapped into second line in certain situations.

# How

Force only one line for the last commit message in Git Panel via
`line_clamp`.

I have also remove manual `max-width` setting since it is controlled by
flex layout and gap setting no matter if there is an additional element
on the right or not.

Release Notes:

- Fixed last commit UI glitching on panel resize

# Preview

### Before


https://github.com/user-attachments/assets/9ce74f6f-d33c-4787-b7e4-010de8f0ffff

<img width="852" height="502" alt="Screenshot 2025-09-28 at 18 16 35"
src="https://github.com/user-attachments/assets/1131c73f-fe06-4d8e-adbb-5ce84ecf31e0"
/>

### After


https://github.com/user-attachments/assets/279b8c37-7ec9-4038-8761-197cba26aa83
2025-09-29 13:06:15 +03:00
Lukas Wirth
0a10e3e264 acp_thread: Fix terminal tool incorrectly redirecting stdin to /dev/null (#39092)
Closes https://github.com/zed-industries/zed/issues/38462

Release Notes:

- Fixed AI terminal tool incorrectly redirecting stdin to `/dev/null`
2025-09-29 09:43:50 +00:00
Xiaobo Liu
77854f4627 windows: Refactor shell environment capture to use new_smol_command (#39055)
Using `crate::command::new_smol_command` on the Windows platform will
not display the PowerShell window.

Closes #39052

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-09-28 18:54:26 +02:00
Lukas Wirth
5ce7eda8d2 ui: Fix panic in highlight_ranges when given an oob index (#39051)
Fixes ZED-1QW

Release Notes:

- Fixed a panic when highlighting labels
2025-09-28 11:54:18 +00:00
Lukas Wirth
6d7a4c441b search: Fix panic in project search due to workspace double lease (#39049)
Fixes ZED-1K1

Release Notes:

- Fixed panic when spawning a new project search with include file only
filtering
2025-09-28 11:35:36 +00:00
Lukas Wirth
cc85a48de5 editor: Fix panic when syncing empty selections (#39047)
Fixes ZED-1KF

Release Notes:

- Fixed commit modal panicking in specific scenario
2025-09-28 11:01:16 +00:00
warrenjokinen
4cd839e352 Fix typo in search.rs (#39045)
Fixed confusing word

Release Notes:

- Fixed a typo in the tooltip for search case sensitivity.
2025-09-28 11:17:08 +02:00
Yang Gang
78098f6809 windows: Update Windows keymap (#38767)
Pickup the changes from #36550

Release Notes:

- N/A

---------

Signed-off-by: Yang Gang <yanggang.uefi@gmail.com>
Co-authored-by: 张小白 <364772080@qq.com>
2025-09-28 02:09:44 +08:00
warrenjokinen
4d2ff6c899 markup: Update yara.md (#39027)
Minor fixes / clarifications for two links in one markdown file

Release Notes:

- N/A
2025-09-27 19:43:19 +02:00
Lukas Wirth
6f5d1522cb git_ui: Allow splitting commit_view pane (#39025)
Release Notes:

- Allow splitting git commit view pane
2025-09-27 15:28:37 +00:00
Xiaobo Liu
682cf023ca windows: Implement shell environment loading for git operations (#39019)
Fixes the "failed to get working directory environment for repository"
error on Windows by implementing proper shell environment variable
capture.

Release Notes:

- Fixed failed to get working directory environment for repository

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-09-27 17:10:06 +02:00
Lukas Wirth
72948e14ee Use into_owned over to_string for Cow<str> (#39024)
This removes unnecessary allocations when the `Cow` is already owned


Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-27 14:50:10 +00:00
Cole Miller
a063a70cfb call: Play a different sound when a guest joins (#38987)
Release Notes:

- collab: A distinct sound effect is now used for when a guest joins a
call.
- collab: Fixed the "joined" sound being excessively loud when joining a
call that already has many participants.

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-09-27 09:20:55 -04:00
Cole Miller
687e22b4c3 extension_host: Use the more permissive RelPath constructor for paths from extensions (#38965)
Closes #38922 

Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-27 09:20:42 -04:00
loczek
e13b88e4bd snippets: Fix configure snippets not opening on remote workspaces (#38790)
Release Notes:

- Fixed `snippets: configure snippets` action not working on remote
workspaces
2025-09-27 11:01:04 +02:00
Bedis Nbiba
e1e9f78dc3 docs: Document config completion for Deno (#38993)
Closes #ISSUE

Release Notes:

- doc: document config completion for deno
2025-09-26 22:17:46 -04:00
Max Brunsfeld
0fe696bc7c Bump html extension version to 0.2.3 (#38997)
Release Notes:

- N/A
2025-09-26 23:23:00 +00:00
Lukas Wirth
ead38fd1be fsevent: Check CFURLCreateFromFileSystemRepresentation return value (#38996)
Fixes ZED-1T

Release Notes:

- Fixed a segmentation fault on macOS fervent stream creation
2025-09-26 22:28:52 +00:00
Lukas Wirth
fbdf5d4df4 editor: Do not panic on tab_size > 16, cap it at 128 (#38994)
Fixes ZED-1PT
Fixes ZED-1PW
Fixes ZED-1G2

Release Notes:

- Fixed Zed panicking when the `tab_size` is set higher than 16
2025-09-27 00:13:16 +02:00
Max Brunsfeld
837f282f1e html: Remove Windows workaround (#38069)
⚠️ Don't merge until Zed 0.205.x is on stable ⚠️ 

See https://github.com/zed-industries/zed/pull/37811

This PR updates the HTML extension, bumping the zed extension API to the
latest version, which removes the need to work around a bug where
`current_dir()` returned an invalid path on windows.

Release Notes:

- N/A
2025-09-26 12:14:54 -07:00
Xiaobo Liu
bd3cccea15 edit_prediction_button: Fix Copilot menu not updating after sign out (#38854)
The edit prediction button menu was displaying stale authentication
status due to capturing the Copilot status in a closure. After signing
out, the menu would still show "Sign Out" instead of "Sign In to
Copilot".

This change fixes the issue by reading the current Copilot status each
time the menu is displayed, ensuring the menu options are always
accurate.

Release Notes:

- Fixed Copilot AI menu not updating after sign out

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-09-26 12:42:06 -06:00
justin talbott
d437bbaa0a Don't let ctrl-g clobber git panel keybindings in Emacs keymap (#37732)
i'm testing out zed, coming from emacs, and so i'm trying out the base
keymap for it. i noticed though that zed's default git keybindings don't
work when the gitpanel is open though, because of the top-level binding
of `ctrl-g` to cancel. my expectation is that the emacs-like keybindings
would work insofar as they don't clobber zed's defaults (which would
take precedence), but obviously i'll defer to others on this!

another option could be to use the `C-x v` keymap prefix that the emacs
built-in `vc` package uses, but it doesn't contain the same set of
bindings for git commands that zed has.
2025-09-26 12:13:35 -06:00
Conrad Irwin
114791e1a8 Revert "Fix arrow function detection in TypeScript/JavaScript outline (#38411)" (#38982)
This reverts commit 1bbf98aea6.

We found that #38411 caused problems where anonymous functions are
included too many times in the outline. We'd like to figure out a better
fix before shipping this to stable.

Fixes #38956

Release Notes:

- (preview only) revert changes to outline view
2025-09-26 13:54:52 -04:00
Martin Pool
d6fcd404af Show config messages from install-wild, install-mold (#38979)
Follows on from
https://github.com/zed-industries/zed/pull/37717#discussion_r2376739687

@dvdsk suggested this but I didn't get to it in the previous PR.

# Tested

```
; sudo rm /usr/local/bin/wild
; ./script/install-wild
Downloading from https://github.com/davidlattimore/wild/releases/download/0.6.0/wild-linker-0.6.0-x86_64-unknown-linux-gnu.tar.gz
Wild is installed to /usr/local/bin/wild

To make it your default, add or merge these lines into your ~/.cargo/config.toml:

[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=--ld-path=wild"]

[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=--ld-path=wild"]

```

```
; sudo rm /usr/local/bin/mold
; ./script/install-mold 2.34.0
Downloading from https://github.com/rui314/mold/releases/download/v2.34.0/mold-2.34.0-x86_64-linux.tar.gz
Mold is installed to /usr/local/bin/mold

To make it your default, add or merge these lines into your ~/.cargo/config.toml:

[target.'cfg(target_os = "linux")']
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
```

Release Notes:

- N/A
2025-09-26 16:47:38 +00:00
Bartosz Kaszubowski
7ad9ca9bcc editor: Replace hardcoded keystroke in Excerpt Fold Toggle tooltip (#38978)
# Why

I have recently corrected this tooltip content for macOS, but recently
have learnt that keystroke to text helpers already exist in the
codebase.

# How

Replace hardcoded keystroke for Excerpt Fold Toggle in Uncommitted
Changes tab.

> [!important]
> Should be merged after #38969 and #38971, otherwise it would be a
regression on macOS.

Release Notes:

- N/A

# Preview (stacked on mentioned above PRs)

<img width="618" height="248" alt="Screenshot 2025-09-26 at 17 43 53"
src="https://github.com/user-attachments/assets/cdc7fb74-e1d8-4a59-b847-8a8d2edd4641"
/>
2025-09-26 10:44:46 -06:00
Bartosz Kaszubowski
a55dff7834 ui: Fix Vim mode detection in keybinding to text helpers (#38971)
# Why

Refs:
* #38969

When working on the PR above I have spotted that keybinding to text
helpers incorrectly detects if Vim mode is enabled.

# How

Replace inline check with an existing `KeyBinding::is_vim_mode` method
in keybinding text helpers.

Release Notes:

- Fixed incorrect Vim mode detection in UI keybinding to text helpers.

# Test plan

Made sure that when Vim mode is not specified in settings file it
resolves to `false`, and correct keybindings are displayed, than I have
added the `"vim_mode": true,` line to my settings file and made sure
that keybindings text have changed accordingly.

### Before

<img width="712" height="264" alt="Screenshot 2025-09-26 at 16 57 08"
src="https://github.com/user-attachments/assets/62bc24bd-c335-420f-9c2e-3690031518c1"
/>

### After

<img width="712" height="264" alt="Screenshot 2025-09-26 at 17 13 50"
src="https://github.com/user-attachments/assets/e0088897-eb6b-4d7b-855a-931adcc15fe8"
/>
2025-09-26 10:18:49 -06:00
Bartosz Kaszubowski
6db621a1ed ui: Display option in lowercase in Vim mode keybindings (#38969)
# Why

Spotted that some tooltips include `alt` keystroke combination on macOS.

# How

Add missing `vim_mode` version definition of `Option` key to the
`keystroke_text` helper.

Release Notes:

- Fixed keystroke to text helper output for macOS `Option` key in Vim
mode

# Preview

### Before

<img width="712" height="264" alt="Screenshot 2025-09-26 at 16 57 08"
src="https://github.com/user-attachments/assets/d5daa37f-0da7-4430-91ea-4a750c025472"
/>

### After

<img width="712" height="264" alt="Screenshot 2025-09-26 at 16 56 21"
src="https://github.com/user-attachments/assets/5804ed39-9b1b-4028-a9c9-32c066042f4a"
/>
2025-09-26 10:18:31 -06:00
Kirill Bulatov
948b4379df Stop using linear color space on Linux Blade renderer (#38967)
Part of https://github.com/zed-industries/zed/issues/7992
Closes https://github.com/zed-industries/zed/issues/22711

Left is main, right is patched.

* default font

<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/c4e3d18a-a0dd-48b8-a1f0-182407655efb"
/>
<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/6eea07e7-1676-422c-961f-05bc72677fad"
/>


<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/4d9e30dc-6905-48ad-849d-48eac6ebed03"
/>
<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/ef20986e-c29c-4fe0-9f20-56da4fb0ac29"
/>


* font size 7

<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/8b277e92-9ae4-4415-8903-68566b580f5a"
/>
<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/b9140e73-81af-430b-b07f-af118c7e3dae"
/>

<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/185f526a-241e-4573-af1d-f27aedeac48e"
/>
<img width="3862" height="2152" alt="image"
src="https://github.com/user-attachments/assets/7a239121-ae13-4db9-99d9-785ec26cd98e"
/>


Release Notes:

- Improved color rendering on Linux

Co-authored-by: Kate <kate@zed.dev>
Co-authored-by: John <john-tur@outlook.com>
Co-authored-by: apricotbucket28 <71973804+apricotbucket28@users.noreply.github.com>
2025-09-26 16:09:30 +00:00
Danilo Leal
8db24dd8ad docs: Update wording around configuring MCP servers (#38973)
Felt like this could be clarified a bit.

Release Notes:

- N/A
2025-09-26 12:47:26 -03:00
Ben Kunkle
4aac5642c1 JSON Schema URIs (#38916)
Closes #ISSUE

Improves the efficiency of our interactions with the Zed language
server. Previously, on startup and after every workspace configuration
changed notification, we would send >1MB of JSON Schemas to the JSON
LSP. The only reason this had to happen was due to the case where an
extension was installed that would result in a change to the JSON schema
for settings (i.e. added language, theme, etc).

This PR changes the behavior to use the URI LSP extensions of
`vscode-json-language-server` in order to send the server URI's that it
can then use to fetch the schemas as needed (i.e. the settings schema is
only generated and sent when `settings.json` is opened. This brings the
JSON we send to on startup and after every workspace configuration
changed notification down to a couple of KB.

Additionally, using another LSP extension request we can notify the
server when a schema has changed using the URI as a key, so we no longer
have to send a workspace configuration changed notification, and the
schema contents will only be re-requested and regenerated if the schema
is in use.

Release Notes:

- Improved the efficiency of communication with the builtin JSON LSP.
JSON Schemas are no longer sent to the JSON language server in their
full form. If you wish to view a builtin JSON schema in the language
server info tab of the language server logs (`dev: open language server
logs`), you must now use the `editor: open url` action with your cursor
over the URL that is sent to the server.
- Made it so that Zed urls (`zed://...`) are resolved locally when
opened within the editor instead of being resolved through the OS. Users
who could not previously open `zed://*` URLs in the editor can now do so
by pasting the link into a buffer and using the `editor: open url`
action (please open an issue if this is the case for you!).

---------

Co-authored-by: Michael <michael@zed.dev>
2025-09-26 11:41:26 -04:00
Nia
30b49cfbf5 perf: Fixup ordering, fix pathing, docs (#38970)
Release Notes:

- N/A
2025-09-26 15:28:48 +00:00
Lukas Wirth
c69912c76a Forbid std::process::Command spawning, replace with smol where appropriate (#38894)
std commands can block for an arbitrary duration and so runs risk of
blocking tasks for too long. This replaces all such uses where sensible
with async processes.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-26 15:17:36 +00:00
Smit Barmase
7f14ab26dd copilot: Ensure minimum Node version (#38945)
Closes #38918

Release Notes:

- N/A
2025-09-26 20:08:21 +05:30
Marshall Bowers
5ee73d3e3c Move settings_macros to Cargo workspace (#38962)
Release Notes:

- N/A
2025-09-26 14:20:36 +00:00
Martin Pool
d5aa81a5b2 Fix up Wild package name and decompression (#38961)
Wild changed in 0.6.0 to using gzip rather than xz, and changed the
format of the package name.

Follows on from and fixes
https://github.com/zed-industries/zed/pull/37717

cc @dvdsk @mati865 

Release Notes:

- N/A
2025-09-26 16:20:01 +02:00
Kirill Bulatov
21855c15e4 Disable subpixel shifting for y axis on Linux (#38959)
Part of https://github.com/zed-industries/zed/issues/7992
Port of #38440

<img width="3836" height="2142" alt="zed_nightly_vs_zed_dev_2"
src="https://github.com/user-attachments/assets/66bcbb9a-2159-4790-8a9a-d4814058d966"
/>

Does not change the rendering on Linux, but prepares us for the times
without cosmic-text where this will be needed.

Release Notes:

- N/A

Co-authored-by: Kate <kate@zed.dev>
Co-authored-by: John <john@zed.dev>
2025-09-26 13:31:59 +00:00
Kirill Bulatov
1f9279a56f linux: Add missing linear to sRGB transform in mono sprite rendering (#38944)
Part of https://github.com/zed-industries/zed/issues/7992
Takes
https://github.com/zed-industries/zed/issues/7992#issuecomment-3083871615
and applies its adjusted version on the current state of things

Screenshots (left is main, right is the patch): 

* default font size

<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/26fdc42c-12e6-447f-ad3d-74808e4b2562"
/>

<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/29829c61-c998-4e77-97c3-0e66e14b236d"
/>


* buffer and ui font size 7 

<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/5d0f1d94-b7ed-488d-ab22-c25eb01e6b4a"
/>

<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/7020d62e-de65-4b86-a64b-d3eea798c217"
/>


Release Notes:

- Added missing linear to sRGB transform in mono sprite rendering on
Linux

Co-authored-by: Thomas Dagenais <exrok@i64.dev>
Co-authored-by: Kate <work@localcc.cc>
2025-09-26 09:54:46 +00:00
Michael Sloan
da71465437 edit_prediction_context: Minor optimization of text similarity + some renames (#38941)
Release Notes:

- N/A
2025-09-26 07:57:28 +00:00
Nia
bcc8149263 perf: Fixes (#38935)
Release Notes:

- N/A
2025-09-26 05:41:06 +00:00
Danilo Leal
b1528601cc settings ui: Add some light design tweaks (#38934)
Release Notes:

- N/A
2025-09-26 05:22:57 +00:00
Marshall Bowers
ee357e8987 language_models: Send a header indicating that the client supports xAI models (#38931)
This PR adds an `x-zed-client-supports-x-ai` header to the `GET /models`
request sent to Cloud to indicate that the client supports xAI models.

Release Notes:

- N/A
2025-09-26 04:11:48 +00:00
Floyd Wang
0891a7142d gpui: Fix incorrect colors comment (#38929)
| Before | After |
| - | - |
| <img width="466" height="207" alt="SCR-20250926-khst"
src="https://github.com/user-attachments/assets/c28a9ea8-3d22-458c-a683-b2fabe275a04"
/> | <img width="480" height="215" alt="SCR-20250926-kgru"
src="https://github.com/user-attachments/assets/cfee6392-804c-46e2-a55a-f72071264d10"
/> |

Release Notes:

- N/A
2025-09-25 21:53:04 -06:00
Marshall Bowers
94fe862fb6 x_ai: Fix Model::from_id for Grok 4 (#38930)
This PR fixes `x_ai::Model::from_id`, which was not properly handling
`grok-4`.

Release Notes:

- N/A
2025-09-26 03:49:14 +00:00
Marshall Bowers
4f91fab190 language_models: Add xAI support to Zed Cloud provider (#38928)
This PR adds xAI support to the Zed Cloud provider.

Release Notes:

- N/A
2025-09-26 03:19:12 +00:00
Mikayla Maki
0e0f48d8e1 Introduce SettingsField type to the settings UI (#38921)
Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-09-26 01:08:55 +00:00
Max Brunsfeld
7980dbdaea Add API docs for RelPath (#38923)
Also reduce the use of `unsafe` in that module.

Release Notes:

- N/A
2025-09-26 00:49:10 +00:00
Michael Sloan
a5683f3541 zeta_cli: Add --output-format both and --prompt-format only-snippets (#38920)
These are options are probably temporary, added for use in some
experimental code

Release Notes:

- N/A

Co-authored-by: Oleksiy <oleksiy@zed.dev>
2025-09-25 22:49:36 +00:00
Michael Sloan
67984d5e49 provider configuration: Use SingleLineInput instead of Editor (#38814)
Release Notes:

- N/A
2025-09-25 22:38:27 +00:00
Cole Miller
d83d7d35cb windows: Fix inconsistent separators in buffer headers and breadcrumbs (#38898)
Make `resolve_full_path` use the appropriate separators, and return a
`String`.

As part of fixing the fallout from that type change, this also fixes a
bunch of places in the agent code that were using `std::path::Path`
operations on paths that could be non-local, by changing them to operate
instead on strings and use the project's `PathStyle`.

This clears the way a bit for making `full_path` also return a string
instead of a `PathBuf`, but I've left that for a follow-up.

Release Notes:

- N/A
2025-09-25 22:24:32 +00:00
Derek Nguyen
6470443271 python: Fix ty archive extraction on Linux (#38917)
Closes #38553 
Release Notes:

- Fixed wrong AssetKind specified on linux for ty 


As discussed in the linked issue. All of the non windows assets for ty
are `tar.gz` files. This change applies that fix.
2025-09-25 22:17:49 +00:00
Jakub Konka
5b72dfff87 helix: Streamline mode naming in the UI and in settings (#38870)
Release Notes:

- When `helix_mode = true`, modes are called without the `HELIX_` prefix
in the UI:
  `HELIX_NORMAL` becomes `NORMAL`
  `HELIX_SELECT` becomes `SELECT`
- (breaking change) Helix users should remove `"default_mode":
"helix_normal"` from their settings. This is now the default when
`"helix_mode": true`.
2025-09-25 23:57:01 +02:00
Max Brunsfeld
495a7b0a84 Clean up RelPath API (#38912)
Consolidate constructors and accessors.

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-25 14:42:32 -07:00
Lauren Hinchcliffe
301e976465 Fix inlay hints using status theming instead of syntax theming (#36219)
Release Notes:

- Fixed editor inlay hints incorrectly using status theming when syntax
theming is available

Previously, a theme's `style.syntax.hint` object is completely ignored,
and `style.hint` `style.hint.background` are used instead. However,
these seem to be related to status hints, such as the inline git blame
integration.

For syntax hints (as given by an LSP), the reasonable assumption would
be that the `style.syntax.hint` object is used instead, but it isn't.
This means that defining other style characteristics (`font_style`, for
example) does nothing.

I've fixed the issue in a backward-compatible way, by using the theme
`syntax` `HighlightStyle` as the base for inlay hint styling, and
falling back to the original `status` colors should the syntax object
not contain the color definitions.

 With the following theme settings:
```jsonc
{
  "hint": "#ff00ff",                    // Status hints (git blame, etc.)
  "hint.background": "#ff00ff10",
  "syntax": {
    "hint": {
      "color": "#ffffff",               // LSP inlay hints
      "background_color": "#ffffff10",
      "font_style": "italic",           // Now properly applied
      "font_weight": 700
    }
  }
}
```


Current behavior:
<img width="896" height="201" alt="image"
src="https://github.com/user-attachments/assets/e89d212f-ed7e-4d27-94e4-96d716e229d2"
/>

Italics and font weight are ignored. Uses status colors instead.

Fixed behavior:
<img width="896" height="202" alt="image"
src="https://github.com/user-attachments/assets/f14ed2c3-bb60-4b74-886d-6b409d338714"
/>

Italics and font weight are used properly. Status color is preserved for
the git blame status, but correct syntax colors are used for the inlay
hints.
2025-09-25 16:39:12 -05:00
Anthony Eid
daebc4052d settings ui: Implement dynamic navbar based on pages section headers (#38915)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-09-25 21:19:18 +00:00
Cole Miller
ecc35fcd9a acp: Fix @mentions when remoting from Windows to Linux (#38882)
Closes #38620

`Url::from_file_path` and `Url::from_directory_path` assume the path
style of the target they were compiled for, so we can't use them in
general. So, switch from `file://` to encoding the absolute path (for
mentions that have one) as a query parameter, which works no matter the
platforms. We'll still parse the old `file://` mention URIs for
compatibility with thread history.

Release Notes:

- windows: Fixed a crash when using `@mentions` in agent threads when
remoting from Windows to Linux or WSL.
2025-09-25 16:23:45 -04:00
Ben Kunkle
236006b6b3 settings_ui: Small UI improvements (#38911)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-25 20:23:02 +00:00
Jakub Konka
39c4480841 terminal: Trace terminal events (#38896)
Tracing terminal events can now be enabled using typical `RUST_LOG`
invocation:

```
RUST_LOG=info,terminal=trace,alacritty_terminal=trace cargo run
```

Release Notes:

- N/A
2025-09-25 22:21:33 +02:00
Ben Kunkle
48aac2a746 settings_ui: Add dropdown component + other fixes (#38909)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-25 15:59:34 -04:00
Nathan Sobo
ae036f8ead Read env vars in TestScheduler::many (#38897)
This allows ITERATIONS and SEED environment variables to override the
hard coded values during testing.

cc @ConradIrwin @as-cii 

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-25 13:03:56 -06:00
Bartosz Kaszubowski
de1de25712 keymap_editor: Fix filter input element alignment (#38895)
# Why

I have spotted that Keymap Editor filter input (editor) is misaligned
vertically.

# How

Switch the input wrapper to flex layout, use `items_center` to align
editor vertically in center of the wrapper.

Release Notes:

- Fixed Keymap Editor filter input alignment

# Test plan

I have tested the change locally and compared the UI before and after,
to make sure that change does not affect the size of the wrapper
element.

### Before

<img width="1622" height="428" alt="Screenshot 2025-09-25 at 18 18 59"
src="https://github.com/user-attachments/assets/7d09be5c-6caf-4873-8ecf-2542851cb40a"
/>

### After

<img width="1622" height="428" alt="Screenshot 2025-09-25 at 18 07 18"
src="https://github.com/user-attachments/assets/540fcb3e-691d-4fb7-8130-2ed45ddc0adc"
/>
2025-09-25 15:29:02 -03:00
Cole Miller
18fc951135 Fix flaky test_remote_resolve_path_in_buffer test (#38903)
Release Notes:

- N/A
2025-09-25 18:11:45 +00:00
Cole Miller
40138e12a4 windows: Make ctrl-n open a new terminal when in a terminal (#38900)
This is how `ctrl-n` works on macOS. Right now `ctrl-n` on Windows with
the default keymap usually causes a new buffer to open, which is
inconvenient.

Release Notes:

- N/A
2025-09-25 17:51:19 +00:00
Joseph T. Lyons
e7a5c81b07 Improve media-creation flow in release process (#38902)
Release Notes:

- N/A
2025-09-25 17:49:12 +00:00
Joseph T. Lyons
d98175c0a6 Update release process docs to reflect new process (#38892)
Release Notes:

- N/A
2025-09-25 11:57:00 -04:00
313838373473747564656e74766775
bc7d804a42 remote: Don’t pass --method=GET to wget (#38771)
BusyBox's off brand `wget` does not have support for the `--method`
argument, which makes `zed` incapable of downloading the remote server
unless the _☙authentic❧_ one is installed. Removing this should fix the
issue. Couldn't find much about guidelines on how the code is supposed
to be formatted, so I opted for commenting the line out with an
explanation.

Closes #38712

Release Notes:

- Fixed remote development on BusyBox
2025-09-25 14:59:04 +00:00
Ben Kunkle
50bb8a4ae6 gpui: Add tab group (#38531)
Closes #ISSUE

Co-Authored-By: Mikayla <mikayla@zed.dev>
Co-Authored-By: Anthony <anthony@zed.dev>
Co-Authored-By: Kate <kate@zed.dev>

Release Notes:

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

---------

Co-authored-by: Kate <kate@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-09-25 14:41:29 +00:00
Agus Zubiaga
b2b90b003d zeta2: Add prompt format option to inspector (#38884)
Adds the new prompt format option to the inspector view


Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-09-25 14:23:58 +00:00
Agus Zubiaga
c0f56f500e zeta2: Test prediction request (#38794)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-09-25 13:49:56 +00:00
Lukas Wirth
a9fe18f4cb Revert "gpui: Flash menu in menubar on macOS when action is triggered (#38588)" (#38880)
This reverts commit ed7bd5a8ed.

We noticed this PR causes the editor to hang if you hold down any of the
menu item actions like ctrl+z, ctrl+x, etc


Release Notes:

- Fixed macOS menu item actions hanging the editor when their key
combination is held down
2025-09-25 13:36:19 +00:00
David Kleingeld
3c5e683fbe Fix experimental audio, add denoise, auto volume.Prep migration (#38874)
Uses the previously merged denoising crate (and fixes a bug in it that
snug in during refactoring) to add denoising to the microphone input. 

Adds automatic volume control for microphone and output.

Prepares for migrating to 16kHz SR mono:
The experimental audio path now picks the samplerate and channel count depending on a setting. It can handle incoming streams with both the current (future legacy) and new samplerate & channel count. These are url-encoded into the livekit track name

Release Notes:

- N/A
2025-09-25 15:11:12 +02:00
Cole Miller
783ba389f7 Fix script/zed-local on Windows (#38832)
There's a mismatch between the URL used here and the one that's referred
to in `build_zed_cloud_url`, which prevents using the script on Windows.

A previous PR changed the script to use `127.0.0.1` instead of
`localhost` because of supposed URL parsing issues, but we were unable
to reproduce those.

Release Notes:

- N/A
2025-09-25 09:03:27 -04:00
Kirill Bulatov
e72021a26b Implement perceptual gamma / contrast correction for Linux font rendering (#38862)
Part of https://github.com/zed-industries/zed/issues/7992
Port of https://github.com/zed-industries/zed/pull/37167 to Linux

When using Blade rendering (Linux platforms and self-compiled builds
with the Blade renderer enabled), Zed reads `ZED_FONTS_GAMMA` and
`ZED_FONTS_GRAYSCALE_ENHANCED_CONTRAST` environment variables for the
values to use for font rendering.

`ZED_FONTS_GAMMA` corresponds to
[getgamma](https://learn.microsoft.com/en-us/windows/win32/api/dwrite/nf-dwrite-idwriterenderingparams-getgamma)
values.
Allowed range [1.0, 2.2], other values are clipped.
Default: 1.8

`ZED_FONTS_GRAYSCALE_ENHANCED_CONTRAST` corresponds to
[getgrayscaleenhancedcontrast](https://learn.microsoft.com/en-us/windows/win32/api/dwrite_1/nf-dwrite_1-idwriterenderingparams1-getgrayscaleenhancedcontrast)
values.
Allowed range: [0.0, ..), other values are clipped.
Default: 1.0

Screenshots (left is Nightly, right is the new code):

* Non-lodpi display

With the defaults:

<img width="2560" height="1600" alt="image"
src="https://github.com/user-attachments/assets/987168b4-3f5f-45a0-a740-9c0e49efbb9c"
/>


With `env ZED_FONTS_GRAYSCALE_ENHANCED_CONTRAST=7777`: 

<img width="2560" height="1600" alt="image"
src="https://github.com/user-attachments/assets/893bc2c7-9db4-4874-8ef6-3425d079db63"
/>


Lodpi, default settings:
<img width="3830" height="2160" alt="image"
src="https://github.com/user-attachments/assets/ec009e00-69b3-4c01-a18c-8286e2015e74"
/>

Lodpi, font size 7:
<img width="3830" height="2160" alt="image"
src="https://github.com/user-attachments/assets/f33e3df6-971b-4e18-b425-53d3404b19be"
/>


Release Notes:

- Implement perceptual gamma / contrast correction for Linux font
rendering

---------

Co-authored-by: localcc <work@localcc.cc>
2025-09-25 16:02:27 +03:00
Agus Zubiaga
f25ace6be0 zeta2 cli: Output raw request (#38876)
Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-09-25 12:59:17 +00:00
Umesh Yadav
c627543b46 assistant_context: Fix thread_summary_model not getting used in Text Threads (#38859)
Closes https://github.com/zed-industries/zed/issues/37472

Release Notes:

- Fixed an issue in Text Threads where it was using `default_model` even
in case `thread_summary_model` was set.

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-25 14:41:49 +02:00
Ben Brandt
f303a461c4 acp: Use ACP error types in read_text_file (#38863)
- Map path lookup and internal failures to acp::Error 
- Return INVALID_PARAMS for reads beyond EOF

Release Notes:

- acp: Return more informative error types from `read_text_file` to
agents
2025-09-25 11:53:36 +00:00
localcc
a9def8128f Adjust keymap to not conflict with the french keyboard layout (#38868)
Closes #38382 

Release Notes:

- N/A
2025-09-25 11:25:22 +00:00
Lukas Wirth
6580eac077 auto_update: Unmount update disk image in the background (#38867)
Release Notes:

- Fixed potentially temporarily hanging on macOS when updating the app
2025-09-25 11:13:40 +00:00
localcc
5c3c79d667 Fix file association icons on Windows (#38713)
This now uses the default zed icon for file associations as our own icon
svgs are black/white shapes which are not suitable to set as an icon in
a file explorer.

Closes #36286

Release Notes:

- N/A
2025-09-25 12:58:58 +02:00
Lukas Wirth
16fccb5c76 editor: Assert ordering in selections of resolve_selections (#38861)
Inspired by the recent anchor assertions, this asserts that the produced
selections are always ordered at various resolutions stages, this is an
invariant within `SelectionsCollection` but something breaks it
somewhere causing us to seek cursors backwards which panics.

Related to ZED-13X

Release Notes:

- N/A
2025-09-25 10:06:47 +00:00
Driftcell
a25504edaf file_finder: Leverage or-patterns and bindings to deduplicate prefix handling (#38860)
Just small code changes, to deduplicate prefix handling.

Release Notes:

- N/A
2025-09-25 10:01:28 +00:00
Ben Brandt
bc11844b2e acp: Fix read_text_file erroring on empty files (#38856)
The previous validation was too strict and didn't permit reading empty
files.

Addresses: https://github.com/google-gemini/gemini-cli/issues/9280

Release Notes:

- acp: Fix `read_text_file` returning errors for empty files
2025-09-25 09:15:50 +00:00
Martin Pool
10b99c6f55 RFC: Recommend and enable using Wild rather than Mold on Linux for local builds (#37717)
# Summary 

Today, Zed uses Mold on Linux, but Wild can be significantly faster. 

On my machine, Wild is 14% faster at a whole-tree clean build, 20%
faster on an incremental build with a minimal change, and makes no
measurable effect on runtime performance of tests.

However, Wild's page says it's not yet ready for production, so it seems
to early to switch for production and CI builds.

This PR keeps using Mold in CI and lets developers choose in their own
config what linker to use. (The downside of this is that after landing
this change, developers will have to do some local config or it will
fall back to the default linker which may be slower.)

[Wild 0.6 is out, and their announcement has some
benchmarks](https://davidlattimore.github.io/posts/2025/09/23/wild-update-0.6.0.html).

cc @davidlattimore from Wild, just fyi

# Tasks

- [x] Measure Wild build, incremental build, and runtime performance in
different scenarios
- [x] Remove the Linux linker config from `.cargo/config.toml` in the
tree
- [x] Test rope benchmarks etc
- [x] Set the linker to Mold in CI 
- [x] Add instructions to use Wild or Mold into `linux.md`
- [x] Add a script to download Wild
- [x] Measure binary size
- [x] Recommend Wild from `scripts/linux`

# Benchmarks 

| | wild 0.6 (rust 1.89) | mold 2.37.1 (1.89) | lld (rust 1.90) | wild
advantage |
| -- | -- | -- | -- | -- |
| clean workspace build | 176s | 184s | 182s | 5% faster than mold |
| nextest run workspace after build | 137s | 142s | 137s | in the noise?
|
| incremental rebuild | 3.9s | 5.0s | 6.6s | 22% faster than mold | 

I didn't observe any apparent significant change in runtime performance
or binary size, or in the in-tree microbenchmarks.

Release Notes:

- N/A

---------

Co-authored-by: Mateusz Mikuła <oss@mateuszmikula.dev>
2025-09-25 10:35:13 +02:00
Kirill Bulatov
17dea24533 Disable terminal breadcrumbs by default (#38806)
<img width="1211" height="238" alt="image"
src="https://github.com/user-attachments/assets/d847fabe-0e00-474c-ad79-cb4da221b319"
/>

At least on Windows, "git terminal" and PowerShell set the header, which
is not very useful but occupies space and sometimes confuses users:


![telegram-cloud-photo-size-2-5377720447174575846-x](https://github.com/user-attachments/assets/a889fa44-e879-4b3d-956b-0af959113e1e)

Release Notes:

- Disable terminal breadcrumbs by default. Set
`terminal.toolbar.breadcrumbs` to `true` to re-enable.

Co-authored-by: Finn Evers <finn@zed.dev>
2025-09-25 10:25:37 +02:00
Marshall Bowers
17e55daf6f Remove billing-v2 feature flag (#38843)
This PR removes the `billing-v2` feature flag, now that the new pricing
is launched.

Release Notes:

- N/A
2025-09-25 02:11:48 +00:00
Remy Suen
6b968e0118 Remove the duplicated Global LSP Settings section (#38811)
This section [shows up
twice](https://zed.dev/docs/configuring-zed#global-lsp-settings) in the
documentation.

<img width="701" height="1269" alt="image"
src="https://github.com/user-attachments/assets/4d930676-5cae-43c8-83d4-6406c27d149c"
/>

Release Notes:

- N/A

Signed-off-by: Remy Suen <remy.suen@docker.com>
2025-09-24 18:41:58 -06:00
Bartosz Kaszubowski
0f66310192 git_ui: Tweak appearance of repo and branch separator (#38447)
# Why

In Git Panel, it felt to me that repo and branch separator can be
slightly demphasized (since it is not-interactable) and separated a bit
more from the repo and branch popover triggers.

# How

Use `icon_muted` color for the separator (happy to know if this is an
abuse of the UI styleguide 😄), add one pixel horizontal spacing around
the `/` character.

Release Notes:

- Improved appearance of repo and branch separator in Git Commit Panel

# Test plan

I have tested the change locally and compared the UI before and after to
make sure it feels right.

### Before

<img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 46"
src="https://github.com/user-attachments/assets/7bfcd1a4-8d16-4e75-8660-9cbfa3952848"
/>

### After

<img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 12"
src="https://github.com/user-attachments/assets/100d3599-ecc6-473f-b270-a71005b41494"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-25 00:39:29 +00:00
warrenjokinen
26adc70ae6 docs: Update glossary (#38820)
Added blank line in front of 2 image tags so markdown renders correctly
in zed. (Previously, images were skipped. They are also skipped in zed
if there are leading spaces in front of img tag.)

Updated text in 3 alt tags.

Fixed 1 typo.

Release Notes:

- N/A
2025-09-24 20:27:17 -04:00
Danilo Leal
a5fb290252 docs: Add stray design tweaks (#38835)
Tiny little improvements opportunities I noticed today while browsing
the docs.

Release Notes:

- N/A
2025-09-25 00:10:42 +00:00
Michael Sloan
8fc7bd9ae8 zeta2: Add labeled sections prompt format (#38828)
Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
2025-09-25 00:07:43 +00:00
Smit Barmase
7167be5889 editor: Fix predict edit at cursor action when show_edit_predictions is false (#38821)
Closes #37601 

Regressed in https://github.com/zed-industries/zed/pull/36469. 

Edit: Original issue https://github.com/zed-industries/zed/issues/25744
is fixed for Zeta in this PR. For Copilot, it will be covered in a
follow-up. In the case of Copilot, even after discarding, we still get a
prediction on suggest, which is a bug.

Release Notes:

- Fixed issue where predict edit at cursor didn't work when
`show_edit_predictions` is `false`.
2025-09-25 05:28:32 +05:30
Cole Miller
d321cf93ba Fix semantic merge conflict from RelPath refactor (#38829)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-09-24 23:27:11 +00:00
Conrad Irwin
ce7b02e3a1 Whitespace map more (#38827)
Release Notes:

- N/A
2025-09-24 23:11:40 +00:00
Max Brunsfeld
03f9cf4414 Represent relative paths using a dedicated, separator-agnostic type (#38744)
Closes https://github.com/zed-industries/zed/issues/38690
Closes #37353

### Background

On Windows, paths are normally separated by `\`, unlike mac and linux
where they are separated by `/`. When editing code in a project that
uses a different path style than your local system (e.g. remoting from
Windows to Linux, using WSL, and collaboration between windows and unix
users), the correct separator for a path may differ from the "native"
separator.

Previously, to work around this, Zed converted paths' separators in
numerous places. This was applied to both absolute and relative paths,
leading to incorrect conversions in some cases.

### Solution

Many code paths in Zed use paths that are *relative* to either a
worktree root or a git repository. This PR introduces a dedicated type
for these paths called `RelPath`, which stores the path in the same way
regardless of host platform, and offers `Path`-like manipulation APIs.
RelPath supports *displaying* the path using either separator, so that
we can display paths in a style that is determined at runtime based on
the current project.

The representation of absolute paths is left untouched, for now.
Absolute paths are different from relative paths because (except in
contexts where we know that the path refers to the local filesystem)
they should generally be treated as opaque strings. Currently we use a
mix of types for these paths (std::path::Path, String, SanitizedPath).

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Peter Tripp <petertripp@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-09-24 18:57:33 -04:00
Conrad Irwin
3c626f3758 Only allow single chars for whitespace map (#38825)
Release Notes:

- Only allow single characters in the whitespace map
2025-09-24 16:18:00 -06:00
Joseph T. Lyons
4a1bab52f3 Update release process docs to include storing feature media (#38824)
Release Notes:

- N/A
2025-09-24 21:52:02 +00:00
Conrad Irwin
91b0f42382 Fix panic when hovering string ending with unicode (#38818)
Release Notes:

- Fixed a panic when hovering a string literal ending with an emoji
2025-09-24 15:33:31 -06:00
Ben Kunkle
523c042930 settings_ui: Collect all settings files (#38816)
Closes #ISSUE

Updates the settings editor to collect all known settings files from the
settings store, in order to show them in the UI. Additionally adds a
fake worktree instantiation in the settings UI example binary in order
to have more than one file available when testing.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 21:16:06 +00:00
Victor Tran
ed7bd5a8ed gpui: Flash menu in menubar on macOS when action is triggered (#38588)
On macOS, traditionally when a keyboard shortcut is activated, the menu
in the menu bar flashes to indicate that the action was recognised.

<img width="289" height="172" alt="image"
src="https://github.com/user-attachments/assets/a03ecd2f-f159-4f82-b4fd-227f34393703"
/>

This PR adds this functionality to GPUI, where when a keybind is pressed
that triggers an action in the menu, the menu flashes.

Release Notes:

- N/A
2025-09-24 12:09:03 -07:00
Lukas Wirth
8ebe4fa149 gpui_macros: Hide inner test function from project symbols (#38809)
This makes rust-analyzer not consider the function for project symbols,
meaning searching for tests wont show two entries.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 18:07:34 +00:00
Bennet Bo Fenner
6b646e3a14 zeta2: Support edit prediction: clear history (#38808)
Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-09-24 17:44:03 +00:00
Ben Kunkle
e653cc90c5 Clean up last remnants of Settings UI v1 (#38803)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 17:02:32 +00:00
Danilo Leal
0794de71e3 docs: Update note about agent message editor setting (#38805)
As of stable 206.0, the `agent.message_editor_min_lines` setting is
fully available, so removing the docs note that said it was only for
Preview.

Release Notes:

- N/A
2025-09-24 13:57:30 -03:00
Anthony Eid
2b283e7c53 Revert "Fix UTF-8 character boundary panic in DirectWrite text ... (#37767)" (#38800)
This reverts commit 9e7302520e.

I run into an infinite hang in Zed nightly and used instruments and
activity monitor to sample what was going on. The root cause seemed to
be the unwrap_unchecked introduced in reverted PR.

Release Notes:

- N/A
2025-09-24 16:44:39 +00:00
Joseph T. Lyons
45a4277026 Add community champion auto labeler (#38802)
Release Notes:

- N/A
2025-09-24 16:42:01 +00:00
Kirill Bulatov
fa76b6ce06 Switch to "standard" as a default line height in the terminal (#38798)
Closes https://github.com/zed-industries/zed/issues/38686

Release Notes:

- Switched to "standard" as a default line height in the terminal
2025-09-24 16:36:35 +00:00
morgankrey
a13e3a8af3 Docs updates September (#38796)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-09-24 11:10:58 -05:00
Nia
39370bceb2 perf: Bugfixes (#38725)
Release Notes:

- N/A
2025-09-24 16:03:08 +00:00
Mikayla Maki
53885c00d3 Start up settings UI 2 (#38673)
Release Notes:

- N/A

---------

Co-authored-by: Anthony <hello@anthonyeid.me>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-09-24 15:45:14 +00:00
Danilo Leal
6f3e66d027 Adjust stash picker design (#38789)
Just making it more consistent with other pickers—button actions
justified to the right and timestamp directly in the list item to avoid
as much as possible relevant information tucked away in a tooltip where
using the keyboard will mostly be the main mean of interaction.

<img width="500" height="310" alt="Screenshot 2025-09-24 at 10  41@2x"
src="https://github.com/user-attachments/assets/0bd478da-d1a6-48fe-ade7-a4759d175c60"
/>


Release Notes:

- N/A
2025-09-24 13:59:42 +00:00
Agus Zubiaga
b3f9be6e9c zeta2: Split up crate into modules (#38788)
Split up provider, prediction, and global into modules.

Release Notes:

- N/A
2025-09-24 13:40:29 +00:00
Agus Zubiaga
4353b61155 zeta2: Compute smaller edits (#38786)
The new cloud endpoint returns structured edits, but they may include
more of the input excerpt than what we want to display in the preview,
so we compute a smaller diff on the client side against the snapshot.

Release Notes:

- N/A
2025-09-24 13:10:52 +00:00
Lukas Wirth
e1b57f00a0 sum_tree: Reduce Cursor size for contextless summary types (#38776)
This reduces the size of cursor by a usize when the summary does not
require a context making Cursor usages and constructions slightly more
efficient.

This change is a bit annoying though, as Rust has no means of
specializing, so this uses a `ContextlessSummary` trait with a blanket
impl while turning the `Context` into a GAT `Context<'a>`. This means
`Summary` implies are a bit more verbose now while contextless ones are
slimmer. It does come with the downside that the lifetime in the GAT is
always considered invariant, so some lifetime splitting occurred due to
that.


 ```
push/4096               time:   [352.65 µs 360.87 µs 367.80 µs]
                        thrpt:  [10.621 MiB/s 10.825 MiB/s 11.077 MiB/s]
                 change:
time: [-2.6633% -1.3640% -0.0561%] (p = 0.05 < 0.05)
                        thrpt:  [+0.0561% +1.3828% +2.7361%]
                        Change within noise threshold.
Found 16 outliers among 100 measurements (16.00%)
  7 (7.00%) low severe
  3 (3.00%) low mild
  2 (2.00%) high mild
  4 (4.00%) high severe
push/65536              time:   [1.2917 ms 1.2949 ms 1.2979 ms]
                        thrpt:  [48.156 MiB/s 48.267 MiB/s 48.387 MiB/s]
                 change:
time: [+1.4428% +1.9844% +2.5299%] (p = 0.00 < 0.05)
                        thrpt:  [-2.4675% -1.9458% -1.4223%]
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) low severe
  1 (1.00%) low mild
  1 (1.00%) high severe

append/4096             time:   [677.87 ns 678.87 ns 679.83 ns]
                        thrpt:  [5.6112 GiB/s 5.6192 GiB/s 5.6274 GiB/s]
                 change:
time: [-0.8924% -0.5017% -0.1705%] (p = 0.00 < 0.05)
                        thrpt:  [+0.1708% +0.5043% +0.9004%]
                        Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) low mild
  1 (1.00%) high mild
append/65536            time:   [9.3275 µs 9.3406 µs 9.3536 µs]
                        thrpt:  [6.5253 GiB/s 6.5344 GiB/s 6.5435 GiB/s]
                 change:
time: [+0.5409% +0.7215% +0.9054%] (p = 0.00 < 0.05)
                        thrpt:  [-0.8973% -0.7163% -0.5380%]
                        Change within noise threshold.

slice/4096              time:   [27.673 µs 27.791 µs 27.907 µs]
                        thrpt:  [139.97 MiB/s 140.56 MiB/s 141.16 MiB/s]
                 change:
time: [-1.1065% -0.6725% -0.2429%] (p = 0.00 < 0.05)
                        thrpt:  [+0.2435% +0.6770% +1.1189%]
                        Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) low mild
  1 (1.00%) high mild
slice/65536             time:   [507.55 µs 517.40 µs 535.60 µs]
                        thrpt:  [116.69 MiB/s 120.80 MiB/s 123.14 MiB/s]
                 change:
time: [-1.3489% +0.0599% +2.2591%] (p = 0.96 > 0.05)
                        thrpt:  [-2.2092% -0.0598% +1.3674%]
                        No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
  5 (5.00%) low mild
  2 (2.00%) high mild
  1 (1.00%) high severe

bytes_in_range/4096     time:   [3.3917 µs 3.4108 µs 3.4313 µs]
                        thrpt:  [1.1117 GiB/s 1.1184 GiB/s 1.1247 GiB/s]
                 change:
time: [-5.3466% -4.7193% -4.1262%] (p = 0.00 < 0.05)
                        thrpt:  [+4.3038% +4.9531% +5.6487%]
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) low mild
  5 (5.00%) high mild
bytes_in_range/65536    time:   [88.175 µs 88.613 µs 89.111 µs]
                        thrpt:  [701.37 MiB/s 705.31 MiB/s 708.82 MiB/s]
                 change:
time: [-0.6935% +0.3769% +1.4655%] (p = 0.50 > 0.05)
                        thrpt:  [-1.4443% -0.3755% +0.6984%]
                        No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

chars/4096              time:   [678.70 ns 680.38 ns 682.08 ns]
                        thrpt:  [5.5927 GiB/s 5.6067 GiB/s 5.6206 GiB/s]
                 change:
time: [-0.6969% -0.2755% +0.1485%] (p = 0.20 > 0.05)
                        thrpt:  [-0.1483% +0.2763% +0.7018%]
                        No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) low mild
  4 (4.00%) high mild
chars/65536             time:   [12.720 µs 12.775 µs 12.830 µs]
                        thrpt:  [4.7573 GiB/s 4.7778 GiB/s 4.7983 GiB/s]
                 change:
time: [-0.6172% -0.1110% +0.4179%] (p = 0.68 > 0.05)
                        thrpt:  [-0.4162% +0.1112% +0.6211%]
                        No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) low mild
  1 (1.00%) high mild

clip_point/4096         time:   [33.240 µs 33.310 µs 33.394 µs]
                        thrpt:  [116.98 MiB/s 117.27 MiB/s 117.52 MiB/s]
                 change:
time: [-2.8892% -2.6305% -2.3438%] (p = 0.00 < 0.05)
                        thrpt:  [+2.4000% +2.7015% +2.9751%]
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  7 (7.00%) high severe
clip_point/65536        time:   [1.6531 ms 1.6586 ms 1.6640 ms]
                        thrpt:  [37.560 MiB/s 37.683 MiB/s 37.808 MiB/s]
                 change:
time: [-6.6381% -5.9395% -5.2680%] (p = 0.00 < 0.05)
                        thrpt:  [+5.5610% +6.3146% +7.1100%]
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
  4 (4.00%) high severe

point_to_offset/4096    time:   [11.586 µs 11.603 µs 11.621 µs]
                        thrpt:  [336.15 MiB/s 336.67 MiB/s 337.16 MiB/s]
                 change:
time: [-14.289% -14.111% -13.939%] (p = 0.00 < 0.05)
                        thrpt:  [+16.197% +16.429% +16.672%]
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  3 (3.00%) low severe
  5 (5.00%) low mild
  4 (4.00%) high mild
point_to_offset/65536   time:   [527.74 µs 532.08 µs 536.51 µs]
                        thrpt:  [116.49 MiB/s 117.46 MiB/s 118.43 MiB/s]
                 change:
time: [-6.7825% -4.6235% -2.3533%] (p = 0.00 < 0.05)
                        thrpt:  [+2.4100% +4.8477% +7.2760%]
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  4 (4.00%) high mild
  4 (4.00%) high severe

cursor/4096             time:   [16.154 µs 16.192 µs 16.232 µs]
                        thrpt:  [240.66 MiB/s 241.24 MiB/s 241.81 MiB/s]
                 change:
time: [-3.2536% -2.9145% -2.5526%] (p = 0.00 < 0.05)
                        thrpt:  [+2.6194% +3.0019% +3.3630%]
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
  2 (2.00%) high severe
cursor/65536            time:   [509.60 µs 511.24 µs 512.93 µs]
                        thrpt:  [121.85 MiB/s 122.25 MiB/s 122.65 MiB/s]
                 change:
time: [-7.3677% -6.6017% -5.7840%] (p = 0.00 < 0.05)
                        thrpt:  [+6.1391% +7.0683% +7.9537%]
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe
```
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 14:35:38 +02:00
Oleksiy Syvokon
c5219e8fd2 agent: Clean up git exclusions after emergency (#38775)
In some rare cases, the auto-generated block gets stuck in
`.git/info/exclude`. We now auto-clean it.

Closes #38374

Release Notes:

- Remove auto-generated block from git excludes if it gets stuck there.
2025-09-24 10:58:39 +00:00
Piotr Osiewicz
5612a961b0 windows: Do not attempt to encrypt empty encrypted strings (#38774)
Related to #38427

Release Notes:

* N/A
2025-09-24 10:27:45 +00:00
Lukas Wirth
c53e5ba397 editor: Fix invalid anchors in hover_links::surrounding_filename (#38766)
Fixes ZED-1K3

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 08:30:11 +00:00
tidely
d5a99d079e ollama: Remove dead code (#38550)
The `Duration` argument in `get_models` has been unused for over a year.

The `complete` function is also unused and it has fallen behind in new
feature additions such as Authorization support. This used to exist
because ollama didn't support tools in streaming mode, `with_tools` also
existed because of that. Now however there is no reason to keep this
around.

`ChatResponseDelta ` had unnecessary `#[allow(unused)]` macros since the
fields are marked `pub`. Using `#[expect(unused)]` would've caught this.

Release Notes:

- N/A
2025-09-24 02:19:52 -06:00
Lukas Wirth
9418a2f4bc editor: Prevent panics in BlockChunks if the block spans more than 128 lines (#38763)
Not an ideal fix, but a proper one will require restructuring the
iterator state (which would be easier if Rust had first class
generators)
Fixes ZED-1MB

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-24 08:10:56 +00:00
Santiago Bernhardt
880fff471c ollama: Add support for qwen3-coder (#38608)
Release Notes:

- N/A
2025-09-24 02:09:40 -06:00
Michael Sloan
5f6ae2361f Delete unused types for Mistral non-streaming requests (#38758)
Confusing to have these interspersed with the streaming request types

Release Notes:

- N/A
2025-09-24 04:31:06 +00:00
Conrad Irwin
5d89b2ea26 Revert "Add setting to show/hide title bar (#37428)" (#38756)
Closes https://github.com/zed-industries/zed/issues/38547

Release Notes:

- Reverted the ability to show/hide the titlebar. This caused rendering
bugs on
macOS, and we're preparing for the redesign which requires the toolbar
being present.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-09-24 07:15:30 +03:00
Smit Barmase
0f7dbf57f5 editor: Fix APCA contrast split text runs offset (#38751)
Closes #38576

In case of inline element rendering, we can have multiple text runs on
the same display row. There was a bug in
https://github.com/zed-industries/zed/pull/37165 which doesn't consider
this multiple text runs case. This PR fixes that and adds a test for it.

Before:

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/3bdf5f14-988b-45dc-bc8e-c5d61ab35a93"
/>

After:

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/0e1a45ff-c521-4994-b259-3a054d89c4df"
/>

Release Notes:

- Fixed an issue where text could be incorrectly highlighted during
search when a line contained an inline color preview.
2025-09-24 04:34:35 +05:30
Danilo Leal
b60f19f71e agent: Allow to see the whole command before running it (#38747)
Closes https://github.com/zed-industries/zed/issues/38528

In the agent panel's `thread_view.rs` file, we have a `render_tool_call`
function that controls what we show in the UI for most types of tools.
However, for some of them—for example, terminal/execute and edit
tools—we have a special rendering so we can tailor the UI for their
specific needs. But... before the specific rendering function is called,
all tools still go through the `render_tool_call`.

Problem is that, in the case of the terminal tool, you couldn't see the
full command the agent wants to run when the tool is still in its
`render_tool_call` state. That's mostly because of the treatment we give
to labels while in that state. A particularly bad scenario because
well... seeing the _full_ command _before_ you choose to accept or
reject is rather important.

This PR fixes that by essentially special-casing the terminal tool
display when in the `render_tool_call` rendering state, so to speak.
There's still a slight UI misalignment I want to fix but it shouldn't
block this fix to go out.

Here's our final result:

<img width="400" height="1172" alt="Screenshot 2025-09-23 at 6  19@2x"
src="https://github.com/user-attachments/assets/71c79e45-ab66-4102-b046-950f137fa3ea"
/>

Release Notes:

- agent: Fixed terminal command not being fully displayed while in the
"waiting for confirmation" state.
2025-09-23 18:57:28 -03:00
Jonathan Hart
0a261ad8d0 Implement regex_select action for Helix (#38736)
Closes #31561

Release Notes:

- Implemented the select_regex Helix keymap

Prior: The keymap `s` defaulted to `vim::Substitute`

After:
<img width="1387" height="376" alt="image"
src="https://github.com/user-attachments/assets/4d3181d9-9d3f-40d2-890f-022655c77577"
/>

Thank you to @ConradIrwin for pairing to work on this
2025-09-23 15:44:40 -06:00
Marshall Bowers
28ed08340c Remove experimental jj UI, for now (#38743)
This PR removes the experimental jj bookmark picker that was added in
#30883.

This was just an exploratory prototype and while I would like to have
native jj UI at some point, I don't know when we'll get back to it.

Release Notes:

- N/A
2025-09-23 21:40:22 +00:00
Michael Sloan
74fe3b17f7 Delete edit_prediction_tools.rs (was moved to zeta2_tools.rs) (#38745)
Move happened in #38718

Release Notes:

- N/A
2025-09-23 21:18:04 +00:00
Kirill Bulatov
9112554262 Clear buffer colors on empty LSP response (#38742)
Follow-up of https://github.com/zed-industries/zed/pull/32816
Closes https://github.com/zed-industries/zed/issues/38602


https://github.com/user-attachments/assets/26058c91-4ffd-4c6f-a41d-17da0c3d7220

Release Notes:

- Fixed buffer colors not cleared on empty LSP responses
2025-09-24 00:00:55 +03:00
Joseph T. Lyons
3b79490e8f Bump Zed to v0.207 (#38741)
Release Notes:

- N/A
2025-09-23 20:49:51 +00:00
Chris Ewald
52c467ea3a Document task filtering based on variables (#38642)
Closes: https://github.com/zed-industries/zed/issues/38525
Documentation follow up for #38614

Task filtering behavior is currently undocumented.

Release Notes:

- N/A

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2025-09-23 23:26:33 +03:00
Agus Zubiaga
831de8e48f zeta2: Include edits in prompt and add max_prompt_bytes param (#38737)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-09-23 19:50:07 +00:00
ImFeH2
bc528411df Preserve trailing newline in TerminalOutput::full_text (#38061)
Closes #30678

This is caused by `TerminalOutput::full_text` triming trailing newline
when creating the "REPL Output" buffer.

Release Notes:

- fix: Preserve trailing newline in `TerminalOutput::full_text`
2025-09-23 12:11:35 -07:00
Michael Sloan
9ac511e47c zeta2: Collect nearby diagnostics (#38732)
Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2025-09-23 12:32:17 -06:00
Peter Tripp
afaed3af62 Windows: Fix keybinds for onboarding dialog (#38730)
Closes: https://github.com/zed-industries/zed/issues/38482

- Previously fixed by: https://github.com/zed-industries/zed/pull/36712
- Regressed in: https://github.com/zed-industries/zed/pull/36572

Release Notes:

- N/A
2025-09-23 17:47:32 +00:00
Marshall Bowers
f78699eb71 Update plan text (#38731)
Release Notes:

- N/A

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-09-23 17:44:43 +00:00
Umesh Yadav
3646aa6bba language_models: Actually override Ollama model from settings (#38628)
The current problem is that if I specify model parameters, like
`max_tokens`, in `settings.json` for an Ollama model, they do not
override the values coming from the Ollama API. Instead, the parameters
from the API are used. For example, in the settings below, even though I
have overridden `max_tokens`, Zed will still use the API's default
`context_length` of 4k.

```
  "language_models": {
    "ollama": {
      "available_models": [
        {
          "name": "qwen3-coder:latest",
          "display_name": "Qwen 3 Coder",
          "max_tokens": 64000,
          "supports_tools": true,
          "keep_alive": "15m",
          "supports_thinking": false,
          "supports_images": false
        }
      ]
    }
  },
```

Release Notes:

- Fixed an issue where Ollama model parameters were not being correctly
overridden by user settings.
2025-09-23 13:16:52 -04:00
Piotr Osiewicz
dc20a41e0d windows: Encrypt SSH passwords stored in memory (#38427)
Release Notes:

- N/A

---------

Co-authored-by: Julia <julia@zed.dev>
2025-09-23 18:58:46 +02:00
Kirill Bulatov
6a24ad7d39 Fix the markdown table (#38729)
Closes https://github.com/zed-industries/zed/issues/38597

Release Notes:

- N/A
2025-09-23 16:49:45 +00:00
Bennet Bo Fenner
8fefd793f0 zeta2: Include edit events in cloud request (#38724)
Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-09-23 18:45:37 +02:00
Danilo Leal
f6e2a2a808 docs: Tweak the toolchains page (#38728)
Mostly just breaking a massive wall of text in small paragraphs for ease
of reading/parsing.

Release Notes:

- N/A
2025-09-23 13:31:56 -03:00
Danilo Leal
3cf6fa8f61 agent: Make the panel's textarea font size be controlled by buffer_font_size (#38726)
Closes https://github.com/zed-industries/zed/issues/37882

Previously, every piece of text in the agent panel was controlled by
`agent_font_size`. Although it is nice to only have one setting to tweak
that, it could be a bit misleading particularly because we use
monospaced and sans-serif fonts for different elements in the panel. Any
editor/textarea in the panel, whehter it is the main message editor or
the previous message editor, uses the buffer font. Therefore, I think it
is reasonable to expect that tweaking `buffer_font_size` would also
change the agent panel's usage of buffer fonts.

With this change, regular buffers and the agent panel's message editor
will always have the same size.

Release Notes:

- agent: Made the agent panel's textarea font size follow the font size
of regular buffers. They're now both controlled by the
`buffer_font_size` setting.
2025-09-23 13:26:45 -03:00
Dino
2759f541da vim: Fix cursor position being set to end of line in normal mode (#38161)
Address an issue where, in Vim mode, clicking past the end of a line
after selecting the entire line would place the cursor on the newline
character instead of the last character of the line, which is
inconsistent with Vim's normal mode expectations.

I believe the root cause was that the cursor’s position was updated to
the end of the line before the mode switch from Visual to Normal, at
which point `DisplayMap.clip_at_line_ends` was still set to `false`. As
a result, the cursor could end up in an invalid position for Normal
mode. The fix ensures that when switching between these two modes, and
if the selection is empty, the selection point is properly clipped,
preventing the cursor from being placed past the end of the line.

Related #38049 

Release Notes:

- Fixed issue in Vim mode where switching from any mode to normal mode
could end up with the cursor in the newline character

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-23 09:39:12 -06:00
Agus Zubiaga
809d3bfe00 acp: Include only path to @mentioned directory in user message (#37942)
Nowadays, people don't expect @-mentioning a directory to include the
contents of all files within it. Doing so makes it very likely to
consume an undesirable amount of tokens.

By default, we'll now only include the path of the directory and let the
model decide how much to read via tools. We'll still include the
contents if no tools are available (e.g. "Minimal" profile is selected).

Release Notes:

- Agent Panel: Do not include the content of @-mentioned directories
when tools are available
2025-09-23 12:33:31 -03:00
Agus Zubiaga
0aad47493e zeta2: Use global zeta in Inspector (#38718)
The edit prediction debug tools has been renamed to zeta2 inspector
because it's now zeta specific. It will now always display the last
prediction request context, prompt, and model response.

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-09-23 12:32:36 -03:00
Alvaro Parker
271d67f7ad git: Fix git amend on panel (#38681)
Closes #38651 

`git_panel.set_amend_pending(false, cx);` was being called before
`git_panel.commit_changes(...)` which was causing the commit buffer to
be cleared/reset before actually sending the commit request to git.

Introduced by #35268 which added clear buffer functionality to the
`set_amend_pending` function.

Release Notes:

- Fix git amend on panel sending "Update ..." instead of the original
commit message
- FIx git amend button not working
2025-09-23 09:20:49 -06:00
localcc
2e87387e53 Change emulated GPU message on Windows (#38710)
Release Notes:

- N/A
2025-09-23 15:57:26 +02:00
Lex Berezhny
15e75bdf04 Add show_summary & show_command to the initial_tasks.json (#38660)
Release Notes:

- Added "show_summary" & "show_command" settings to the initial
tasks.json file.


This makes the initial task template match the docs here:
https://zed.dev/docs/tasks
2025-09-23 12:32:14 +00:00
Ben Brandt
3ac14e15bb agent: Fix Gemini refusing all requests with file-based tool calls (#38705)
Solves an issue where Google APIs refuse all requests with file-based
tool calls attached.
This seems to get triggered in the case where:

- copy_path + another file-based tool call is enabled
- default terminal is `/bin/bash` or something similar

It is unclear why this is happening, but removing the terminal commands
in those tool calls seems to have solved the issue.

Closes #37180 and #37414

Release Notes:

- agent: Fix Gemini refusing requests with certain profiles/systems.
2025-09-23 12:14:03 +00:00
邻二氮杂菲
9e7302520e Fix UTF-8 character boundary panic in DirectWrite text layout (#37767)
## Problem

Zed was crashing with a UTF-8 character boundary error when rendering
text containing multi-byte characters (like emojis or CJK characters):

```
Thread "main" panicked with "byte index 49 is not a char boundary; it is inside '…' (bytes 48..51)"
```

## Root Cause Analysis

The PR reviewer correctly identified that the issue was not in the
DirectWrite boundary handling, but rather in the text run length
calculation in the text system. When text runs are split across lines in
`text_system.rs:426`, the calculation:

```rust
let run_len_within_line = cmp::min(line_end, run_start + run.len) - run_start;
```

This could result in `run_len_within_line` values that don't respect
UTF-8 character boundaries, especially when multi-byte characters (like
'…' which is 3 bytes) get split across lines. The resulting `FontRun`
objects would have lengths that don't align with character boundaries,
causing the panic when DirectWrite tries to slice the string.

## Solution

Fixed the issue by adding UTF-8 character boundary validation in the
text system where run lengths are calculated. The fix ensures that when
text runs are split across lines, the split always occurs at valid UTF-8
character boundaries:

```rust
// Ensure the run length respects UTF-8 character boundaries
if run_len_within_line > 0 {
    let text_slice = &line_text[run_start - line_start..];
    if run_len_within_line < text_slice.len() && !text_slice.is_char_boundary(run_len_within_line) {
        // Find the previous character boundary using efficient bit-level checking
        // UTF-8 characters are at most 4 bytes, so we only need to check up to 3 bytes back
        let lower_bound = run_len_within_line.saturating_sub(3);
        let search_range = &text_slice.as_bytes()[lower_bound..=run_len_within_line];
        
        // SAFETY: A valid character boundary must exist in this range because:
        // 1. run_len_within_line is a valid position in the string slice
        // 2. UTF-8 characters are at most 4 bytes, so some boundary exists in [run_len_within_line-3..=run_len_within_line]
        let pos_from_lower = unsafe {
            search_range
                .iter()
                .rposition(|&b| (b as i8) >= -0x40)
                .unwrap_unchecked()
        };
        
        run_len_within_line = lower_bound + pos_from_lower;
    }
}
```

## Testing

-  Builds successfully on all platforms
-  Eliminates UTF-8 character boundary panics
-  Maintains existing functionality for all text types
-  Handles edge cases like very long multi-byte characters

## Benefits

1. **Root cause fix**: Addresses the issue at the source rather than
treating symptoms
2. **Performance optimal**: Uses the same efficient algorithm as the
standard library
3. **Minimal changes**: Only modifies the specific problematic code path
4. **Future compatible**: Can be easily replaced with
`str::floor_char_boundary()` when stabilized

## Alternative Approaches Considered

1. **DirectWrite boundary fixing**: Initially tried to fix in
DirectWrite, but this was treating symptoms rather than the root cause
2. **Helper function approach**: Considered extracting to a helper
function, but inlined implementation is more appropriate for this
specific use case
3. **Standard library methods**: `floor_char_boundary()` is not yet
stable, so implemented equivalent logic

The chosen approach provides the best balance of performance, safety,
and code maintainability.
---
Release Notes:

- N/A
2025-09-23 14:03:29 +02:00
Lukas Wirth
1bf8332333 editor: Deduplicate locations in navigate_to_hover_links (#38707)
Closes
https://github.com/zed-industries/zed/issues/6730#issuecomment-3320933701

That way if multiple servers are running while reporting the same
results we prevent opening multi buffers for single entries.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-23 11:39:48 +00:00
Kirill Bulatov
d8048f46ee Test task shell commands (#38706)
Add tests on task commands, to ensure things like
https://github.com/zed-industries/zed/issues/38343 do not come so easily
unnoticed and to provide a base to create more tests in the future, if
needed.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-23 11:12:39 +00:00
Kaikai
edb804de5a go: Stop running ghost tests, fix broken go test -run for suites (#38167)
Closed #33759
Closed #38166

### Summary

This PR fixes the way `go test` commands are generated for **testify
suite test methods**.
Previously, only the method name was included in the `-run` flag, which
caused Go’s test runner to fail to find suite test cases.

---

### Problem


https://github.com/user-attachments/assets/e6f80a77-bcf3-457c-8bfb-a7286d44ff71

1. **Incorrect command** was generated for suite tests:

   ```bash
   go test -run TestSomething_Success
   ```

   This results in:

   ```
   testing: warning: no tests to run
   ```

2. The correct format requires the **suite name + method name**:

   ```bash
   go test -run ^TestFooSuite$/TestSomething_Success$
   ```

Without the suite prefix (`TestFooSuite`), Go cannot locate test methods
defined on a suite struct.

---

### Changes Made

* **Updated `runnables.scm`**:

  * Added a new query rule for suite methods (`.*Suite` receiver types).
* Ensures only methods on suite structs (e.g., `FooSuite`) are matched.
  * Tagged these with `go-testify-suite` in addition to `go-test`.

* **Extended task template generation**:

  * Introduced `GO_SUITE_NAME_TASK_VARIABLE` to capture the suite name.
  * Create a `TaskTemplate` for the testify suite.

* **Improved labeling**:

* Labels now show the full path (`go test ./pkg -v -run
TestFooSuite/TestSomething_Success`) for clarity.

* **Added a test** `test_testify_suite_detection`:

* Covered testify suite cases to ensure correct detection and command
generation.

---

### Impact


https://github.com/user-attachments/assets/ef509183-534a-4aa4-9dc7-01402ac32260

* **Before**: Running a suite test method produced “no tests to run.”
* **After**: Suite test methods are runnable individually with the
correct `-run` command, and full suites can still be executed as before.

### Release Notes

* Fixed generation of `go test` commands for **testify suite test
methods**.
Suite methods now include both the suite name and the method name in the
`-run` flag (e.g., `^TestFooSuite$/TestSomething_Success$`), ensuring
they are properly detected and runnable individually.
2025-09-23 12:47:18 +02:00
tidely
691bfe71db search: Remove noisy buffer search logs (#38679)
Buffer search initiates a new search every time a key is pressed in the
buffer search bar. This would cancel the task associated with any
pending searches. Whenever one of these searches was canceled Zed would
log `[search]: oneshot canceled`. This log would trigger almost on every
keypress when typing moderately fast. This PR silences these logs by not
treating canceled searches as errors.

Release Notes:

- N/A
2025-09-23 11:59:37 +02:00
张小白
1d5da68560 windows: Show alt-= for pane::GoForward (#38696)
Reorder the shortcuts for `pane::GoForward` so the menu now shows
`Alt-=` instead of `forward`

Release Notes:

- N/A
2025-09-23 08:13:29 +00:00
Jakub Konka
f07bc12aed helix: Further cleanups to helix paste in line mode (#38694)
I noticed that after we paste in line mode, the cursor position is
positioned at the beginning of the next logical line which is somewhat
undesirable since then inserting/appending will position the cursor
after the selection. This does not match helix behaviour which we should
further investigate.

Follow-up to https://github.com/zed-industries/zed/pull/38663

Release Notes:

- N/A
2025-09-23 07:44:50 +00:00
Michael Sloan
4532765ae8 zeta2: Add prompt planner and provide access via zeta_cli (#38691)
Release Notes:

- N/A
2025-09-23 06:20:26 +00:00
Conrad Irwin
25a1827456 Ensure we have the targets needed for bundling (#38688)
Closes #ISSUE

Release Notes:

- N/A
2025-09-23 03:51:03 +00:00
Conrad Irwin
98865a3ff2 Fix invalid anchors in breadcrumbs (#38687)
Release Notes:

- (nightly only) Fix panic when your cursor abuts a multibyte character
2025-09-23 02:38:12 +00:00
Michael Sloan
681a4adc42 Remove OutlineItem::signature_range as it is no longer used (#38680)
Use in edit predictions was removed in #38676

Release Notes:

- N/A
2025-09-22 22:57:41 +00:00
Julia Ryan
5e502a32fb Fix remote server crash with JSON files (#38678)
Closes #38594

Release Notes:

- N/A
2025-09-22 22:30:27 +00:00
Conrad Irwin
e9fbcf5abf Allow zed filename.rs: (#38677)
iTerm's editor configuration dialog allows you to set your editor to
`zed \1:\2`, but not (as far as I know) to leave off the : when there's
no line number

This fixes clicking on bare filenames in iTerm for me.

Release Notes:

- Fixed line number parsing so that `zed filename.rs:` will now act as
though you did `zed filename.rs`
2025-09-22 22:26:47 +00:00
Agus Zubiaga
c9e3b32366 zeta2: Provider setup (#38676)
Creates a new `EditPredictionProvider` for zeta2, that requests
completions from a new cloud endpoint including context from the new
`edit_prediction_context` crate. This is not ready for use, but it
allows us to iterate.

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-09-22 22:18:38 +00:00
Jens Kouros
e9abd5b28b docs: Mention required matching configs when developing language server extensions (#38674)
This took me quite a while to find out when I developed my first
language extension. I had non-matching entries in the `languages` array
and in the name field of `config.toml`, and it was especially tricky
because the zed extension would start up, but not the language server. I
sure which this had been in the docs, so I am contributing it now!
2025-09-22 21:40:50 +00:00
Piotr Osiewicz
a90abb1009 Bump Rust to 1.90 (#38436)
Release Notes:

- N/A

---------

Co-authored-by: Nia Espera <nia@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-09-22 14:36:10 -07:00
Jakub Konka
46d19d8a47 helix: Fix helix-paste mode in line mode (#38663)
In particular,
* if the selection ends at the beginning of the next line, and the
current line under the cursor is empty, we paste at the selection's end.
* if however the current line under the cursor is empty, we need to move
to the beginning of the next line to avoid pasting above the end of
current selection

In addition, in line mode, we always move the cursor to the end of the
inserted text. Otherwise, while it looks fine visually,
inserting/appending ends up in the next logical line which is not
desirable.

Release Notes:

- N/A
2025-09-22 23:03:37 +02:00
Marshall Bowers
e484f49ee8 language_models: Treat a block_reason from Gemini as a refusal (#38670)
This PR updates the Gemini provider to treat a
`prompt_feedback.block_reason` as a refusal, as Gemini does not seem to
return a `stop_reason` to use in this case.

<img width="639" height="162" alt="Screenshot 2025-09-22 at 4 23 15 PM"
src="https://github.com/user-attachments/assets/7a86d67e-06c1-49ea-b58f-fa80666f0f8c"
/>

Previously this would just result in no feedback to the user.

Release Notes:

- Added an error message when a Gemini response contains a
`block_reason`.
2025-09-22 20:40:56 +00:00
Nia
80dcabe95c perf: Better docs, internal refactors (#38664)
Release Notes:

- N/A
2025-09-22 22:37:51 +02:00
Joseph T. Lyons
e602cfadd3 Restore user-defined ordering of profiles (#38665)
This PR fixes a regression where settings profiles were no longer
ordered in the same order that the user defined in their settings.

Release Notes:

- N/A
2025-09-22 19:35:44 +00:00
Peter Tripp
d4adb51553 languages: Update package.json and tsconfig.json schemas (#38655)
Closes: https://github.com/zed-industries/zed/issues/34382

- Add support for `tsconfig.*.json` not just `tsconfig.json`. 
- Updated JSON schemas to
[SchemaStore/schemastore@281aa4a](281aa4aa4a)
(2025-09-21)
-
[tsconfig.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/tsconfig.json)
@
[281aa4a](https://raw.githubusercontent.com/SchemaStore/schemastore/281aa4aa4ac21385814423f86a54d1b8ccfc17a1/src/schemas/json/tsconfig.json)
-
[package.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/package.json)
@
[281aa4a](https://raw.githubusercontent.com/SchemaStore/schemastore/281aa4aa4ac21385814423f86a54d1b8ccfc17a1/src/schemas/json/package.json)

See also: 
- [discord
thread](https://discord.com/channels/869392257814519848/1419298937290096760)
-
https://github.com/zed-industries/zed/issues/21994#issuecomment-3319321308

Release Notes:

- Updated package.json and tsconfig.json schemas to newest release
(2025-09-21). Match `tsconfig.*.json` too.
2025-09-22 14:59:24 -04:00
Miao
a0514af589 editor: Make buffer search bar capture CopyPath & CopyRelativePath actions (#38645)
Closes #38495

Cause:

- When the Find input is focused, CopyPath/CopyRelativePath were handled
by the editor and stopped during the bubble phase, preventing
BufferSearchBar from relaying to the file-backed editor.

Release Notes:

- Fixes “Workspace: Copy Relative Path” not copying while the Find bar
is focused.
2025-09-22 19:56:40 +03:00
Joseph T. Lyons
c88fdaf02d Implement Markdown link embedding on paste (#38639)
This PR adds automatic markdown URL embedding on paste when you are in
text associated with the Markdown language and you have a valid URL in
your clipboard. This the default behavior in VS Code and GitHub, when
pasting a URL in Markdown. It works in both singleton buffers and multi
buffers.

One thing that is a bit unfortunate is that, previously, `do_paste` use
to simply call `Editor::insert()`, in the case of pasting content that
was copied from an external application, and now, we are duplicating
some of `insert()`'s logic in place, in order to have control over
transforming the edits before they are inserted.

Release Notes:

- Added automatic Markdown URL embedding on paste.

---------

Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
2025-09-22 12:33:12 -04:00
Conrad Irwin
003163eb4f Move my keybinding fixes to the right platform (#38654)
In cffb883108 I put the fixed keybindings
on the wrong platform

Release Notes:

- Fix syntax node shortcuts
2025-09-22 10:22:37 -06:00
Jakub Konka
9e64b7b911 terminal: Escape args in alacritty on Windows (#38650)
Release Notes:

- N/A
2025-09-22 18:12:35 +02:00
Ran Benita
d4fd59f0a2 vim: Add support for <count>gt and <count>gT (#38570)
Vim mode currently supports `gt` (go to next tab) and `gT` (go to
previous tab) but not with count. Implement the expected behavior as
defined by vim:

- `<count>gt` moves to tab `<count>`
- `<count>gT` moves to previous tab `<count>` times (with wraparound)

Release Notes:

- Improved vim `gt` and `gT` to support count, e.g. `5gt` - go to tab 5,
`8gT` - go to 8th previous tab with wraparound.
2025-09-22 10:07:16 -06:00
Ben Brandt
4e6e424fd7 acp: Support model selection for ACP agents (#38652)
It requires the agent to implement the (still unstable) model selection
API. Will allow us to test it out before stabilizing.

Release Notes:

- N/A
2025-09-22 15:07:40 +00:00
Conrad Irwin
dccbb47fbc Use a consistent default for window scaling (#38527)
(And make it 2, because most macs have retina screens)

Release Notes:

- N/A
2025-09-22 08:56:15 -06:00
Ilija Tovilo
b97843ea02 Add quick "Edit debug.json" button to debugger control strip (#38600)
This button already exists in the main menu, as well as the "New
Session" view in the debugger panel. However, this view disappears after
starting the debugging session. This PR adds the same button to the
debugger control strip that remains accessible. This is convenient for
people editing their debug.json frequently.

Site-node: I feel like the `Cog` icon would be more appropriate, but I
picked `Code` to stay consistent with the "New Session" view.

Before:

<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/5b42a8a4-f48f-4145-a425-53365dd785ca"
/>

After:

<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/12f56ea1-150b-4564-8e6a-da4671f52079"
/>

Release Notes:

- Added "Edit debug.json" button to debugger control strip
2025-09-22 16:52:33 +02:00
Xiaobo Liu
fbe06238e4 cli: Refactor URL prefix checks (#38375)
use slice apply to prefix.

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-09-22 13:12:19 +00:00
Bartosz Kaszubowski
e0028fbef2 git_ui: Remove duplicated/unused tooltips (#38439)
Release Notes:

- N/A
2025-09-22 12:56:37 +00:00
strygwyr
1bbf98aea6 Fix arrow function detection in TypeScript/JavaScript outline (#38411)
Closes #35102 



https://github.com/user-attachments/assets/3c946d6c-0acd-4cfe-8cb3-61eb6d20f808


Release Notes:

- TypeScript/JavaScript: symbol outline now includes closures nested
within functions.
2025-09-22 14:35:43 +02:00
localcc
8bac1bee7a Disable subpixel shifting for y axis on Windows (#38440)
Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-22 13:46:29 +02:00
Lukas Wirth
55dc9ff7ca text: Implement Rope::clip_offset in terms of the new utf8 boundary methods (#38630)
Release Notes:

- N/A
2025-09-22 11:45:23 +00:00
Justin Su
50bd8bc255 docs: Add instructions for setting up fish_indent for fish (#38414)
Release Notes:

- N/A
2025-09-22 14:29:46 +03:00
Lukas Wirth
a2c71d3d20 text: Assert text anchor offset validity on construction (#38441)
Attempt to aid debugging some utf8 indexing issues

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-09-22 11:20:46 +00:00
Matheus
79620454d0 Docs: change format_on_save value from false to "off" (#38615)
Found this outdated piece of information in the docs while trying to
disable it myself, this PR simply changes `false` to `"off"`.

Release Notes:

- N/A
2025-09-22 10:14:04 +00:00
Miao
271771c742 editor: Prevent non‑boundary highlight indices in UTF‑8 (#38510)
Closes #38359

Release Notes:

- Use byte offsets for highlights; fix UTF‑8 crash
2025-09-22 11:06:54 +02:00
Remy Suen
891a06c294 docs: Small grammar fix to use a possessive pronoun (#38610)
> Your extension can define it's own debug locators
> Your extension can define it is own debug locators

The sentence above does not make sense after expanding "it's". We should
instead be using the possessive "its" in this scenario.

Release Notes:

- N/A

Signed-off-by: Remy Suen <remy.suen@docker.com>
2025-09-21 20:18:17 -04:00
Nia
11041ef3b0 perf: Greatly expand profiler (#38584)
Expands on #38543 (notably allows setting importance categories and
weights on tests, and a lot of internal refactoring) because I couldn't
help myself. Also allows exporting runs to json and comparing across them. See code for docs.

Release Notes:

- N/A
2025-09-21 13:54:59 +02:00
Jakub Konka
839c216620 terminal: Re-add sanitizing trailing periods in URL detection (#38569)
I accidentally regressed this when bumping alacritty in
https://github.com/zed-industries/zed/pull/38505

cc @davewa 

Release Notes:

- N/A
2025-09-20 22:10:47 +02:00
Cole Miller
18df6a81b4 acp: Fix spawning login task (#38567)
Reverts #38175, which is not correct, since in fact we do need to
pre-quote the command and arguments for the shell when using
`SpawnInTerminal` (although we should probably change the API so that
this isn't necessary). Then, applies the same fix as #38565 to fix the
root cause of being unable to spawn the login task on macOS, or in any
case where the command/args contain spaces.

Release Notes:

- Fixed being unable to login with Claude Code or Gemini using the
terminal.
2025-09-20 14:14:55 -04:00
CharlesChen0823
f5c2e4b49e vim: Remove duplicate bracket pair (#38560)
remove depulicate code, this same with line: 556-562

Release Notes:

- N/A
2025-09-20 20:01:55 +02:00
Vitaly Slobodin
1d1bbf01a9 docs: Mention herb LSP for Ruby language (#38351)
Hi! This pull request mentions [the `herb` LSP](https://herb-tools.dev)
for `HTML/ERB` language that the Ruby extension supports. Thanks!

Release Notes:

- N/A

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-09-20 17:29:12 +00:00
Marshall Bowers
ffa23d25e3 Fix formatting in workspace Cargo.toml (#38563)
This PR fixes some formatting issues in the workspace `Cargo.toml`.

Release Notes:

- N/A
2025-09-20 15:23:02 +00:00
Nia
782058647d tests: Add an automatic perf profiler (#38543)
Add an auto-profiler for our tests, to hopefully allow better triage of
performance impacts resulting from code changes. Comprehensive usage
docs are in the code.

Currently, it uses hyperfine under the hood and prints markdown to the
command line for all crates with relevant tests enabled. We may want to
expand this to allow outputting json in the future to allow e.g.
automatically comparing the difference between two runs on different
commits, and in general a lot of functionality could be added (maybe
measuring memory usage?).

It's enabled (mostly as an example) on two tests inside `gpui` and a
bunch of those inside `vim`. I'd have happily used `cargo bench`, but that's nightly-only.

Release Notes:

- N/A
2025-09-20 09:04:32 +02:00
Smit Barmase
be77682a3f editor: Fix adding extraneous closing tags within TSX (#38534) 2025-09-20 04:40:22 +05:30
Mikayla Maki
8df616e28b Suppress the 'Agent Thread Started' event when initializing the panel (#38535)
Release Notes:

- N/A
2025-09-19 22:55:32 +00:00
Jakub Konka
89520ea221 chore: Bump alacritty_terminal to 0.25.1-rc1 (#38505)
Release Notes:

- N/A

---------

Co-authored-by: Dave Waggoner <waggoner.dave@gmail.com>
2025-09-20 00:15:01 +02:00
Marshall Bowers
de75e2d9f6 extension_host: Expand supported extension API range to include v0.7.0 (#38529)
This PR updates the version range for v0.6.0 of the extension API to
include v0.7.0.

Since we bumped the `zed_extension_api` crate's version to v0.7.0, we
need to expand this range in order for Zed clients to be able to install
extensions built against v0.7.0 of `zed_extension_api`.

Currently no extensions that target `zed_extension_api@0.7.0` can be
installed.

Release Notes:

- N/A
2025-09-19 20:48:52 +00:00
Ben Kunkle
4e316c683b macos: Fix panic when NSWindow::screen returns nil (#38524)
Closes #ISSUE

Release Notes:

- mac: Fixed an issue where Zed would panic if the workspace window was
previously off screen
2025-09-19 13:07:02 -06:00
Conrad Irwin
1afbfcb832 git: Docs-based workaround for GitHub/git auth confusion (#38479)
Closes #ISSUE

Release Notes:

- git: Added a link to Github's authentication help if you end up in Zed
trying to type a password in for https auth
2025-09-19 11:14:31 -06:00
Conrad Irwin
be7575536e Fix theme overrides (#38512)
Release Notes:

- N/A
2025-09-19 10:51:21 -06:00
Conrad Irwin
30a29ab34e Fix server settings (#38477)
In the settings refactor I'd assumed server settings were like project
settings. This is not the case, they are in fact the normal user
settings;
but just read from the server.

Release Notes:

- N/A
2025-09-19 10:38:39 -06:00
Piotr Osiewicz
b9188e0fd3 collab: Fix screen share aspect ratio on non-Mac platforms (#38517)
It was just a bunch of finnickery around UI layout. It affected Linux
too.



Release Notes:

* Fixed aspect ratio of peer screen share when using Linux/Windows
builds.
2025-09-19 18:38:22 +02:00
Finn Evers
df6f0bc2a7 Fix markdown list in bump-zed-minor-versions (#38515)
This fixes a small markdown issue in the `bump-zed-minor-versions`
script that bugged me for too long 😅

Release Notes:

- N/A
2025-09-19 16:11:19 +00:00
Dino
4743fe8415 vim: Fix regression in surround behavior (#38344)
Fix an issue introduced in
https://github.com/zed-industries/zed/pull/37321 where vim's surround
wouldn't work as expected when replacing quotes with non-quotes, with
whitespace always being added, regardless of whether the opening or
closing bracket was used. This is not the intended, or previous,
behavior, where only the opening bracket would trigger whitespace to be
added.

Closes #38169 

Release Notes:

- Fixed regression in vim's surround plugin that ignored whether the
opening or closing bracket was being used when replacing quotes, so
space would always be added
2025-09-19 09:50:33 -06:00
Jan Češpivo
0f4bdca9e9 Update icon theme fallback to use default theme (#38485)
https://github.com/zed-industries/zed/pull/38367 introduced panic:

```
thread 'main' panicked at crates/theme/src/settings.rs:812:18:
called `Option::unwrap()` on a `None` value
```

In this PR I restored fallback logic from the original code - before
settings refactor.

Release Notes:

- N/A
2025-09-19 15:17:35 +00:00
Finn Evers
154b01c5fe Dismiss agent panel when disable_ai is toggled to true (#38461)
Closes https://github.com/zed-industries/zed/issues/38331

This fixes an issue where we would not dismiss the panel once the user
toggled the setting, leaving them in an awkward state where closing the
panel would become hard.

Also takes care of one more check for the `Fix with assistant` action
and consolidates some of the `AgentSettings` and `DisableAiSetting`
checks into one method to make the code more readable.

Release Notes:

- N/A
2025-09-19 17:05:39 +02:00
逃生舱
b6944d0bae docs: Fix duplicate postgresql package and punctuation error (#38478)
Found duplicate `postgresql` package in installation command. Uncertain
whether it should be `postgresql-contrib` or `postgresql-client`, but
neither appears necessary.


Release Notes:

- N/A
2025-09-19 16:43:25 +02:00
Dimas Ari
94fcbb400b docs: Update invalid property in a configuration example (#38466)
Just install Zed for the first time and got a warning from the first
config example i copied from docs.
Great design btw, immediately able to see that this is a well thought
out app. seems like i'll stick with zed and make it my new dev
'sanctuary'.

Release Notes:

- N/A
2025-09-19 16:36:36 +02:00
David Kleingeld
2e97ef32c4 Revert "Audio fixes and mic denoise" (#38509)
Reverts zed-industries/zed#38493

Release Notes:

- N/A
2025-09-19 10:33:38 -04:00
David Kleingeld
aa5b99dc11 Fully qualify images in Docker Compose (#38496)
This enables podman-compose (easier to install and run on linux) as drop
in replacement for docker-compose

Release Notes:

- N/A
2025-09-19 10:12:49 -04:00
Peter Tripp
3217bcb83e docs: Add Kotlin JAVA_HOME example (#38507)
Closes: https://github.com/zed-extensions/kotlin/issues/46

Release Notes:

- N/A
2025-09-19 13:59:13 +00:00
Bartosz Kaszubowski
a3da66cec0 editor: Correct "Toggle Excerpt Fold" tip on macOS (#38487)
Show `"Option+click to toggle all"` instead of `"Alt+click to toggle
all" on macOS.

<img width="546" height="212" alt="Screenshot 2025-09-19 at 10 16 11"
src="https://github.com/user-attachments/assets/b1052b7c-349f-4a11-892b-988cfd2ff365"
/>

Release Notes:

- N/A
2025-09-19 09:41:52 -04:00
Derek Nguyen
9e6f1d5a6e python: Fix ty binary path and required args (#38458)
Closes #38347

Release Notes:

- Fixed path and args to ty lsp binary


When attempting to use the new ty lsp integration in the preview, I
noticed issues related to accessing the binary. After deleting the
downloaded archive and adding the following changes that:

- downloads the archive with the correct `AssetKind::TarGz`
- uses the correct path to the extracted binary
- adds the `server` argument to initialize the lsp (like ruff)

After the above changes the LSP starts correctly
```bash
2025-09-18T16:17:03-05:00 INFO  [lsp] starting language server process. binary path: "/Users/dereknguyen/Library/Application Support/Zed/languages/ty/ty-0.0.1-alpha.20/ty-aarch64-apple-darwin/ty", working directory: "/Users/dereknguyen/projects/test-project", args: ["server"]
```
<img width="206" height="98" alt="image"
src="https://github.com/user-attachments/assets/8fcf423f-40a0-4cd9-a79e-e09666323fe2"
/>

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-19 13:29:40 +00:00
Cole Miller
430ac5175f python: Install basedpyright with npm instead of pip (#38471)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-19 13:14:52 +00:00
Bennet Bo Fenner
5f728efccf agent: Show custom MCP servers in agent configuration (#38500)
Fixes a regression introduced in #38419

Release Notes:

- N/A
2025-09-19 12:21:28 +00:00
David Kleingeld
194a13ffb5 Add denoising & prepare for migrating to new samplerate & channel count (#38493)
Uses the previously merged denoising crate (and fixes a bug in it that snug in during refactoring) in the microphone input. The experimental audio path now picks the samplerate and channel count depending on a setting. It can handle incoming streams with both the current (future legacy) and new samplerate & channel count. These are url-encoded into the livekit track name.
2025-09-19 10:31:54 +00:00
jneem
66f2fda625 helix: Initial support for helix-mode paste (#37963)
This is a redo of #29776. I went for a separate function -- instead of
adding a bunch of conditions to `vim::Paste` -- because there were quite
a few differences.

Release Notes:

- Added a `vim::HelixPaste` command that imitates Helix's paste behavior

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-19 09:42:04 +00:00
Conrad Irwin
e62dd2a0e5 Tighten up MergeFrom trait (#38473)
Release Notes:

- N/A
2025-09-18 22:28:17 -06:00
Nia
c826ce6fc6 markdown: Use the faster hasher (#38469)
Micro-optimisation in the markdown crate to use the faster hasher.

Release Notes:

- N/A
2025-09-19 01:51:41 +00:00
Nia
e5e308ba78 fuzzy: Fixup atomic ordering (#38468)
Hopefully partially addresses some crashes that can be triggered in this
code.

Release Notes:

- N/A
2025-09-19 00:45:59 +00:00
Julia Ryan
166b2352f3 Respect user's font-smoothing setting (#38467)
#37622 was incorrectly forcing font smoothing to be enabled on macos
even when the user had disabled that setting at the OS level. See [this
comment](https://github.com/zed-industries/zed/pull/37622#issuecomment-3310030659)
for an example of the difference that font smoothing makes.

Release Notes:

- N/A
2025-09-18 17:21:42 -07:00
tidely
f18b19a73e http_client: Relax lifetime bounds and add fluent builder methods (#38448)
`HttpClient`: Relaxes the lifetime bound to `&self` in `get`/`post`
by returning the `self.send` future directly. This makes both
methods return `'static` futures without extra boxing.

`HttpRequestExt`: Added fluent builder methods to `HttpRequestExt`
inspired by the `gpui::FluentBuilder` trait.

Release Notes:

- N/A
2025-09-19 01:39:26 +02:00
Conrad Irwin
b09764c54a settings: Use a derive macro for refine (#38451)
When we refactored settings to not pass JSON blobs around, we ended up
needing
to write *a lot* of code that just merged things (like json merge used
to do).

Use a derive macro to prevent typos in this logic.

Release Notes:

- N/A
2025-09-18 21:13:49 +00:00
Conrad Irwin
5f4f0a873e Fix wierd rust-analyzer error (#38431)
Release Notes:

- N/A
2025-09-18 14:58:15 -06:00
Conrad Irwin
82e1e5b7ac Fix panic in vim mode (#38437)
Release Notes:

- vim: Fixed a rare panic in search
2025-09-18 14:58:07 -06:00
Peter Tripp
530225a06a python: Remove a redundant pip install call (#38449)
I confirmed that the pip packages match for:
```sh
pip install python-lsp-server && pip install 'python-lsp-server[all]'
pip install 'python-lsp-server[all]'
```

Originally introduced here:
- https://github.com/zed-industries/zed/pull/20358 

Release Notes:

- N/A
2025-09-18 16:40:06 -04:00
Peter Tripp
11212b80f9 docs: Improve Elixir HEEX language server documentation (#38363)
Closes: https://github.com/zed-industries/zed/issues/38009

Release Notes:

- N/A
2025-09-18 16:39:50 -04:00
Anthony Eid
e3e0522e32 debugger: Fix debug scenario picker showing history in reverse order (#38452)
Closes #37859

Release Notes:

- debugger: Fix sort order of pasted launched debug sessions in debugger
launch modal
2025-09-18 20:15:25 +00:00
Matt
fc0eb882f7 debugger_ui: Update new process modal to include more context about its source (#36650)
Closes #36280

Release Notes:
  - Added additional context to debug task selection

Adding additional context when selecting a debug task to help with
projects that have multiple config files with similar names for tasks.

I think there is room for improvement, especially adding context for a
LanguageTask type. I started but it looked like it would need to add a
path value to that and wanted to make sure this was a good idea before
working on that.

Also any thoughts on the wording if you do like this format? 

---

<img width="1246" height="696" alt="image"
src="https://github.com/user-attachments/assets/b42e3f45-cfdb-4cb1-8a7a-3c37f33f5ee2"
/>

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony <hello@anthonyeid.me>
2025-09-18 16:05:55 -04:00
Jaeyong Sung
6b8ed5bf28 docs: Fix typo in Python configuration example (#38434)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-09-18 18:46:26 +00:00
Cole Miller
5fccde9b1b python: Install basedpyright if the basedpyright-langserver binary is missing (#38426)
Potential fix for #38377 

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <petertripp@gmail.com>
2025-09-18 18:45:02 +00:00
Bartosz Kaszubowski
c58763a526 git_ui: Reduce spacing between action icon and label (#38445)
# Why

Opinionated change: A bit uneven spacing between Git action icon and
label, in comparison to the border on the right in the segmented action
button was triggering my UI OCD a bit. 😅

# How

Remove the right margin from icon and icon + counter children of the
segmented Git action button in Git Panel. The default spacing from the
button layout seems to be enough to separate them from the left-side
label.

# Release Notes

- Reduced spacing between Git action icon and label in Git Panel

# Test plan

I have tested few cases, and made sure that the spacing is still
present, but icon (or icon and counter) does not feel too
separated/detached from the label.

### Before

<img width="384" height="186" alt="Screenshot 2025-09-18 at 20 11 16"
src="https://github.com/user-attachments/assets/8f353b8f-8e43-466d-88a9-567a82100b5f"
/>
<img width="384" height="186" alt="Screenshot 2025-09-18 at 20 13 19"
src="https://github.com/user-attachments/assets/1ecb4e1a-8a60-45b6-988e-966fb2b27ff5"
/>


### After

<img width="392" height="168" alt="Screenshot 2025-09-18 at 19 53 14"
src="https://github.com/user-attachments/assets/388d9b83-9906-4eac-82ed-13d2ae78c990"
/>
<img width="392" height="168" alt="Screenshot 2025-09-18 at 19 53 34"
src="https://github.com/user-attachments/assets/a179239b-ac09-479e-b688-f895ba75ca33"
/>
<img width="392" height="168" alt="Screenshot 2025-09-18 at 19 56 23"
src="https://github.com/user-attachments/assets/6ca10cf1-d46d-43b7-b847-832555823b8a"
/>
2025-09-18 18:34:13 +00:00
Agus Zubiaga
a6a2465954 edit prediction: Fix sub overflow in identifiers_in_range (#38438)
Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2025-09-18 18:28:41 +00:00
Cole Miller
439d31e2d4 Add branch rename action to Git panel (#38273)
Reopening #35136, cc @launay12u

Release Notes:

- git: added `git: rename branch` action to rename a branch (`git branch
-m`)

---------

Co-authored-by: Guillaume Launay <guillaume.launay@paylead.fr>
Co-authored-by: Peter Tripp <petertripp@gmail.com>
2025-09-18 18:17:13 +00:00
Agus Zubiaga
df50b5c14a edit prediction: Context debug view (#38435)
Adds a `dev: open edit prediction context` action that opens a new
workspace pane that displays the excerpts and snippets that would be
included in the edit prediction request.

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
2025-09-18 15:09:44 -03:00
Anthony Eid
55d130a166 Fix chunks peek_with_bitmaps panic (#38430)
This panic only happened in debug builds because of a left shift
overflow. The slice range has bounds between 0 and 128. The 128 case
caused the overflow.

We now do an unbounded shift and a wrapped sub to get the correct
bitmask. If the slice range is 128 left, it should make 1 zero. Then the
wrapped sub would flip all bits, which is expected behavior.

Release Notes:

- N/A

Co-authored-by: Nia <nia@zed.dev>
2025-09-18 13:16:36 -04:00
Conrad Irwin
fcdab160f9 Settings refactor (#38367)
Co-Authored-By: Ben K <ben@zed.dev>
Co-Authored-By: Anthony <anthony@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- settings: Major internal changes to settings. The primary user-facing
effect is that some settings which did not make sense in project
settings files are no-longer read from there. (For example the inline
blame settings)

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
2025-09-18 16:47:23 +00:00
Devdatta Talele
0a9023bce0 ui: Use hoverable tooltips for Badge component to fix tooltip behavior (#38387)
## Summary

Fixes #38362 - Privacy tooltip behavior issues in AI Setup onboarding

## Problem
The Privacy tooltip in AI Setup onboarding had incorrect behavior:
1. Tooltip remained visible after mouse left the Privacy button
2. Clicking the button didn't toggle tooltip properly
3. Clicking in intersection area between tooltip and button didn't work

## Root Cause
Badge component used `tooltip()` instead of `hoverable_tooltip()`,
causing:
- Immediate tooltip hiding when mouse left triggering element
- No support for tooltip content interaction
- Poor intersection area click handling

## Solution
**Single line change** in `crates/ui/src/components/badge.rs:61`:
```rust
// Before:
this.tooltip(move |window, cx| tooltip(window, cx))

// After:
this.hoverable_tooltip(move |window, cx| tooltip(window, cx))
```

## Technical Details
- Leverages existing GPUI `hoverable_tooltip()` infrastructure
- Enables 500ms grace period before tooltip hiding
- Allows hovering over tooltip content without disappearing
- Uses proper tooltip bounds detection for click handling
- Affects all Badge tooltips system-wide (positive improvement)
- Full backward compatibility - no API changes

## Test Plan
- [x] Hover over Privacy badge → tooltip appears
- [x] Move mouse away → tooltip stays visible for 500ms
- [x] Move mouse to tooltip content → tooltip remains visible
- [x] Click on tooltip content → properly handled
- [x] Move mouse completely away → tooltip hides after delay
- [x] Verify no regression in other Badge tooltip usage

Release Notes:

- N/A
2025-09-18 15:15:10 +00:00
Finn Evers
fb60f710e3 Make scrollbars auto-hide by default (#38340)
With this, scrollbars across the app will now auto-hide unless it is
specified that they should follow a specific setting.

Optimally, we would just track the user preference by default. However,
this is currently not possible. because the setting we would need to
read lives in `editor` and we cannot read that from within the `ui`
crate.

Release Notes:

- N/A
2025-09-18 12:08:14 -03:00
Danilo Leal
589e2c0fe4 agent: Make settings view more consistent across different sections (#38419)
Closes https://github.com/zed-industries/zed/issues/37660

This PR makes sections in the AI settings UI more consistent with each
other and also just overall simpler. One of the main changes here is
adding the tools from a given MCP server in a modal (as opposed to in a
disclosure within the settings view). That's mostly an artifact of
wanting to make all of the items within sections look more of the same.
Then, in the process of doing so, also changed the logic that we were
using to display MCP servers; previously, in the case of extension-based
servers, we were only showing those that were _configured_, which felt
wrong because you should be able to see everything you have _installed_,
despite of its status (configured or not).

However, there's still a bit of a bug (to be solved in a follow-up PR),
which already existed but it was just not visible given we'd only
display configured servers: an MCP server installed through an extension
stays as a "custom server" until it is configured. If you don't
configure it, you can't also uninstall it from the settings view (though
it is possible to do so via the extensions UI).

Release Notes:

- agent: Improve settings view UI and solve issue where MCP servers
would get unsorted upon turning them on and off (they're all
alphabetically sorted now).
2025-09-18 11:48:36 -03:00
Jakub Konka
21d8b19926 dap: Add more debug logs for child's stderr (#38418)
Without this, I would never have converged on @cole-miller's patch
https://github.com/zed-industries/zed/pull/38380 when debugging codelldb
not spawning in WSL!

Release Notes:

- N/A
2025-09-18 16:35:06 +02:00
Cole Miller
82686bf94c Start working on refreshing Python docs (#37880)
- Reflect that basedpyright is the new primary language server
- Discuss Ruff
- Deemphasize manual venv configuration for language servers

Release Notes:

- N/A

---------

Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
2025-09-18 08:53:30 -04:00
Michael Sloan
f562e7e157 edit predictions: Initial Tree-sitter context gathering (#38372)
Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Oleksiy <oleksiy@zed.dev>
Co-authored-by: Finn <finn@zed.dev>
2025-09-18 12:44:40 +00:00
Cole Miller
202dcb122f remote: Remove excess quoting in WSL build_command (#38380)
The built-up command for the WSL remote connection looks like

```
wsl.exe --distribution Ubuntu --user cole --cd /home/cole -- bash -c SCRIPT
```

Where `SCRIPT` is a command itself. We don't need extra quotes around
`SCRIPT` because we already pass it whole as a separate argument to
`wsl.exe`.

This isn't yet enough to get ACP servers working in WSL projects
(#38332), but it removes one roadblock.

Release Notes:

- windows: Fixed an issue that could prevent running binaries in WSL
remote projects.
2025-09-18 14:10:33 +02:00
Lukas Wirth
b1aa2723e9 editor: Reverse range of pending selection if required (#38410)
cc https://github.com/zed-industries/zed/issues/38129

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-18 10:58:10 +00:00
Lukas Wirth
59a609c9fc Partially revert "project: Fix terminal activation scripts failing on Windows for new shells (#37986) (#38406)
This partially reverts commit 4002602a89.
Specifically the parts that closes
https://github.com/zed-industries/zed/issues/38343

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-18 10:06:43 +00:00
Ben Brandt
ca05ff89f4 agent2: More efficent read file tool (#38407)
Before we were always reading the entire file into memory as a string.
Now we only read the range that is actually requested.

Release Notes:

- N/A
2025-09-18 10:05:05 +00:00
Lukas Wirth
9f9e8063fc workspace: Pop a toast if manually spawning a task fails (#38405)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-18 12:03:35 +02:00
Ben Brandt
32c868ff7d acp: Fix behavior of read_text_file for ACP agents (#38401)
We were incorrectly handling the line number as well as stripping out
line breaks when returning portions of files.

It also makes sure following is updated even when we load a snapshot
from cache, which wasn't the case before.

We also are able to load the text via a range in the snapshot, rather
than allocating a string for the entire file and then another after
iterating over lines in the file.

Release Notes:

- acp: Fix incorrect behavior when ACP agents requested to read portions
of files.
2025-09-18 09:38:59 +00:00
Romans Malinovskis
ed46e2ca77 helix: Apply modification (e.g. switch case) on a single character only in helix mode (#38119)
Closes #34192

Without selection, only current character would be affected.

Also if #38117 is merged too, then transformations in SelectMode behave
correctly too and selection is not collapsed.

Release Notes:

- helix: Implemented `~`, `` ` ``, `` Alt-` `` correctly in normal and
select modes

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-18 08:47:15 +00:00
Lukas Wirth
d85a6db6a3 git_ui: Use margin instead of padding for blame entries (#38397)
This makes the hover background change keep a visible border element
between the gutter and blame entries

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-18 08:22:26 +00:00
Miao
4b1e78cd5c terminal: Fix COLORTERM regression for true color support (#38379)
Closes #38304 

Release Notes:

- Fixed true color detection regression by setting `COLORTERM=truecolor`

---

Reason:

The regression is possibly introduced in [pr#36576: Inject venv
environment via the
toolchain](https://github.com/zed-industries/zed/pull/36576/files#diff-6f30387876b79f1de44f8193401d6c8fb49a2156479c4f2e32bc922ec5d54d76),
where `alacritty_terminal::tty::setup_env();` is removed.

The `alacritty_terminal::tty::setup_env();` does 2 things, which sets
`TERM` & `COLORTERM` envvar.
```rs
/// Setup environment variables.
pub fn setup_env() {
    // Default to 'alacritty' terminfo if it is available, otherwise
    // default to 'xterm-256color'. May be overridden by user's config
    // below.
    let terminfo = if terminfo_exists("alacritty") { "alacritty" } else { "xterm-256color" };
    unsafe { env::set_var("TERM", terminfo) };

    // Advertise 24-bit color support.
    unsafe { env::set_var("COLORTERM", "truecolor") };
}
```
2025-09-18 08:15:52 +00:00
Cole Miller
eaa1cb0ca3 acp: Add a basic test for ACP remoting (#38381)
Tests that the downstream project can see custom agents configured in
the remote server's settings, and that it constructs an appropriate
`AgentServerCommand`.

Release Notes:

- N/A
2025-09-18 00:02:44 -04:00
Cole Miller
ea473eea87 acp: Fix agent servers sometimes not being registered when Zed starts (#38330)
In local projects, initialize the list of agents in the agent server
store immediately. Previously we were initializing the list only after a
delay, in an attempt to avoid sending the `ExternalAgentsUpdated`
message to the downstream client (if any) before its handlers were
initialized. But we already have a separate codepath for that situation,
in the `AgentServerStore::shared`, and we can insert the delay in that
place instead.

Release Notes:

- acp: Fixed a bug where starting an external agent thread soon after
Zed starts up would show a "not registered" error.

---------

Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Agus <agus@zed.dev>
2025-09-17 16:45:47 -04:00
Marshall Bowers
4912096599 collab: Remove unused feature flag queries (#38360)
This PR removes the feature flag queries, as they were no longer used.

Release Notes:

- N/A
2025-09-17 20:31:03 +00:00
Joseph T. Lyons
3c69144128 Update release URLs in release actions (#38361)
Release Notes:

- N/A
2025-09-17 20:22:50 +00:00
Jakub Konka
96111c6ef3 extension_host: Sanitize cwd path for ResolvedTask (#38357)
Ensures build task's CWD paths use POSIX-friendly path separator on
Windows host so that `std::path::Path` ops work as expected within the
Wasm guest.

Release Notes:

- N/A
2025-09-17 21:36:06 +02:00
Marshall Bowers
f6d08fe59c Remove /cargo-workspace slash command (#38354)
This PR removes the `/cargo-workspace` slash command.

We never fully shipped this—with it requiring explicit opt-in via a
setting—and it doesn't seem like the feature is needed in an agentic
world.

Release Notes:

- Removed the `/cargo-workspace` slash command.
2025-09-17 19:15:56 +00:00
Peter Tripp
86a2649944 docs: Add whitespace_map (#38355)
Adds docs for settings introduced in:
- https://github.com/zed-industries/zed/pull/37704

Release Notes:

- N/A
2025-09-17 15:04:18 -04:00
Finn Evers
f0b21508ec editor: Properly layout expand toggles with git blame enabled (#38349)
Release Notes:

- Fixed an issue where expand toggles were too large with the git blame
deployed.
2025-09-17 18:37:36 +00:00
localcc
3968b9cd09 Add open WSL shortcut (#38342)
Adds a shortcut to add a WSL distro for better wsl feature
discoverability.

- [x] Open wsl from open remote
- [x] Open local folder in wsl action
- [x] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A
2025-09-17 17:55:30 +00:00
Marshall Bowers
43f40c60fd rope: Fix spelling of peek_with_bitmaps (#38341)
This PR fixes the spelling of the `peek_with_bitmaps` method.

Release Notes:

- N/A
2025-09-17 17:02:13 +00:00
Joseph T. Lyons
824f695383 Rename Windows GitHub Issue template (#38339)
Release Notes:

- N/A
2025-09-17 19:25:50 +03:00
Nils Koch
50326ddc35 project_panel: Collapse top-level entries in Collapse all entries command (#38310)
Closes #11760

The command `project panel: collapse all entries` currently does not
collapse top-level entries (the workspaces themselves). I think this
should be expected behaviour if you only have a single workspace in your
project. However, if you have multiple workspaces, we should collapse
their top-level folders as well. This is the expected behaviour in the
screenshots in #11760.

For more context: Atm the `.retain` function empties the
`self.expanded_dir_ids` Hash Map, because the `expanded_entries` Vec is
(almost) never empty - it contains the id of the `root_entry` of the
workspace.


d48d6a7454/crates/project_panel/src/project_panel.rs (L1148-L1152)

We then update the `self.expanded_dir_ids` in the
`update_visible_entries` function, and since the Hash Map is empty, we
execute the `hash_map::Entry::Vacant` arm of the following match
statement.


d48d6a7454/crates/project_panel/src/project_panel.rs (L3062-L3073)

This change makes sure that we do not clear the `expanded_dir_ids`
HashMap and always keep the keys for all visible workspaces and
therefore we run the `hash_map::Entry::Occupied` arm, which does not
override the `expanded_dir_ids` anymore.



https://github.com/user-attachments/assets/b607523b-2ea2-4159-8edf-aed7bca05e3a

cc @MrSubidubi 

Release Notes:

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

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-09-17 17:58:46 +02:00
Ben Brandt
52521efc7b acp: update to v0.4 of Rust library (#38336)
Release Notes:

- N/A
2025-09-17 15:41:46 +00:00
localcc
4a7784cf67 Allow opening a local folder inside WSL (#38335)
This PR adds an option to allow opening local folders inside WSL
containers. (wsl_actions::OpenFolderInWsl). It is accessible via the
command palette and should be available to keybind.

- [x] Open wsl from open remote
- [x] Open local folder in wsl action
- [ ] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A
2025-09-17 15:39:47 +00:00
Lukas Wirth
f3b8c619e3 editor: Fix unwrap_syntax_node panicking by not setting selections (#38329)
Fixes ZED-11T

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-17 15:10:05 +00:00
Joseph T. Lyons
0f6dd84c98 Bump Zed to v0.206 (#38327)
Release Notes:

-N/A
2025-09-17 14:45:25 +00:00
Lukas Wirth
405a8eaf78 editor: Fix BlockMapWriter::blocks_intersecting_buffer_range creating invalid indexing ranges (#38325)
Fixes ZED-113
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-17 13:47:00 +00:00
itsaphel
c54e294965 Autosave files on close, when setting is afterDelay (#36929)
Closes https://github.com/zed-industries/zed/issues/12149
Closes #35524

Release Notes:

- Improved autosave behavior, to prevent a confirmation dialog when
quickly closing files and using the `afterDelay` setting

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-09-17 13:08:29 +00:00
Smit Barmase
86834887da editor: Fix completions menu flashes on every keystroke in TSX files with emmet (#38320)
Closes https://github.com/zed-industries/zed/issues/37774

Bug in https://github.com/zed-industries/zed/pull/32927

Instead of using trigger characters to clear cached completions items,
now we check if the query is empty to clear it. Turns out Emmet defines
whole [alphanumeric as trigger
characters](279be10872/index.ts (L116))
which causes flickering.

Clear on trigger characters was introduced to get rid of cached
completions like in the case of "Parent.Foo.Bar", where "." is one of
the trigger characters. This works still since "." is not part of
`completion_query_characters` and hence we use it as a boundary while
building the current query. i.e in this case, the query would be empty
after typing ".", clearing cached completions.

Release Notes:

- Fixed issue where completions menu flashed on every keystroke in TSX
files with emmet extension installed.
2025-09-17 18:13:57 +05:30
Lukas Wirth
a5c29176a3 editor: Fix incorrect offset passed to acp completion provider (#38321)
Might fix | ZED-15G
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-17 12:02:39 +00:00
localcc
574b943081 Add wsl specific icon (#38316)
Release Notes:

- N/A
2025-09-17 10:47:09 +00:00
Lukas Wirth
399118f461 denoise: Fix LICENSE-GPL symlink (#38313)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-17 10:38:49 +00:00
Lukas Wirth
5ca3b998f3 fs: Do panic when failing to query modified timestamps (#38312)
Fixes ZED-1EW

Release Notes:

- N/A
2025-09-17 10:28:05 +00:00
Smit Barmase
d74b8bcf4c docs: Fix macOS development docs typo (#38311)
Release Notes:

- N/A
2025-09-17 15:46:53 +05:30
Lukas Wirth
28800c2a3b languages: Fix panic in python lsp adapters assuming settings shape (#38309)
Fixes ZED-1EV
Fixes ZED-S0
Fixes ZED-Q9

Release Notes:

- N/A
2025-09-17 10:09:15 +00:00
localcc
83d9f07547 Add WSL opening UI (#38260)
This PR adds an option to open WSL machines from the UI.

- [x] Open wsl from open remote
- [ ] Open local folder in wsl action
- [ ] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A
2025-09-17 09:44:16 +00:00
Lukas Wirth
c5ac1e6218 editor: Fix select_larget_syntax_node overflowing in multibuffers (#38308)
Fixes ZED-18Z

Release Notes:

- N/A
2025-09-17 11:36:20 +02:00
localcc
d48d6a7454 Fix empty nodes crash (#38259)
The crash occured because we raced against the platform windowing
backend to render a frame, and if we lost the race there would be no
frame on a window that we return, which breaks most of gpui

Release Notes:

- N/A
2025-09-17 11:26:53 +02:00
Lukas Wirth
a2de91827d agent_ui: Fix panic on editor changes in inline_assistant (#38303)
Fixes ZED-13P

Release Notes:

- N/A
2025-09-17 08:39:24 +00:00
Lukas Wirth
531f9ee236 Give most spawned threads names (#38302)
Release Notes:

- N/A
2025-09-17 10:11:51 +02:00
Michael Sloan
64d362cbce edit prediction: Initial implementation of Tree-sitter index (not yet used) (#38301)
Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: oleksiy <oleksiy@zed.dev>
2025-09-17 07:25:14 +00:00
Kyrilasa
5d561aa494 agent_ui: Fix agent panel insertion to use cursor position (#38253)
Fix agent panel insertion to use cursor position

Closes #38216

Release Notes:
- Fixed agent panel text insertion to respect cursor position instead of
always appending to the end

## Before

[before.webm](https://github.com/user-attachments/assets/684d3cbe-4710-4724-8d2d-ac08f430dea8)

## After

[output.webm](https://github.com/user-attachments/assets/d1122d99-4efb-4a24-a408-db128814f98c)
2025-09-17 07:10:21 +00:00
Lukas Wirth
4ee2daeded markdown: Fix indented codeblocks having incorrect content ranges (#38225)
Closes https://github.com/zed-industries/zed/issues/37743

Release Notes:

- Fixed agent panel panicking when streaming indented codeblocks from
agent output
2025-09-17 06:48:47 +00:00
Cole Miller
c27d8e0c7a editor: Don't pull diagnostics on excerpts change in diagnostics editors (#38212)
This can lead to an infinite regress when using a language server that
supports pull diagnostics, since the excerpts for the diagnostics editor
are set based on the project's diagnostics.

Closes #36772

Release Notes:

- Fixed a bug that could cause duplicated diagnostics with some language
servers.
2025-09-16 21:58:24 -04:00
Marshall Bowers
f6c5c68751 collab: Remove user backfiller (#38291)
This PR removes the user backfiller from Collab.

Release Notes:

- N/A
2025-09-16 22:53:44 +00:00
Marshall Bowers
74e5b848ff cloud_llm_client: Make default_model and default_fast_model optional (#38288)
This PR makes the `default_model` and `default_fast_model` fields
optional on the `ListModelsResponse`.

Release Notes:

- N/A
2025-09-16 22:24:03 +00:00
Smit Barmase
ee399ebccf macOS: Make it easier to debug NSAutoFillHeuristicControllerEnabled (#38285)
Uses `setObject` instead of `registerDefaults`, so that it can be read
with `defaults read dev.zed.Zed`. Still can be overrided.

Release Notes:

- N/A
2025-09-17 03:49:47 +05:30
Max Brunsfeld
54c82f2732 Windows: Unminimize a window when activating it (#38287)
Closes #36287

Release Notes:

- Windows: Fixed an issue where a Zed window would stay minimized when
opening an existing file in that window via the Zed CLI.
2025-09-16 22:12:02 +00:00
Uwe Krause
e14a4ab90d Fix small spelling mistakes (#38284)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-16 21:58:40 +00:00
David Kleingeld
0343b5ff06 Add new crate denoise required by audio (#38217)
The audio crate will use the denoise crate to remove background noises
from microphone input.

We intent to contribute this to rodio. Before that can happen a PR needs
to land in candle. Until then this lives here.

Uses a candle fork which removes the dependency on `protoc` and has the PR's mentioned above already applied.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2025-09-16 21:49:26 +00:00
Marshall Bowers
26202e5af2 language_models: Use message field from Cloud error responses, if present (#38286)
This PR updates the Cloud language model provider to use the `message`
field from the Cloud error response, if it is present.

Previously we would always show the entire JSON payload in the error
message, but with this change we can show just the user-facing `message`
the error response is in a shape that we recognize.

Release Notes:

- N/A
2025-09-16 21:45:25 +00:00
George Waters
ee912366a3 Check if virtual environment is in worktree root (#37510)
The problem from issue #37509 comes from local virtual environments
created with certain approaches (including the 'simple' way of `python
-m venv`) not having a `.project` file with the path to the project's
root directory. When the toolchains are sorted, a virtual environment in
the project is not treated as being for that project and therefore is
not prioritized.

With this change, if a toolchain does not have a `project` associated
with it, we check to see if it is a virtual environment, and if it is we
use its parent directory as the `project`. This will make it the top
priority (i.e. the default) if there are no other virtual environments
for a project, which is what should be expected.

Closes #37509

Release Notes:

- Improved python toolchain prioritization of local virtual
environments.
2025-09-16 21:30:32 +02:00
David Kleingeld
673a98a277 Fix a number of spelling mistakes (#38281)
My pre push hooks keep failing on these. This is easier then disabling
and re-enabling those hooks all the time :)

Closes #ISSUE

Release Notes:

- N/A
2025-09-16 19:18:39 +00:00
VBB
5674445a61 Move keyboard shortcut for pane::GoForward (#38221)
Move keyboard shortcut for `pane:GoForward` so it's going to be
displayed as a shortcut hint in UI. Currently `Forward` is shown as a
hint, which isn't consistent with `GoBack` action and can be confusing.

Release Notes: 

- Improved the displayed keybinding for the `pane::GoForward` action on
Linux.
2025-09-16 18:33:55 +02:00
Jason Lee
53513cab23 Fix filled button hover background (#38235)
Release Notes:

- Fixed filled button hover background.

## Before


https://github.com/user-attachments/assets/fbc75890-d1a4-4a0c-b54e-ca2c7e63a661

## After


https://github.com/user-attachments/assets/a3595b01-e143-4cd0-8bc4-90db9ccfbf74


This appears to be a minor calculation error, not an intentional use of
this value.

If we pass `0.92` to `fade_out`, the calculated will be `alpha: 0.08`.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-16 14:47:10 +00:00
Smit Barmase
e885a939ba git_ui: Add tooltip for branch picker items (#38261)
Closes #38256

<img width="300" alt="image"
src="https://github.com/user-attachments/assets/5018951f-0f1b-4d5d-b59d-5b5266380e43"
/>


Release Notes:

- Added tooltip to Git branch picker items, making it easier to
distinguish long branch names.
2025-09-16 20:06:32 +05:30
Smit Barmase
a01a2ed0e0 languages: Add Tailwind CSS support for TypeScript (#38254)
Closes #37028

I noticed many projects use Tailwind in plain TypeScript (.ts) files, so
it makes sense to support them out of the box, alongside .js and .tsx
files we already handle. For example, see
[supabase](https://github.com/supabase/supabase/blob/master/packages/ui/src/lib/theme/defaultTheme.ts).

Note: You’ll still need to add `"classFunctions": ["cva", "cx"],`
manually for Tailwind completions to work in `cva` type methods. This is
because you don’t want completions on every string, only in specific
methods or regex matches. This is documented.

Release Notes:

- Added out-of-the-box support for Tailwind completions in `.ts` files.
2025-09-16 20:06:14 +05:30
Nathan Sobo
af3bc45a26 Drop ellipses from About Zed menu item (#38211)
Follow the macOS app style guideline.

Release Notes:

- N/A
2025-09-16 08:06:16 -06:00
Lukas Wirth
173074f248 search: Re-issue project search if search query is stale on replacement (#38251)
Closes https://github.com/zed-industries/zed/issues/34897

Release Notes:

- Fixed project search replacement replacing stale search results
2025-09-16 12:12:45 +00:00
Ben Brandt
a7cb64c64d Remove unused agent server settings module (#38250)
This was no longer in the module graph (the settings moved elsewhere) so
cleaning up the dead code.

Release Notes:

- N/A
2025-09-16 12:11:06 +00:00
Lukas Wirth
c6472fd7a8 agent_settings: Fix schema validation rejecting custom llm providers (#38248)
Closes https://github.com/zed-industries/zed/issues/37989

Release Notes:

- N/A
2025-09-16 10:23:49 +00:00
Ben Brandt
c0710fa8ca agent_servers: Set proxy env for all ACP agents (#38247)
- Use ProxySettings::proxy_url to read from settings or env 
- Export HTTP(S)_PROXY and NO_PROXY for agent CLIs 
- Add read_no_proxy_from_env and move parsing from main

Closes https://github.com/zed-industries/claude-code-acp/issues/46

Release Notes:

- acp: Pass proxy settings through to all ACP agents
2025-09-16 10:18:10 +00:00
Lukas Wirth
f321d02207 auto_update: Show update error on hover and open logs on click (#38241)
Release Notes:

- Improved error reporting when auto-updating fails
2025-09-16 08:07:02 +00:00
Lukas Wirth
1c09985fb3 worktree: Add more context to log_err calls (#38239)
Release Notes:

- N/A
2025-09-16 07:31:28 +00:00
Marshall Bowers
d986077592 client: Hide usage when not available (#38234)
Release Notes:

- N/A
2025-09-16 02:30:56 +00:00
Danilo Leal
555b6ee4e5 agent: Add small UI fixes (#38231)
Release Notes:

- N/A
2025-09-16 01:06:45 +00:00
Owen Kelly
6446963a0c agent: Make assistant panel input size configurable (#37975)
Release Notes:

- Added the `agent. message_editor_min_lines `setting to allow users to
customize the agent panel message editor default size by using a
different minimum number of lines.

<img width="800" height="1316" alt="Screenshot 2025-09-11 at 5 47 18 pm"
src="https://github.com/user-attachments/assets/20990b90-c4f9-4f5c-af59-76358642a273"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-16 00:27:25 +00:00
Finn Evers
ceb907e0dc onboarding: Add scrollbar to pages (#38093)
Closes #37214

This PR adds a scrollbar to the onboarding view and additionally ensures
the scroll state is properly reset when switching between the different
pages each time.

Release Notes:

- N/A
2025-09-15 19:55:02 -03:00
Alvaro Parker
3dbccc828e Fix hover element on ACP thread mode selector (#38204)
Closes #38197

This will render `^ click to also ...` on MacOS and `Ctrl + click to
also ...` on Windows and Linux.

|Before|After|
|-|-|
| <img width="683" height="197" alt="image"
src="https://github.com/user-attachments/assets/09909f1b-3163-40d1-b025-4eb9b159fbf3"
/> | <img width="683" height="197" alt="image"
src="https://github.com/user-attachments/assets/47d0290d-afa2-4b1b-a588-adfe3130d0b1"
/>|

On Mac: 

<img width="683" height="197" alt="image"
src="https://github.com/user-attachments/assets/f63103b5-1ceb-4193-ae6c-be55b97106e0"
/>

Release Notes:

- Fixed keymap hint when hovering over mode selector

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-15 22:48:04 +00:00
Michael Sloan
853e625259 edit predictions: Add new excerpt logic (not yet used) (#38226)
Release Notes:

- N/A

---------

Co-authored-by: agus <agus@zed.dev>
2025-09-15 16:29:58 -06:00
Kenny
0784bb8192 docs: Add "Copy as Markdown" button to toolbar (#38218)
## Summary
Adds a "Copy as Markdown" button to the documentation toolbar that
allows users to easily copy the raw markdown content of any
documentation page.

This feature is inspired by similar implementations on sites like
[Better Auth docs](https://www.better-auth.com/docs/installation) and
[Cloudflare Workers docs](https://developers.cloudflare.com/workers/)
which provide easy ways for users to copy documentation content.

## Features
- **Button placement**: Positioned between theme toggle and search icon
for optimal UX
- **Content fetching**: Retrieves raw markdown from GitHub's API for the
current page
- **Consistent styling**: Matches existing toolbar button patterns

## Test plan
- [x] Copy functionality works on all documentation pages
- [x] Toast notifications appear and disappear correctly
- [x] Button icon animations work properly (spinner → checkmark → copy)
- [x] Styling matches other toolbar buttons
- [x] Works in both light and dark themes

## Screenshots
The button appears as a copy icon between the theme and search buttons
in the left toolbar.
<img width="798" height="295" alt="image"
src="https://github.com/user-attachments/assets/37d41258-d71b-40f8-b8fe-16eaa46b8d7f"
/>
<img width="1628" height="358" alt="image"
src="https://github.com/user-attachments/assets/fc45bc04-a290-4a07-8d1a-a010a92be033"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-15 21:57:23 +00:00
Mikayla Maki
9046091164 Add a test that would have caught the bug last week (#38222)
This adds a test to make sure that the default value of the auto update
setting is always true. We manually re-applied the broken code from last
week, and confirmed that this test fails with that code.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-15 18:10:28 +00:00
Danilo Leal
6384966ab5 agent: Improve some items in the settings view UI (#38199)
All described in each commit; mostly small things, simplifying/clearing
up the UI.

Release Notes:

- N/A
2025-09-15 13:35:39 -03:00
Ben Kunkle
8b9c74726a docs: Call out Omarchy specifically in regards to issues with amdvlk (#38214)
Closes #28851


Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-15 16:03:45 +00:00
Kaan Kuscu
63586ff2e4 Add new injections for Go (#37605)
support for injecting sql, json, yaml, xml, html, css, js, lua and csv
value

if you use `/* lang */` before string literals, highlights them

**Example:**

```go
const sqlQuery = /* sql */ "SELECT * FROM users;" // highlights as SQL code
```

<img width="629" height="46" alt="Screenshot 2025-09-05 at 06 17 49"
src="https://github.com/user-attachments/assets/80f404d8-0a47-428d-bdb5-09fbee502cfe"
/>


Closes #ISSUE

Release Notes:

- Go: Added support for injecting sql, json, yaml, xml, html, css, js, lua and csv language highlights into string literals, when they are prefixed with `/* lang */`

**Example:**

```go
const sqlQuery = /* sql */ "SELECT * FROM users;" // Will be highlighted as SQL code
```
2025-09-15 15:51:03 +00:00
Conrad Irwin
35e5aa4e71 Re-add VSCode syntax node motions (#38208)
Closes #ISSUE

Release Notes:

- (preview only) restored ctrl-shift-{left,right} for Larger/Smaller
syntax node. This is VSCode's default and avoids the breaking change
from #37874
2025-09-15 09:18:07 -06:00
Richard Feldman
7ea94a32be Create failed tool call entries for missing tools (#38207)
Release Notes:

- When an agent requests a tool that doesn't exist, this is now treated
as a failed tool call instead of stopping the thread.
2025-09-15 15:07:14 +00:00
Piotr Osiewicz
6d6c3d648a lsp: Fix overnotifying about open buffers for unrelated servers (#38196)
Do not report all open buffers to new instances of the same language
server, as they can respond with ~spurious errors.

This regressed in  https://github.com/zed-industries/zed/pull/34142

Closes https://github.com/zed-industries/zed/issues/35017

Release Notes:

- Fixed Zed overly notifying language servers about open buffers, which
could've resulted in confusing errors in multi-language projects (in
e.g. Go).
2025-09-15 15:20:04 +02:00
Hichem
53b2f37452 Enhance layout and styling of tool list in AgentConfiguration (#38195)
Improve the layout and styling of the tool list in the
AgentConfiguration, ensuring better responsiveness and visual clarity.

closes #38194

<img width="1270" height="738" alt="image"
src="https://github.com/user-attachments/assets/86345e57-4fd0-43b8-8b8d-6209dc635dfb"
/>

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-15 13:00:22 +00:00
Lukas Wirth
92b946e8e5 acp_thread: Properly use project terminal API (#38186)
Closes https://github.com/zed-industries/zed/issues/35603

Release Notes:

- Fixed shell selection for terminal tool
2025-09-15 12:43:41 +00:00
Hakan Ensari
e9b4f59e0f Fix external agent authentication with spaces in paths (#38175)
This fixes terminal-based authentication for external ACP agents (Claude
Code, Gemini CLI) when file paths contain spaces, like "Application
Support" on macOS and "Program Files" on Windows.

When users click authentication buttons or type `/login`, they get
errors like `Cannot find module '/Users/username/Library/Application'`
because the path gets split at the space.

The fix removes redundant `shlex::try_quote` calls from
`spawn_external_agent_login`. These were causing double-quoting since
the terminal spawning code already handles proper shell escaping.

Added a test to verify paths with spaces aren't pre-quoted.

Release Notes:

- Fixed external agent authentication failures when file paths contain
spaces

---------

Co-authored-by: Hakan Ensari <hakanensari@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
2025-09-15 10:20:27 +00:00
Finn Evers
989adde57b Add scrollbars to markdown preview and syntax tree view (#38183)
Closes https://github.com/zed-industries/zed/issues/38141

This PR adds default scrollbars to the markdown preview and syntax tree
view.

Release Notes:

- Added scrollbars to the markdown preview and syntax tree view.
2025-09-15 10:17:27 +00:00
Lukas Wirth
393d6787a3 terminal: Do not auto close shell terminals if they error out (#38182)
Closes https://github.com/zed-industries/zed/issues/38134

This also reduces an annoying level of shell nesting

Release Notes:

- N/A
2025-09-15 10:09:25 +00:00
Finn Evers
4a582504d4 ui: Follow-up improvements to the scrollbar component (#38178)
This PR lands some more improvements to the reworked scrollbars.

Namely, we will now explicitly paint a background in cases where a track
is requested for the specific scrollbar, which prevents a flicker, and
also reserve space only if space actually needs to be reserved. The
latter was a regression introduced by the recent changes.

Release Notes:

- N/A
2025-09-15 09:53:33 +00:00
Smit Barmase
cfb2925169 macOS: Disable NSAutoFillHeuristicController on macOS 26 (#38179)
Closes #33182

From
https://github.com/zed-industries/zed/issues/33182#issuecomment-3289846957,
thanks @mitchellh.

Release Notes:

- Fixed an issue where scrolling could sometimes feel choppy on macOS
26.
2025-09-15 15:17:27 +05:30
Lukas Wirth
14f4e867aa terminal: Do not auto close shell terminals if they error out (#38180)
cc https://github.com/zed-industries/zed/issues/38134
Release Notes:

- N/A
2025-09-15 09:43:05 +00:00
Ben Brandt
4d54ccf494 agent_servers: Let Gemini CLI know it is running in Zed (#38058)
By passing through Zed as the surface, Gemini can know which editor it
is running in.

Release Notes:

- N/A
2025-09-15 08:30:46 +00:00
Tim Vermeulen
5b1c87b6a6 Fix incorrect ANSI color contrast adjustment on some background colors (#38155)
The `Hsla` -> `Rgba` conversion sometimes results in negative (but very
close to 0) color components due to floating point imprecision, causing
the `.powf(constants.main_trc)` computations in the `srgb_to_y` function
to evaluate to `NaN`. This propagates to `apca_contrast` which then
makes `ensure_minimum_contrast` unconditionally return `black` for
certain background colors. This PR addresses this by clamping the rgba
components in `impl From<Hsla> for Rgba` to 0-1.

Before/after:
<img width="1044" height="48" alt="before"
src="https://github.com/user-attachments/assets/771f809f-3959-43e9-8ed0-152ff284cef8"
/>
<img width="1044" height="49" alt="after"
src="https://github.com/user-attachments/assets/5fd6ae25-1ef0-4334-90d1-7fc5acf48958"
/>

Release Notes:

- Fixed an issue where ANSI colors were incorrectly adjusted to improve
contrast on some background colors
2025-09-15 07:52:56 +00:00
Vladimir Varankin
0fef17baa2 Hide BasedPyright banner in toolbar when dismissed (#38135)
This PR fixes the `BasedPyrightBanner`, making sure the banner is
completely hidden in the toolbar, when it was dismissed, or it's not
installed.

Without the fix, the banner still occupies some space in the toolbar,
making the UI looks inconsistent when editing a Python file. The bug is
**especially prominent** when the toolbar is hidden in the user's
settings (see below).

_Banner is shown_
<img width="1470" height="254" alt="Screenshot 2025-09-14 at 11 36 37"
src="https://github.com/user-attachments/assets/1415b075-0660-41ed-8069-c2318ac3a7cf"
/>

_Banner dismissed_
<img width="1470" height="207" alt="Screenshot 2025-09-14 at 11 36 44"
src="https://github.com/user-attachments/assets/828a3fba-5c50-4aba-832c-3e0cc6ed464b"
/>

_Banner dismissed (and the toolbar is hidden)_
<img width="1470" height="177" alt="Screenshot 2025-09-14 at 12 07 25"
src="https://github.com/user-attachments/assets/41aa5861-87df-491f-ac7e-09fc1558dd84"
/>

Closes n/a

Release Notes:

- Fixed the basedpyright onboarding banner
2025-09-15 09:43:04 +02:00
Umesh Yadav
526196917b language_models: Add support for API key to Ollama provider (#34110)
Closes https://github.com/zed-industries/zed/issues/19491

Release Notes:

- Ollama: Added configuration of URL and API key for remote Ollama provider.

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Oliver Azevedo Barnes <oliver@liquidvoting.io>
Co-authored-by: Michael Sloan <michael@zed.dev>
2025-09-15 06:34:26 +00:00
Michael Sloan
a598fbaa73 ai: Show "API key configured for {URL}" for non-default urls (#38170)
Followup to #38163, also makes some changes intended to be included in
that PR.

Release Notes:

- N/A
2025-09-15 05:49:25 +00:00
Michael Sloan
634ae72cad Misc cleanup + clear language model provider API key editors when API keys are submitted (#38165)
Followup to #38163 along with some other misc cleanups

Release Notes:

- N/A
2025-09-15 05:08:38 +00:00
Michael Sloan
98edf1bf0b Reload API keys when URLs configured for LLM providers change (#38163)
Three motivations for this:

* Changing provider URL could cause credentials for the prior URL to be
sent to the new URL.
* The UI is in a misleading state after URL change - it shows a
configured API key, but on restart it will show no API key.
* #34110 will add support for both URL and key configuration for Ollama.
This is the first provider to have UI for setting the URL, and this
makes these issues show up more directly as odd UI interactions.

#37610 implemented something similar for the OpenAI and OpenAI
compatible providers. This extracts out some shared code, uses it in all
relevant providers, and adds more safety around key use.

I haven't tested all providers, but the per-provider changes were pretty
mechanical, so hopefully work properly.

Release Notes:

- Fixed handling of changes to LLM provider URL in settings to also load
the associated API key.
2025-09-15 03:36:24 +00:00
Ben Kunkle
1090c47a90 Move Keymap Editor Table component to UI crate (#38157)
Closes #ISSUE

Move the data table component created for the Keymap Editor to the UI
crate. Additionally includes simplifications to the scrollbar component
in UI necessary for the table component to support scrollbar
configurations, and a fix for an issue with the table component where
when used with the `.row` API instead of `uniform_list` the rows would
render on top of each other.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-14 15:53:07 -04:00
Michael Sloan
be7b22b0dc Show docs for all documented actions in keymap.json (#38156)
Release Notes:

- Fixed a bug where action documentation while editing `keymap.json` was
only shown for actions that take input.
2025-09-14 19:38:48 +00:00
Michael Sloan
f3e49e1b05 x11: Don't skip consecutive same key press events in the same batch (#38154)
This has noticeable misbehavior when framerates are low (in my case this
sometimes happens when CPUs are throttled and compilation is happening),
as now a batch of x11 events can contain events over the span of 100s of
millis. So in that case, key press repetitions with quite normal typing
are skipped.

Under normal operating conditions it can be reproduced by running this
and quickly switching to Zed:

> sleep 1; for i in {1..5}; do xdotool type --delay 5 "aaaaaa "; xdotool
key Return; done

Output before looks like:
```
aaa
aaaaa
aaa
aaa
aaaa
```

Output after looks like:
```
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
```

This behavior was added in #13955.

Release Notes:

- N/A
2025-09-14 19:09:15 +00:00
Alvaro Parker
0adc6ddaad ui: Fix scrollbar showing despite being disabled by tracked setting (#38152)
Closes #38147 

The scrollbar's `show_state` field was always being initialized to
`VisibilityState::Visible`, ignoring the `show_setting` value.

Release Notes:

- N/A
2025-09-14 18:39:23 +00:00
Ben Kunkle
99b71677c6 Ability to update JSON arrays (#38087)
Closes #ISSUE

Adds the ability to our JSON updating code to update arrays within other
objects. Previously updating of arrays was limited to just top level
arrays (i.e. `keymap.json`) however this PR makes it so nested arrays
are supported as well using `#{index}` syntax as a key.

This PR also fixes an issue with the array updating code that meant that
updating empty json values `""` or an empty `keymap.json` file in the
case of the Keymap Editor would fail instead of creating a new array.

Release Notes:

- Fixed an issue where keybindings would fail to save in the Keymap
Editor if the `keymap.json` file was completely empty
2025-09-14 12:36:26 -04:00
Alexander
1c27a6dbc2 Do not escape glob pattern in dynamic Jest/Vitest test names (#36999)
Related to #35090

Release Notes:

- javascript: Fixed name escaping in dynamic jest/vitest task names

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-09-14 18:05:03 +02:00
Martin Pool
256a91019a ci: Move doctests to a separate parallel job (#38111)
Follow on from #37851 

This may reduce CI time by running doctests in parallel with other
tests. It also makes it easier to find the results.

Example output:
https://github.com/zed-industries/zed/actions/runs/17698218116/job/50300398669?pr=38111

At least on this run, the doctests finished before the main Linux tests,
which makes sense because there are many fewer doctests. So they should
not be on the critical path.

Thanks @maxdeviant for the prompt.

<img width="615" height="513" alt="image"
src="https://github.com/user-attachments/assets/bcafa636-a68c-4602-97f4-61f7904e6a7b"
/>


Release Notes:

- N/A
2025-09-14 12:01:00 -04:00
Jakub Konka
85aa458b9c helix: Drop back to normal mode after yanking in select mode (#38133)
Follow-up to https://github.com/zed-industries/zed/pull/38117.
@romaninsh I'd appreciate if you could have a look :-)

Release Notes:

- N/A
2025-09-14 15:49:56 +00:00
Piotr Osiewicz
37239fd66b Use serde 1.0.221 instead of serde_derive hackery (#38137)
serde 1.0.221 introduced serde_core into the build graph, which should
render explicitly depending on serde_derive for faster build times an
obsolote method.

Besides, I'm not even sure if that worked for us. My hunch is that at
least one of our deps would have `serde` with derive feature enabled..
and then, most of the crates using `serde_derive` explicitly were also
depending on gpui, which depended on `serde`.. thus, we wouldn't have
gained anything from explicit dep on `serde_derive`

Release Notes:

- N/A
2025-09-14 14:01:04 +02:00
Smit Barmase
2b1f7d5763 project_panel: Fix primary and secondary click on blank area (#38139)
Follow up https://github.com/zed-industries/zed/pull/38008

Release Notes:

- N/A
2025-09-14 17:28:51 +05:30
Romans Malinovskis
813a9bb0bc Fix select in Helix mode (#38117)
Hotfixes issue I have introduced in #37748.

Without this, helix mode select not working at all in `main` branch.

Release Notes:

- N/A
2025-09-14 10:32:12 +02:00
Marshall Bowers
e40a950bc4 collab: Add orb_portal_url column to billing_customers table (#38124)
This PR adds an `orb_portal_url` column to the `billing_customers`
table.

Release Notes:

- N/A
2025-09-14 02:42:39 +00:00
Marshall Bowers
89e527c23b Fix typo in default settings (#38123)
This PR fixes a typo in the default settings file.

Release Notes:

- N/A
2025-09-14 02:39:34 +00:00
Casper van Elteren
c50b561e1c Expose REPL Settings (#37927)
Closes #37829

This PR introduces and exposes `REPLSettings` to control the number of
lines and columns in the REPL. These settings are integrated into the
existing configuration system, allowing for customization and management
through the standard settings interface.

#### Changes
- Added `REPLSettings` struct with `max_number_of_lines` and
`max_number_of_columns` fields.
- Integrated `REPLSettings` with the settings system by implementing the
`Settings` trait.
- Ensured compatibility with the workspace and existing settings
infrastructure.

Release Notes:

- Add configuration "repl" to settings to configure max lines and
columns for repl.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-09-13 23:17:44 +00:00
Ben Gubler
13113ab311 Add setting to show/hide title bar (#37428)
Closes #5120

Release Notes:

- Added settings for hiding and showing title bar



https://github.com/user-attachments/assets/aaed52d0-6278-4544-8932-c6bab531512a
2025-09-13 22:54:00 +00:00
Umesh Yadav
01f181339f language_models: Remove unnecessary LM Studio connection refused log (#37277)
In zed logs you can see these logs of lmstudio connection refused.
Currently zed connects to lmstudio by default as there is no credential
mechanism to check if the user has enabled lmstudio previously or not
like we do with other providers using api keys.

This pr removes the below annoying log and makes the zed logs less
polluted.

```
2025-09-01T02:11:33+05:30 ERROR [language_models] Other(error sending request for url (http://localhost:1234/api/v0/models)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 61)
    2: Connection refused (os error 61))
```

Release Notes:

- N/A

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-13 20:17:13 +02:00
Marshall Bowers
d046016ef5 collab: Add Orb cancellation date to billing_subscriptions table (#38098)
This PR adds an `orb_cancellation_date` column to the
`billing_subscriptions` table.

Release Notes:

- N/A
2025-09-13 04:13:04 +00:00
Michael Sloan
e43ad858d8 Add debug methods for visually annotating ranges (#38097)
This allows you to write `buffer_snapshot.debug(ranges, value)` and it
will be displayed in the buffer (or multibuffer!) until that callsite
runs again. `ranges` can be any position (`usize`, `Anchor`, etc), any
range, or a slice or vec of those. `value` just needs a `Debug` impl.
These are stored in a mutable global for convenience, and this is only
available in debug builds.

For example, using this to visualize the captures of the brackets
Tree-sitter query:

<img width="1215" height="480" alt="image"
src="https://github.com/user-attachments/assets/c1878fc7-f6b3-4e27-949e-ecf67a7906b9"
/>

Release Notes:

- N/A
2025-09-13 03:37:24 +00:00
Finn Evers
ded6467604 Refactor the scrollbar component (#36105)
Closes https://github.com/zed-industries/zed/issues/37621
Improves https://github.com/zed-industries/zed/issues/24623

Adding scrollbars withing Zed's UI currently is rather cumbersome, as it
requires the copying of a lot of code in order for these to work. Wiring
up settings for scrollbar visibilty always has to be done at the call
site and the state has to be saved and maintained by the caller as well.
Similarly, reserving space has to also be handled by the caller.

This PR changes the way scrollbars work in Zed fundamentally by making
use of the new `use_keyed_state` APIs: Instead of saving the state at
the call site, the window now keeps track of the state corresponding to
scrollbars. This enables us to add scrollbars with e.g. one simple call
on divs:
```rust
div()
    .vertical_scrollbar(window, cx)
```
will add a scrollbar to the corresponding container. There are some more
improvements regarding tracking of scrollbar visibility settings (which
is now handled by a trait for each setting that supports this) as well
as reserving space.
Additionally, all needed stuff for layouting, catching events and
reserving space is also now managed by the scrollbar component instead.
This drastically reduces the amount of event listeners and makes
layouting of two scrollbars easier.

Furthermore, this paves the way for more improvements to scrollbars,
such as graceful auto-hide. Only downsight here is that we lose some
customizability in a few areas. However, once this lands, we gain the
ability to quickly follow these up without breaking stuff elsewhere.

This also already fixes a few bugs:
- Scrollbars no longer flicker on first render. 
- Auto-hide now properly works for all scrollbars.
- If the content size changes, the scrollbar is updated on the same
frame. Both of these happened because we were computing the scrollbar
sizes too early, causing us to use the sizes from the previous frame or
unitialized sizes.
- The project panel no longer jumps if scrolled all the way to the
bottom and the scrollbar actually auto-hides.

Still TODO:
- [x] Fix scrolling in the debugger memory view
- [x] Clean up some more in the scrollbar component and reduce clones
there
- [x] Ensure we don't over-notify the entity the scrollbar is rendered
within
- [x] Make sure auto-hide properly works for all cases
- [x] Check whether we want to implement the scrollbar trait for
`UniformList`s as well
    - ~~ [ ] Use for uniformlist where possible~~ Postponed
- [x] Improve layout for cases where we render both scrollbars.

Release Notes:

- N/A
2025-09-13 00:43:16 +02:00
Finn Evers
53c5db4495 Highlight Zed log file by default if log language is available (#38091)
This ensures that we highlight the log file with the log extension
should the extension be installed.

If it is not installed, we just fallback to the default of no
highlighting, but also log no errors.

Release Notes:

- N/A
2025-09-12 23:39:15 +02:00
Michael Sloan
cd2ecbbd27 Add logging of missing or unexpected capture names in Tree-sitter queries (#37830)
Now logs warnings for unrecognized capture names and logs errors for
missing required captures.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2025-09-12 15:01:16 -06:00
Finn Evers
e71012a2f8 Automatically uninstall release extension prior to dev extension install (#38088)
Closes https://github.com/zed-industries/zed/issues/31106

This fixes an issue where you would have to manually uninstall the
release extension before installing the dev extension in case that is
locally installed.

Release Notes:

- Installing a dev extension will now automatically remove the release
extension should it be installed.
2025-09-12 22:48:24 +02:00
Martin Pool
b9cf5886e4 Run doctests in CI and fix up existing doctests (#37851)
Follows on from
https://github.com/zed-industries/zed/pull/37716#pullrequestreview-3195695110
by @SomeoneToIgnore

After this the doctests will be run in CI to check that the examples are
still accurate.

Note that doctests aren't run by Nextest: you can run them locally with
`cargo test --doc`.

Summary:
* Run tests from CI
* Loosen an exact float comparison to match approximately (otherwise it
fails)
* Fixed one actual bug in the tests for `dilate` where the test code
assumed that `dilate` mutates `self` rather than returning a new object
* Add some `must_use` on some functions that seemed at risk of similar
bugs, following the Rust stdlib style to add it where ignoring the
result is almost certainly a bug.
* Fix some cases where the doc examples seem to have gone out of date
with the code
* Add imports to doctests that need them
* Add some dev-dependencies to make the tests build
* Fix the `key_dispatch` module docstring, which was accidentally
attached to objects within that module
* Skip some doctest examples that seem like they need an async
environment or that just looked hard to get running

AI usage: I asked Claude to do some of the repetitive tests. I checked
the output and fixed up some things that seemed to not be in the right
spirit of the test, or too longwinded.

I think we could reasonably run the tests on only Linux to save CI
CPU-seconds and latency, but I haven't done that yet, partly because of
how it's implemented in the action.

Release Notes:

- N/A
2025-09-12 23:24:04 +03:00
Ben Kunkle
174a0b1517 Fix line indicator format setting (#38071)
Closes #ISSUE

Release Notes:

- Fixed an issue where the `line_indicator_format` setting would not
update based on the value in `settings.json`
2025-09-12 15:55:19 -04:00
Anthony Eid
e4b754a19f settings ui: Fix dropdown menu rendering the same entries for different settings (#38083)
Using `window.use_state` made the element IDs match between elements,
thus causing the same menu to be shared for drop down menus. I switched
to `window.use_keyed_state` and used a value's path as it's element id

Release Notes:

- N/A
2025-09-12 15:03:24 -04:00
Jacob
5f20b905a5 Add support for named folder icons (#36351)
Adds a `named_directory_icons` field to the icon theme that can be used
to specify a collection of icons for collapsed and expanded folders
based on the folder name.

The `named_directory_icons` is a map from the folder name to a
`DirectoryIcons` object containing the paths to the expanded and
collapsed icons for that folder:

```json
{
  "named_directory_icons": {
    ".angular": {
      "collapsed": "./icons/folder_angular.svg",
      "expanded": "./icons/folder_angular_open.svg"
    }
  }
}

```

Closes #20295

Also referenced
https://github.com/zed-industries/zed/pull/23987#issuecomment-2638869213

Example using https://github.com/jacobtread/zed-vscode-icons/ which I've
ported over from a VSCode theme,

<img width="609" height="1307" alt="image"
src="https://github.com/user-attachments/assets/2d3c120a-b2f0-43fd-889d-641ad4bb9cee"
/>

Release Notes:

- Added support for icon themes to change the folder icon based on the
directory name.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-09-12 14:55:25 -04:00
Karl-Erik Enkelmann
4c758bd0b7 fix command name for hover in docs (#38084)
Release Notes:

- N/A
2025-09-12 18:46:48 +00:00
Alvaro Parker
4b7595c94c git: Add git stash picker (#35927)
Closes #ISSUE

This PR continues work from #32821 by adding a stash entry picker for
pop/drop operations. Additionally, the stash pop action in the git panel
is now disabled when no stash entries exist, preventing error logs from
attempted pops on empty stashes.

Preview:

<img width="1920" height="1256" alt="Screenshot From 2025-09-11
14-08-31"
src="https://github.com/user-attachments/assets/b2f32974-8c69-4e50-8951-24ab2cf93c12"
/>

<img width="1920" height="1256" alt="Screenshot From 2025-09-11
14-08-12"
src="https://github.com/user-attachments/assets/992ce237-43c9-456e-979c-c2e2149d633e"
/>



Release Notes:

- Added a stash picker to pop and drop a specific stash entry
- Disabled the stash pop action on the git panel when no stash entries
exist
- Added git stash apply command
- Added git stash drop command
2025-09-12 14:45:38 -04:00
Finn Evers
2143c59fba svg_preview: Ensure preview properly updates in follow mode (#38081)
This fixes an issue where we would not update neither the path nor the
editor that was listened to during follow mode, which in turn would
cause the preview to become stale.

Fix here is to update the subscription whenever the active item changes
and also update the associated path accordingly.


Release Notes:

- Fixed an issue where the SVG preview would not update when following
the active editor.
2025-09-12 18:08:21 +00:00
Danilo Leal
2b3ca360c3 Fix flicker in short context menus that have documentation aside (#38074)
Menu items in the context menu component have the ability to display a
documentation aside popover. However, because this docs aside popover
was setup as a sibling flex container to the actual menu popover, if the
menu had a short amount of items and the docs popover is bigger than the
menu, this flickering would happen, making it essentially unusable:


https://github.com/user-attachments/assets/74956254-fff6-4c5c-9f79-02998c64a105

So, this PR makes the docs aside popover in wide window sizes
absolutely-positioned relative to the menu container, which removes all
flickering. On top of that, I'm adding a `DocumentationEdge` enum that
allows to control the edge anchor of the docs aside, which is useful in
this particular mode selector example to make the layout work well.


https://github.com/user-attachments/assets/a3e811e1-86b4-4839-a219-c3b0734532b3

When the window is small, the docs aside continue to be a sibling flex
container, which causes a super subtle shift in the items within the
menu popover. This is something I want to pursue fixing, but didn't want
to delay this PR too much.

Release Notes:

- N/A
2025-09-12 14:22:35 -03:00
Jakub Konka
85f7bb6277 extension_host: Replace backslashes with forward slashes for cwd on Windows (#38072)
Instead of passing CWD verbatim from the Windows host with backslashes
and all, we now rewrite it into a more POSIX-happy format featuring
forward slashes which means `std::path::Path` operations now work within
WASI with Windows-style paths.

Release Notes:

- N/A
2025-09-12 19:22:24 +02:00
Smit Barmase
7377a898e8 project_panel: Allow dragging folded directories onto other items (#38070)
In https://github.com/zed-industries/zed/pull/22983 we made it possible
to drag items onto folded directories.

This PR handles the reverse: dragging folded directories onto other
items.

Release Notes:

- Improved drag-and-drop support by allowing folded directories to be
dragged onto other items in Project Panel.
2025-09-12 22:28:43 +05:30
Marshall Bowers
8ebe812c24 Format CONTRIBUTING.md (#38073)
This PR formats `CONTRIBUTING.md` using Prettier.

Release Notes:

- N/A
2025-09-12 16:39:54 +00:00
Conrad Irwin
7f1c7c1910 Update CONTRIBUTING to reflect reality (#38016)
Release Notes:

- N/A
2025-09-12 10:21:02 -06:00
bemyak
503284db45 Update oo7 to 0.5.0 (#38043)
Resolves Incorrect Secret error in Secret Service integration

Closes #34024 

Release Notes:

- Fixed Secret Service integration sometimes producing `Incorrect
secret` error
2025-09-12 10:18:44 -06:00
Bennet Bo Fenner
2aa564eeb7 Remove ACP feature flags (#38055)
This removes the `gemini-and-native` and `claude-code` feature flags.
Also, I removed a bunch of unused agent1 code that we do not need
anymore.

Initially I wanted to remove much more of the `agent` code, but noticed
some things that we need to figure out first:
- The inline assistant + context strip use `Thread`/`ContextStore`
directly
- We need some replacement for `ToolWorkingSet`, so we can access
available tools (as well as context server tools) in other places, e.g.
the agent configuration and the configure profile modal

Release Notes:

- N/A
2025-09-12 18:07:59 +02:00
Romans Malinovskis
cba9ff55c7 Helix Select Mode (#37748)
Please credit @eliaperantoni, for the original PR (#34136).
Merge after (#34060) to avoid conflicts.

Closes https://github.com/zed-industries/zed/issues/33838
Closes https://github.com/zed-industries/zed/issues/33906

Release Notes:
- Helix will no longer sometimes fall out into "normal" mode, will
remain in "helix normal" (example: vv)
- Added dedicated "helix select" mode that can be targeted by
keybindings

Known issues:
- [ ] Helix motion, especially surround-add will not properly work in
visual mode, as it won't call `helix_move_cursor`. It is possible
however to respect self.mode in change_selection now.
- [ ] Some operations, such as `Ctrl+A` (increment) or `>` (indent) will
collapse selection also. I haven't found a way to avoid it.

---------

Co-authored-by: fantacell <ghub@giggo.de>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-12 17:47:07 +02:00
Agus Zubiaga
a577128163 Update acp to 0.2.1 (#38068)
Release Notes:

- N/A
2025-09-12 15:22:51 +00:00
David Kleingeld
687c2c88c7 Fix experimental audio volume being significantly too low (#38062)
The rodio channelcount convertor halves the volume. This addresses that
in most cases by using the default channelcount for the system
microphone which is usually 2.

A proper fix will follow later as part of the de-noising PR

Release Notes:

- N/A
2025-09-12 13:56:48 +00:00
Lukas Wirth
2a03b6b80c terminal: Fix test_basic_terminal test (#38059)
`echo` isn't a program on windows, so we need to spawn a shell that
executes it for the test

Release Notes:

- N/A
2025-09-12 13:13:23 +00:00
Lukas Wirth
e68aa18fd4 project: Fix task arguments being quoted incorrectly for nushell and powershell (#38056)
Release Notes:

- Fixed task arguments being quoted incorrectly for nushell and
powershell

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2025-09-12 12:02:39 +00:00
Lukas Wirth
592b013013 language: Split LSP installation handling into a separate trait (#38046)
Part of reworking our installation handling to allow for multiple
different versions to be handled

Release Notes:

- Fixed pre-release lsp fetching setting not having an affect until
restarting Zed
2025-09-12 09:37:45 +00:00
Umesh Yadav
1142408675 language_models: Add provider options for OpenRouter models (#37979)
Supersedes: #34500

Also this will allow to fix this: #35386 without the UX changes but
providers can now be control through settings as well within zed.

Just rebased the latest main and docs added. Added @AurelienTollard as
co-author as it was started by him everything else remains the same from
original PR.

Release Notes:

- Added ability to control Provider Routing for OpenRouter models from
settings.

Co-authored-by: Aurelien Tollard <tollard.aurelien1999@gmail.com>
2025-09-12 11:17:55 +02:00
Alvaro Parker
8201f3d72f Use \x00 representation instead of literal null characters (#38033)
When working on the git stash picker PR (#35927) I notice that my test
was detected as a binary file on the git diff view and on GitHub. This
was due to the fact that I was using the literal char \0 (instead of a
proper representation like `\x00` or `\u{0000}`) character in my test
strings. This causes problems with git diff and GitHub's diff viewer,
and a reviewer might even assume that the file is corrupted, not
viewable or even malicious.

Looking at the rest of the codebase, only at `crates/git/src/commit.rs`
this character was used, so I replaced it with `\x00` which is a more
common representation of the null character in Rust strings.

It can also be seen that the PR that introduced this code, can't be
viewed properly on Github:
https://github.com/zed-industries/zed/pull/27636/files#diff-31114f0b22306b467482573446f71c638277510b442a10e60dd9a8667ccd93c3

Closes #ISSUE

Release Notes:

- Use `\x00` representation instead of literal null character in strings
to improve compatibility with git diff and GitHub's diff viewer.

Since the file is not viewable from the "Files changed" tab on Github,
this is the changed code:


dcd743aca4/crates/git/src/commit.rs (L66-L74)
2025-09-11 23:29:20 -06:00
Conrad Irwin
fcfc54c515 Allow SplitAndMove on panes (#38034)
Updates #19350

Release Notes:

- Add `pane::SplitAndMove{Up,Down,Left,Right}` to allow creating a split
without cloning the current buffer.
2025-09-12 03:18:28 +00:00
Julia Ryan
ffb85d7e81 Update crash handling docs (#38026)
Also removed the symbolicate script, which we could replace with a
`minidump-stackwalk` wrapper that downloaded sources/unstripped binaries
from github releases if that's helpful for folks.

Release Notes:

- N/A
2025-09-12 03:00:35 +00:00
Richard Feldman
405d7d7476 Don't send contents of large @mention-ed files (#38032)
<img width="598" height="311" alt="Screenshot 2025-09-11 at 9 39 12 PM"
src="https://github.com/user-attachments/assets/b526e648-37cf-4412-83a0-42037b9fc94d"
/>

This is for both ACP and the regular agent. Previously we would always
include the whole file, which can easily blow the context window on huge
files.

Release Notes:

- When `@mention`ing large files, the Agent Panel now send an outline of
the file instead of the whole thing.
2025-09-11 22:18:42 -04:00
Joseph T. Lyons
bdf44e55aa Prevent Discord URL preview in good first issue notifications (#38030)
Release Notes:

- N/A
2025-09-12 01:16:51 +00:00
Cole Miller
45ee1327a4 Add handling of git's core.excludesFile (#33592)
Taking over from #28314.

Part of https://github.com/zed-industries/zed/issues/4824

Co-authored-by: Paul Nameless <reacsdas@gmail.com>

Release Notes:

- Zed now respects git's `core.excludesFile` (~/.config/git/ignore) in
addition to .gitignore.

---------

Co-authored-by: Paul Nameless <reacsdas@gmail.com>
2025-09-11 21:00:03 -04:00
Anthony Eid
b60e705782 Fix auto update not defaulting to true (#38022)
#37337 Made `AutoUpdateSetting` `FileContent =
AutoUpdateSettingsContent` which caused a deserialization bug to occur
because the field it was wrapping wasn't optional. Thus serde would
deserialize the wrapped type `bool` to its default value `false`
stopping the settings load function from reading the correct default
value from `default.json`

I also added a log message that states when the auto updater struct is
checking for updates to make this easier to test.

Release Notes:

- fix auto update defaulting to false
2025-09-11 22:29:06 +00:00
Joseph T. Lyons
2bb50acb58 Add action to send good first issues to discord (#38021)
Release Notes:

- N/A
2025-09-11 21:54:33 +00:00
Piotr Osiewicz
87f5e72fc0 python: Add built-in support for Ty (#37580)
- **Rename PythonLSPAdapter to PyrightLspAdapter**
- **ah damn**
- **Ah damn x2**

Release Notes:

- Python: Added built-in support for [ty](https://docs.astral.sh/ty/)
language server (disabled by default).

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-11 21:52:05 +00:00
Michael Sloan
11b7913956 Refactor/optimize tree-sitter utilities for finding nodes enclosing ranges (#37943)
#35053 split out these utility functions. I found the names / doc
comments a bit confusing so this improves that. Before that PR there was
also a mild inefficiency - it would walk the cursor all the way down to
a leaf and then back up to an ancestor.

Release Notes:

- N/A
2025-09-11 21:42:09 +00:00
Anthony Eid
ff2eebf522 settings ui: Add basic support for drop down menus (#38019)
Enums with six or less fields can still use toggle groups by adding a
definition.

I also renamed the `OpenSettingsEditor` action to `OpenSettingsUi`

Release Notes:

- N/A
2025-09-11 21:16:16 +00:00
Max Brunsfeld
c4d75ea6d5 Windows: Fix issues with paths in extensions (#37811)
### Background

Zed extensions use WASI to access the file-system. They only have
read-write access to one specific folder called their work dir. But
extensions do need to be able to *refer* to other arbitrary files on the
user's machine. For instance, extensions need to be able to look up
existing binaries on the user's `PATH`, and request that Zed invoke them
as language servers. Similarly, extensions can create paths to files in
the user's project, and use them as arguments in commands that Zed
should run. For these reasons, we pass *real* paths back and forth
between the host and extensions; we don't try to abstract over the
file-system with some virtualization scheme.

On Windows, this results in a bit of mismatch, because `wasi-libc` uses
*unix-like* path conventions (and thus, so does the Rust standard
library when compiling to WASI).

### Change 1 - Fixing `current_dir`

In order to keep the extension API minimal, extensions use the standard
library function`env::current_dir()` to query the location of their
"work" directory. Previously, when initializing extensions, we used the
`env::set_current_dir` function to set their work directory, but on
Windows, where absolute paths typically begin with a drive letter, like
`C:`, the [`wasi-libc` implementation of
`chdir`](d1793637d8/libc-bottom-half/sources/chdir.c (L21))
was prepending an extra forward slash to the path, which caused
`current_dir()` to return an invalid path.

See https://github.com/bytecodealliance/wasmtime/issues/10415

In this PR, I've switched our extension initialization function to
*bypass* wasi-libc's `chdir` function, and instead write directly to
wasi-libc's private, internal state. This is a bit of a hack, but it
causes the `current_dir()` function to do what we want on Windows
without any changes to extensions' source code.

### Change 2 - Working around WASI's relative path handling

Once `current_dir` was fixed (giving us correct absolute paths on
Windows), @kubkon and I discovered that without the spurious leading `/`
character, windows absolute paths were no longer accepted by Rust's
`std::fs` APIs, because they were now recognized as relative paths, and
were being appended to the working directory.

We first tried to override the `__wasilibc_find_abspath` function in
`wasi-libc` to make it recognize windows absolute paths as being
absolute, but that functionality is difficult to override. Eventually
@kubkon realized that we could prevent WASI-libc's CWD handling from
being linked into the WASM file by overriding the `chdir` function.
wasi-libc is designed so that if you don't use their `chdir` function,
then all paths will be interpreted as relative to `/`. This makes
absolute paths behave correctly. Then, in order to make *relative* paths
work again, we simply add a preopen for `.`. Relative paths will match
that.

### Next Steps

This is a change to `zed-extension-api`, so we do need to update every
Zed extension to use the new version, in order for them to work on
windows.

Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-09-11 13:56:06 -07:00
Cole Miller
d5d30b5c44 python: Add built-in support for Ruff (#37804)
Release Notes:

- python: The Ruff native language server is now available without
installing an extension.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-09-11 20:52:07 +00:00
Michael Sloan
7655e22ff5 Fix panics from unicode slicing in license detection (#38015)
Closes #37954

Release Notes:

- N/A
2025-09-11 19:57:24 +00:00
Joseph T. Lyons
7a83a7fbd0 Fix congratsbot (#38013)
We need a PAT to have permission to check team information. Also, the
COAUTHOR_TEMPLATES didn't feel quite right. Skipping this for now.

Release Notes:

- N/A
2025-09-11 19:30:37 +00:00
Piotr Osiewicz
3cb3f01406 languages: Pass fs into the init function (#38007)
Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-11 19:00:51 +00:00
Martin Pool
46aa05e240 Fix regex syntax in matching os-release (#38010)
From
https://github.com/zed-industries/zed/pull/37712#issuecomment-3281970712,
thank you @zywo

Release Notes:

- N/A
2025-09-11 21:22:55 +03:00
Julia Ryan
a33af4e9c0 Remove legacy panic handling (#37947)
@maxdeviant We can eventually turn down the panic telemetry endpoint,
but should probably leave it up while there's still a bunch of stable
users hitting it.

@maxbrunsfeld We're optimistic that this change also fixed the macos
crashed-thread misreporting. We think it was because the
`CrashContext::exception` was getting set to `None` only on macos, while
on linux it was getting a real exception value from the sigtrap. Now
we've unified and it uses `SIGABRT` on both platforms (I need to double
check that this works as expected for windows).

We unconditionally set `RUST_BACKTRACE=1` for the current process so
that we see backtraces when running in a terminal by default. This
should be fine but I just wanted to note it since it's a bit abnormal.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-11 11:06:04 -07:00
Smit Barmase
116c6549f6 project_panel: Make rest of the project panel drag and drop target (#38008)
Closes #25854

You can now drag-and-drop on the remaining space in the project panel to
drop entries/external paths in the last worktree.


https://github.com/user-attachments/assets/a7e14518-6065-4b0f-ba2c-823c70f154f4

Release Notes:

- Added support for drag-and-drop files and external paths into the
empty space of the project panel, placing them in the last folder you
have added to the project.
2025-09-11 23:25:10 +05:30
Joseph T. Lyons
da8c7a1256 Polish congratsbot (#38005)
Release Notes:

- N/A
2025-09-11 12:04:09 -04:00
Joseph T. Lyons
2b04186b0f Only run congratsbot for non-staff (#38000)
Release Notes:

- N/A
2025-09-11 15:07:11 +00:00
Lukas Wirth
462293667b editor: Re-use multibuffers when opening the same locations again (#37994)
A very primitive attempt, we just key the editor with the locations and
re-use the editor if we open a new buffer with the same initial
locations and title.

Release Notes:

- Added reusing of reference search buffers when applicable
2025-09-11 16:58:11 +02:00
David Kleingeld
e5c0373011 Make rodio audio input compile under windows (#37999)
Follow up on https://github.com/zed-industries/zed/pull/37786

adds conditional cmp removing use of libwebrtc on windows/freebsd

They cant compile livekit yet. This removes microphone and echo
cancellation on those platforms however they can not join calls due to
the same cause so it does not matter.

Documentation and error handing improvements

Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>
2025-09-11 14:45:42 +00:00
Kirill Bulatov
a066794e8d Document two task rerun modes better (#37996)
Part of https://github.com/zed-industries/zed/issues/37720

Release Notes:

- N/A
2025-09-11 14:41:02 +00:00
Joseph T. Lyons
f6b6d4a9fe Add congratsbot (#37998)
Release Notes:

- N/A
2025-09-11 14:29:44 +00:00
Joseph T. Lyons
238dab4a9c Adjust release notes Discord webhook name (#37997)
Release Notes:

- N/A
2025-09-11 14:22:24 +00:00
Kirill Bulatov
d1c6c9d035 Remove old LSP definitions (#37995)
Last time MultiLspQuery was used in Zed was 0.201.x and Nightly is of
0.205.x version, hence it's time to clean up the old code.

Release Notes:

- N/A
2025-09-11 14:07:04 +00:00
Finn Evers
d7f3d08c59 editor: Ensure placeholder text wraps properly after font size change (#37992)
Follow-up of https://github.com/zed-industries/zed/pull/37919

This fixes an issue where the placeholder text in editors would not wrap
properly in cases where the font size was changed.

Before:


https://github.com/user-attachments/assets/479c919f-5815-4164-b46d-75f31b5dc56f

After:


https://github.com/user-attachments/assets/9f63ab9f-eac2-4f3e-864c-2b96b58f2d71


Release Notes:

- N/A
2025-09-11 13:20:05 +00:00
tidely
4db19a3a96 search: Fix buffer search history navigation (#37924)
Closes #36109 

Adds an additional option to `search` and `update_matches` to specify
whether the update should affect the search history.

Release Notes:

- Fix navigating buffer search history
2025-09-11 14:55:14 +02:00
Smit Barmase
c4e8fe1fb7 theme: Ensure opaque for overlay fallback (#37987)
Closes #37965

Release Notes:

- N/A
2025-09-11 18:04:40 +05:30
Lukas Wirth
4002602a89 project: Fix terminal activation scripts failing on Windows for new shells (#37986)
Tasks are still disabled as there seem to be more issues with it

Release Notes:

- N/A
2025-09-11 12:16:08 +00:00
ImFeH2
6ae83b4740 Support indent regex with inline comments in Python (#37903)
Closes #36491

This issue is caused by the Python language configuration treating
compound statements (such as for loops and if statements) that end with
an inline comment as not requiring an increased indent.

Release Notes:

- python: Correctly indent lines starting the blocks (for, finally, if,
else, try) that have trailing comments.
2025-09-11 13:39:39 +02:00
Finn Evers
eec6bfebbb extension_host: Fix operation status whilst installing dev extension (#37985)
This fixes a minor issue where we would show "Removing extension ..." in
the status bar when we would actually be installing it.

Release Notes:

- Fixed an issue where installing a dev extension would show the
installation status as "removing" in the activity indicator.
2025-09-11 10:58:24 +00:00
Finn Evers
9875969cba editor: Allow no context for the excerpt_context_lines setting (#37982)
Closes #37980

There seems to be no reason to hard limit this to 1, and we even have
existing UX for this case already:

<img width="1530" height="748" alt="Bildschirmfoto 2025-09-11 um 11 22
57"
src="https://github.com/user-attachments/assets/d6498318-c905-4d3c-90ab-60e4f2bb6c48"
/>

(Notice the different arrows in the gutter area for single lines)

Hence, allowing the value to honor the request from the issue

Release Notes:

- Allowed `0` as a value for the `excerpt_context_lines` setting
2025-09-11 09:42:18 +00:00
David Matter
59502289e7 Document Tailwind CSS language server configuration (#37970)
Added configuration instructions for Tailwind CSS language server.

Release Notes:

- N/A
2025-09-11 07:16:36 +00:00
Mitch (a.k.a Voz)
f764077020 Change keymap precedence to favor user (#37557)
Closes #35623 

Previously if a base keymap had a `null` set to an action, leading to a
`NoAction` being assigned to the keymap, if a user wanted to take
advantage of that keymap (in this particular case, `cmd-2`), the keymap
binding check would favor the `NoAction` over the user, since
technically the context depth matched better. Instead, we should always
prefer the user's settings over whatever base or default.

Release Notes:

- Fixed keymap precedence by favoring user settings over base keymap /
configs.
2025-09-11 00:29:31 -06:00
Marshall Bowers
9708c8d507 feature_flags: Move feature flag definitions to their own module (#37956)
This PR moves the feature flag definitions to their own module so that
they aren't intermingled with the feature flag infrastructure itself.

Release Notes:

- N/A
2025-09-11 02:43:19 +00:00
Marshall Bowers
f205732074 feature_flags: Remove unused llm-closed-beta feature flag (#37955)
This PR removes the `llm-closed-beta` feature flag, as it is no longer
used.

Release Notes:

- N/A
2025-09-11 02:23:18 +00:00
Ryan Hawkins
aee21ca17f Allow for commit amends with no file changes (#37256)
This will users to change the wording of the most recent commit,
something they might want to do if they realize they made a small typo
of some kind or if the formatting of their commit message is wrong, but
don't have any other changes they need to make.

Release Notes:

- Commit messages can now be amended in the UI without any other changes
needing to be made.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-11 00:20:32 +00:00
Danilo Leal
816c4817d0 Fix code actions menu item font size (#37951)
Follow up to https://github.com/zed-industries/zed/pull/37824, which
made items be cut-off in the _editor_ instance of the code actions menu.
This PR applies the default UI font size for the code action menu items
only when the origin is the quick actions bar.

Release Notes:

- Fix code actions menu items being cut-off in the editor.
2025-09-10 20:16:51 -03:00
Dima
0f9232a10d Fix wrong cursor shape description in Configuring Zed page (#37933)
It was previously copied incorrectly from `Terminal: Copy On Select`.

Release Notes:

- Fixed wrong description in `Terminal: Cursor Shape` in `Configuring
Zed` document
2025-09-10 20:05:23 -03:00
Marshall Bowers
db367cc6bf scheduler: Add missing constructs for Cloud (#37948)
This PR adds some missing constructs that are needed by Cloud to the
scheduler.

Release Notes:

- N/A
2025-09-10 22:02:23 +00:00
Ben Kunkle
2ce0641fe0 settings_ui: Handle enums with fields (#37945)
Closes #ISSUE

Adds handling for Enums with fields (i.e. not `enum Foo { Yes, No }`) in
Settings UI. Accomplished by creating default values for each element
with fields (in the derive macro), and rendering a toggle button group
with a button for each variant where switching the active variant sets
the value in the settings JSON to the default for the new active
variant.

Release Notes:

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

---------

Co-authored-by: Conrad <conrad@zed.dev>
2025-09-10 18:02:08 -04:00
David Kleingeld
95ccce3095 Rodio audio (#37786)
Adds input to the experimental rodio_audio pipeline.

Enable with:
```json
"audio": {
  "experimental.rodio_audio": true
}
```

Additionally enables automatic volume 
control for incoming audio:
```json
"audio": {
  "experimental.control_output_volume": true
}
```

Release Notes:

- N/A
2025-09-10 22:48:33 +02:00
Julia Ryan
14de161d06 Compress minidumps (#37797)
@notpeter this should fix that issue you were seeing where a generated
minidump was too big to upload with the sentry api.

Release Notes:

- N/A
2025-09-10 13:22:54 -07:00
Anthony Eid
b8c30f448f Improve Tab Map performance (#32243)
## Context

While looking into: #32051 and #16120 with instruments, I noticed that
`TabSnapshot::to_tab_point` and `TabSnapshot::to_fold_point` are a
common bottleneck between the two issues. This PR takes the first steps
into closing the stated issues by improving the performance of both
those functions.

### Method

`to_tab_point` and `to_fold_point` iterate through each character in
their rows to find tab characters and translate those characters into
their respective transformations. This PR changes this iteration to take
advantage of the tab character bitmap in the `Rope` data structure and
goes directly to each tab character when iterating.

The tab bitmap is now passed from each layer in-between the `Rope` to
the `TabMap`.

### Testing 

I added several randomized tests to ensure that the new `to_tab_point`
and `to_fold_point` functions have the same behavior as the old methods
they're replacing. I also added `test_random_chunk_bitmap` on each layer
the tab bitmap is passed up to the `TabMap` to make sure that the bitmap
being passed is transformed correctly between the layers of
`DisplayMap`.

`test_random_chunk_bitmap` was added to these layers:
- buffer
- multi buffer
- custom_highlights
- inlay_map
- fold_map

## Benchmarking 

I setup benchmarks with criterion that is runnable via `cargo bench -p
editor --profile=release-fast`. When benchmarking I had my laptop
plugged in and did so from the terminal with a minimal amount of
processes running. I'm also on a m4 max

### Results 

#### To Tab Point

Went from completing 6.8M iterations in 5s with an average time of
`736.13 ns` to `683.38 ns` which is a `-7.1875%` improvement

#### To Fold Point

Went from completing 6.8M iterations in 5s with an average time of
`736.55 ns` to `682.40 ns` which is a `-7.1659%` improvement

#### Editor render 

Went from having an average render time of `62.561 µs` to `57.216 µs`
which is a `-8.8248%` improvement

#### Build Buffer with one long line

Went from having an average buffer build time of `3.2549 ms` to `3.2635
ms` which is a `+0.2151%` regression within the margin of error

#### Editor with 1000 multi cursor input 

Went from having an average edit time of `133.05 ms` to `122.96 ms`
which is a `-7.5776%` improvement

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-09-10 16:13:41 -04:00
Marshall Bowers
cb75c2aeb7 Make plans backwards compatible (#37941)
This PR fixes the backwards compatibility of the new `Plan` variants.

We can't add new variants to the wire representation, as old clients
won't be able to understand them.

Release Notes:

- N/A
2025-09-10 20:11:07 +00:00
Joseph T. Lyons
2c29eac29f Fetch all staff in get-preview-channel-changes script (#37940)
Release Notes:

- N/A
2025-09-10 20:05:51 +00:00
AidanV
a94b0931c7 editor: Fix cuts on end of line cutting whole line (#34553)
Closes #19816

Release Notes:

- Improved `ctrl-k` (`editor::CutToEndOfLine`) behavior when used at the
end of lines
- Add option to make `editor::CutToEndOfLine` not gobble newlines.
   ```json
   {
     "context": "Editor",
"bindings": { "ctrl-k": ["editor::CutToEndOfLine", { "stop_at_newlines":
true }] }
   },
   ```

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-09-10 14:40:00 -04:00
Michael Sloan
441a934d84 Remove unnecessary Option from functions querying buffer outline (#37935)
`None` case wasn't being used

Release Notes:

- N/A
2025-09-10 18:21:51 +00:00
Ilija Tovilo
b28c979aae language_settings: Add whitespace_map setting (#37704)
This setting controls which visible characters are used to render
whitespace when the show_whitespace setting is enabled.

Release Notes:

- Added `whitespace_map` setting to control which visible characters are
used to render whitespace when the `show_whitespace` setting is enabled.

---------

Co-authored-by: Nia Espera <nia@zed.dev>
2025-09-10 18:19:24 +00:00
Smit Barmase
22e31a0d41 Fix crash when filtering items in Picker (#37929)
Closes #37617

We're already using `get` in a bunch of places, this PR updates the
remaining spots to follow the same pattern. Note that the `ix` we read
in `render_match` can sometimes be stale.

The likely reason is that we run the match-update logic asynchronously
(see
[here](138117e0b1/crates/picker/src/picker.rs (L643))).
That means it's possible to render items after the list's [data
update](138117e0b1/crates/picker/src/picker.rs (L652))
but before the [list
reset](138117e0b1/crates/picker/src/picker.rs (L662)),
in which case the `ix` can be greater than that of our updated data.

Release Notes:

- Fixed crash when filtering MCP tools.
2025-09-10 23:06:09 +05:30
Piotr Osiewicz
c0b583c9ef keymap_editor: Move OpenKeymapEditor action into zed_actions (#37928)
This lets us remove title_bar's dependency on keymap_editor, which in
turns improves dev build times by ~0.5s for me

Release Notes:

- N/A
2025-09-10 16:57:05 +00:00
Finn Evers
6441099a67 gpui: Fix blending of colors in HighlightStyle::highlight (#37666)
Whilst looking into adding support for RainbowBrackes, we stumbled upon
this: Whereas for all properties during this blending, we take the value
of `other` if it is set, for the color we actually take `self.color`
instead of `other.color` if `self.color` is at full opacity.
`Hsla::blend` returns the latter color if it is at full opacity, which
seems wrong for this case. Hence, this PR swaps these.

Will not merge before the next release, to ensure that we don't break
something somewhere unexpected.

Release Notes:

- N/A
2025-09-10 18:56:49 +02:00
Andy Brauninger
611b96627b Fix typo in development docs for Windows and Linux (#37925)
Fixes same typo ("collabortation") as #37607 but for the Windows and
Linux dev docs.

Release Notes:

- N/A
2025-09-10 19:43:50 +03:00
Bennet Bo Fenner
630340d659 agent: Fix mention completion sometimes not dismissing on space (#37922)
Previously we would still show a completion menu even when the user
typed an unrecognised mode with an argument,
e.g. `@something word`.
This PR ensures that we only show the completion menu, when the part
after the `@` is a known mode (e.g. `file`/`symbol`/`rule`/...)

Release Notes:

- Fix an issue where completions for `@mentions` in the agent panel
would sometimes not be dismissed when typing a space
2025-09-10 15:58:04 +00:00
Bennet Bo Fenner
acb3406eb8 editor: Wrap placeholder if text overflows (#37919)
This fixes an issue where long placeholders would be cut off, e.g. in a
Claude Code thread:

<img width="387" height="115" alt="image"
src="https://github.com/user-attachments/assets/831a54aa-cf2b-4d87-af86-e368a5936f6b"
/>

Now:

<img width="354" height="115" alt="image"
src="https://github.com/user-attachments/assets/e5df5e05-0869-4db2-8dee-38611263191c"
/>


Most of the changes in this PR are caused by us requiring `&mut Window`
in `set_placeholder_text`.

Release Notes:

- Fixed an issue where placeholders inside editors would not wrap

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-09-10 15:38:19 +00:00
Joseph T. Lyons
fb3c991112 Bump Zed to v0.205 (#37917)
Release Notes:

-N/A
2025-09-10 14:39:37 +00:00
Lukas Wirth
d110d325d4 languages: Remove broken pixi environment activation (#37915)
Closes [#ISSUE](https://github.com/zed-industries/zed/issues/37895)

This needs more thought behind it to be implemented properly

Release Notes:

- N/A
2025-09-10 13:35:16 +00:00
Bennet Bo Fenner
2cf3def716 acp: Add keybindings for authorizing tool calls (#37876)
TODO:
- [x] Double-check if we like the naming of the new actions
- [x] Only show keybinding hint once per option (e.g. if there are two
`allow_once` buttons only show it on the first one)
- [x] If there are multiple tool calls that need authorisation, only
show keybindings on the first tool call
- [x] Figure out which keybindings to use
- [x] Add linux keybindings
- [x] Add windows keybindings
- [x] Bug: long keybindings can make the buttons overflow


Release Notes:

- Add keybindings for authorizing tool calls (`agent: Allow once`,
`agent: Allow always`, `agent: Reject once`) in the agent panel

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-09-10 13:23:46 +00:00
Lukas Wirth
df2d097dc5 editor: Fix adjacent custom highlights interfering with each other (#37912)
Release Notes:

- Fixed matching bracket highlighting not highlighting closing brackets
when adjacent to each other

Co-authored-by: Finn Evers <finn@zed.dev>
2025-09-10 13:08:32 +00:00
Kirill Bulatov
fcdd427cf8 Revert "markdown: Add support for inline HTML img tags inside text (#37264)" (#37893)
This reverts commit e1a5d29972.

This have regressed Zed release notes' wrapping which we do not want to
do on a release day:
https://github.com/zed-industries/zed/pull/37264#issuecomment-3265420442

Release Notes:

- N/A
2025-09-10 05:34:42 +00:00
Smit Barmase
9c548a0ec6 workspace: Fix tab bar drop target height when no unpinned tabs present (#37884)
Before:
<img width="846" height="192" alt="Screenshot 2025-09-10 at 4 44 18 AM"
src="https://github.com/user-attachments/assets/3c79e140-e2b2-4e50-9fce-cb182e46d878"
/>

After:
<img width="846" height="192" alt="Screenshot 2025-09-10 at 4 43 13 AM"
src="https://github.com/user-attachments/assets/b5fa853d-ce39-4c81-9773-1d84eebc8cbb"
/>

Release Notes:

- Fixed height of the drop background in the tab bar when no unpinned
tabs are present.
2025-09-10 05:17:36 +05:30
Michael Sloan
bd0a5dd664 Potentially fix welcome banner in agent panel not going away (#37879)
Potentially fixes #37367. Just going ahead with the change even though
it's unclear whether this is the fix, since it is quite low risk.

Release Notes:

- N/A
2025-09-09 21:13:12 +00:00
Michael Sloan
2f40a3bdfa keymap validation: Improve message for action that takes no input (#37877)
See
https://github.com/zed-industries/zed/issues/26370#issuecomment-3200022302

Before (user screenshot):

<img width="650" height="127" alt="Image"
src="https://github.com/user-attachments/assets/9548ce43-657e-46ef-b6be-b95489167ac2"
/>

After (my screenshot):

<img width="616" height="229" alt="image"
src="https://github.com/user-attachments/assets/09028305-e7bb-4a31-bb87-55effbec26f3"
/>

Release Notes:

- N/A
2025-09-09 20:56:29 +00:00
Mitch (a.k.a Voz)
304af661a0 Fix import not working on first column first row of file (#37746)
Closes #26136

Release Notes:

- fixed auto import not working on first column, first row of file
2025-09-09 14:18:27 -06:00
Santiago Bernhardt
d2886d606b ollama: Add mistral-nemo (#37723)
Adding mistral nemo, sorting by name and adding comment about clamp
sizing

Release Notes:

- Added support for mistral-nemo

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-09 20:08:05 +00:00
Joseph T. Lyons
cffb883108 Consistently map syntax node navigation actions on macOS (#37874)
Skipping Linux and Windows keymaps here, as it's hard to find a
consistent base-binding for all 4 actions across all platforms that
don't break important actions for each keymap. Someone else can think on
that and make a proposal.

Release Notes:

- Added bindings for navigating between sibling nodes in the syntax tree
on macOS (`cmd-ctrl-{up/down}` for `SelectPreviousSyntaxNode` and
`SelectNextSyntaxNode`). Breaking change: the existing syntax tree
parent/child navigation bindings have moved from
`ctrl-shift-{left/right}` to `cmd-ctrl-{left/right}` to create a unified
four-directional navigation pattern where all syntax tree operations use
the same modifier combination. We could not use the previous base
modifiers without breaking more bindings.
2025-09-09 20:07:42 +00:00
Kirill Bulatov
eb7154d099 Skip "open this directory" menu entry in case of errors (#37872)
Follow-up of https://github.com/zed-industries/zed/pull/37564

Release Notes:

- N/A
2025-09-09 19:53:03 +00:00
0xshadow
18c6d9d394 Fix SVG preview not refreshing on external file changes (#37316)
Closes #37208 

## Release Notes:

- Fixed: SVG preview now refreshes automatically when files are modified
by external programs

## Summary

Previously, SVG preview would only refresh when files were saved within
the Zed editor, but not when modified by external programs (like
scripts, other editors, etc.)

## What Changed

The SVG preview now subscribes to file system events through the
worktree system. When an external program modifies an SVG file, the
worktree detects the change and notifies the preview. The preview then
clears its cache and refreshes to show the updated content.

## Before the fix



https://github.com/user-attachments/assets/e7f9a2b2-50f9-4b43-95e9-93a0720749f5


## After the fix


https://github.com/user-attachments/assets/b23511e3-8e59-45a1-b29b-d5105d32bd2c

AI Usage:
Used Cursor for code generation
2025-09-09 13:36:35 -06:00
Mitch (a.k.a Voz)
414d3be437 Set usePlaceholders to match Go default (#37551)
Closes #33629

Release Notes:

- changed gopls default to match what Go specifies
https://github.com/golang/tools/blob/master/gopls/doc/settings.md#useplaceholders-bool
2025-09-09 13:32:45 -06:00
Alvaro Parker
0862a0b666 git: Add uncommit action (#37031)
Closes #36767

Release Notes:

- Add uncommit action for git
2025-09-09 13:29:49 -06:00
Umesh Yadav
2e36e9782e language_models: Make Copilot Chat resilient to new model vendors and add tokenizer-based token counting (#37118)
While working on fixing this: #37116. I reliased the current
implementation of github copilot is not truly resilient to upstream
changes.

This PR enhances GitHub Copilot Chat to be forward-compatible with new
AI model vendors and improves token counting accuracy by using
vendor-specific tokenizers from the GitHub Copilot API. The system
previously failed when GitHub added new model vendors like xAI with
deserialization errors, and token counting wasn't utilizing the
vendor-specific tokenizer information provided by the API. The solution
adds an Unknown variant to the ModelVendor enum with serde other
attribute to gracefully handle any new vendors GitHub introduces,
implements tokenizer-aware token counting that uses the model's
specified tokenizer mapping o200k_base to gpt-4o with fallback, adds
explicit support for xAI models with proper tool input format handling,
and includes comprehensive test coverage for unknown vendor scenarios.
Key changes include adding the tokenizer field to model capabilities,
implementing the tokenizer method on models, updating tool input format
logic to handle unknown vendors, and simplifying token counting to use
the vendor's specified tokenizer or fall back to gpt-4o. This ensures
Zed's Copilot Chat integration remains robust and accurate as GitHub
continues expanding their AI model provider ecosystem.

Release Notes:

- Enhanced model vendor compatibility to automatically support future AI
providers and improved token counting accuracy using vendor-specific
tokenizers from the GitHub Copilot

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-09 13:28:26 -06:00
Mitch (a.k.a Voz)
1751bf4cdb Allow outline modal toggling (#37575)
Closes #37511 

The outline modal seems to have a bug where if it's open and the
`outline::Toggle` is triggered, it would not close if there was another
command with the same keybind. So instead, if the outline modal is open
and an `outline::Toggle` is triggered, we dismiss the modal.

Release Notes:

- Fixed a bug where `outline::Toggle` would sometimes not close outline
modal
2025-09-09 13:26:35 -06:00
Jonathan Hart
2fae4c7c72 vim: Make indenting selected lines with > and < in Helix mode no longer deselect them (#37665)
Improves Helix compatibility by making the Indent keybinds `<` and `>`
no longer deselect lines if they're selected.

Post Indent action current Zed release:
<img width="485" height="271" alt="image"
src="https://github.com/user-attachments/assets/41fd3d94-9c89-49dd-adc5-f696dbd79827"
/>
(Cursor is on the beginning of the first line)

Post Indent action in Helix:
<img width="376" height="144" alt="image"
src="https://github.com/user-attachments/assets/fdd1a489-cf3a-4638-9199-3adffa63ef61"
/>

Post Indent action in this PR:
<img width="463" height="300" alt="image"
src="https://github.com/user-attachments/assets/8edd3b81-e446-4b55-bc90-61cac3661ed7"
/>

Release Notes:

- Fixed selected lines indented with `<` and `>` deselecting in Helix
mode
2025-09-09 13:18:22 -06:00
chbk
1ae3d25aed Improve Markdown highlighting (#37669)
Release Notes:

  - Improved Markdown syntax highlighting
  
  
PR #25330 raised concerns about breaking changes, so I split it into two
PRs:
- This PR improves highlighting without deprecating existing selectors.
- PR #37670 is based on this PR and introduces new Markdown selectors.

| Zed 0.202.7 | With this PR |
| --- | --- |
| <img width="800" height="1080" alt="md-0 202 7"
src="https://github.com/user-attachments/assets/0b0b5920-32ed-454f-bc3b-bf5cd0a9086a"
/> | <img width="800" height="1080" alt="md-pr"
src="https://github.com/user-attachments/assets/a5923a2e-391e-4e09-a60b-1a142f9378f3"
/> |

Changes to include the `markup` selector, conforming to
[Neovim](38e46a6d7a/queries/markdown/highlights.scm (L59)),
[VS
Code](dfad570d15/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json (L60)),
[Atom](6686ac6ccc/grammars/gfm.json (L147)),
and [Zed
itself](1e255e41cc/crates/languages/src/gitcommit/highlights.scm (L1)).

- `paragraph`, `indented_code_block`, `pipe_table`: `text`
- `# Heading`: `title` -> `title.markup`
- `-`, `1.`, `>`, `|`: `punctuation.markup`
- ```` ``` ````: `punctuation.embedded.markup`
- `[1]: url.com`, `[link](url.com)`: `link_text.markup`
- `url.com`: `link_uri` -> `link_uri.markup`
- `*italic*`: `emphasis` -> `emphasis.markup`
- `**bold**`: `emphasis.strong` -> `emphasis.strong.markup`
- ``` `raw` ```: `text.literal` -> `text.literal.markup`
- `~~strikethrough~~`: `strikethrough.markup`

````md

# Heading

Some stylized text:
- `raw`
- *italic*
- ~strike~
- **strong**

> quoted

```python
print("some code")
```

1. Here is an ![image](image.jpg)
2. A [link](https://github.com/zed-industries)
3. And even a [referenced link][1]

[1]: https://zed.dev

| tables | are |
| --- | --- |
| properly | scoped |

````
2025-09-09 13:05:07 -06:00
Ben Brandt
5e58f44d85 Fix auth in edit_agent evals (#37869)
Somehow we have a regression where the auth wasn't being called, so the
model didn't exist.

Looking at the code, it is likely this was relying on some other part of
the code doing the auth, since the order wouldn't have worked before
without that happening. This new order of doing auth before checking for
available models should fix it going forward.

Release Notes:

- N/A
2025-09-09 19:00:24 +00:00
Jakub Konka
d8085d3ac0 zed: Hide Install CLI menu button on Windows (#37843)
The "Install CLI" menu button and `install_cli::Install` action are
effectively no-op on Windows since the CLI is directly available in
Windows Terminal (CMD prompt, PowerShell, etc.) after the user runs Zed
installer package.

Release Notes:

- N/A

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-09-09 20:56:08 +02:00
Anthony Eid
707d0e6ebd settings ui: Add text field support to ui layer (#37868)
This is an initial implementation that isn't used for any settings yet,
but will be used once `Vec<String>` is implemented.

I also updated the window.with_state api to grant access to a
`Context<S>` app reference instead of just an App.

## Example

<img width="603" height="83" alt="Screenshot 2025-09-09 at 2 15 56 PM"
src="https://github.com/user-attachments/assets/7b3fc350-a157-431f-a4bc-80a1806a3147"
/>


Release Notes:

- N/A
2025-09-09 18:48:22 +00:00
Lev Zakharov
46fb521333 git_ui: Show author name on commits in branch picker (#36812)
See related discussion
https://github.com/zed-industries/zed/discussions/36511.

<img alt="zed"
src="https://github.com/user-attachments/assets/da7fc30d-2504-48f4-a392-7c8d5cd8acb1"
/>

Release Notes:

- Added option to show the author name in a branch picker commit
information

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-09 18:44:46 +00:00
Ivan Trubach
9529cd18d1 project_panel: Add action to open file in split pane (#36973)
Closes #18605

Related:
- https://github.com/zed-industries/zed/discussions/16901
- https://github.com/zed-industries/zed/issues/10549

Adds an action to open file in split pane. Also updates vim keybindings
for better compatibility with netrw:
[“v”](bc461f952d/runtime/pack/dist/opt/netrw/doc/netrw.txt (L1091))
and
[“o”](bc461f952d/runtime/pack/dist/opt/netrw/doc/netrw.txt (L1075))
keys should open file in splits.

<table>
<tr>
<td><video
src="https://github.com/user-attachments/assets/e24c6fd4-4eb0-407a-bdd1-5300908ea2a1">
<td><video
src="https://github.com/user-attachments/assets/fa0b8105-41a9-4421-a3cc-89244a90d67a">
</table>


Release Notes:

- Added `project_panel::OpenSplitVertical` and
`project_panel::OpenSplitHorizontal` actions for opening file in a
splits.
2025-09-10 00:14:15 +05:30
Marco Munizaga
14ffd7b53f editor: Implement Go to next/prev Document Highlight (#35994)
Closes #21193
Closes #14703 

Having the ability to navigate directly to the next
symbolHighlight/reference lets you follow the data flow of a variable.
If you highlight the function itself (depending on the LSP), you can
also navigate to all returns.

Note that this is a different feature from navigating to the next match,
as that is not language-context aware. For example, if you have a var
named foo it would also navigate to an unrelated variable fooBar.

Here's how this patch works:

- The editor struct has a background_highlights.
- Collect all highlights with the keys [DocumentHighlightRead,
DocumentHighlightWrite]
- Depending on the direction, move the cursor to the next or previous
highlight relative to the current position.

Release Notes:

- Added `editor::GoToNextDocumentHighlight` and
`editor::GoToPreviousDocumentHighlight` to navigate to the next LSP
document highlight. Useful for navigating to the next usage of a certain
symbol.
2025-09-09 18:38:38 +00:00
Jacob
9431c65733 git: Improve error messages (#35946)
Release Notes:

- Improved git error messages

Includes stderr in the error message for git commands, provides better
output for things like errors when switching branches.

Before:
<img width="702" height="330" alt="image"
src="https://github.com/user-attachments/assets/f32402ae-b85c-4b0b-aae8-789607e8ec9e"
/>

After:
<img width="650" height="575" alt="image"
src="https://github.com/user-attachments/assets/308dbe3c-1ff9-40b9-a187-1e12d2488c80"
/>

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-09 18:16:29 +00:00
Paul Sadauskas
b2d7e34e80 Update Editor::select_larger_syntax_node (#36971)
When the cursor was sitting on a syntactically insignificant character,
like a `{` or `,`, this function was selecting only that character, when
what the user likely wanted was to select the next larger syntax node.

Those punctuation characters all seemed to be not "named", in
tree-sitter terminology, so I updated the function to walk up the node
tree until it found a node where `is_named()` is true.

Closes #4555 

Also, while writing the tests, the output of a failing test with the
wrong thing selected was harder to read than it needed to be.

It used to output a diff of ranges, like this:

<img width="217" height="111" alt="image"
src="https://github.com/user-attachments/assets/00de53a8-8776-47aa-8101-5a5b5bc3fa5e"
/>

I leveraged the existing `generate_marked_text` helper function and
updated the assertion to output a diff of the text with the selection
markers:

<img width="211" height="116" alt="image"
src="https://github.com/user-attachments/assets/53b2b882-2676-4c70-8718-e2e2ba6f254e"
/>

Happy to make that a separate PR, if needed.

Release Notes:

- Fixed Editor select_larger_syntax_node to be smart about punctuation.
2025-09-09 12:13:20 -06:00
Antonio Scandurra
61d4718f2b Make it possible to support GPUI in the scheduler crate (#37849)
Added features that weren't needed in our cloud code.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2025-09-09 18:10:03 +00:00
nick-kilian
9e903c9fd1 Add path/status sorting toggle to git panel menu (#35704)
Adds a new menu option to toggle between sorting git entries by path or
status, with settings integration

Release Notes:

- Git Panel: Added toggle to switch between sorting git panel entries by
path or by status (available in git panel ellipsis menu)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-09 17:55:25 +00:00
Warpten
d81479ee57 Allow user-defined worktree names in title bar and platform windows (#36713)
Closes #36637 

Release Notes:
- Adds the ability to specify a human-readable project name for each
worktree.


https://github.com/user-attachments/assets/ce980fa6-65cf-46d7-9343-d08c800914fd
2025-09-09 11:50:58 -06:00
Piotr Osiewicz
a2edd56587 python: Add import paths to Pyright/BasedPyright completion items (#37865)
Release Notes:

- python: Added package origin to completions from Pyright/BasedPyright
2025-09-09 17:50:18 +00:00
Agus Zubiaga
d7a9be03d1 acp: Ensure connection subprocess gets killed on drop (#37858)
It appears that in macOS, the `AcpConnection._wait_task` doesn't always
get dropped when quitting the app. In these cases, the subprocess would
be kept alive because we move the `child` into it.

Instead, we will now explicitly kill it when `AcpConnection` is dropped.
It's ok to do this because when the connection is dropped, the thread is
also dropped, so there's no need to report the exit status to it.

Closes #37741

Release Notes:

- Claude Code: Fix subprocess leak on app quit
2025-09-09 17:22:19 +00:00
Conrad Irwin
cdbddc2170 Allow unauthenticated commit models to show (#37857)
Closes #37462
Closes #37814

Release Notes:

- Fixed a bug where the commit generation message would not always show
2025-09-09 17:05:49 +00:00
localcc
f397294640 Fix git staging in a subfolder (#37860)
Closes #37418 

Ideal fix for this would be #37855 but that is a large refactor so
implementing this as a workaround.

Release Notes:

- N/A
2025-09-09 16:50:26 +00:00
Umesh Yadav
8527dcfc65 git_ui: Better handle commit message amend (#35268)
Follow up to this: #35114

* Previously we were still showing the commit message even after
cancelling amend which was the old commit message.
* This PR fixes that by restoring the commit message to the old state
before the amend begin so that in case user typed a commit message it's
shown if not then it's not.

Before:


https://github.com/user-attachments/assets/e0edcfff-863d-4367-a7c4-8a2998e702ca

After:



https://github.com/user-attachments/assets/9daf9be0-8a3d-4914-91a4-567693711b6b




Release Notes:

- Resolved an issue where cancelling an amend commit would incorrectly
leave the old commit message in the input field. The commit message box
now properly reverts to its pre-amend state.
2025-09-09 10:37:53 -06:00
Guillaume Launay
7f607a9b7d git_ui: Show current branch first in branch picker (#35138)
Closes #ISSUE

Release Notes:

- Put current branch first in branch picker
2025-09-09 10:36:26 -06:00
Agus Zubiaga
5e397e85b1 acp: Support session modes (e.g. CC plan mode) (#37632)
Adds support for [ACP session
modes](https://github.com/zed-industries/agent-client-protocol/pull/67)
enabling plan and other permission modes in CC:


https://github.com/user-attachments/assets/dea18d82-4da6-465e-983b-02b77c6dcf15


Release Notes:

- Claude Code: Add support for plan mode, and all other permission modes

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-09 13:28:02 -03:00
Marshall Bowers
ad02f6b9e3 cloud_llm_client: Add another Plan variant (#37852)
This PR adds a corresponding `FreeV2` variant to the `Plan`.

Release Notes:

- N/A
2025-09-09 15:51:22 +00:00
Piotr Osiewicz
2e7607c0e7 python: Fix instability of Pyright/BasedPyright code completions (#37850)
Pyright sets different `sortText` based on whether a given completion
item was recently resolved. This probably lines up with VSCode's way of
resolving items, but it's a no-no for us, as it makes completions
unstable.

Closes #9983

Release Notes:

- python: Fixed code completions having arbitrary order when using
Pyright/basedpyright
2025-09-09 15:34:57 +00:00
Joseph Mearman
0ac1752668 terminal: Sanitize trailing periods in URL detection (#37684)
Fixes #12338, related to #37616

This change improves URL detection in the terminal by removing trailing
periods that appear to be sentence punctuation rather than part of the
URL structure. It builds upon the parentheses sanitization work from
#37076 by consolidating both approaches into a unified
`sanitize_url_punctuation` function.

## Changes
- Combines parentheses and period sanitization into a single
`sanitize_url_punctuation` function
- Uses optimized single traversal with `fold()` for parentheses counting
(addressing code review feedback)
- Removes trailing periods using heuristics to distinguish sentence
punctuation from legitimate URL components
- Removes multiple trailing periods (always considered punctuation)
- Removes single trailing periods when they appear after alphanumeric
characters or slashes
- Preserves periods that are part of legitimate URL structure (e.g.,
version numbers, IP addresses, subdomains)
- Maintains existing parentheses balancing logic from #37076

## Implementation Details
- **Parentheses handling**: Counts opening and closing parentheses,
removes trailing `)` when unbalanced
- **Period handling**: Uses `take_while()` iterator for efficient period
counting
- **Performance**: Single pass counting with optimized loop to avoid
redundant work
- **Code clarity**: Uses let-else pattern for readable conditional logic

## Testing
- Added comprehensive test coverage for both parentheses and period
sanitization
- Tests cover balanced vs unbalanced parentheses cases  
- Tests cover various period scenarios including legitimate URL periods
vs sentence punctuation
- All existing tests continue to pass

## Release Notes

- Improved terminal URL detection by further trimming trailing
punctuation. URLs ending with periods (like
`https://example.com.`) and unbalanced parentheses (like
`https://example.com/path)`) are now properly detected without including
the trailing punctuation.
2025-09-09 10:39:09 -04:00
Dave Waggoner
af1875f91c terminal_view: Improve path hyperlink navigation by considering the terminal working directory (#36962)
Closes #34027

Release Notes:

- Improved terminal path hyperlink navigation by considering the
terminal working directory
2025-09-09 10:31:37 -04:00
Smit Barmase
734f94b71c agent_ui: Fix crash when typing multibyte character after mention (#37847)
Closes #36333

Release Notes:

- Fixed a crash that occurred when typing an IME character right after a
mention in the Agent Panel.
2025-09-09 19:16:22 +05:30
Danilo Leal
136468a4df keymap editor: Add some adjustments to the UI (#37819)
- Makes the keymap editor search container more consistent with the
project & file search corresponding elements
- Changes the keymap editor menu item in the user menu be called "Keymap
Editor", as opposed to "Key Binding", to match with the tab and action
name

Design note: Still a bit unsure about the extra space on the right for
the keymap editor. This makes it way more consistent with the other
search views, but it also just feels like space that could be used. On
the other hand, though, it's very unlikely anyone will ever use more
than 30% of the search bar width as search queries here are likely
pretty short; definitely much shorter than project search queries.

<img width="600" height="552" alt="Screenshot 2025-09-09 at 1  02@2x"
src="https://github.com/user-attachments/assets/9825a129-2c5a-4852-9837-c586b88e9332"
/>


Release Notes:

- N/A
2025-09-09 09:36:12 -03:00
Lukas Wirth
adf43d691a project: Remove non searchable buffer entries on buffer close (#37841)
Release Notes:

- N/A
2025-09-09 11:21:51 +00:00
localcc
466a2e22d5 Improve font rendering on macOS (#37622)
Part of https://github.com/zed-industries/zed/issues/7992

Release Notes:

- N/A
2025-09-09 13:46:59 +03:00
Finn Evers
365c5ab45f editor: Remove unnecessary clone (#37833)
The style is taken by reference everywhere, so no need to clone it at
the start of every `prepaint`.

Release Notes:

- N/A
2025-09-09 08:04:27 +00:00
Jakub Konka
11d81b95d4 Revert "git: Use self.git_binary_path instead raw git string" (#37828)
Reverts zed-industries/zed#37757
2025-09-09 06:36:25 +00:00
Michael Sloan
4b3b2acf75 Fix hot reload of builtin TreeSitter queries on Linux (#37825)
`fs.watch` is recursive on mac and non-recursive on Linux.

Release Notes:

- N/A
2025-09-09 05:55:28 +00:00
Danilo Leal
849424740f Fix code action menu items font size in toolbar (#37824)
Closes https://github.com/zed-industries/zed/issues/36478

Release Notes:

- N/A
2025-09-09 02:20:23 -03:00
Danilo Leal
3e605c2c4b docs: Fix casing on mentions to some brand names (#37822)
- MacOS → macOS
- VSCode → VS Code
- SublimeText → Sublime Text
- Javascript/Typescript → JavaScript/TypeScript

Release Notes:

- N/A
2025-09-09 01:45:55 -03:00
Danilo Leal
82b11bf77c docs: Include Cursor in the list of supported base keymaps (#37821)
We were missing that in the /key-bindings page. Also took advantage of
the opportunity to add a bunch of small writing tweaks.

Release Notes:

- N/A
2025-09-09 01:39:52 -03:00
Conrad Irwin
3a437fd888 Remove Chat (#37789)
At RustConf we were demo'ing zed, and it continually popped open the
chat panel.

We're usually inured to this because the Chat panel doesn't open unless
a Guest
is in the channel, but it made me sad that we were showing a long stream
of
vacuous comments and unresponded to questions on every demo screen.

We may bring chat back in the future, but we need more thought on the
UX, and
we need to rebuild the backend to not use the existing collab server
that we're
trying to move off of.

Release Notes:

- Removed the chat feature from Zed (Sorry to the 5 of you who use this
on the regular!)
2025-09-08 21:53:17 -06:00
Conrad Irwin
96c429d2c3 Only reject agent actions, don't restore checkpoint on revert (#37801)
Updates #37623

Release Notes:

- Changed the behaviour when editing an old message in a native agent
thread.
Prior to this, it would automatically restore the checkpoint (which
could
lead to a surprising amount of work being discarded). Now it will just
reject
any unaccepted agent edits, and you can use the "restore checkpoint"
button
  for the original behavior.
2025-09-08 20:18:40 -06:00
Marshall Bowers
ea4073e50e cloud_llm_client: Add new Plan variants (#37810)
This PR adds new variants to the `Plan` enum.

Release Notes:

- N/A
2025-09-09 00:18:43 +00:00
Ben Kunkle
8c93112869 settings_ui: Add Basic Implementation of Language Settings (#37803)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-09-08 20:14:36 -04:00
Marshall Bowers
1feffad5e8 Remove zed-pro feature flag (#37807)
This PR removes the `zed-pro` feature flag, as it was not being used.

Release Notes:

- N/A
2025-09-08 23:23:16 +00:00
Ivan Danov
ae54a4e1b8 Add commands to select next/previous siblings in the syntax tree (#35053)
Closes #5133 and discussion
https://github.com/zed-industries/zed/discussions/33493

This PR adds two new commands to select next/previous siblings in the
syntax tree. These commands were modelled after the existing ones about
expand/shrink selection. With this PR I've added new key bindings
inspired by `helix` for previous / next / expand / shrink selections.



https://github.com/user-attachments/assets/4ef7fadb-0b82-4897-95c7-1737827bf4ac


Release Notes:

- Add commands to select next/previous siblings in the syntax tree

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2025-09-08 23:11:53 +00:00
Danilo Leal
4a0a7d1d27 Add item for the debugger panel in the app view menu (#37805)
Release Notes:

- Enabled the debugger panel to be opened via the app's "View" menu
option
2025-09-08 19:19:10 -03:00
Danilo Leal
5934d3789b python: Improve Basedpyright banner styles (#37802)
Just tidying this up a bit.

Release Notes:

- N/A
2025-09-08 18:51:13 -03:00
Danilo Leal
acde79dae7 agent: Improve popover trigger styles (#37800)
This PR mostly adds some style treatment to popover button triggers in
the agent panel, either making them better aligned with their trigger or
adjusting the color to better clarify which button is triggering the
currently opened menu.

Moving forward, I think the selected styles at least should probably be
tackled at the component level, whether that's a context menu or a
popover, so we don't have to ever do this manually (and running the risk
of forgetting to do it).

Release Notes:

- N/A
2025-09-08 18:39:49 -03:00
Patsakula Nikita
246c644316 agent_servers: Fix proxy configuration for Gemini (#37790)
Closes #37487 

Proxy settings are now taken from the Zed configuration and passed to
Gemini via the "--proxy" flag.

Release Notes:

- acp: Gemini ACP server now uses proxy settings from Zed configuration.
2025-09-08 20:44:40 +00:00
Marshall Bowers
e4de26e5dc cloud_llm_client: Remove unused code (#37799)
This PR removes some unused code from the `cloud_llm_client`.

This was only used on the server, so we can move it there.

Release Notes:

- N/A
2025-09-08 20:42:42 +00:00
ZhangJun
7091c70a1e open_ai: Trim newline before "data:" prefix and account for the possibility of no space after ":" (#37644)
I'am using an openai compatible model, but got nothing in agent thread
panel, and Zed log has "Model generated an empty summary" line.

I add one log to open_ai.rs:
<img width="2454" height="626" alt="图片"
src="https://github.com/user-attachments/assets/85354c7d-a0cc-4bba-86fd-2a640038a13e"
/>

and got:

<img width="3456" height="278" alt="图片"
src="https://github.com/user-attachments/assets/7746aedd-5d76-44b5-90f2-e129a1507178"
/>

It appear that `let line = line.strip_prefix("data: ")?;` can not handle
correctly.

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-09-08 22:01:55 +02:00
Cole Miller
fa0df6da1c python: Replace pyright with basedpyright (#35362)
Follow-up to #35250. Let's experiment with having this by default on
nightly.

Release Notes:

- Added built-in support for the basedpyright language server for Python
code. basedpyright is now enabled by default, and pyright (previously
the primary Python language server) remains available but is disabled by
default. This supersedes the basedpyright extension, which can be
uninstalled. Advantages of basedpyright over pyright include support for
inlay hints, semantic highlighting, auto-import code actions, and
stricter type checking. To switch back to pyright, add the following
configuration to settings.json:

```json
{
  "languages": {
    "Python": {
      "language_servers": ["pyright", "pylsp", "!basedpyright"]
    }
  }
}
```

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-08 19:15:17 +00:00
Cole Miller
99102a84fa ACP over SSH (#37725)
This PR adds support for using external agents in SSH projects via ACP,
including automatic installation of Gemini CLI and Claude Code,
authentication with API keys (for Gemini) and CLI login, and custom
agents from user configuration.

Co-authored-by: maan2003 <manmeetmann2003@gmail.com>

Release Notes:

- agent: Gemini CLI, Claude Code, and custom external agents can now be
used in SSH projects.

---------

Co-authored-by: maan2003 <manmeetmann2003@gmail.com>
2025-09-08 14:19:41 -04:00
Cole Miller
5f01f6d75f agent: Make read_file and edit_file tool call titles more specific (#37639)
For read_file and edit_file, show the worktree-relative path if there's
only one visible worktree, and the "full path" otherwise. Also restores
the display of line numbers for read_file calls.

Release Notes:

- N/A
2025-09-08 12:57:22 -04:00
Dave Waggoner
a66cd820b3 Fix line endings in terminal_hyperlinks.rs (#37654)
Fixes Windows line endings in `terminal_hyperlinks.rs`, which was
accidentally originally added with them.

Release Notes:

- N/A
2025-09-08 12:21:47 -04:00
hong jihwan
f07da9d9f2 Correctly parse backslash character on replacement (#37014)
When a keybind contains a backslash character (\\), it is parsed
incorrectly, which results in an invalid keybind configuration.


This patch fixes the issue by ensuring that backslashes are properly
escaped during the parsing process. This allows them to be used as
intended in keybind definitions.

Release Notes:

- Fixed an issue where keybinds containing a backslash character (\\)
failed to be replaced correctly


## Screenshots
<img width="912" height="530" alt="SCR-20250828-borp"
src="https://github.com/user-attachments/assets/561a040f-575b-4222-ac75-17ab4fa71d07"
/>
<img width="912" height="530" alt="SCR-20250828-bosx"
src="https://github.com/user-attachments/assets/b8e0fb99-549e-4fc9-8609-9b9aa2004656"
/>
2025-09-08 12:17:48 -04:00
Iha Shin (신의하)
8d05bb090c Add injections for Isograph function calls in JavaScript and TypeScript (#36320)
Required for https://github.com/isographlabs/isograph/pull/568 to work
properly. Tested with a local build and made sure everything's working
great!

Release Notes:

- JavaScript/TypeScript/JSX: Added support for injecting Isograph language support into `iso`
function calls
2025-09-08 16:04:37 +00:00
Dino
2325f14713 diagnostics: Current file diagnostics view (#34430)
These changes introduce a new command to the Diagnostics panel,
`diagnostics: deploy current file`, which allows the user to view the
diagnostics only for the currently opened file.

Here's a screen recording showing these changes in action 🔽 

[diagnostics: deploy current
file](https://github.com/user-attachments/assets/b0e87eea-3b3a-4888-95f8-9e21aff8ea97)

Closes #4739 

Release Notes:

- Added new `diagnostics: deploy current file` command to view
diagnostics for the currently open file

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-08 09:14:24 -06:00
Ben Kunkle
fe2aa3f4cb onboarding: Fix font loading frame delay (#37668)
Closes #ISSUE

Fixed an issue where the first frame of the `Editing` page in onboarding
would have a slight delay before rendering the first time it was
navigated to. This was caused by listing the OS fonts on the main
thread, blocking rendering. This PR fixes the issue by adding a new
method to the font family cache to prefill the cache on a background
thread.

Release Notes:

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

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
2025-09-08 11:09:54 -04:00
fantacell
10989c702c helix: Add match operator (#34060)
This is an implementation of matching like "m i (", as well as "] (" and
"[ (" in `helix_mode` with a few supported objects and a basis for more.

Release Notes:

- Added helix operators for selecting text objects

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-08 08:48:47 -06:00
张小白
3f80ac0127 macos: Fix menu bar flickering (#37707)
Closes #37526

Release Notes:

- Fixed menu bar flickering when using some IMEs on macOS.
2025-09-08 10:44:19 -04:00
Bennet Bo Fenner
4f1634f95c Remove unused semantic_index crate (#37780)
Release Notes:

- N/A
2025-09-08 13:38:31 +00:00
Eduardo Alba
40eec32cb8 markdown_preview: Fix trimming of leading whitespace in Markdown lists (#35750)
Closes #35712

Release Notes:

- Fixed white-space trimming leading to disconnect between list items
and content in markdown previews.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-09-08 12:37:11 +00:00
张小白
17499453f6 windows: Check required GPU/driver feature StructuredBuffer (#37776)
Check whether the GPU/driver supports the StructuredBuffer feature
required by our shaders. If it doesn’t, log an error and skip that
GPU/driver, so Windows can fall back to the software renderer.

Release Notes:

- N/A
2025-09-08 12:22:57 +00:00
Lukas Wirth
80a4746a46 project: Be explicit about project-searchability for buffers (#37773)
Closes https://github.com/zed-industries/zed/issues/28830

Release Notes:

- Fixed builtin buffers and log views showing up in project search
2025-09-08 11:22:36 +00:00
Jakub Konka
01f5b73e3b cargo: Remove unused -fuse-ld=lld flag from Win config (#37769)
It is unused and generates a warning

```
 LINK : warning LNK4044: unrecognized option '/fuse-ld=lld'; ignored
```

If in the future we want to give `lld-link.exe` a try, we can set

```toml
linker = "lld-link.exe"
```

instead. At the time of writing, my tests have shown that there is no
real difference between `lld-link` and `link` in terms of linking speed.

Release Notes:

- N/A
2025-09-08 10:43:56 +00:00
Lukas Wirth
a0081dd693 project: Consider all worktrees for activation script search (#37764)
Should fix https://github.com/zed-industries/zed/issues/37734

Release Notes:

- Fixed venv not always activating correctly
2025-09-08 10:06:43 +00:00
chbk
f522823988 Highlight shorthand fields in Rust (#37674)
Release Notes:

- Highlight shorthand fields in Rust

| Zed 0.202.7 | With this PR |
| --- | --- |
| <img width="370" height="50" alt="rust-0 202 7"
src="https://github.com/user-attachments/assets/856a4d82-3ad0-4248-ad51-0472a0b6531a"
/> | <img width="370" height="50" alt="rust-pr"
src="https://github.com/user-attachments/assets/25b8e357-8519-4533-9026-3f2874b42ddb"
/> |
2025-09-08 12:32:08 +03:00
Martin Pool
5a8603bebb Install mold from the OS on Debian 13 (Trixie) (#37712)
I ran `scripts/linux` on Debian Trixie 13. It suggested manually
installing Mold, but [mold](http://packages.debian.org/mold) is packaged
on Debian and so we could install it automatically.

The version packaged there seems to work well enough for `cargo t` to
pass, at least.

## Tested

```
; sudo apt remove mold libstdc++-14-dev
... uninstalls them
; ./script/linux
The following NEW packages will be installed:
  build-essential clang clang-19 clang-tools-19 g++ g++-14 g++-14-x86-64-linux-gnu g++-x86-64-linux-gnu libstdc++-14-dev mold
; cargo t
(passes)
```

Release Notes:

- N/A
2025-09-08 12:29:17 +03:00
Martin Pool
abac87c2f8 tests: Fix doctests in crates/component (#37716)
Previously, `cargo test --package component` failed due to missing
imports for a doctest:


```

   Doc-tests component

running 1 test
test crates/component/src/component.rs - Component::description (line 229) ... FAILED

failures:

---- crates/component/src/component.rs - Component::description (line 229) stdout ----
error: cannot find derive macro `Documented` in this scope
 --> crates/component/src/component.rs:231:10
  |
4 | #[derive(Documented)]
  |          ^^^^^^^^^^

error[E0599]: no associated item named `DOCS` found for struct `MyComponent` in the current scope
 --> crates/component/src/component.rs:236:20
  |
5 | struct MyComponent;
  | ------------------ associated item `DOCS` not found for this struct
...
9 |         Some(Self::DOCS)
  |                    ^^^^ associated item not found in `MyComponent`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
Couldn't compile the test.

failures:
    crates/component/src/component.rs - Component::description (line 229)

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s

error: doctest failed, to rerun pass `-p component --doc`
bobcat ~/src/zed (doctests) 18:33

``` 

This might be unnoticed if you mostly run nextest, as it does not run
doctests.

Release Notes:

- N/A
2025-09-08 12:23:33 +03:00
Jakub Konka
c3d065cecc git: Use self.git_binary_path instead raw git string (#37757)
Release Notes:

- N/A
2025-09-08 11:05:04 +02:00
Remco Smits
e1a5d29972 markdown: Add support for inline HTML img tags inside text (#37264)
Follow-up: #36700

This PR adds basic support for showing images inline inside a text.

As you can see inside the before screenshot, the image was displayed
right below the `Some inline text` text. This was because we didn't
consider the image to be inline with the text (paragraph). Now we do :)

All the test changes are making sure it is not more than 1 element
parsed, instead of only checking for the first parsed element. This
could work out bad when we return more than 1 result.

**Before**
<img width="1717" height="1344" alt="Screenshot 2025-08-31 at 13 49 45"
src="https://github.com/user-attachments/assets/13c5f9dd-0e0a-4e08-b2a6-28e9a4e0cab8"
/>

**After**
<img width="1719" height="1343" alt="Screenshot 2025-08-31 at 13 42 14"
src="https://github.com/user-attachments/assets/bf7aa82f-3743-4fb3-87aa-4a97a550c4d1"
/>


**Code example**:
```markdown
<p>some inline text <img src="https://picsum.photos/200/300" alt="Description of image" style="height: 100px" /> asdjkflsadjfl</p>

# Html Tag
<img src="https://picsum.photos/200/300" alt="Description of image" />

# Html Tag with width and height
<img src="https://picsum.photos/200/300" alt="Description of image" width="100" height="200" />

# Html Tag with style attribute with width and height
<img src="https://picsum.photos/200/300" alt="Description of image" style="width: 100px; height: 200px" />

# Normal Tag
![alt text](https://picsum.photos/200/300)
```

Release Notes:

- Markdown: Added support for inline HTML `img` tags inside paragraphs
2025-09-08 11:49:32 +03:00
HE7086
d342da4e9a docs: Fix typos in language configurations (#37740)
Fixes several typos in the docs. I think there are more but I have only
read what I actually needed :)

Release Notes:

- N/A
2025-09-08 08:44:46 +00:00
Umesh Yadav
7ae8f81d74 language_models: Clear cached credentials when OpenAI and OpenAI Compatible provider api_url change (#37610)
Closes #37093

Also check this: #37099.

So currently in zed for both OpenAI and OpenAI Compatible provider when
the url is changed from settings the api_key stored in the provider
state is not cleared and it is still used. But if you restart zed the
api_key is cleared. Currently zed uses the api_url to store and fetch
the api key from credential provider. The behaviour is not changed
overall, it's just that we have made it consistent it with the zed
restart logic where it re-authenticates and fetches the api_key again. I
have attached the video below to show case before and after of this.

So all in all the problem was we were not re-authenticating the in case
api_url change while zed is still running. Now we trigger a
re-authentication and clear the state in case authentication fails.
 
OpenAI Compatible Provider:

| Before | After |
|--------|--------|
| <video
src="https://github.com/user-attachments/assets/324d2707-ea72-4119-8981-6b596a9f40a3"
/> | <video
src="https://github.com/user-attachments/assets/cc7fdb73-8975-4aaf-a642-809bb03ce319"
/> |

OpenAI Provider:

| Before | After |
|--------|--------|
| <video
src="https://github.com/user-attachments/assets/a1c07d1b-1909-4b49-b33c-fc05123e92e7"
/> | <video
src="https://github.com/user-attachments/assets/d78aeccd-5cd3-4d0c-8b9f-6f98e499d7c8"
/> |

Release Notes:

- Fixed OpenAI and OpenAI Compatible provide API keys being persisted
when changing the API URL setting. Authentication is now properly
revalidated when settings change.

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-08 06:57:16 +02:00
Umesh Yadav
36364b16a0 agent_ui: Clear model selector query on dismiss (#37569)
Closes #36756

| Before | After |
|--------|--------|
| <video src
="https://github.com/user-attachments/assets/1d022ac6-0aea-4e98-a717-9988420c9683"/>
| <video
src="https://github.com/user-attachments/assets/78d19012-1224-4c92-a6c8-47ae4c13ca31"/>
|

Release Notes:

- agent: Clear model selector query on dismiss in agent panel

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-08 06:52:57 +02:00
Umesh Yadav
b35959f4c2 agent_ui: Fix context_server duplication when name is updated (#35403)
Closes #35400

| Before | After |
|--------|--------|
| <video
src="https://github.com/user-attachments/assets/6aae34ca-e022-457a-9b66-47b85c976b23"/>
| <video
src="https://github.com/user-attachments/assets/ae058988-8f70-4605-b537-e045175d2e75"
/> |

Release Notes:

- agent: Fix `context_server` duplication when name is updated

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-09-08 04:50:26 +00:00
marius851000
9450bcad25 ollama: Properly format tool calls fed back to the model (#34750)
Fix an issue that resulted in Ollama models not being able to not being
able to access the input of the commands they executed (only being able
to access the result).

This properly return the function history as shown in
https://github.com/ollama/ollama/blob/main/docs/api.md#chat-request-with-history-with-tools

Previously, function input where not returned and result where returned
as a "user" role.

Release Notes:

- ollama: Improved format when returning tool results to the models
2025-09-08 04:26:01 +00:00
Liu Jinyi
69bdef38ec editor: Fix inconsistent search behavior for untitled/temporary tabs (#37086)
Closes #37597 

Release Notes:

- N/A

---


## Problem

When using "Tab Switcher: Toggle All", temporary files (untitled buffers
without associated file paths) cannot be searched by their displayed
content. This creates an inconsistent user experience where:

- **UI Display**: Shows dynamic titles based on the first line of
content (up to 40 characters)
- **Search Text**: Only searches for the static text "untitled"

### Example
- A temporary file containing `Hello World` is displayed as "Hello
World" in the tab
- However, searching for "Hello" in Tab Switcher returns no results
- Only searching for "untitled" will find this temporary file

## Root Cause

The issue stems from inconsistent title generation logic between display
and search:

1. **Display Title** (`items.rs:724`): Uses `self.title(cx)` →
`MultiBuffer::title()` → `buffer_content_title()`
- Returns the first line of content (max 40 chars) for temporary files
   
2. **Search Text** (`items.rs:650-656`): Uses `tab_content_text()`
method
   - Returns hardcoded "untitled" for files without paths

## Solution

Modified the `tab_content_text()` method in `crates/editor/src/items.rs`
to use the same logic as the displayed title for consistency:

```rust
fn tab_content_text(&self, detail: usize, cx: &App) -> SharedString {
    if let Some(path) = path_for_buffer(&self.buffer, detail, true, cx) {
        path.to_string_lossy().to_string().into()
    } else {
        // Use the same logic as the displayed title for consistency
        self.buffer.read(cx).title(cx).to_string().into()
    }
}
```
2025-09-07 11:33:17 -07:00
Michael Sloan
0e33a3afe0 zeta: Check whether data collection is allowed for recent edit history (#37680)
Also:

* Adds tests for can_collect_data.
* Temporarily removes collection of diagnostics.

Release Notes:

- Edit Prediction: Fixed a bug where requests were marked eligible for
data collection despite the recent edit history in the request involving
files that may not be open source. The requests affected by this bug
will not be used in training data.
2025-09-07 11:16:49 -06:00
Bruno Taschenbier
76aaf6a8fe Fix docs for tabs.close_position in default.json (#37729)
Minor docs fix.
Seems like 0a4ff2f475 accidentally added
"hidden" to the docs of both – `close_position` and `show_close_button`.

Release Notes:

- N/A

Co-authored-by: tastenbier <>
2025-09-07 17:00:58 +00:00
张小白
0ef7ee172f windows: Remove some unused keys from the keymap (#37722)
AFAIK, we dont handle these keys on Windows.

Release Notes:

- N/A
2025-09-07 06:45:41 +00:00
张小白
29def012a1 windows: Update Windows keymap (#37721)
Pickup the changes from #37009

Release Notes:

- N/A
2025-09-07 06:09:35 +00:00
Smit Barmase
5c30578c49 linux: Fix IME preedit text not showing in Terminal on Wayland (#37701)
Closes https://github.com/zed-industries/zed/issues/37268
 
Release Notes:

- Fixed an issue where IME preedit text was not showing in the Terminal
on Wayland.
2025-09-07 02:01:55 +05:30
Cole Miller
1552afd8bf docs: Use #action throughout configuring-zed.md (#37709)
Release Notes:

- N/A
2025-09-06 19:38:48 +00:00
Kirill Bulatov
e04473dd26 Revert "gpui: Skip test attribute expansion for rust-analyzer (#37611)" (#37705)
This reverts commit 4124bedab7.

With the new annotation, r-a starts to skip the tasks that are marked
with `gpui::test` and when it fully loads, it starts to return
module-only tasks:


https://github.com/user-attachments/assets/5af3e3e4-91b7-4f19-aab0-ed7f186e5f74


Release Notes:

- N/A
2025-09-06 16:51:51 +00:00
Kirill Bulatov
84f166fc85 Tweak word completions more (#37697)
Follow-up of https://github.com/zed-industries/zed/pull/37352
Closes https://github.com/zed-industries/zed/issues/37132

* disabled word completions in the agent panel's editor
* if not disabled, allow to trigger word completions with an action even
if the completions threshold is not reached

Release Notes:

- Fixed word completions appearing in the agent panel's editor and not
appearing when triggered with the action before the completion threshold
is reached
2025-09-06 13:39:21 +00:00
Kirill Bulatov
065518577e Fix the tasks docs (#37699)
Closes https://github.com/zed-industries/zed/issues/37698

Release Notes:

- N/A
2025-09-06 13:37:21 +00:00
Marco Groot
1d828b6ac6 Fix broken link in CONTRIBUTING.md (#37688)
Can see currently the link is dead currently, but this changes fixes
locally


https://github.com/user-attachments/assets/e01d9c47-e91e-4c24-8285-01e3b45583b9


Release Notes:

- N/A
2025-09-06 12:29:34 +02:00
Kirill Bulatov
777ce7cc97 Fixed LSP binary info not being shown in full (#37682)
Follow-up of https://github.com/zed-industries/zed/pull/37083
Closes https://github.com/zed-industries/zed/issues/37677

Release Notes:

- Fixed LSP binary info not being shown in full
2025-09-06 07:37:59 +00:00
Umesh Yadav
1f37fbd051 language_models: Use /models/user for fetching OpenRouter models (#37534)
This PR switches the OpenRouter integration from fetching all models to
fetching only the models specified in the user's account preferences.
This will help improve the experience

**The Problem**

The previous implementation used the `/models` endpoint, which returned
an exhaustive list of all models supported by OpenRouter. This resulted
in a long and cluttered model selection dropdown in Zed, making it
difficult for users to find the models they actually use.

**The Solution**

We now use the `/models/user` endpoint. This API call returns a curated
list based on the models and providers the user has selected in their
[OpenRouter dashboard](https://openrouter.ai/models).

Ref: [OpenRouter API Docs for User-Filtered
Models](https://openrouter.ai/docs/api-reference/list-models-filtered-by-user-provider-preferences)

Release Notes:

- language_models: Support OpenRouter user preferences for available
models
2025-09-06 07:42:15 +02:00
Umesh Yadav
8c9442ad11 language_models: Skip empty delta text content in OpenAI and OpenAI compatible provider (#37626)
Closes #37302 

Related: #37614 

In case of open_ai_compatible providers like Zhipu AI and z.ai they
return empty content along with usage data. below is the example json
captured from z.ai. We now ignore empty content returned by providers
now to avoid this issue where we would return the same empty content
back to provider which would error out.

```
OpenAI Stream Response JSON:
{
  "id": "2025090518465610d80dc21e66426d",
  "created": 1757069216,
  "model": "glm-4.5",
  "choices": [
    {
      "index": 0,
      "finish_reason": "tool_calls",
      "delta": {
        "role": "assistant",
        "content": ""
      }
    }
  ],
  "usage": {
    "prompt_tokens": 7882,
    "completion_tokens": 150,
    "total_tokens": 8032,
    "prompt_tokens_details": {
      "cached_tokens": 7881
    }
  }
}
```

Release Notes:

- Skip empty delta text content in OpenAI and OpenAI compatible provider

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-06 07:16:08 +02:00
Michael Sloan
47a475681f Optimize Chunks::seek when offset is in current chunk (#37659)
Release Notes:

- N/A
2025-09-06 04:22:55 +00:00
Max Brunsfeld
23dc1f5ea4 Disable foreign keys in sqlite when running migrations (#37572)
Closes #37473

### Background

Previously, we enabled foreign keys at all times for our sqlite database
that we use for client-side state.
The problem with this is that In sqlite, `alter table` is somewhat
limited, so for many migrations, you must *recreate* the table: create a
new table called e.g. `workspace__2`, then copy all of the data from
`workspaces` into `workspace__2`, then delete the old `workspaces` table
and rename `workspaces__2` to `workspaces`. The way foreign keys work in
sqlite, when we delete the old table, all of its associated records in
other tables will be deleted due to `on delete cascade` clauses.

Unfortunately, one of the types of associated records that can be
deleted are `editors`, which sometimes store unsaved text. It is very
bad to delete these records, as they are the *only* place that this
unsaved text is stored.

This has already happened multiple times as we have migrated tables as
we develop Zed, but I caused it to happened again in
https://github.com/zed-industries/zed/pull/36714.

### The Fix

The Sqlite docs recommend a multi-step approach to migrations where you:

* disable foreign keys
* start a transaction
* create a new table
* populate the new table with data from the old table
* delete the old table
* rename the new table to the old name
* run a foreign key check
* if it passes, commit the transaction
* enable foreign keys

In this PR, I've adjusted our sqlite migration code path to follow this
pattern more closely. Specifically, we disable foreign key checks before
running migrations, run a foreign key check before committing, and then
enable foreign key checks after the migrations are done.

In addition, I've added a generic query that we run *before* running the
foreign key check that explicitly deletes any rows that have dangling
foreign keys. This way, we avoid failing the migration (and breaking the
app) if a migration deletes data that *does* cause associated records to
need to be deleted.

But now, in the common case where we migrate old data in the new table
and keep the ids, all of the associated data will be preserved.

Release Notes:

- Fixed a bug where workspace state would be lost when upgrading from
Zed 0.201.x. or below.
2025-09-06 01:09:50 +00:00
chbk
a6a111cadd Highlight labels in Go (#37673)
Release Notes:

- Highlight labels in Go

| Zed 0.202.7 | With this PR |
| --- | --- |
| <img width="160" height="50" alt="go-0 202 7"
src="https://github.com/user-attachments/assets/1a1b3b3c-52ae-41e3-a52b-c2a9bb7589d2"
/> | <img width="160" height="50" alt="go-pr"
src="https://github.com/user-attachments/assets/29020b9f-ed03-4298-aa5b-0201a81fd5e6"
/> |
2025-09-06 01:36:36 +02:00
Piotr Osiewicz
6a7b84eb87 toolchains: Allow users to provide custom paths to toolchains (#37009)
- **toolchains: Add new state to toolchain selector**
- **Use toolchain term for Add Toolchain button**
- **Hoist out a meta function for toolchain listers**

Closes #27332

Release Notes:

- python: Users can now specify a custom path to their virtual
environment from within the picker.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-09-06 00:47:39 +02:00
Nia
59bdbf5a5d Various fixups to unsafe code (#37651)
A collection of fixups of possibly-unsound code and removing some small
useless writes.

Release Notes:

- N/A
2025-09-06 00:27:14 +02:00
Remco Smits
64b6e8ba0f debugger: Fix allow showing more than 1 compact session item (#37036)
Closes #36978

This PR fixes an issue that we would only show the first `root -> child`
session in compact mode, but the session that came after it, we would
only show the child session label instead of also adding the parent
label due to compact mode.

## Before
<img width="348" height="173" alt="Screenshot 2025-08-27 at 22 18 39"
src="https://github.com/user-attachments/assets/ad6afd3a-196d-497f-812a-00698676ee90"
/>

## After
<img width="563" height="211" alt="Screenshot 2025-08-27 at 21 57 16"
src="https://github.com/user-attachments/assets/a953ef2a-a796-4160-b868-96e96f81c858"
/>

With 3 parent + child sessions and one parent session only.
<img width="484" height="223" alt="Screenshot 2025-08-27 at 22 22 13"
src="https://github.com/user-attachments/assets/a26f79a4-63a5-43d0-a714-d62cb1995e6e"
/>

cc @cole-miller I know we hacked on this some while ago, so figured you
might be the best guy to ask for a review.

Release Notes:

- Debugger: Fix to allow showing more than 1 compact session item

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-09-05 21:35:28 +00:00
morgankrey
236b3e546e Update Link (#37671)
Documentation fix

Release Notes:

- N/A
2025-09-05 14:34:13 -07:00
Anthony Eid
ea363466aa Fix attach modal showing local processes in SSH sessions (#37608)
Closes #37520

This change makes the attach modal load processes from the remote server
when connecting via SSH, rather than showing local processes from the
client machine.

This works by using the new GetProcessesRequest RPC message to allow
downstream clients to get the correct processes to display. It also only
works with downstream ssh clients because the message handler is only
registered on headless projects.

Release Notes:

- debugger: Fix bug where SSH attach modal showed local processes
instead of processes from the server
2025-09-05 17:03:42 -04:00
Smit Barmase
c45177e296 editor: Fix fold placeholder hover width smaller than marker (#37663)
Bug:
<img width="196" height="95" alt="Screenshot 2025-09-06 at 1 21 39 AM"
src="https://github.com/user-attachments/assets/66ec0fc9-961e-4289-bd75-68b24dad485e"
/>

The fold marker we use, `⋯`, isn’t rendered at the same size as the
editor’s font. Notice how the fold marker appears larger than the same
character typed directly in the editor buffer.

<img width="146" height="82" alt="image"
src="https://github.com/user-attachments/assets/a059d221-6b55-4cf9-bc1e-898ff5444006"
/>

When we shape the line, we use the editor’s font size, and it ends up
determining the element’s width. To fix this, we should treat the
ellipsis as a UI element rather than a buffer character, since current
visual size looks good to me.

<img width="196" height="95" alt="Screenshot 2025-09-06 at 1 29 28 AM"
src="https://github.com/user-attachments/assets/1b766d46-00ab-40c7-b98a-95ea2d4b29bf"
/>

Release Notes:

- Fixed an issue where the fold placeholder’s hover area was smaller
than the marker.
2025-09-06 02:05:42 +05:30
Finn Evers
45fa034107 Restore notification panel settings (#37661)
Follow-up to https://github.com/zed-industries/zed/pull/37489

Notification panel settings were always missing the content, hence this
PR adds it. After #37489, the use of the same content twice broke
things, which currently makes the notification panel non-configurable on
Nightly. This PR fixes this.

There once was an issue about the documentation for the panel being
wrong as well. However, I was just unable to find that sadly.

Release Notes:

- N/A
2025-09-05 21:50:51 +02:00
Conrad Irwin
1c5c8552f2 Show actual error in InvalidBufferView (#37657)
Release Notes:

- Update error view to show the error
2025-09-05 12:03:26 -07:00
Conrad Irwin
5d374193bb Add terminal::Toggle (#37585)
Co-Authored-By: Brandan <b5@n0.computer>

Release Notes:

- Added a new action `terminal::Toggle` that is by default bound to
'ctrl-\`'. This copies the default behaviour from VSCode and Jetbrains
where the terminal opens and closes correctly. If you'd like the old
behaviour you can rebind 'ctrl-\`' to `terminal::ToggleFocus`

Co-authored-by: Brandan <b5@n0.computer>
2025-09-05 17:34:39 +00:00
Dino
b65fb06264 editor: Fix text manipulation on line mode selections (#37646)
This commit updates the implementation for
`editor::Editor.manipulate_text` to use
`editor::selections_collection::SelectionsCollection.all_adjusted`
instead of `editor::selections_collection::SelectionsCollection.all`, as
the former takes into account the selection's `line_mode`, fixing the
issue where, if an user was in vim's visual line mode, running the
`editor: convert to upper case` command would not work as expected.

Closes #36953 

Release Notes:

- Fixed bug where using the editor's convert case commands while in
vim's Visual Line mode would not work as expected
2025-09-05 10:12:51 -07:00
Matin Aniss
b3405c3bd1 Add line ending selector (#35392)
Partially addresses this issue #5294

Adds a selector between `LF` and `CRLF` for the buffer's line endings,
the checkmark denotes the currently selected line ending.

Selector
<img width="487" height="66" alt="image"
src="https://github.com/user-attachments/assets/13f2480f-4d2d-4afe-adf5-385aeb421393"
/>

Release Notes:

- Added line ending selector.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-09-05 09:52:57 -07:00
Peter Tripp
638320b21e Improve macOS version information in telemetry (#37185)
macOS versions are currently reported as `macOS 26.0.0`.
But this makes it impossible to differentiate amongst macOS Beta
releases which have the same version number (`X.0.0`) but are different
builds.

This PR adds build number info to `os_version` for macOS Betas and
[Rapid Security Response](https://support.apple.com/en-us/102657)
release that have identical version numbers to stable release, but have
different builds numbers. We can differentiate them because the build
numbers end with a letter.

| Version | Before | After |
| - | - | - | 
| macOS Sonoma 14.7.8 | 14.7.8 | 14.7.8 |
| macOS Sequoia 15.6.1 | 15.6.1 | 15.6.1 |
| mcOS Ventura 13.3.1 | 13.3.1 | 13.3.1 |
| macOS Ventura 13.3.1 (a) |  13.3.1 | 13.3.1 (Build 22E772610a) |
| macOS Tahoe 26.0.0 (Beta1) | 26.0.0 | 26.0.0 (Build 25A5316a) |
| macOS Tahoe 26.0.0 (Beta5) | 26.0.0 | 26.0.0 (Build 25A5349a) | 

This should cause minimal telemetry changes and only impacting a macOS
betas and a couple specific older macOS versions, but will allow
differentiation between macOS beta releases in GitHub issues.

Alternatives:
1. Leave as-is (can't differentiate between macOS beta builds)
2. Always include build number info (impacts telemetry; more consistent
going forward; differentiates non-final Release Candidates which don't
include a trailing letter)

I couldn't find a cocoa method to retrieve macOS build number, so I
switched dependencies from `cocoa` to `objc2-foundation` in the client
crate. We already depend upon this crate as a dependency of
`blade-graphics` so I matched the features of that and so workspace-hack
doesn't change.

1ebc69a447/tooling/workspace-hack/Cargo.toml (L355)

Release Notes:

- N/A
2025-09-05 12:40:47 -04:00
张小白
91ab0636ec windows: Make sure zed.sh using the correct line ending (#37650)
This got missed in the changes from #37631

Release Notes:

- N/A
2025-09-05 16:25:55 +00:00
Yacine Hmito
fb6cc8794f Fix typo in development docs for macOS (#37607)
Release Notes:

- N/A
2025-09-05 15:56:40 +00:00
Jakub Konka
3d37611b6f cli: Rename script zed-wsl to zed, and enable on non-WSL (#37631)
Closes #23026

With this hotfix, git committing from the built-in Zed terminal (well,
PowerShell), now works.

Release Notes:

- N/A
2025-09-05 17:43:39 +02:00
Peter Tripp
360e372b57 linux: Restore ctrl-escape to keymap (#37636)
Closes: https://github.com/zed-industries/zed/issues/37628
Follow-up to: https://github.com/zed-industries/zed/pull/36712

Release Notes:

- linux: Fix for ctrl-escape not escaping the tab switcher.
2025-09-05 11:09:32 -04:00
Isaac Hales
74e8afe9a8 Fix logic for default values for task variables (#37588)
This is a small fix for default values in task variables. The
[documentation](https://zed.dev/docs/tasks) states

> You can also use verbose syntax that allows specifying a default if a
given variable is not available: ${ZED_FILE:default_value}

I found, however, that this doesn't actually work. Instead, the Zed
variable and the default value are just appended in the output. For
example, if I run a task `echo ${ZED_ROW:100}` the result I get is
`447:100` (in this case it should just be `447`).

This PR fixes that. I also added a new test case for handling default
values.
I also tested the fix in a dev build and it seems to work.

There are no UI adjustments.

AI disclosure: I used Claude Code to write the code, including the fix
and the tests.

This is actually my first open-source PR ever, so if I did something
wrong, I'd appreciate any tips and I'll make it right!


Release Notes:

- Fixed task variable substitution always appending the default
2025-09-05 14:57:58 +00:00
Finn Evers
e30f45cf64 Syntax tree view improvements (#37570)
In an effort to improve the experience while developing extensions and
improving themes, this PR updates the syntax tree views behavior
slightly.

Before, the view would always update to the current active editor whilst
being used. This was quite painful for improving extension scheme files,
as you would always have to change back and forth between editors to
have a view at the relevant syntax tree.

With this PR, the syntax tree view will now stay attached to the editor
it was opened in, similar to preview views. Once the view is shown, the
`UseActiveEditor` will become available in the command palette and
enable the user to update the view to the last focused editor. On file
close, the view will also be updated accordingly.



https://github.com/user-attachments/assets/922075e5-9da0-4c1d-9e1a-51e024bf41ea

A button is also shown whenever switching is possible.

Futhermore, improved the empty state of the view.

Lastly, a drive-by cleanup of the `show_action_types` method so there is
no need to call `iter()` when calling the method.


Release Notes:

- The syntax tree view will now stay attached to the buffer it was
opened in, similar to the Markdown preview. Use the `UseActiveEditor`
action when the view is shown to change it to the last focused editor.
2025-09-05 14:22:32 +02:00
Jakub Konka
16c4fd4fc5 gpui: move Option -> Result conversion out of closure in App::update_window_id (#37624)
Doesn't fix anything, but it seems that we do not need to assert and
convert into an error until after the closure run to completion,
especially since this is the only error we throw.

Release Notes:

- N/A
2025-09-05 13:19:57 +02:00
Lukas Wirth
ec58adca13 languages: Invoke conda activate in conda environments (#37627)
This isn't quite right, but using the env manager path causes conda to
scream and I am not yet sure why, either way this is an improvement over
the status quo

Release Notes:

- N/A\
2025-09-05 11:16:15 +00:00
Lukas Wirth
bed358718b agent_ui: Fix index panic in SlashCommandCompletion::try_parse (#37612)
Release Notes:

- N/A
2025-09-05 07:56:53 +00:00
Lukas Wirth
4124bedab7 gpui: Skip test attribute expansion for rust-analyzer (#37611)
The `test` attribute doesn't really matter to rust-analyzer, so we can
make use of its cfg to have it think its just the standard test
attribute which should make rust-analyzer slightly less resource
intensive in zed. It also should prevent some IDE features from possibly
failing within tests.

Notably this has no effect outside of this repo, as the `rust-analyzer`
cfg only takes effect on workspace member crates.

Ideally we'd use the ignored proc macro config here but rust-analyzer
still doesn't have toml configs working unfortunately.

Release Notes:

- N/A
2025-09-05 06:54:08 +00:00
Smit Barmase
57c6dbd71e linux: Fix IME positioning on scaled display on Wayland (#37600)
Removes IME bounds scaling on Wayland since it uses logical pixels,
unlike X11. We now scale only on X11. Windows and macOS don’t use these
bounds for IME anyway.

Release Notes:

- Fixed an issue where the IME popover could appear outside the window
or fail to show on Wayland.
2025-09-05 09:10:50 +05:30
Michael Sloan
fded3fbcdb zeta: Scope edit prediction event history to current project (#37595)
This change also causes Zeta to not do anything for editors that are not
associated with a project. In practice, this shouldn't affect any
behavior - those editors shouldn't have edit predictions anyway.

Release Notes:

- Edit Prediction: Requests no longer include recent edits from other
projects (other Zed windows).
2025-09-05 01:15:59 +00:00
Michael Sloan
a660527036 Make entry_for_path return a reference instead of cloning (#37591)
Release Notes:

- N/A
2025-09-05 00:26:37 +00:00
Anthony Eid
0cb8a8983c settings ui: Improve setting proc macro and add scroll to UI (#37581)
This PR improves the settings_ui proc macro by taking into account more
serde attributes
1. rename_all
2. rename
3. flatten

We also pass field documentation to the UI layer now too. This allows ui
elements to have more information like the switch field description.

We got the scrollbar working and started getting language settings to
show up.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-09-04 22:30:48 +00:00
Cole Miller
c7902478c1 acp: Pass project environment to external agent servers (#37568)
Closes #37469 

Release Notes:

- agent: The project shell environment is now passed to external agent
processes.

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Nia Espera <nia-e@haecceity.cc>
2025-09-04 18:16:25 -04:00
morgankrey
3c0183fa5e Extraneous backtick (#37576)
Release Notes:

- N/A
2025-09-04 16:14:57 -05:00
morgankrey
e982cb824a docs: Claude Authentication (#37573)
Release Notes:

- N/A
2025-09-04 15:57:00 -05:00
Marshall Bowers
1b865a60f8 snippets: Bump to v0.0.6 (#37567)
This PR bumps the snippets extension to v0.0.6.

Changes:

- https://github.com/zed-industries/zed/pull/37565

Release Notes:

- N/A
2025-09-04 20:08:49 +00:00
Marshall Bowers
4c32d5bf13 snippets: Disable feature_paths by default (#37565)
This PR updates the default configuration of the `snippets` extension to
disable suggesting paths (`feature_paths`).

If users want to enable it, it can be done via the settings:

```json
{
  "lsp": {
    "snippet-completion-server": {
      "settings": {
        "feature_paths": true
      }
    }
  }
}
```

Release Notes:

- N/A
2025-09-04 19:35:48 +00:00
Kirill Bulatov
ccae033d85 Make fallback open picker more intuitive (#37564)
Closes https://github.com/zed-industries/zed/issues/34991

Before, the picker did not allow to open the current directory that was
just completed:

<img width="553" height="354" alt="image"
src="https://github.com/user-attachments/assets/e77793c8-763e-416f-9728-18d5a39b467f"
/>

pressing `enter` here would open `assets`; pressing `tab` would append
the `assets/` segment to the query.
Only backspace, removing `/` would allow to open the current directory.

After:
<img width="574" height="349" alt="image"
src="https://github.com/user-attachments/assets/bdbb3e23-7c7a-4e12-8092-51a6a0ea9f87"
/>

The first item is now a placeholder for opening the current directory
with `enter`.
Any time a fuzzy query is appended, the placeholder goes away; `tab`
selects the entry below the placeholder.

Release Notes:

- Made fallback open picker more intuitive

---------

Co-authored-by: Peter Tripp <petertripp@gmail.com>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-09-04 19:34:23 +00:00
Marshall Bowers
c2fa9d7981 docs: Add configuration example for simple-completion-language-server (#37566)
This PR adds a configuration example for the
`simple-completion-language-server`.

We show the user how to re-enable the `feature_paths` option, as we're
now disabling it by default
(https://github.com/zed-industries/zed/pull/37565).

Release Notes:

- N/A
2025-09-04 19:25:52 +00:00
Anthony Eid
5f03202b5c settings ui: Create settings key trait (#37489)
This PR separates out the associated constant `KEY` from the `Settings`
trait into a new trait `SettingsKey`. This allows for the key trait to
be derived using attributes to specify the path so that the new
`SettingsUi` derive macro can use the same attributes to determine top
level settings paths thereby removing the need to duplicate the path in
both `Settings::KEY` and `#[settings_ui(path = "...")]`

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

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-09-04 15:19:02 -04:00
Kirill Bulatov
223fda2fe2 Make remote projects to sync in local user settings (#37560)
Closes https://github.com/zed-industries/zed/issues/20024
Closes https://github.com/zed-industries/zed/issues/23489



https://github.com/user-attachments/assets/6466e0c1-4188-4980-8bb6-52ef6e7591c9


Release Notes:

- Made remote projects to sync in local user settings
2025-09-04 19:05:21 +00:00
Marshall Bowers
a85946eba8 docs: Update TOML docs (#37561)
This PR updates the TOML docs to remove references to Taplo and suggest
the Tombi extension for users wanting language server support.

Relates to https://github.com/zed-industries/zed/issues/36766.

Release Notes:

- N/A
2025-09-04 18:54:32 +00:00
Cole Miller
9d94358971 acp: Keep diff editors in sync with AgentFontSize global (#37559)
Release Notes:

- agent: Fixed `cmd-+` and `cmd--` not affecting the font size of diffs.
2025-09-04 18:33:56 +00:00
Marshall Bowers
9e11105483 toml: Extract to zed-extensions/toml repository (#37558)
This PR extracts the TOML extension to the
[zed-extensions/toml](https://github.com/zed-extensions/toml)
repository.

Release Notes:

- N/A
2025-09-04 18:07:50 +00:00
Anthony Eid
caebd0cc4d debugger: Fix stack frame filter crash (#37555)
The crash was caused by not accounting for the fact that a range of
collapse frames only counts as one entry. Causing the filter indices to
overshoot for indices after collapse frames (it was counting all
collapse frames instead of just one).

The test missed this because it all happened in one `cx.update` closure
and didn't render the stack frame list when the filter was applied. The
test has been updated to account for this.


Release Notes:

- N/A

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-04 17:55:20 +00:00
Marshall Bowers
6e2922367c Use full SHA for blade dependency (#37554)
In https://github.com/zed-industries/zed/pull/37516 we updated the
`blade` dependency, but used a short SHA.

No reason to not use the full SHA.

Release Notes:

- N/A
2025-09-04 17:41:47 +00:00
Jiqing Yang
25ee9b1013 Fix Wayland crash on AMD GPUs by updating Blade (#37516)
Updates blade-graphics from e0ec4e7 to bfa594e to fix GPU crashes on
Wayland with AMD graphics cards.

The crash was caused by incorrect BLAS scratch buffer alignment - the
old version hardcoded 256-byte alignment, but AMD GPUs require different
alignment values. The newer Blade version uses the GPU's actual
alignment requirements instead of hardcoding.

Closes #37448

Release Notes:

- Migrate to newer version of Blade upstream
2025-09-04 17:21:44 +00:00
Ben Brandt
0870a1fe80 acp: Don't share API key with Anthropic provider (#37543)
Since Claude Code has it's own preferred method of grabbing API keys, we
don't want to reuse this one.

Release Notes:

- acp: Don't share Anthropic API key from the Anthropic provider to
allow default Claude Code login options

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-09-04 16:01:50 +00:00
Lukas Wirth
e37efc1e9b diagnostics: Fix diagnostics pane clearing up too eagerly on typing (#37546)
Closes https://github.com/zed-industries/zed/issues/30494

Release Notes:

- Fixed diagnostics pane closing buffers too eagerly when typing inside
it
2025-09-04 15:30:23 +00:00
Nathan Sobo
1ae326432e Extract a scheduler crate from GPUI to enable unified integration testing of client and server code (#37326)
Extracts and cleans up GPUI's scheduler code into a new `scheduler`
crate, making it pluggable by external runtimes. This will enable
deterministic integration testing with cloud components by providing a
unified test scheduler across Zed and backend code. In Zed, it will
replace the existing GPUI scheduler for consistent async task management
across platforms.

## Changes

- **Core Implementation**: `TestScheduler` with seed-based
randomization, session tracking (`SessionId`), and foreground/background
task separation for reproducible testing.
- **Executors**: `ForegroundExecutor` (!Send, thread-local) and
`BackgroundExecutor` (Send, with blocking/timeout support) as
GPUI-compatible wrappers.
- **Clock and Timer**: Controllable `TestClock` and future-based `Timer`
for time-sensitive tests.
- **Testing APIs**: `once()`, `with_seed()`, and `many()` methods for
configurable test runs.
- **Dependencies**: Added `async-task`, `chrono`, `futures`, etc., with
updates to `Cargo.toml` and lock file.

## Benefits

- **Integration Testing**: Facilitates reliable async tests involving
cloud sessions, reducing flakiness via deterministic execution.
- **Pluggability**: Trait-based design (`Scheduler`) allows easy
integration into non-GPUI runtimes while maintaining GPUI compatibility.
- **Cleanup**: Refactors GPUI scheduler logic for clarity, correctness
(no `unwrap()`, proper error handling), and extensibility.

Follows Rust guidelines; run `./script/clippy` for verification.

- [x] Define and test a core scheduler that we think can power our cloud
code and GPUI
- [ ] Replace GPUI's scheduler


Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-09-04 17:14:53 +02:00
张小白
a05f86f97b windows: Don't log error when RedrawWindow (#37542)
Release Notes:

- N/A
2025-09-04 14:47:17 +00:00
Marshall Bowers
473bbd78cc onboarding: Fix typos in comments (#37541)
This PR fixes some grammatical typos in some comments in the
`onboarding` crate.

Release Notes:

- N/A
2025-09-04 13:46:40 +00:00
张小白
28c78d2d85 windows: Keep just one copy of GPU instance (#37445)
Now we only keep a single copy of the GPU device. The GPU lost handling
got broken after #35376, but it’s properly handled again now.

Release Notes:

- N/A
2025-09-04 21:31:12 +08:00
Lukas Wirth
fca44f89c1 languages: Allow installing pre-release of rust-analyzer and clangd (#37530)
Release Notes:

- Added lsp binary config to allow fetching nightly rust-analyzer and
clangd releases
2025-09-04 09:22:19 +00:00
Mitch (a.k.a Voz)
b7ad20773c worktree: Create parent directories on rename (#37437)
Closes https://github.com/zed-industries/zed/issues/37357

Release Notes:

- Allow creating sub-directories when renaming a file in file finder

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-09-04 08:25:47 +00:00
Finn Evers
aa1629b544 Remove some unused events (#37498)
This PR cleans up some emitted events around the codebase. These events
are either never emitted or never listened for.

It seems better to re-implement these at some point should they again be
needed - this ensures that they will actually be fired in the cases
where they are needed as opposed to being there and getting unreliable
and stale (which is already the case for the majority of the events
removed here).

Lastly, this ensures the `CapabilitiesChanged` event is not fired too
often.

Release Notes:

- N/A
2025-09-04 09:09:28 +02:00
James Tucker
69a5c45672 gpui: Fix out-of-bounds node indices in dispatch_path (#37252)
Observed in a somewhat regular startup crash on Windows at head (~50% of
launches in release mode).

Closes #37212

Release Notes:

- N/A
2025-09-03 23:18:23 -07:00
沈瑗杰
d0aaf04673 Change DeepSeek max token count to 128k (#36864)
https://api-docs.deepseek.com/zh-cn/news/news250821

Now the official API supports 128k token content

and have modify the name to v3.1/v3.1 thinking

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-09-04 05:51:48 +00:00
Francis
d677c98f43 agent2: Use inline enums in now and edit_file tools JSON schema (#37397)
Added schemars annotations to generate inline enums instead of
references ($ref) in the JSON schema passed to LLMs.

Concerns :
- "timezeone" parameter for "now" tool function
- "mode" parameter for "edit_file" tool function

Should be the same for futures tools/functions enums. This is easier for
LLMs to understand the schema since many of them don't use JSON
references correctly.

Tested with :
- local GPT-OSS-120b with llama.cpp server (openai compatible)
- remote Claude Sonnet 4.0 with Zed pro subscription

Thanks in advance for the merge.
(notice this is my first PR ever on Github, I hope I'm doing things
well, please let me know if you have any comment - edit: just noticed my
username/email were not correctly setup on my local git, sorry, it's
been 5 years I've not used git)

Closes #37389

Release Notes:

- agent: Improve "now" and "edit_file" tool schemas to work with more
models.
2025-09-04 05:39:55 +00:00
Ben Brandt
ce362864db docs: Update OpenAI-compatible provider config format (#37517)
The example was still showing how we used to setup openai compatible
providers, but that format should only be used for changing the url for
your actual OpenAI provider.

If you are doing a compatible provider, it should be using the new
format.

Closes #37093

Release Notes:

- N/A
2025-09-04 04:39:06 +00:00
Umesh Yadav
3c021d0890 language_models: Fix beta_headers for Anthropic custom models (#37306)
Closes #37289

The current implementation has a problem. The **`from_id` method** in
the Anthropic crate works well for predefined models, but not for custom
models that are defined in the settings. This is because it fallbacks to
using default beta headers, which are incorrect for custom models.

The issue is that the model instance for custom models lives within the
`language_models` provider, so I've updated the **`stream_completion`**
method to explicitly accept beta headers from its caller. Now, the beta
headers are passed from the `language_models` provider all the way to
`anthropic.stream_completion`, which resolves the issue.

Release Notes:

- Fixed a bug where extra_beta_headers defined in settings for Anthropic
custom models were being ignored.

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-09-04 06:02:13 +02:00
Ben Kunkle
f36a545a86 onboarding: Improve performance of AI upsell card (#37504)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-04 00:03:32 +00:00
Anthony Eid
9eeeda1330 onboarding: Add telemetry to Basics page (#37502)
- Welcome Keymap Changed
- Welcome Theme Changed
- Welcome Theme mode Changed
- Welcome Page Telemetry Diagnostics Toggled
- Welcome Page Telemetry Metrics Toggled
- Welcome Vim Mode Toggled
- Welcome Keymap Changed
- Welcome Sign In Clicked

cc: @katie-z-geer 

Release Notes:

- N/A
2025-09-03 20:02:57 -04:00
Agus Zubiaga
da2d791127 Update external agents installation docs (#37500) 2025-09-03 21:02:34 -03:00
Agus Zubiaga
d6f0811dab acp: Receive available commands over notifications (#37499)
See: https://github.com/zed-industries/agent-client-protocol/pull/62

Release Notes:

- Agent Panel: Fixes an issue where Claude Code would timeout waiting
for slash commands to be loaded

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-03 22:24:59 +00:00
Ben Kunkle
be0bb4a56b Centralize ZED_STATELESS (#37492)
Closes #ISSUE

Centralizes the references to the `ZED_STATELESS` env var into a single
location in a new crate named `zed_env_vars`

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-09-03 22:10:14 +00:00
Danilo Leal
bf1ae1d196 docs: Fix typo in the CLAUDE.md section (#37497)
Follow-up to https://github.com/zed-industries/zed/pull/37496. Fix a
typo and improves writing overall.

Release Notes:

- N/A
2025-09-03 18:46:35 -03:00
Danilo Leal
3b7dbb87b0 docs: Add note about CLAUDE.md usage (#37496)
Some users asked whether Claude Code in Zed can also observe/consume
`CLAUDE.md` guidelines, regardless of whether they're at the root
`.claude` directory or within the project. Answer is yes and the
documentation will mention it now!

Release Notes:

- N/A
2025-09-03 18:31:54 -03:00
Max Brunsfeld
bb13228ad5 Revert "Remote: Change "sh -c" to "sh -lc" (#36760)" (#37417)
This reverts commit bf5ed6d1c9.

We believe this may be breaking some users whose shell initialization
scripts change the working directory.

Release Notes:

- N/A
2025-09-03 14:24:32 -07:00
Danilo Leal
ec1528b890 thread view: Refine the terminal tool card header UI (#37488)
Rendering the disclosure button last (on the far right of the header
container) to avoid awkward layouts when there's truncation and elapsed
time information being displayed.

Release Notes:

- N/A
2025-09-03 18:09:59 -03:00
Danilo Leal
2aa0114b40 ai onboarding: Add some fast-follow adjustments (#37486)
Closes https://github.com/zed-industries/zed/issues/37305

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-09-03 17:59:12 -03:00
1769 changed files with 276172 additions and 121329 deletions

View File

@@ -5,8 +5,24 @@
# Arrays are merged together though. See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
# The intent for this file is to configure CI build process with a divergance from Zed developers experience; for example, in this config file
# we use `-D warnings` for rustflags (which makes compilation fail in presence of warnings during build process). Placing that in developers `config.toml`
# would be incovenient.
# would be inconvenient.
# The reason for not using the RUSTFLAGS environment variable is that doing so would override all the settings in the config.toml file, even if the contents of the latter are completely nonsensical. See: https://github.com/rust-lang/cargo/issues/5376
# Here, we opted to use `[target.'cfg(all())']` instead of `[build]` because `[target.'**']` is guaranteed to be cumulative.
[target.'cfg(all())']
rustflags = ["-D", "warnings"]
# We don't need fullest debug information for dev stuff (tests etc.) in CI.
[profile.dev]
debug = "limited"
# Use Mold on Linux, because it's faster than GNU ld and LLD.
#
# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
# is faster than Mold, in their own ~/.cargo/config.toml.
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]

View File

@@ -4,14 +4,9 @@ rustflags = ["-C", "symbol-mangling-version=v0", "--cfg", "tokio_unstable"]
[alias]
xtask = "run --package xtask --"
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
perf-test = ["test", "--profile", "release-fast", "--lib", "--bins", "--tests", "--all-features", "--config", "target.'cfg(true)'.runner='cargo run -p perf --release'", "--config", "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]"]
# Keep similar flags here to share some ccache
perf-compare = ["run", "--profile", "release-fast", "-p", "perf", "--config", "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]", "--", "compare"]
[target.'cfg(target_os = "windows")']
rustflags = [
@@ -19,8 +14,6 @@ rustflags = [
"windows_slim_errors", # This cfg will reduce the size of `windows::core::Error` from 16 bytes to 4 bytes
"-C",
"target-feature=+crt-static", # This fixes the linking issue when compiling livekit on Windows
"-C",
"link-arg=-fuse-ld=lld",
]
[env]

View File

@@ -1,45 +0,0 @@
# This file contains settings for `cargo hakari`.
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options.
hakari-package = "workspace-hack"
resolver = "2"
dep-format-version = "4"
workspace-hack-line-style = "workspace-dotted"
# this should be the same list as "targets" in ../rust-toolchain.toml
platforms = [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-musl", # remote server
]
[traversal-excludes]
workspace-members = [
"remote_server",
]
third-party = [
{ name = "reqwest", version = "0.11.27" },
# build of remote_server should not include scap / its x11 dependency
{ name = "scap", git = "https://github.com/zed-industries/scap", rev = "808aa5c45b41e8f44729d02e38fd00a2fe2722e7" },
# build of remote_server should not need to include on libalsa through rodio
{ name = "rodio" },
]
[final-excludes]
workspace-members = [
"zed_extension_api",
# exclude all extensions
"zed_glsl",
"zed_html",
"zed_proto",
"zed_ruff",
"slash_commands_example",
"zed_snippets",
"zed_test_extension",
"zed_toml",
]

View File

@@ -4,3 +4,17 @@ sequential-db-tests = { max-threads = 1 }
[[profile.default.overrides]]
filter = 'package(db)'
test-group = 'sequential-db-tests'
# Run slowest tests first.
#
[[profile.default.overrides]]
filter = 'package(worktree) and test(test_random_worktree_changes)'
priority = 100
[[profile.default.overrides]]
filter = 'package(collab) and (test(random_project_collaboration_tests) or test(random_channel_buffer_tests) or test(test_contact_requests) or test(test_basic_following))'
priority = 99
[[profile.default.overrides]]
filter = 'package(extension_host) and test(test_extension_store_with_test_extension)'
priority = 99

2
.gitattributes vendored
View File

@@ -2,4 +2,4 @@
*.json linguist-language=JSON-with-Comments
# Ensure the WSL script always has LF line endings, even on Windows
crates/zed/resources/windows/zed-wsl text eol=lf
crates/zed/resources/windows/zed.sh text eol=lf

View File

@@ -39,3 +39,21 @@ body:
Output of "zed: copy system specs into clipboard"
validations:
required: true
- type: textarea
attributes:
label: If applicable, attach your `Zed.log` file to this issue.
description: |
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>
<!-- Paste your log inside the code block. -->
```log
```
</details>
validations:
required: false

View File

@@ -33,3 +33,21 @@ body:
Output of "zed: copy system specs into clipboard"
validations:
required: true
- type: textarea
attributes:
label: If applicable, attach your `Zed.log` file to this issue.
description: |
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>
<!-- Paste your log inside the code block. -->
```log
```
</details>
validations:
required: false

53
.github/ISSUE_TEMPLATE/06_bug_git.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Bug Report (Git)
description: Zed Git Related Bugs
type: "Bug"
labels: ["git"]
title: "Git: <a short description of the Git bug>"
body:
- type: textarea
attributes:
label: Summary
description: Describe the bug with a one-line summary, and provide detailed reproduction steps
value: |
<!-- Please insert a one-line summary of the issue below -->
SUMMARY_SENTENCE_HERE
### Description
<!-- Describe with sufficient detail to reproduce from a clean Zed install. -->
Steps to trigger the problem:
1.
2.
3.
**Expected Behavior**:
**Actual Behavior**:
validations:
required: true
- type: textarea
id: environment
attributes:
label: Zed Version and System Specs
description: 'Open Zed, and in the command palette select "zed: copy system specs into clipboard"'
placeholder: |
Output of "zed: copy system specs into clipboard"
validations:
required: true
- type: textarea
attributes:
label: If applicable, attach your `Zed.log` file to this issue.
description: |
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>
<!-- Paste your log inside the code block. -->
```log
```
</details>
validations:
required: false

View File

@@ -1,8 +1,8 @@
name: Bug Report (Windows Alpha)
description: Zed Windows Alpha Related Bugs
name: Bug Report (Windows)
description: Zed Windows Related Bugs
type: "Bug"
labels: ["windows"]
title: "Windows Alpha: <a short description of the Windows bug>"
title: "Windows: <a short description of the Windows bug>"
body:
- type: textarea
attributes:
@@ -33,3 +33,21 @@ body:
Output of "zed: copy system specs into clipboard"
validations:
required: true
- type: textarea
attributes:
label: If applicable, attach your `Zed.log` file to this issue.
description: |
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>
<!-- Paste your log inside the code block. -->
```log
```
</details>
validations:
required: false

View File

@@ -56,3 +56,20 @@ body:
Output of "zed: copy system specs into clipboard"
validations:
required: true
- type: textarea
attributes:
label: If applicable, attach your `Zed.log` file to this issue.
description: |
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>
<!-- Paste your log inside the code block. -->
```log
```
</details>
validations:
required: false

View File

@@ -33,11 +33,10 @@ body:
required: true
- type: textarea
attributes:
label: If applicable, attach your `~/Library/Logs/Zed/Zed.log` file to this issue.
label: If applicable, attach your `Zed.log` file to this issue.
description: |
macOS: `~/Library/Logs/Zed/Zed.log`
Linux: `~/.local/share/zed/logs/Zed.log` or $XDG_DATA_HOME
If you only need the most recent lines, you can run the `zed: open log` command palette action to see the last 1000.
From the command palette, run `zed: open log` to see the last 1000 lines.
Or run `zed: reveal log in file manager` to reveal the log file itself.
value: |
<details><summary>Zed.log</summary>

View File

@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-config.json
# yaml-language-server: $schema=https://www.schemastore.org/github-issue-config.json
blank_issues_enabled: false
contact_links:
- name: Feature Request

View File

@@ -15,9 +15,12 @@ runs:
node-version: "18"
- name: Limit target directory size
env:
MAX_SIZE: ${{ runner.os == 'macOS' && 300 || 100 }}
shell: bash -euxo pipefail {0}
run: script/clear-target-dir-if-larger-than 100
# Use the variable in the run command
run: script/clear-target-dir-if-larger-than ${{ env.MAX_SIZE }}
- name: Run tests
shell: bash -euxo pipefail {0}
run: cargo nextest run --workspace --no-fail-fast
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final

View File

@@ -24,4 +24,4 @@ runs:
shell: powershell
working-directory: ${{ inputs.working-directory }}
run: |
cargo nextest run --workspace --no-fail-fast
cargo nextest run --workspace --no-fail-fast --failure-output immediate-final

88
.github/workflows/after_release.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
# Generated from xtask::workflows::after_release
# Rebuild with `cargo xtask workflows`.
name: after_release
on:
release:
types:
- published
jobs:
rebuild_releases_page:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: after_release::rebuild_releases_page::refresh_cloud_releases
run: curl -fX POST https://cloud.zed.dev/releases/refresh?expect_tag=${{ github.event.release.tag_name }}
shell: bash -euxo pipefail {0}
- name: after_release::rebuild_releases_page::redeploy_zed_dev
run: npm exec --yes -- vercel@37 --token="$VERCEL_TOKEN" --scope zed-industries redeploy https://zed.dev
shell: bash -euxo pipefail {0}
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
post_to_discord:
needs:
- rebuild_releases_page
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- id: get-release-url
name: after_release::post_to_discord::get_release_url
run: |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
URL="https://zed.dev/releases/preview"
else
URL="https://zed.dev/releases/stable"
fi
echo "URL=$URL" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}
- id: get-content
name: after_release::post_to_discord::get_content
uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757
with:
stringToTruncate: |
📣 Zed [${{ github.event.release.tag_name }}](<${{ steps.get-release-url.outputs.URL }}>) was just released!
${{ github.event.release.body }}
maxLength: 2000
truncationSymbol: '...'
- name: after_release::post_to_discord::discord_webhook_action
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_RELEASE_NOTES }}
content: ${{ steps.get-content.outputs.string }}
publish_winget:
runs-on: self-32vcpu-windows-2022
steps:
- id: set-package-name
name: after_release::publish_winget::set_package_name
run: |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
PACKAGE_NAME=ZedIndustries.Zed.Preview
else
PACKAGE_NAME=ZedIndustries.Zed
fi
echo "PACKAGE_NAME=$PACKAGE_NAME" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}
- name: after_release::publish_winget::winget_releaser
uses: vedantmgoyal9/winget-releaser@19e706d4c9121098010096f9c495a70a7518b30f
with:
identifier: ${{ steps.set-package-name.outputs.PACKAGE_NAME }}
max-versions-to-keep: 5
token: ${{ secrets.WINGET_TOKEN }}
create_sentry_release:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: release::create_sentry_release
uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
with:
environment: production
env:
SENTRY_ORG: zed-dev
SENTRY_PROJECT: zed
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

39
.github/workflows/cherry_pick.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
# Generated from xtask::workflows::cherry_pick
# Rebuild with `cargo xtask workflows`.
name: cherry_pick
on:
workflow_dispatch:
inputs:
commit:
description: commit
required: true
type: string
branch:
description: branch
required: true
type: string
channel:
description: channel
required: true
type: string
jobs:
run_cherry_pick:
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- id: get-app-token
name: cherry_pick::run_cherry_pick::authenticate_as_zippy
uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
with:
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
- name: cherry_pick::run_cherry_pick::cherry_pick
run: ./script/cherry-pick ${{ inputs.branch }} ${{ inputs.commit }} ${{ inputs.channel }}
shell: bash -euxo pipefail {0}
env:
GIT_COMMITTER_NAME: Zed Zippy
GIT_COMMITTER_EMAIL: hi@zed.dev
GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}

View File

@@ -1,863 +0,0 @@
name: CI
on:
push:
branches:
- main
- "v[0-9]+.[0-9]+.x"
tags:
- "v*"
pull_request:
branches:
- "**"
concurrency:
# Allow only one workflow per any non-`main` branch.
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
jobs:
job_spec:
name: Decide which jobs to run
if: github.repository_owner == 'zed-industries'
outputs:
run_tests: ${{ steps.filter.outputs.run_tests }}
run_license: ${{ steps.filter.outputs.run_license }}
run_docs: ${{ steps.filter.outputs.run_docs }}
run_nix: ${{ steps.filter.outputs.run_nix }}
run_actionlint: ${{ steps.filter.outputs.run_actionlint }}
runs-on:
- namespace-profile-2x4-ubuntu-2404
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# 350 is arbitrary; ~10days of history on main (5secs); full history is ~25secs
fetch-depth: ${{ github.ref == 'refs/heads/main' && 2 || 350 }}
- name: Fetch git history and generate output filters
id: filter
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo "Not in a PR context (i.e., push to main/stable/preview)"
COMPARE_REV="$(git rev-parse HEAD~1)"
else
echo "In a PR context comparing to pull_request.base.ref"
git fetch origin "$GITHUB_BASE_REF" --depth=350
COMPARE_REV="$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD)"
fi
CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" ${{ github.sha }})"
# Specify anything which should potentially skip full test suite in this regex:
# - docs/
# - script/update_top_ranking_issues/
# - .github/ISSUE_TEMPLATE/
# - .github/workflows/ (except .github/workflows/ci.yml)
SKIP_REGEX='^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!ci)))'
echo "$CHANGED_FILES" | grep -qvP "$SKIP_REGEX" && \
echo "run_tests=true" >> "$GITHUB_OUTPUT" || \
echo "run_tests=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED_FILES" | grep -qP '^docs/' && \
echo "run_docs=true" >> "$GITHUB_OUTPUT" || \
echo "run_docs=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED_FILES" | grep -qP '^\.github/(workflows/|actions/|actionlint.yml)' && \
echo "run_actionlint=true" >> "$GITHUB_OUTPUT" || \
echo "run_actionlint=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED_FILES" | grep -qP '^(Cargo.lock|script/.*licenses)' && \
echo "run_license=true" >> "$GITHUB_OUTPUT" || \
echo "run_license=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED_FILES" | grep -qP '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' && \
echo "$GITHUB_REF_NAME" | grep -qvP '^v[0-9]+\.[0-9]+\.[0-9x](-pre)?$' && \
echo "run_nix=true" >> "$GITHUB_OUTPUT" || \
echo "run_nix=false" >> "$GITHUB_OUTPUT"
migration_checks:
name: Check Postgres and Protobuf migrations, mergability
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
timeout-minutes: 60
runs-on:
- self-mini-macos
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
fetch-depth: 0 # fetch full history
- name: Remove untracked files
run: git clean -df
- name: Find modified migrations
shell: bash -euxo pipefail {0}
run: |
export SQUAWK_GITHUB_TOKEN=${{ github.token }}
. ./script/squawk
- name: Ensure fresh merge
shell: bash -euxo pipefail {0}
run: |
if [ -z "$GITHUB_BASE_REF" ];
then
echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> "$GITHUB_ENV"
else
git checkout -B temp
git merge -q "origin/$GITHUB_BASE_REF" -m "merge main into temp"
echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> "$GITHUB_ENV"
fi
- uses: bufbuild/buf-setup-action@v1
with:
version: v1.29.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "crates/proto/proto/"
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/"
workspace_hack:
timeout-minutes: 60
name: Check workspace-hack crate
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
runs-on:
- namespace-profile-8x16-ubuntu-2204
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install cargo-hakari
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
with:
command: install
args: cargo-hakari@0.9.35
- name: Check workspace-hack Cargo.toml is up-to-date
run: |
cargo hakari generate --diff || {
echo "To fix, run script/update-workspace-hack or script/update-workspace-hack.ps1";
false
}
- name: Check all crates depend on workspace-hack
run: |
cargo hakari manage-deps --dry-run || {
echo "To fix, run script/update-workspace-hack or script/update-workspace-hack.ps1"
false
}
style:
timeout-minutes: 60
name: Check formatting and spelling
needs: [job_spec]
if: github.repository_owner == 'zed-industries'
runs-on:
- namespace-profile-4x8-ubuntu-2204
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Prettier Check on /docs
working-directory: ./docs
run: |
pnpm dlx "prettier@${PRETTIER_VERSION}" . --check || {
echo "To fix, run from the root of the Zed repo:"
echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .."
false
}
env:
PRETTIER_VERSION: 3.5.0
- name: Prettier Check on default.json
run: |
pnpm dlx "prettier@${PRETTIER_VERSION}" assets/settings/default.json --check || {
echo "To fix, run from the root of the Zed repo:"
echo " pnpm dlx prettier@${PRETTIER_VERSION} assets/settings/default.json --write"
false
}
env:
PRETTIER_VERSION: 3.5.0
# To support writing comments that they will certainly be revisited.
- name: Check for todo! and FIXME comments
run: script/check-todos
- name: Check modifier use in keymaps
run: script/check-keymaps
- name: Run style checks
uses: ./.github/actions/check_style
- name: Check for typos
uses: crate-ci/typos@8e6a4285bcbde632c5d79900a7779746e8b7ea3f # v1.24.6
with:
config: ./typos.toml
check_docs:
timeout-minutes: 60
name: Check docs
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
(needs.job_spec.outputs.run_tests == 'true' || needs.job_spec.outputs.run_docs == 'true')
runs-on:
- namespace-profile-8x16-ubuntu-2204
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: Build docs
uses: ./.github/actions/build_docs
actionlint:
runs-on: namespace-profile-2x4-ubuntu-2404
if: github.repository_owner == 'zed-industries' && needs.job_spec.outputs.run_actionlint == 'true'
needs: [job_spec]
steps:
- uses: actions/checkout@v4
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
macos_tests:
timeout-minutes: 60
name: (macOS) Run Clippy and tests
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
runs-on:
- self-mini-macos
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: Check that Cargo.lock is up to date
run: |
cargo update --locked --workspace
- name: cargo clippy
run: ./script/clippy
- name: Install cargo-machete
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
with:
command: install
args: cargo-machete@0.7.0
- name: Check unused dependencies
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
with:
command: machete
- name: Check licenses
run: |
script/check-licenses
if [[ "${{ needs.job_spec.outputs.run_license }}" == "true" ]]; then
script/generate-licenses /tmp/zed_licenses_output
fi
- name: Check for new vulnerable dependencies
if: github.event_name == 'pull_request'
uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8 # v4
with:
license-check: false
- name: Run tests
uses: ./.github/actions/run_tests
- name: Build collab
run: cargo build -p collab
- name: Build other binaries and features
run: |
cargo build --workspace --bins --all-features
cargo check -p gpui --features "macos-blade"
cargo check -p workspace
cargo build -p remote_server
cargo check -p gpui --examples
# Since the macOS runners are stateful, so we need to remove the config file to prevent potential bug.
- name: Clean CI config file
if: always()
run: rm -rf ./../.cargo
linux_tests:
timeout-minutes: 60
name: (Linux) Run Clippy and tests
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
runs-on:
- namespace-profile-16x32-ubuntu-2204
steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Cache dependencies
uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
# cache-provider: "buildjet"
- name: Install Linux dependencies
run: ./script/linux
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: cargo clippy
run: ./script/clippy
- name: Run tests
uses: ./.github/actions/run_tests
- name: Build other binaries and features
run: |
cargo build -p zed
cargo check -p workspace
cargo check -p gpui --examples
# Even the Linux runner is not stateful, in theory there is no need to do this cleanup.
# But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code
# to clean up the config file, Ive included the cleanup code here as a precaution.
# While its not strictly necessary at this moment, I believe its better to err on the side of caution.
- name: Clean CI config file
if: always()
run: rm -rf ./../.cargo
build_remote_server:
timeout-minutes: 60
name: (Linux) Build Remote Server
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
runs-on:
- namespace-profile-16x32-ubuntu-2204
steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Cache dependencies
uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
# cache-provider: "buildjet"
- name: Install Clang & Mold
run: ./script/remote-server && ./script/install-mold 2.34.0
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: Build Remote Server
run: cargo build -p remote_server
- name: Clean CI config file
if: always()
run: rm -rf ./../.cargo
windows_tests:
timeout-minutes: 60
name: (Windows) Run Clippy and tests
needs: [job_spec]
if: |
github.repository_owner == 'zed-industries' &&
needs.job_spec.outputs.run_tests == 'true'
runs-on: [self-32vcpu-windows-2022]
steps:
- name: Environment Setup
run: |
$RunnerDir = Split-Path -Parent $env:RUNNER_WORKSPACE
Write-Output `
"RUSTUP_HOME=$RunnerDir\.rustup" `
"CARGO_HOME=$RunnerDir\.cargo" `
"PATH=$RunnerDir\.cargo\bin;$env:PATH" `
>> $env:GITHUB_ENV
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Configure CI
run: |
New-Item -ItemType Directory -Path "./../.cargo" -Force
Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
- name: cargo clippy
run: |
.\script\clippy.ps1
- name: Run tests
uses: ./.github/actions/run_tests_windows
- name: Build Zed
run: cargo build
- name: Limit target directory size
run: ./script/clear-target-dir-if-larger-than.ps1 250
- name: Clean CI config file
if: always()
run: Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
tests_pass:
name: Tests Pass
runs-on: namespace-profile-2x4-ubuntu-2404
needs:
- job_spec
- style
- check_docs
- actionlint
- migration_checks
# run_tests: If adding required tests, add them here and to script below.
- workspace_hack
- linux_tests
- build_remote_server
- macos_tests
- windows_tests
if: |
github.repository_owner == 'zed-industries' &&
always()
steps:
- name: Check all tests passed
run: |
# Check dependent jobs...
RET_CODE=0
# Always check style
[[ "${{ needs.style.result }}" != 'success' ]] && { RET_CODE=1; echo "style tests failed"; }
if [[ "${{ needs.job_spec.outputs.run_docs }}" == "true" ]]; then
[[ "${{ needs.check_docs.result }}" != 'success' ]] && { RET_CODE=1; echo "docs checks failed"; }
fi
if [[ "${{ needs.job_spec.outputs.run_actionlint }}" == "true" ]]; then
[[ "${{ needs.actionlint.result }}" != 'success' ]] && { RET_CODE=1; echo "actionlint checks failed"; }
fi
# Only check test jobs if they were supposed to run
if [[ "${{ needs.job_spec.outputs.run_tests }}" == "true" ]]; then
[[ "${{ needs.workspace_hack.result }}" != 'success' ]] && { RET_CODE=1; echo "Workspace Hack failed"; }
[[ "${{ needs.macos_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "macOS tests failed"; }
[[ "${{ needs.linux_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "Linux tests failed"; }
[[ "${{ needs.windows_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "Windows tests failed"; }
[[ "${{ needs.build_remote_server.result }}" != 'success' ]] && { RET_CODE=1; echo "Remote server build failed"; }
# This check is intentionally disabled. See: https://github.com/zed-industries/zed/pull/28431
# [[ "${{ needs.migration_checks.result }}" != 'success' ]] && { RET_CODE=1; echo "Migration Checks failed"; }
fi
if [[ "$RET_CODE" -eq 0 ]]; then
echo "All tests passed successfully!"
fi
exit $RET_CODE
bundle-mac:
timeout-minutes: 120
name: Create a macOS bundle
runs-on:
- self-mini-macos
if: |
( startsWith(github.ref, 'refs/tags/v')
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
needs: [macos_tests]
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: Install Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "18"
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
with:
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# We need to fetch more than one commit so that `script/draft-release-notes`
# is able to diff between the current and previous tag.
#
# 25 was chosen arbitrarily.
fetch-depth: 25
clean: false
ref: ${{ github.ref }}
- name: Limit target directory size
run: script/clear-target-dir-if-larger-than 100
- name: Determine version and release channel
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
# This exports RELEASE_CHANNEL into env (GITHUB_ENV)
script/determine-release-channel
- name: Draft release notes
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
mkdir -p target/
# Ignore any errors that occur while drafting release notes to not fail the build.
script/draft-release-notes "$RELEASE_VERSION" "$RELEASE_CHANNEL" > target/release-notes.md || true
script/create-draft-release target/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create macOS app bundle
run: script/bundle-mac
- name: Rename binaries
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
run: |
mv target/aarch64-apple-darwin/release/Zed.dmg target/aarch64-apple-darwin/release/Zed-aarch64.dmg
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
- name: Upload app bundle (x86_64) to workflow run if main branch or specific label
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
name: Upload app bundle to release
if: ${{ env.RELEASE_CHANNEL == 'preview' || env.RELEASE_CHANNEL == 'stable' }}
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
files: |
target/zed-remote-server-macos-x86_64.gz
target/zed-remote-server-macos-aarch64.gz
target/aarch64-apple-darwin/release/Zed-aarch64.dmg
target/x86_64-apple-darwin/release/Zed-x86_64.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bundle-linux-x86_x64:
timeout-minutes: 60
name: Linux x86_x64 release bundle
runs-on:
- namespace-profile-16x32-ubuntu-2004 # ubuntu 20.04 for minimal glibc
if: |
( startsWith(github.ref, 'refs/tags/v')
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
needs: [linux_tests]
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Install Linux dependencies
run: ./script/linux && ./script/install-mold 2.34.0
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
with:
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
- name: Determine version and release channel
if: startsWith(github.ref, 'refs/tags/v')
run: |
# This exports RELEASE_CHANNEL into env (GITHUB_ENV)
script/determine-release-channel
- name: Create Linux .tar.gz bundle
run: script/bundle-linux
- name: Upload Artifact to Workflow - zed (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
path: target/release/zed-*.tar.gz
- name: Upload Artifact to Workflow - zed-remote-server (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.gz
path: target/zed-remote-server-linux-x86_64.gz
- name: Upload Artifacts to release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) }}
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
files: |
target/zed-remote-server-linux-x86_64.gz
target/release/zed-linux-x86_64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bundle-linux-aarch64: # this runs on ubuntu22.04
timeout-minutes: 60
name: Linux arm64 release bundle
runs-on:
- namespace-profile-8x32-ubuntu-2004-arm-m4 # ubuntu 20.04 for minimal glibc
if: |
startsWith(github.ref, 'refs/tags/v')
|| contains(github.event.pull_request.labels.*.name, 'run-bundling')
needs: [linux_tests]
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Install Linux dependencies
run: ./script/linux
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
with:
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
- name: Determine version and release channel
if: startsWith(github.ref, 'refs/tags/v')
run: |
# This exports RELEASE_CHANNEL into env (GITHUB_ENV)
script/determine-release-channel
- name: Create and upload Linux .tar.gz bundles
run: script/bundle-linux
- name: Upload Artifact to Workflow - zed (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
path: target/release/zed-*.tar.gz
- name: Upload Artifact to Workflow - zed-remote-server (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.gz
path: target/zed-remote-server-linux-aarch64.gz
- name: Upload Artifacts to release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) }}
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
files: |
target/zed-remote-server-linux-aarch64.gz
target/release/zed-linux-aarch64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
freebsd:
timeout-minutes: 60
runs-on: github-8vcpu-ubuntu-2404
if: |
false && ( startsWith(github.ref, 'refs/tags/v')
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
needs: [linux_tests]
name: Build Zed on FreeBSD
steps:
- uses: actions/checkout@v4
- name: Build FreeBSD remote-server
id: freebsd-build
uses: vmactions/freebsd-vm@c3ae29a132c8ef1924775414107a97cac042aad5 # v1.2.0
with:
usesh: true
release: 13.5
copyback: true
prepare: |
pkg install -y \
bash curl jq git \
rustup-init cmake-core llvm-devel-lite pkgconf protobuf # ibx11 alsa-lib rust-bindgen-cli
run: |
freebsd-version
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
git config --global --add safe.directory /home/runner/work/zed/zed
rustup-init --profile minimal --default-toolchain none -y
. "$HOME/.cargo/env"
./script/bundle-freebsd
mkdir -p out/
mv "target/zed-remote-server-freebsd-x86_64.gz" out/
rm -rf target/
cargo clean
- name: Upload Artifact to Workflow - zed-remote-server (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: zed-remote-server-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-freebsd.gz
path: out/zed-remote-server-freebsd-x86_64.gz
- name: Upload Artifacts to release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) }}
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
files: |
out/zed-remote-server-freebsd-x86_64.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
nix-build:
name: Build with Nix
uses: ./.github/workflows/nix.yml
needs: [job_spec]
if: github.repository_owner == 'zed-industries' &&
(contains(github.event.pull_request.labels.*.name, 'run-nix') ||
needs.job_spec.outputs.run_nix == 'true')
secrets: inherit
with:
flake-output: debug
# excludes the final package to only cache dependencies
cachix-filter: "-zed-editor-[0-9.]*-nightly"
bundle-windows-x64:
timeout-minutes: 120
name: Create a Windows installer
runs-on: [self-32vcpu-windows-2022]
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
# if: (startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling'))
needs: [windows_tests]
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: "http://timestamp.acs.microsoft.com"
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
with:
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
- name: Determine version and release channel
working-directory: ${{ env.ZED_WORKSPACE }}
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
# This exports RELEASE_CHANNEL into env (GITHUB_ENV)
script/determine-release-channel.ps1
- name: Build Zed installer
working-directory: ${{ env.ZED_WORKSPACE }}
run: script/bundle-windows.ps1
- name: Upload installer (x86_64) to Workflow - zed (run-bundling)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
with:
name: ZedEditorUserSetup-x64-${{ github.event.pull_request.head.sha || github.sha }}.exe
path: ${{ env.SETUP_PATH }}
- name: Upload Artifacts to release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
# Re-enable when we are ready to publish windows preview releases
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) && env.RELEASE_CHANNEL == 'preview' }} # upload only preview
with:
draft: true
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
files: ${{ env.SETUP_PATH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
auto-release-preview:
name: Auto release preview
if: |
startsWith(github.ref, 'refs/tags/v')
&& endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
needs: [bundle-mac, bundle-linux-x86_x64, bundle-linux-aarch64, bundle-windows-x64]
runs-on:
- self-mini-macos
steps:
- name: gh release
run: gh release edit "$GITHUB_REF_NAME" --draft=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Sentry release
uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c # v3
env:
SENTRY_ORG: zed-dev
SENTRY_PROJECT: zed
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
with:
environment: production

View File

@@ -0,0 +1,48 @@
name: Community Champion Auto Labeler
on:
issues:
types: [opened]
pull_request_target:
types: [opened]
jobs:
label_community_champion:
if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest
steps:
- name: Check if author is a community champion and apply label
uses: actions/github-script@v7
with:
script: |
const communityChampionBody = `${{ secrets.COMMUNITY_CHAMPIONS }}`;
const communityChampions = communityChampionBody
.split('\n')
.map(handle => handle.trim().toLowerCase());
let author;
if (context.eventName === 'issues') {
author = context.payload.issue.user.login;
} else if (context.eventName === 'pull_request_target') {
author = context.payload.pull_request.user.login;
}
if (!author || !communityChampions.includes(author.toLowerCase())) {
return;
}
const issueNumber = context.payload.issue?.number || context.payload.pull_request?.number;
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
labels: ['community champion']
});
console.log(`Applied 'community champion' label to #${issueNumber} by ${author}`);
} catch (error) {
console.error(`Failed to apply label: ${error.message}`);
}

View File

@@ -1,70 +0,0 @@
name: Release Actions
on:
release:
types: [published]
jobs:
discord_release:
if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest
steps:
- name: Get release URL
id: get-release-url
run: |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
URL="https://zed.dev/releases/preview/latest"
else
URL="https://zed.dev/releases/stable/latest"
fi
echo "URL=$URL" >> "$GITHUB_OUTPUT"
- name: Get content
uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757 # v1.4.1
id: get-content
with:
stringToTruncate: |
📣 Zed [${{ github.event.release.tag_name }}](<${{ steps.get-release-url.outputs.URL }}>) was just released!
${{ github.event.release.body }}
maxLength: 2000
truncationSymbol: "..."
- name: Discord Webhook Action
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: ${{ steps.get-content.outputs.string }}
send_release_notes_email:
if: github.repository_owner == 'zed-industries' && !github.event.release.prerelease
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Check if release was promoted from preview
id: check-promotion-from-preview
run: |
VERSION="${{ github.event.release.tag_name }}"
PREVIEW_TAG="${VERSION}-pre"
if git rev-parse "$PREVIEW_TAG" > /dev/null 2>&1; then
echo "was_promoted_from_preview=true" >> "$GITHUB_OUTPUT"
else
echo "was_promoted_from_preview=false" >> "$GITHUB_OUTPUT"
fi
- name: Send release notes email
if: steps.check-promotion-from-preview.outputs.was_promoted_from_preview == 'true'
run: |
TAG="${{ github.event.release.tag_name }}"
cat << 'EOF' > release_body.txt
${{ github.event.release.body }}
EOF
jq -n --arg tag "$TAG" --rawfile body release_body.txt '{version: $tag, markdown_body: $body}' \
> release_data.json
curl -X POST "https://zed.dev/api/send_release_notes_email" \
-H "Authorization: Bearer ${{ secrets.RELEASE_NOTES_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d @release_data.json

81
.github/workflows/compare_perf.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
# Generated from xtask::workflows::compare_perf
# Rebuild with `cargo xtask workflows`.
name: compare_perf
on:
workflow_dispatch:
inputs:
head:
description: head
required: true
type: string
base:
description: base
required: true
type: string
crate_name:
description: crate_name
type: string
default: ''
jobs:
run_perf:
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: compare_perf::run_perf::install_hyperfine
run: cargo install hyperfine
shell: bash -euxo pipefail {0}
- name: steps::git_checkout
run: git fetch origin ${{ inputs.base }} && git checkout ${{ inputs.base }}
shell: bash -euxo pipefail {0}
- name: compare_perf::run_perf::cargo_perf_test
run: |2-
if [ -n "${{ inputs.crate_name }}" ]; then
cargo perf-test -p ${{ inputs.crate_name }} -- --json=${{ inputs.base }};
else
cargo perf-test -p vim -- --json=${{ inputs.base }};
fi
shell: bash -euxo pipefail {0}
- name: steps::git_checkout
run: git fetch origin ${{ inputs.head }} && git checkout ${{ inputs.head }}
shell: bash -euxo pipefail {0}
- name: compare_perf::run_perf::cargo_perf_test
run: |2-
if [ -n "${{ inputs.crate_name }}" ]; then
cargo perf-test -p ${{ inputs.crate_name }} -- --json=${{ inputs.head }};
else
cargo perf-test -p vim -- --json=${{ inputs.head }};
fi
shell: bash -euxo pipefail {0}
- name: compare_perf::run_perf::compare_runs
run: cargo perf-compare --save=results.md ${{ inputs.base }} ${{ inputs.head }}
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact results.md'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: results.md
path: results.md
if-no-files-found: error
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}

57
.github/workflows/congrats.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Congratsbot
on:
push:
branches: [main]
jobs:
check-author:
if: ${{ github.repository_owner == 'zed-industries' }}
runs-on: ubuntu-latest
outputs:
should_congratulate: ${{ steps.check.outputs.should_congratulate }}
steps:
- name: Get PR info and check if author is external
id: check
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CONGRATSBOT_GITHUB_TOKEN }}
script: |
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha
});
if (prs.length === 0) {
core.setOutput('should_congratulate', 'false');
return;
}
const mergedPR = prs.find(pr => pr.merged_at !== null) || prs[0];
const prAuthor = mergedPR.user.login;
try {
await github.rest.teams.getMembershipForUserInOrg({
org: 'zed-industries',
team_slug: 'staff',
username: prAuthor
});
core.setOutput('should_congratulate', 'false');
} catch (error) {
if (error.status === 404) {
core.setOutput('should_congratulate', 'true');
} else {
console.error(`Error checking team membership: ${error.message}`);
core.setOutput('should_congratulate', 'false');
}
}
congrats:
needs: check-author
if: needs.check-author.outputs.should_congratulate == 'true'
uses: withastro/automation/.github/workflows/congratsbot.yml@main
with:
EMOJIS: 🎉,🎊,🧑‍🚀,🥳,🙌,🚀,🦀,🔥,🚢
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}

View File

@@ -1,42 +1,40 @@
name: Danger
# Generated from xtask::workflows::danger
# Rebuild with `cargo xtask workflows`.
name: danger
on:
pull_request:
branches: [main]
types:
- opened
- synchronize
- reopened
- edited
- opened
- synchronize
- reopened
- edited
branches:
- main
jobs:
danger:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "script/danger/pnpm-lock.yaml"
- run: pnpm install --dir script/danger
- name: Run Danger
run: pnpm run --dir script/danger danger ci
env:
# This GitHub token is not used, but the value needs to be here to prevent
# Danger from throwing an error.
GITHUB_TOKEN: "not_a_real_token"
# All requests are instead proxied through an instance of
# https://github.com/maxdeviant/danger-proxy that allows Danger to securely
# authenticate with GitHub while still being able to run on PRs from forks.
DANGER_GITHUB_API_BASE_URL: "https://danger-proxy.fly.dev/github"
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: '9'
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
cache: pnpm
cache-dependency-path: script/danger/pnpm-lock.yaml
- name: danger::danger_job::install_deps
run: pnpm install --dir script/danger
shell: bash -euxo pipefail {0}
- name: danger::danger_job::run
run: pnpm run --dir script/danger danger ci
shell: bash -euxo pipefail {0}
env:
GITHUB_TOKEN: not_a_real_token
DANGER_GITHUB_API_BASE_URL: https://danger-proxy.fly.dev/github

View File

@@ -22,6 +22,8 @@ jobs:
- name: Build docs
uses: ./.github/actions/build_docs
env:
DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
- name: Deploy Docs
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3

View File

@@ -49,7 +49,7 @@ jobs:
- name: Limit target directory size
shell: bash -euxo pipefail {0}
run: script/clear-target-dir-if-larger-than 100
run: script/clear-target-dir-if-larger-than 300
- name: Run tests
shell: bash -euxo pipefail {0}

View File

@@ -1,71 +0,0 @@
name: Run Agent Eval
on:
schedule:
- cron: "0 0 * * *"
pull_request:
branches:
- "**"
types: [synchronize, reopened, labeled]
workflow_dispatch:
concurrency:
# Allow only one workflow per any non-`main` branch.
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_EVAL_TELEMETRY: 1
jobs:
run_eval:
timeout-minutes: 60
name: Run Agent Eval
if: >
github.repository_owner == 'zed-industries' &&
(github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-eval'))
runs-on:
- namespace-profile-16x32-ubuntu-2204
steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Cache dependencies
uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
# cache-provider: "buildjet"
- name: Install Linux dependencies
run: ./script/linux
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: Compile eval
run: cargo build --package=eval
- name: Run eval
run: cargo run --package=eval -- --repetitions=8 --concurrency=1
# Even the Linux runner is not stateful, in theory there is no need to do this cleanup.
# But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code
# to clean up the config file, Ive included the cleanup code here as a precaution.
# While its not strictly necessary at this moment, I believe its better to err on the side of caution.
- name: Clean CI config file
if: always()
run: rm -rf ./../.cargo

View File

@@ -0,0 +1,36 @@
name: Good First Issue Notifier
on:
issues:
types: [labeled]
jobs:
handle-good-first-issue:
if: github.event.label.name == 'good first issue' && github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Prepare Discord message
id: prepare-message
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
run: |
MESSAGE="[${ISSUE_TITLE} (#${ISSUE_NUMBER})](<${ISSUE_URL}>)"
{
echo "message<<EOF"
echo "$MESSAGE"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Discord Webhook Action
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_GOOD_FIRST_ISSUE }}
content: ${{ steps.prepare-message.outputs.message }}

View File

@@ -1,33 +0,0 @@
name: Issue Response
on:
schedule:
- cron: "0 12 * * 2"
workflow_dispatch:
jobs:
issue-response:
if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "script/issue_response/pnpm-lock.yaml"
- run: pnpm install --dir script/issue_response
- name: Run Issue Response
run: pnpm run --dir script/issue_response start
env:
ISSUE_RESPONSE_GITHUB_TOKEN: ${{ secrets.ISSUE_RESPONSE_GITHUB_TOKEN }}
SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}

View File

@@ -1,69 +0,0 @@
name: "Nix build"
on:
workflow_call:
inputs:
flake-output:
type: string
default: "default"
cachix-filter:
type: string
default: ""
jobs:
nix-build:
timeout-minutes: 60
name: (${{ matrix.system.os }}) Nix Build
continue-on-error: true # TODO: remove when we want this to start blocking CI
strategy:
fail-fast: false
matrix:
system:
- os: x86 Linux
runner: namespace-profile-16x32-ubuntu-2204
install_nix: true
- os: arm Mac
runner: [macOS, ARM64, test]
install_nix: false
if: github.repository_owner == 'zed-industries'
runs-on: ${{ matrix.system.runner }}
env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
GIT_LFS_SKIP_SMUDGE: 1 # breaks the livekit rust sdk examples which we don't actually depend on
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
# on our macs we manually install nix. for some reason the cachix action is running
# under a non-login /bin/bash shell which doesn't source the proper script to add the
# nix profile to PATH, so we manually add them here
- name: Set path
if: ${{ ! matrix.system.install_nix }}
run: |
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
- uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31
if: ${{ matrix.system.install_nix }}
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
name: zed
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
pushFilter: "${{ inputs.cachix-filter }}"
cachixArgs: "-v"
- run: nix build .#${{ inputs.flake-output }} -L --accept-flake-config
- name: Limit /nix/store to 50GB on macs
if: ${{ ! matrix.system.install_nix }}
run: |
if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
nix-collect-garbage -d || true
fi

489
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,489 @@
# Generated from xtask::workflows::release
# Rebuild with `cargo xtask workflows`.
name: release
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
on:
push:
tags:
- v*
jobs:
run_tests_mac:
if: github.repository_owner == 'zed-industries'
runs-on: self-mini-macos
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
run_tests_linux:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 250
shell: bash -euxo pipefail {0}
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
run_tests_windows:
if: github.repository_owner == 'zed-industries'
runs-on: self-32vcpu-windows-2022
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
New-Item -ItemType Directory -Path "./../.cargo" -Force
Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
shell: pwsh
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: pwsh
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than.ps1 250
shell: pwsh
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: pwsh
- name: steps::cleanup_cargo_config
if: always()
run: |
Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
shell: pwsh
timeout-minutes: 60
check_scripts:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_tests::check_scripts::run_shellcheck
run: ./script/shellcheck-scripts error
shell: bash -euxo pipefail {0}
- id: get_actionlint
name: run_tests::check_scripts::download_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash -euxo pipefail {0}
- name: run_tests::check_scripts::run_actionlint
run: |
${{ steps.get_actionlint.outputs.executable }} -color
shell: bash -euxo pipefail {0}
- name: run_tests::check_scripts::check_xtask_workflows
run: |
cargo xtask workflows
if ! git diff --exit-code .github; then
echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
echo "Please run 'cargo xtask workflows' locally and commit the changes"
exit 1
fi
shell: bash -euxo pipefail {0}
timeout-minutes: 60
create_draft_release:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
fetch-depth: 25
ref: ${{ github.ref }}
- name: script/determine-release-channel
run: script/determine-release-channel
shell: bash -euxo pipefail {0}
- name: mkdir -p target/
run: mkdir -p target/
shell: bash -euxo pipefail {0}
- name: release::create_draft_release::generate_release_notes
run: node --redirect-warnings=/dev/null ./script/draft-release-notes "$RELEASE_VERSION" "$RELEASE_CHANNEL" > target/release-notes.md
shell: bash -euxo pipefail {0}
- name: release::create_draft_release::create_release
run: script/create-draft-release target/release-notes.md
shell: bash -euxo pipefail {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 60
bundle_linux_aarch64:
needs:
- run_tests_linux
- check_scripts
runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-aarch64.tar.gz
path: target/release/zed-linux-aarch64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-aarch64.gz
path: target/zed-remote-server-linux-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_linux_x86_64:
needs:
- run_tests_linux
- check_scripts
runs-on: namespace-profile-32x64-ubuntu-2004
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-x86_64.tar.gz
path: target/release/zed-linux-x86_64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-x86_64.gz
path: target/zed-remote-server-linux-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_aarch64:
needs:
- run_tests_mac
- check_scripts
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac aarch64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-aarch64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-aarch64.gz
path: target/zed-remote-server-macos-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_x86_64:
needs:
- run_tests_mac
- check_scripts
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac x86_64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-x86_64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.dmg
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-x86_64.gz
path: target/zed-remote-server-macos-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_windows_aarch64:
needs:
- run_tests_windows
- check_scripts
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture aarch64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-aarch64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.exe
path: target/Zed-aarch64.exe
if-no-files-found: error
timeout-minutes: 60
bundle_windows_x86_64:
needs:
- run_tests_windows
- check_scripts
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture x86_64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-x86_64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.exe
path: target/Zed-x86_64.exe
if-no-files-found: error
timeout-minutes: 60
upload_release_assets:
needs:
- create_draft_release
- bundle_linux_aarch64
- bundle_linux_x86_64
- bundle_mac_aarch64
- bundle_mac_x86_64
- bundle_windows_aarch64
- bundle_windows_x86_64
runs-on: namespace-profile-4x8-ubuntu-2204
steps:
- name: release::download_workflow_artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
path: ./artifacts/
- name: ls -lR ./artifacts
run: ls -lR ./artifacts
shell: bash -euxo pipefail {0}
- name: release::prep_release_artifacts
run: |-
mkdir -p release-artifacts/
mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
mv ./artifacts/zed-remote-server-macos-x86_64.gz/zed-remote-server-macos-x86_64.gz release-artifacts/zed-remote-server-macos-x86_64.gz
mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
mv ./artifacts/zed-remote-server-linux-x86_64.gz/zed-remote-server-linux-x86_64.gz release-artifacts/zed-remote-server-linux-x86_64.gz
shell: bash -euxo pipefail {0}
- name: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
run: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
shell: bash -euxo pipefail {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
auto_release_preview:
needs:
- upload_release_assets
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
shell: bash -euxo pipefail {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true

View File

@@ -1,363 +1,495 @@
name: Release Nightly
on:
schedule:
# Fire every day at 7:00am UTC (Roughly before EU workday and after US workday)
- cron: "0 7 * * *"
push:
branches:
- rustdoc-action
# Generated from xtask::workflows::release_nightly
# Rebuild with `cargo xtask workflows`.
name: release_nightly
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
RUST_BACKTRACE: '1'
on:
push:
tags:
- nightly
schedule:
- cron: 0 7 * * *
jobs:
# style:
# timeout-minutes: 60
# name: Check formatting and Clippy lints
# if: github.repository_owner == 'zed-industries'
# runs-on:
# - self-hosted
# - macOS
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# fetch-depth: 0
# - name: Run style checks
# uses: ./.github/actions/check_style
# - name: Run clippy
# run: ./script/clippy
# tests:
# timeout-minutes: 60
# name: Run tests
# if: github.repository_owner == 'zed-industries'
# runs-on:
# - self-hosted
# - macOS
# needs: style
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Run tests
# uses: ./.github/actions/run_tests
# windows-tests:
# timeout-minutes: 60
# name: Run tests on Windows
# if: github.repository_owner == 'zed-industries'
# runs-on: [self-32vcpu-windows-2022]
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Configure CI
# run: |
# New-Item -ItemType Directory -Path "./../.cargo" -Force
# Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
# - name: Run tests
# uses: ./.github/actions/run_tests_windows
# - name: Limit target directory size
# run: ./script/clear-target-dir-if-larger-than.ps1 1024
# - name: Clean CI config file
# if: always()
# run: Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
# bundle-mac:
# timeout-minutes: 60
# name: Create a macOS bundle
# if: github.repository_owner == 'zed-industries'
# runs-on:
# - self-mini-macos
# needs: tests
# env:
# MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
# MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
# APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
# APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
# APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
# steps:
# - name: Install Node
# uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
# with:
# node-version: "18"
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Set release channel to nightly
# run: |
# set -eu
# version=$(git rev-parse --short HEAD)
# echo "Publishing version: ${version} on release channel nightly"
# echo "nightly" > crates/zed/RELEASE_CHANNEL
# - name: Setup Sentry CLI
# uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
# with:
# token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
# - name: Create macOS app bundle
# run: script/bundle-mac
# - name: Upload Zed Nightly
# run: script/upload-nightly macos
# bundle-linux-x86:
# timeout-minutes: 60
# name: Create a Linux *.tar.gz bundle for x86
# if: github.repository_owner == 'zed-industries'
# runs-on:
# - namespace-profile-16x32-ubuntu-2004 # ubuntu 20.04 for minimal glibc
# needs: tests
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Add Rust to the PATH
# run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# - name: Install Linux dependencies
# run: ./script/linux && ./script/install-mold 2.34.0
# - name: Setup Sentry CLI
# uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
# with:
# token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
# - name: Limit target directory size
# run: script/clear-target-dir-if-larger-than 100
# - name: Set release channel to nightly
# run: |
# set -euo pipefail
# version=$(git rev-parse --short HEAD)
# echo "Publishing version: ${version} on release channel nightly"
# echo "nightly" > crates/zed/RELEASE_CHANNEL
# - name: Create Linux .tar.gz bundle
# run: script/bundle-linux
# - name: Upload Zed Nightly
# run: script/upload-nightly linux-targz
# bundle-linux-arm:
# timeout-minutes: 60
# name: Create a Linux *.tar.gz bundle for ARM
# if: github.repository_owner == 'zed-industries'
# runs-on:
# - namespace-profile-8x32-ubuntu-2004-arm-m4 # ubuntu 20.04 for minimal glibc
# needs: tests
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Install Linux dependencies
# run: ./script/linux
# - name: Setup Sentry CLI
# uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
# with:
# token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
# - name: Limit target directory size
# run: script/clear-target-dir-if-larger-than 100
# - name: Set release channel to nightly
# run: |
# set -euo pipefail
# version=$(git rev-parse --short HEAD)
# echo "Publishing version: ${version} on release channel nightly"
# echo "nightly" > crates/zed/RELEASE_CHANNEL
# - name: Create Linux .tar.gz bundle
# run: script/bundle-linux
# - name: Upload Zed Nightly
# run: script/upload-nightly linux-targz
# freebsd:
# timeout-minutes: 60
# if: false && github.repository_owner == 'zed-industries'
# runs-on: github-8vcpu-ubuntu-2404
# needs: tests
# name: Build Zed on FreeBSD
# steps:
# - uses: actions/checkout@v4
# - name: Build FreeBSD remote-server
# id: freebsd-build
# uses: vmactions/freebsd-vm@c3ae29a132c8ef1924775414107a97cac042aad5 # v1.2.0
# with:
# # envs: "MYTOKEN MYTOKEN2"
# usesh: true
# release: 13.5
# copyback: true
# prepare: |
# pkg install -y \
# bash curl jq git \
# rustup-init cmake-core llvm-devel-lite pkgconf protobuf # ibx11 alsa-lib rust-bindgen-cli
# run: |
# freebsd-version
# sysctl hw.model
# sysctl hw.ncpu
# sysctl hw.physmem
# sysctl hw.usermem
# git config --global --add safe.directory /home/runner/work/zed/zed
# rustup-init --profile minimal --default-toolchain none -y
# . "$HOME/.cargo/env"
# ./script/bundle-freebsd
# mkdir -p out/
# mv "target/zed-remote-server-freebsd-x86_64.gz" out/
# rm -rf target/
# cargo clean
# - name: Upload Zed Nightly
# run: script/upload-nightly freebsd
# bundle-nix:
# name: Build and cache Nix package
# needs: tests
# secrets: inherit
# uses: ./.github/workflows/nix.yml
# bundle-windows-x64:
# timeout-minutes: 60
# name: Create a Windows installer
# if: github.repository_owner == 'zed-industries'
# runs-on: [self-32vcpu-windows-2022]
# needs: windows-tests
# env:
# AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
# AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
# AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
# ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
# CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
# ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
# FILE_DIGEST: SHA256
# TIMESTAMP_DIGEST: SHA256
# TIMESTAMP_SERVER: "http://timestamp.acs.microsoft.com"
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# clean: false
# - name: Set release channel to nightly
# working-directory: ${{ env.ZED_WORKSPACE }}
# run: |
# $ErrorActionPreference = "Stop"
# $version = git rev-parse --short HEAD
# Write-Host "Publishing version: $version on release channel nightly"
# "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
# - name: Setup Sentry CLI
# uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
# with:
# token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
# - name: Build Zed installer
# working-directory: ${{ env.ZED_WORKSPACE }}
# run: script/bundle-windows.ps1
# - name: Upload Zed Nightly
# working-directory: ${{ env.ZED_WORKSPACE }}
# run: script/upload-nightly.ps1 windows
gpui-docs:
timeout-minutes: 60
name: Render rust docs for gpui
check_style:
if: github.repository_owner == 'zed-industries'
# TODO: build for multiple targets?
runs-on:
- github-16vcpu-ubuntu-2404
# needs: tests
continue-on-error: true
runs-on: self-mini-macos
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
fetch-depth: 0
- name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
- name: ./script/clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
timeout-minutes: 60
run_tests_windows:
if: github.repository_owner == 'zed-industries'
runs-on: self-32vcpu-windows-2022
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
New-Item -ItemType Directory -Path "./../.cargo" -Force
Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
shell: pwsh
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: pwsh
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than.ps1 250
shell: pwsh
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: pwsh
- name: steps::cleanup_cargo_config
if: always()
run: |
Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
shell: pwsh
timeout-minutes: 60
bundle_linux_aarch64:
needs:
- check_style
- run_tests_windows
runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
set -eu
version=$(git rev-parse --short HEAD)
echo "Publishing version: ${version} on release channel nightly"
echo "nightly" > crates/zed/RELEASE_CHANNEL
shell: bash -euxo pipefail {0}
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-aarch64.tar.gz
path: target/release/zed-linux-aarch64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-aarch64.gz
path: target/zed-remote-server-linux-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_linux_x86_64:
needs:
- check_style
- run_tests_windows
runs-on: namespace-profile-32x64-ubuntu-2004
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
set -eu
version=$(git rev-parse --short HEAD)
echo "Publishing version: ${version} on release channel nightly"
echo "nightly" > crates/zed/RELEASE_CHANNEL
shell: bash -euxo pipefail {0}
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-x86_64.tar.gz
path: target/release/zed-linux-x86_64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-x86_64.gz
path: target/zed-remote-server-linux-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_aarch64:
needs:
- check_style
- run_tests_windows
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
set -eu
version=$(git rev-parse --short HEAD)
echo "Publishing version: ${version} on release channel nightly"
echo "nightly" > crates/zed/RELEASE_CHANNEL
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac aarch64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-aarch64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-aarch64.gz
path: target/zed-remote-server-macos-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_x86_64:
needs:
- check_style
- run_tests_windows
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
set -eu
version=$(git rev-parse --short HEAD)
echo "Publishing version: ${version} on release channel nightly"
echo "nightly" > crates/zed/RELEASE_CHANNEL
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac x86_64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-x86_64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.dmg
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-x86_64.gz
path: target/zed-remote-server-macos-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_windows_aarch64:
needs:
- check_style
- run_tests_windows
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
$ErrorActionPreference = "Stop"
$version = git rev-parse --short HEAD
Write-Host "Publishing version: $version on release channel nightly"
"nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture aarch64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-aarch64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.exe
path: target/Zed-aarch64.exe
if-no-files-found: error
timeout-minutes: 60
bundle_windows_x86_64:
needs:
- check_style
- run_tests_windows
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_bundling::set_release_channel_to_nightly
run: |
$ErrorActionPreference = "Stop"
$version = git rev-parse --short HEAD
Write-Host "Publishing version: $version on release channel nightly"
"nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture x86_64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-x86_64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.exe
path: target/Zed-x86_64.exe
if-no-files-found: error
timeout-minutes: 60
build_nix_linux_x86_64:
needs:
- check_style
- run_tests_windows
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-32x64-ubuntu-2004
env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
GIT_LFS_SKIP_SMUDGE: '1'
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: nix_build::build_nix::install_nix
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: nix_build::build_nix::cachix_action
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
with:
name: zed
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachixArgs: -v
- name: nix_build::build_nix::build
run: nix build .#default -L --accept-flake-config
shell: bash -euxo pipefail {0}
timeout-minutes: 60
continue-on-error: true
build_nix_mac_aarch64:
needs:
- check_style
- run_tests_windows
if: github.repository_owner == 'zed-industries'
runs-on: self-mini-macos
env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
GIT_LFS_SKIP_SMUDGE: '1'
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: nix_build::build_nix::set_path
run: |
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
shell: bash -euxo pipefail {0}
- name: nix_build::build_nix::cachix_action
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
with:
name: zed
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachixArgs: -v
- name: nix_build::build_nix::build
run: nix build .#default -L --accept-flake-config
shell: bash -euxo pipefail {0}
- name: nix_build::build_nix::limit_store
run: |-
if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
nix-collect-garbage -d || true
fi
shell: bash -euxo pipefail {0}
timeout-minutes: 60
continue-on-error: true
update_nightly_tag:
needs:
- bundle_linux_aarch64
- bundle_linux_x86_64
- bundle_mac_aarch64
- bundle_mac_x86_64
- bundle_windows_aarch64
- bundle_windows_x86_64
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-4x8-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
fetch-depth: 0
- name: release::download_workflow_artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
path: ./artifacts/
- name: ls -lR ./artifacts
run: ls -lR ./artifacts
shell: bash -euxo pipefail {0}
- name: release::prep_release_artifacts
run: |-
mkdir -p release-artifacts/
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Linux dependencies
run: ./script/linux && ./script/install-mold 2.34.0
- name: Limit target directory size
run: script/clear-target-dir-if-larger-than 100
- name: Build rustdocs
run: cargo doc -p gpui --no-deps
- name: Check for broken links (in HTML)
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
with:
args: --no-progress --exclude '^http' 'target/doc/'
fail: true
- name: Deploy rustdoc
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy target/doc --project-name=gpui-rustdoc
# update-nightly-tag:
# name: Update nightly tag
# if: github.repository_owner == 'zed-industries'
# runs-on: namespace-profile-2x4-ubuntu-2404
# needs:
# - bundle-mac
# - bundle-linux-x86
# - bundle-linux-arm
# - bundle-windows-x64
# steps:
# - name: Checkout repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# with:
# fetch-depth: 0
# - name: Update nightly tag
# run: |
# if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
# echo "Nightly tag already points to current commit. Skipping tagging."
# exit 0
# fi
# git config user.name github-actions
# git config user.email github-actions@github.com
# git tag -f nightly
# git push origin nightly --force
# - name: Create Sentry release
# uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c # v3
# env:
# SENTRY_ORG: zed-dev
# SENTRY_PROJECT: zed
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# with:
# environment: production
mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
mv ./artifacts/zed-remote-server-macos-x86_64.gz/zed-remote-server-macos-x86_64.gz release-artifacts/zed-remote-server-macos-x86_64.gz
mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
mv ./artifacts/zed-remote-server-linux-x86_64.gz/zed-remote-server-linux-x86_64.gz release-artifacts/zed-remote-server-linux-x86_64.gz
shell: bash -euxo pipefail {0}
- name: ./script/upload-nightly
run: ./script/upload-nightly
shell: bash -euxo pipefail {0}
env:
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
- name: release_nightly::update_nightly_tag_job::update_nightly_tag
run: |
if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
echo "Nightly tag already points to current commit. Skipping tagging."
exit 0
fi
git config user.name github-actions
git config user.email github-actions@github.com
git tag -f nightly
git push origin nightly --force
shell: bash -euxo pipefail {0}
- name: release::create_sentry_release
uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
with:
environment: production
env:
SENTRY_ORG: zed-dev
SENTRY_PROJECT: zed
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
timeout-minutes: 60

59
.github/workflows/run_agent_evals.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
# Generated from xtask::workflows::run_agent_evals
# Rebuild with `cargo xtask workflows`.
name: run_agent_evals
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
RUST_BACKTRACE: '1'
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_EVAL_TELEMETRY: '1'
MODEL_NAME: ${{ inputs.model_name }}
on:
workflow_dispatch:
inputs:
model_name:
description: model_name
required: true
type: string
jobs:
agent_evals:
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: cargo build --package=eval
run: cargo build --package=eval
shell: bash -euxo pipefail {0}
- name: run_agent_evals::agent_evals::run_eval
run: cargo run --package=eval -- --repetitions=8 --concurrency=1 --model "${MODEL_NAME}"
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 600
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true

269
.github/workflows/run_bundling.yml vendored Normal file
View File

@@ -0,0 +1,269 @@
# Generated from xtask::workflows::run_bundling
# Rebuild with `cargo xtask workflows`.
name: run_bundling
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
on:
pull_request:
types:
- labeled
- synchronize
jobs:
bundle_linux_aarch64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-aarch64.tar.gz
path: target/release/zed-linux-aarch64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-aarch64.gz
path: target/zed-remote-server-linux-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_linux_x86_64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: namespace-profile-32x64-ubuntu-2004
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: ./script/bundle-linux
run: ./script/bundle-linux
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-linux-x86_64.tar.gz
path: target/release/zed-linux-x86_64.tar.gz
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-linux-x86_64.gz
path: target/zed-remote-server-linux-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_aarch64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac aarch64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-aarch64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-aarch64.gz
path: target/zed-remote-server-macos-aarch64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_mac_x86_64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: self-mini-macos
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: run_bundling::bundle_mac::bundle_mac
run: ./script/bundle-mac x86_64-apple-darwin
shell: bash -euxo pipefail {0}
- name: '@actions/upload-artifact Zed-x86_64.dmg'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.dmg
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
if-no-files-found: error
- name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: zed-remote-server-macos-x86_64.gz
path: target/zed-remote-server-macos-x86_64.gz
if-no-files-found: error
timeout-minutes: 60
bundle_windows_aarch64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture aarch64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-aarch64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-aarch64.exe
path: target/Zed-aarch64.exe
if-no-files-found: error
timeout-minutes: 60
bundle_windows_x86_64:
if: |-
(github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
runs-on: self-32vcpu-windows-2022
env:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
FILE_DIGEST: SHA256
TIMESTAMP_DIGEST: SHA256
TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_sentry
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: run_bundling::bundle_windows::bundle_windows
run: script/bundle-windows.ps1 -Architecture x86_64
shell: pwsh
working-directory: ${{ env.ZED_WORKSPACE }}
- name: '@actions/upload-artifact Zed-x86_64.exe'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: Zed-x86_64.exe
path: target/Zed-x86_64.exe
if-no-files-found: error
timeout-minutes: 60
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

579
.github/workflows/run_tests.yml vendored Normal file
View File

@@ -0,0 +1,579 @@
# Generated from xtask::workflows::run_tests
# Rebuild with `cargo xtask workflows`.
name: run_tests
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
CARGO_INCREMENTAL: '0'
on:
pull_request:
branches:
- '**'
push:
branches:
- main
- v[0-9]+.[0-9]+.x
jobs:
orchestrate:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
fetch-depth: ${{ github.ref == 'refs/heads/main' && 2 || 350 }}
- id: filter
name: filter
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo "Not in a PR context (i.e., push to main/stable/preview)"
COMPARE_REV="$(git rev-parse HEAD~1)"
else
echo "In a PR context comparing to pull_request.base.ref"
git fetch origin "$GITHUB_BASE_REF" --depth=350
COMPARE_REV="$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD)"
fi
CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" ${{ github.sha }})"
check_pattern() {
local output_name="$1"
local pattern="$2"
local grep_arg="$3"
echo "$CHANGED_FILES" | grep "$grep_arg" "$pattern" && \
echo "${output_name}=true" >> "$GITHUB_OUTPUT" || \
echo "${output_name}=false" >> "$GITHUB_OUTPUT"
}
check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP
check_pattern "run_docs" '^docs/' -qP
check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP
check_pattern "run_nix" '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' -qP
check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))' -qvP
shell: bash -euxo pipefail {0}
outputs:
run_action_checks: ${{ steps.filter.outputs.run_action_checks }}
run_docs: ${{ steps.filter.outputs.run_docs }}
run_licenses: ${{ steps.filter.outputs.run_licenses }}
run_nix: ${{ steps.filter.outputs.run_nix }}
run_tests: ${{ steps.filter.outputs.run_tests }}
check_style:
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-4x8-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: '9'
- name: ./script/prettier
run: ./script/prettier
shell: bash -euxo pipefail {0}
- name: ./script/check-todos
run: ./script/check-todos
shell: bash -euxo pipefail {0}
- name: ./script/check-keymaps
run: ./script/check-keymaps
shell: bash -euxo pipefail {0}
- name: run_tests::check_style::check_for_typos
uses: crate-ci/typos@80c8a4945eec0f6d464eaf9e65ed98ef085283d1
with:
config: ./typos.toml
- name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
timeout-minutes: 60
run_tests_windows:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: self-32vcpu-windows-2022
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
New-Item -ItemType Directory -Path "./../.cargo" -Force
Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
shell: pwsh
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy.ps1
shell: pwsh
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: pwsh
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than.ps1 250
shell: pwsh
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: pwsh
- name: steps::cleanup_cargo_config
if: always()
run: |
Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
shell: pwsh
timeout-minutes: 60
run_tests_linux:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 250
shell: bash -euxo pipefail {0}
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
run_tests_mac:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: self-mini-macos
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::setup_node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '20'
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 300
shell: bash -euxo pipefail {0}
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
doctests:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- id: run_doctests
name: run_tests::doctests::run_doctests
run: |
cargo test --workspace --doc --no-fail-fast
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
check_workspace_binaries:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: namespace-profile-8x16-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: cargo build -p collab
run: cargo build -p collab
shell: bash -euxo pipefail {0}
- name: cargo build --workspace --bins --examples
run: cargo build --workspace --bins --examples
shell: bash -euxo pipefail {0}
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
timeout-minutes: 60
check_dependencies:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: run_tests::check_dependencies::install_cargo_machete
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386
with:
command: install
args: cargo-machete@0.7.0
- name: run_tests::check_dependencies::run_cargo_machete
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386
with:
command: machete
- name: run_tests::check_dependencies::check_cargo_lock
run: cargo update --locked --workspace
shell: bash -euxo pipefail {0}
- name: run_tests::check_dependencies::check_vulnerable_dependencies
if: github.event_name == 'pull_request'
uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8
with:
license-check: false
timeout-minutes: 60
check_docs:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_docs == 'true'
runs-on: namespace-profile-8x16-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: run_tests::check_docs::lychee_link_check
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
with:
args: --no-progress --exclude '^http' './docs/src/**/*'
fail: true
jobSummary: false
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: run_tests::check_docs::install_mdbook
uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
with:
mdbook-version: 0.4.37
- name: run_tests::check_docs::build_docs
run: |
mkdir -p target/deploy
mdbook build ./docs --dest-dir=../target/deploy/docs/
shell: bash -euxo pipefail {0}
- name: run_tests::check_docs::lychee_link_check
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
with:
args: --no-progress --exclude '^http' 'target/deploy/docs'
fail: true
jobSummary: false
timeout-minutes: 60
check_licenses:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_licenses == 'true'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: ./script/check-licenses
run: ./script/check-licenses
shell: bash -euxo pipefail {0}
- name: ./script/generate-licenses
run: ./script/generate-licenses
shell: bash -euxo pipefail {0}
check_scripts:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_action_checks == 'true'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: run_tests::check_scripts::run_shellcheck
run: ./script/shellcheck-scripts error
shell: bash -euxo pipefail {0}
- id: get_actionlint
name: run_tests::check_scripts::download_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash -euxo pipefail {0}
- name: run_tests::check_scripts::run_actionlint
run: |
${{ steps.get_actionlint.outputs.executable }} -color
shell: bash -euxo pipefail {0}
- name: run_tests::check_scripts::check_xtask_workflows
run: |
cargo xtask workflows
if ! git diff --exit-code .github; then
echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
echo "Please run 'cargo xtask workflows' locally and commit the changes"
exit 1
fi
shell: bash -euxo pipefail {0}
timeout-minutes: 60
build_nix_linux_x86_64:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_nix == 'true'
runs-on: namespace-profile-32x64-ubuntu-2004
env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
GIT_LFS_SKIP_SMUDGE: '1'
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: nix_build::build_nix::install_nix
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: nix_build::build_nix::cachix_action
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
with:
name: zed
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachixArgs: -v
pushFilter: -zed-editor-[0-9.]*-nightly
- name: nix_build::build_nix::build
run: nix build .#debug -L --accept-flake-config
shell: bash -euxo pipefail {0}
timeout-minutes: 60
continue-on-error: true
build_nix_mac_aarch64:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_nix == 'true'
runs-on: self-mini-macos
env:
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
GIT_LFS_SKIP_SMUDGE: '1'
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: nix_build::build_nix::set_path
run: |
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
shell: bash -euxo pipefail {0}
- name: nix_build::build_nix::cachix_action
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
with:
name: zed
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
cachixArgs: -v
pushFilter: -zed-editor-[0-9.]*-nightly
- name: nix_build::build_nix::build
run: nix build .#debug -L --accept-flake-config
shell: bash -euxo pipefail {0}
- name: nix_build::build_nix::limit_store
run: |-
if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
nix-collect-garbage -d || true
fi
shell: bash -euxo pipefail {0}
timeout-minutes: 60
continue-on-error: true
check_postgres_and_protobuf_migrations:
needs:
- orchestrate
if: needs.orchestrate.outputs.run_tests == 'true'
runs-on: self-mini-macos
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: run_tests::check_postgres_and_protobuf_migrations::remove_untracked_files
run: git clean -df
shell: bash -euxo pipefail {0}
- name: run_tests::check_postgres_and_protobuf_migrations::ensure_fresh_merge
run: |
if [ -z "$GITHUB_BASE_REF" ];
then
echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> "$GITHUB_ENV"
else
git checkout -B temp
git merge -q "origin/$GITHUB_BASE_REF" -m "merge main into temp"
echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> "$GITHUB_ENV"
fi
shell: bash -euxo pipefail {0}
- name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_setup_action
uses: bufbuild/buf-setup-action@v1
with:
version: v1.29.0
- name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_breaking_action
uses: bufbuild/buf-breaking-action@v1
with:
input: crates/proto/proto/
against: https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/
timeout-minutes: 60
tests_pass:
needs:
- orchestrate
- check_style
- run_tests_windows
- run_tests_linux
- run_tests_mac
- doctests
- check_workspace_binaries
- check_dependencies
- check_docs
- check_licenses
- check_scripts
- build_nix_linux_x86_64
- build_nix_mac_aarch64
if: github.repository_owner == 'zed-industries' && always()
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: run_tests::tests_pass
run: |
set +x
EXIT_CODE=0
check_result() {
echo "* $1: $2"
if [[ "$2" != "skipped" && "$2" != "success" ]]; then EXIT_CODE=1; fi
}
check_result "orchestrate" "${{ needs.orchestrate.result }}"
check_result "check_style" "${{ needs.check_style.result }}"
check_result "run_tests_windows" "${{ needs.run_tests_windows.result }}"
check_result "run_tests_linux" "${{ needs.run_tests_linux.result }}"
check_result "run_tests_mac" "${{ needs.run_tests_mac.result }}"
check_result "doctests" "${{ needs.doctests.result }}"
check_result "check_workspace_binaries" "${{ needs.check_workspace_binaries.result }}"
check_result "check_dependencies" "${{ needs.check_dependencies.result }}"
check_result "check_docs" "${{ needs.check_docs.result }}"
check_result "check_licenses" "${{ needs.check_licenses.result }}"
check_result "check_scripts" "${{ needs.check_scripts.result }}"
check_result "build_nix_linux_x86_64" "${{ needs.build_nix_linux_x86_64.result }}"
check_result "build_nix_mac_aarch64" "${{ needs.build_nix_mac_aarch64.result }}"
exit $EXIT_CODE
shell: bash -euxo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true

66
.github/workflows/run_unit_evals.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
# Generated from xtask::workflows::run_agent_evals
# Rebuild with `cargo xtask workflows`.
name: run_agent_evals
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
RUST_BACKTRACE: '1'
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
on:
schedule:
- cron: 47 1 * * 2
workflow_dispatch: {}
jobs:
unit_evals:
runs-on: namespace-profile-16x32-ubuntu-2204
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
- name: steps::setup_cargo_config
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: steps::setup_linux
run: ./script/linux
shell: bash -euxo pipefail {0}
- name: steps::install_mold
run: ./script/install-mold
shell: bash -euxo pipefail {0}
- name: steps::download_wasi_sdk
run: ./script/download-wasi-sdk
shell: bash -euxo pipefail {0}
- name: steps::cargo_install_nextest
run: cargo install cargo-nextest --locked
shell: bash -euxo pipefail {0}
- name: steps::clear_target_dir_if_large
run: ./script/clear-target-dir-if-larger-than 250
shell: bash -euxo pipefail {0}
- name: ./script/run-unit-evals
run: ./script/run-unit-evals
shell: bash -euxo pipefail {0}
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: run_agent_evals::unit_evals::send_failure_to_slack
if: ${{ failure() }}
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
with:
method: chat.postMessage
token: ${{ secrets.SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN }}
payload: |
channel: C04UDRNNJFQ
text: "Unit Evals Failed: https://github.com/zed-industries/zed/actions/runs/${{ github.run_id }}"
- name: steps::cleanup_cargo_config
if: always()
run: |
rm -rf ./../.cargo
shell: bash -euxo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true

View File

@@ -1,21 +0,0 @@
name: Script
on:
pull_request:
paths:
- "script/**"
push:
branches:
- main
jobs:
shellcheck:
name: "ShellCheck Scripts"
if: github.repository_owner == 'zed-industries'
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Shellcheck ./scripts
run: |
./script/shellcheck-scripts error

View File

@@ -1,86 +0,0 @@
name: Run Unit Evals
on:
schedule:
# GitHub might drop jobs at busy times, so we choose a random time in the middle of the night.
- cron: "47 1 * * 2"
workflow_dispatch:
concurrency:
# Allow only one workflow per any non-`main` branch.
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
jobs:
unit_evals:
if: github.repository_owner == 'zed-industries'
timeout-minutes: 60
name: Run unit evals
runs-on:
- namespace-profile-16x32-ubuntu-2204
steps:
- name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: false
- name: Cache dependencies
uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
# cache-provider: "buildjet"
- name: Install Linux dependencies
run: ./script/linux
- name: Configure CI
run: |
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- name: Install Rust
shell: bash -euxo pipefail {0}
run: |
cargo install cargo-nextest --locked
- name: Install Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "18"
- name: Limit target directory size
shell: bash -euxo pipefail {0}
run: script/clear-target-dir-if-larger-than 100
- name: Run unit evals
shell: bash -euxo pipefail {0}
run: cargo nextest run --workspace --no-fail-fast --features eval --no-capture -E 'test(::eval_)'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Send failure message to Slack channel if needed
if: ${{ failure() }}
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
with:
method: chat.postMessage
token: ${{ secrets.SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN }}
payload: |
channel: C04UDRNNJFQ
text: "Unit Evals Failed: https://github.com/zed-industries/zed/actions/runs/${{ github.run_id }}"
# Even the Linux runner is not stateful, in theory there is no need to do this cleanup.
# But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code
# to clean up the config file, Ive included the cleanup code here as a precaution.
# While its not strictly necessary at this moment, I believe its better to err on the side of caution.
- name: Clean CI config file
if: always()
run: rm -rf ./../.cargo

2
.gitignore vendored
View File

@@ -20,10 +20,12 @@
.venv
.vscode
.wrangler
.perf-runs
/assets/*licenses.*
/crates/collab/seed.json
/crates/theme/schemas/theme.json
/crates/zed/resources/flatpak/flatpak-cargo-sources.json
/crates/project_panel/benches/linux_repo_snapshot.txt
/dev.zed.Zed*.json
/node_modules/
/plugins/bin

15
.rules
View File

@@ -12,6 +12,19 @@
- Example: avoid `let _ = client.request(...).await?;` - use `client.request(...).await?;` instead
* When implementing async operations that may fail, ensure errors propagate to the UI layer so users get meaningful feedback.
* Never create files with `mod.rs` paths - prefer `src/some_module.rs` instead of `src/some_module/mod.rs`.
* When creating new crates, prefer specifying the library root path in `Cargo.toml` using `[lib] path = "...rs"` instead of the default `lib.rs`, to maintain consistent and descriptive naming (e.g., `gpui.rs` or `main.rs`).
* Avoid creative additions unless explicitly requested
* Use full words for variable names (no abbreviations like "q" for "queue")
* Use variable shadowing to scope clones in async contexts for clarity, minimizing the lifetime of borrowed references.
Example:
```rust
executor.spawn({
let task_ran = task_ran.clone();
async move {
*task_ran.borrow_mut() = true;
}
});
```
# GPUI
@@ -46,7 +59,7 @@ Trying to update an entity while it's already being updated must be avoided as t
When `read_with`, `update`, or `update_in` are used with an async context, the closure's return value is wrapped in an `anyhow::Result`.
`WeakEntity<T>` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to eachother they will never be dropped.
`WeakEntity<T>` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to each other they will never be dropped.
## Concurrency

View File

@@ -48,7 +48,7 @@
"remove_trailing_whitespace_on_save": true,
"ensure_final_newline_on_save": true,
"file_scan_exclusions": [
"crates/assistant_tools/src/edit_agent/evals/fixtures",
"crates/agent/src/edit_agent/evals/fixtures",
"crates/eval/worktrees/",
"crates/eval/repos/",
"**/.git",

View File

@@ -1,71 +1,75 @@
# Contributing to Zed
Thanks for your interest in contributing to Zed, the collaborative platform that is also a code editor!
Thank you for helping us make Zed better!
All activity in Zed forums is subject to our [Code of Conduct](https://zed.dev/code-of-conduct). Additionally, contributors must sign our [Contributor License Agreement](https://zed.dev/cla) before their contributions can be merged.
All activity in Zed forums is subject to our [Code of
Conduct](https://zed.dev/code-of-conduct). Additionally, contributors must sign
our [Contributor License Agreement](https://zed.dev/cla) before their
contributions can be merged.
## Contribution ideas
If you're looking for ideas about what to work on, check out:
Zed is a large project with a number of priorities. We spend most of
our time working on what we believe the product needs, but we also love working
with the community to improve the product in ways we haven't thought of (or had time to get to yet!)
In particular we love PRs that are:
- Fixes to existing bugs and issues.
- Small enhancements to existing features, particularly to make them work for more people.
- Small extra features, like keybindings or actions you miss from other editors or extensions.
- Work towards shipping larger features on our roadmap.
If you're looking for concrete ideas:
- Our [public roadmap](https://zed.dev/roadmap) contains a rough outline of our near-term priorities for Zed.
- Our [top-ranking issues](https://github.com/zed-industries/zed/issues/5393) based on votes by the community.
- Our [public roadmap](https://zed.dev/roadmap) contains a rough outline of our near-term priorities for Zed.
For adding themes or support for a new language to Zed, check out our [docs on developing extensions](https://zed.dev/docs/extensions/developing-extensions).
## Sending changes
## Proposing changes
The Zed culture values working code and synchronous conversations over long
discussion threads.
The best way to propose a change is to [start a discussion on our GitHub repository](https://github.com/zed-industries/zed/discussions).
The best way to get us to take a look at a proposed change is to send a pull
request. We will get back to you (though this sometimes takes longer than we'd
like, sorry).
First, write a short **problem statement**, which _clearly_ and _briefly_ describes the problem you want to solve independently from any specific solution. It doesn't need to be long or formal, but it's difficult to consider a solution in absence of a clear understanding of the problem.
Although we will take a look, we tend to only merge about half the PRs that are
submitted. If you'd like your PR to have the best chance of being merged:
Next, write a short **solution proposal**. How can the problem (or set of problems) you have stated above be addressed? What are the pros and cons of your approach? Again, keep it brief and informal. This isn't a specification, but rather a starting point for a conversation.
- Include a clear description of what you're solving, and why it's important to you.
- Include tests.
- If it changes the UI, attach screenshots or screen recordings.
By effectively engaging with the Zed team and community early in your process, we're better positioned to give you feedback and understand your pull request once you open it. If the first thing we see from you is a big changeset, we're much less likely to respond to it in a timely manner.
The internal advice for reviewers is as follows:
## Pair programming
- If the fix/feature is obviously great, and the code is great. Hit merge.
- If the fix/feature is obviously great, and the code is nearly great. Send PR comments, or offer to pair to get things perfect.
- If the fix/feature is not obviously great, or the code needs rewriting from scratch. Close the PR with a thank you and some explanation.
We plan to set aside time each week to pair program with contributors on promising pull requests in Zed. This will be an experiment. We tend to prefer pairing over async code review on our team, and we'd like to see how well it works in an open source setting. If we're finding it difficult to get on the same page with async review, we may ask you to pair with us if you're open to it. The closer a contribution is to the goals outlined in our roadmap, the more likely we'll be to spend time pairing on it.
If you need more feedback from us: the best way is to be responsive to
Github comments, or to offer up time to pair with us.
## Mandatory PR contents
If you are making a larger change, or need advice on how to finish the change
you're making, please open the PR early. We would love to help you get
things right, and it's often easier to see how to solve a problem before the
diff gets too big.
Please ensure the PR contains
## Things we will (probably) not merge
- Before & after screenshots, if there are visual adjustments introduced.
Although there are few hard and fast rules, typically we don't merge:
Examples of visual adjustments: tree-sitter query updates, UI changes, etc.
- A disclosure of the AI assistance usage, if any was used.
Any kind of AI assistance must be disclosed in the PR, along with the extent to which AI assistance was used (e.g. docs only vs. code generation).
If the PR responses are being generated by an AI, disclose that as well.
As a small exception, trivial tab-completion doesn't need to be disclosed, as long as it's limited to single keywords or short phrases.
## Tips to improve the chances of your PR getting reviewed and merged
- Discuss your plans ahead of time with the team
- Small, focused, incremental pull requests are much easier to review
- Spend time explaining your changes in the pull request body
- Add test coverage and documentation
- Choose tasks that align with our roadmap
- Pair with us and watch us code to learn the codebase
- Low effort PRs, such as those that just re-arrange syntax, won't be merged without a compelling justification
## File icons
Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner.
We do not accept PRs for file icons that are just an off-the-shelf SVG taken from somewhere else.
### Adding new icons to the Zed icon theme
If you would like to add a new icon to the Zed icon theme, [open a Discussion](https://github.com/zed-industries/zed/discussions/new?category=ux-and-design) and we can work with you on getting an icon designed and added to Zed.
- Anything that can be provided by an extension. For example a new language, or theme. For adding themes or support for a new language to Zed, check out our [docs on developing extensions](https://zed.dev/docs/extensions/developing-extensions).
- New file icons. Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner, please don't submit PRs with off-the-shelf SVGs.
- Giant refactorings.
- Non-trivial changes with no tests.
- Stylistic code changes that do not alter any app logic. Reducing allocations, removing `.unwrap()`s, fixing typos is great; making code "more readable" — maybe not so much.
- Features where (in our subjective opinion) the extra complexity isn't worth it for the number of people who will benefit.
- Anything that seems completely AI generated.
## Bird's-eye view of Zed
We suggest you keep the [zed glossary](docs/src/development/GLOSSARY.md) at your side when starting out. It lists and explains some of the structures and terms you will see throughout the codebase.
We suggest you keep the [Zed glossary](docs/src/development/glossary.md) at your side when starting out. It lists and explains some of the structures and terms you will see throughout the codebase.
Zed is made up of several smaller crates - let's go over those you're most likely to interact with:

8492
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,6 @@ members = [
"crates/action_log",
"crates/activity_indicator",
"crates/agent",
"crates/agent2",
"crates/agent_servers",
"crates/agent_settings",
"crates/agent_ui",
@@ -14,11 +13,9 @@ members = [
"crates/anthropic",
"crates/askpass",
"crates/assets",
"crates/assistant_context",
"crates/assistant_text_thread",
"crates/assistant_slash_command",
"crates/assistant_slash_commands",
"crates/assistant_tool",
"crates/assistant_tools",
"crates/audio",
"crates/auto_update",
"crates/auto_update_helper",
@@ -35,6 +32,7 @@ members = [
"crates/cloud_api_client",
"crates/cloud_api_types",
"crates/cloud_llm_client",
"crates/cloud_zeta2_prompt",
"crates/collab",
"crates/collab_ui",
"crates/collections",
@@ -52,10 +50,13 @@ members = [
"crates/debugger_tools",
"crates/debugger_ui",
"crates/deepseek",
"crates/denoise",
"crates/diagnostics",
"crates/docs_preprocessor",
"crates/edit_prediction",
"crates/edit_prediction_button",
"crates/edit_prediction_context",
"crates/zeta2_tools",
"crates/editor",
"crates/eval",
"crates/explorer_command_injector",
@@ -69,6 +70,7 @@ members = [
"crates/file_finder",
"crates/file_icons",
"crates/fs",
"crates/fs_benchmarks",
"crates/fsevent",
"crates/fuzzy",
"crates/git",
@@ -86,17 +88,18 @@ members = [
"crates/image_viewer",
"crates/inspector_ui",
"crates/install_cli",
"crates/jj",
"crates/jj_ui",
"crates/journal",
"crates/json_schema_store",
"crates/keymap_editor",
"crates/language",
"crates/language_extension",
"crates/language_model",
"crates/language_models",
"crates/language_onboarding",
"crates/language_selector",
"crates/language_tools",
"crates/languages",
"crates/line_ending_selector",
"crates/livekit_api",
"crates/livekit_client",
"crates/lmstudio",
@@ -131,6 +134,7 @@ members = [
"crates/refineable",
"crates/refineable/derive_refineable",
"crates/release_channel",
"crates/scheduler",
"crates/remote",
"crates/remote_server",
"crates/repl",
@@ -141,13 +145,13 @@ members = [
"crates/rules_library",
"crates/schema_generator",
"crates/search",
"crates/semantic_index",
"crates/semantic_version",
"crates/session",
"crates/settings",
"crates/settings_json",
"crates/settings_macros",
"crates/settings_profile_selector",
"crates/settings_ui",
"crates/settings_ui_macros",
"crates/snippet",
"crates/snippet_provider",
"crates/snippets_ui",
@@ -159,6 +163,7 @@ members = [
"crates/sum_tree",
"crates/supermaven",
"crates/supermaven_api",
"crates/codestral",
"crates/svg_preview",
"crates/system_specs",
"crates/tab_switcher",
@@ -193,7 +198,9 @@ members = [
"crates/x_ai",
"crates/zed",
"crates/zed_actions",
"crates/zed_env_vars",
"crates/zeta",
"crates/zeta2",
"crates/zeta_cli",
"crates/zlog",
"crates/zlog_settings",
@@ -205,17 +212,14 @@ members = [
"extensions/glsl",
"extensions/html",
"extensions/proto",
"extensions/ruff",
"extensions/slash-commands-example",
"extensions/snippets",
"extensions/test-extension",
"extensions/toml",
#
# Tooling
#
"tooling/workspace-hack",
"tooling/perf",
"tooling/xtask",
]
default-members = ["crates/zed"]
@@ -234,7 +238,6 @@ acp_tools = { path = "crates/acp_tools" }
acp_thread = { path = "crates/acp_thread" }
action_log = { path = "crates/action_log" }
agent = { path = "crates/agent" }
agent2 = { path = "crates/agent2" }
activity_indicator = { path = "crates/activity_indicator" }
agent_ui = { path = "crates/agent_ui" }
agent_settings = { path = "crates/agent_settings" }
@@ -244,11 +247,9 @@ ai_onboarding = { path = "crates/ai_onboarding" }
anthropic = { path = "crates/anthropic" }
askpass = { path = "crates/askpass" }
assets = { path = "crates/assets" }
assistant_context = { path = "crates/assistant_context" }
assistant_text_thread = { path = "crates/assistant_text_thread" }
assistant_slash_command = { path = "crates/assistant_slash_command" }
assistant_slash_commands = { path = "crates/assistant_slash_commands" }
assistant_tool = { path = "crates/assistant_tool" }
assistant_tools = { path = "crates/assistant_tools" }
audio = { path = "crates/audio" }
auto_update = { path = "crates/auto_update" }
auto_update_helper = { path = "crates/auto_update_helper" }
@@ -265,9 +266,10 @@ clock = { path = "crates/clock" }
cloud_api_client = { path = "crates/cloud_api_client" }
cloud_api_types = { path = "crates/cloud_api_types" }
cloud_llm_client = { path = "crates/cloud_llm_client" }
cloud_zeta2_prompt = { path = "crates/cloud_zeta2_prompt" }
collab = { path = "crates/collab" }
collab_ui = { path = "crates/collab_ui" }
collections = { path = "crates/collections" }
collections = { path = "crates/collections", version = "0.1.0" }
command_palette = { path = "crates/command_palette" }
command_palette_hooks = { path = "crates/command_palette_hooks" }
component = { path = "crates/component" }
@@ -275,6 +277,7 @@ context_server = { path = "crates/context_server" }
copilot = { path = "crates/copilot" }
crashes = { path = "crates/crashes" }
credentials_provider = { path = "crates/credentials_provider" }
crossbeam = "0.8.4"
dap = { path = "crates/dap" }
dap_adapters = { path = "crates/dap_adapters" }
db = { path = "crates/db" }
@@ -282,6 +285,7 @@ debug_adapter_extension = { path = "crates/debug_adapter_extension" }
debugger_tools = { path = "crates/debugger_tools" }
debugger_ui = { path = "crates/debugger_ui" }
deepseek = { path = "crates/deepseek" }
derive_refineable = { path = "crates/refineable/derive_refineable" }
diagnostics = { path = "crates/diagnostics" }
editor = { path = "crates/editor" }
extension = { path = "crates/extension" }
@@ -309,19 +313,22 @@ icons = { path = "crates/icons" }
image_viewer = { path = "crates/image_viewer" }
edit_prediction = { path = "crates/edit_prediction" }
edit_prediction_button = { path = "crates/edit_prediction_button" }
edit_prediction_context = { path = "crates/edit_prediction_context" }
zeta2_tools = { path = "crates/zeta2_tools" }
inspector_ui = { path = "crates/inspector_ui" }
install_cli = { path = "crates/install_cli" }
jj = { path = "crates/jj" }
jj_ui = { path = "crates/jj_ui" }
journal = { path = "crates/journal" }
json_schema_store = { path = "crates/json_schema_store" }
keymap_editor = { path = "crates/keymap_editor" }
language = { path = "crates/language" }
language_extension = { path = "crates/language_extension" }
language_model = { path = "crates/language_model" }
language_models = { path = "crates/language_models" }
language_onboarding = { path = "crates/language_onboarding" }
language_selector = { path = "crates/language_selector" }
language_tools = { path = "crates/language_tools" }
languages = { path = "crates/languages" }
line_ending_selector = { path = "crates/line_ending_selector" }
livekit_api = { path = "crates/livekit_api" }
livekit_client = { path = "crates/livekit_client" }
lmstudio = { path = "crates/lmstudio" }
@@ -346,6 +353,7 @@ outline = { path = "crates/outline" }
outline_panel = { path = "crates/outline_panel" }
panel = { path = "crates/panel" }
paths = { path = "crates/paths" }
perf = { path = "tooling/perf" }
picker = { path = "crates/picker" }
plugin = { path = "crates/plugin" }
plugin_macros = { path = "crates/plugin_macros" }
@@ -359,22 +367,23 @@ proto = { path = "crates/proto" }
recent_projects = { path = "crates/recent_projects" }
refineable = { path = "crates/refineable" }
release_channel = { path = "crates/release_channel" }
scheduler = { path = "crates/scheduler" }
remote = { path = "crates/remote" }
remote_server = { path = "crates/remote_server" }
repl = { path = "crates/repl" }
reqwest_client = { path = "crates/reqwest_client" }
rich_text = { path = "crates/rich_text" }
rodio = { version = "0.21.1", default-features = false }
rodio = { git = "https://github.com/RustAudio/rodio", rev ="e2074c6c2acf07b57cf717e076bdda7a9ac6e70b", features = ["wav", "playback", "wav_output", "recording"] }
rope = { path = "crates/rope" }
rpc = { path = "crates/rpc" }
rules_library = { path = "crates/rules_library" }
search = { path = "crates/search" }
semantic_index = { path = "crates/semantic_index" }
semantic_version = { path = "crates/semantic_version" }
session = { path = "crates/session" }
settings = { path = "crates/settings" }
settings_json = { path = "crates/settings_json" }
settings_macros = { path = "crates/settings_macros" }
settings_ui = { path = "crates/settings_ui" }
settings_ui_macros = { path = "crates/settings_ui_macros" }
snippet = { path = "crates/snippet" }
snippet_provider = { path = "crates/snippet_provider" }
snippets_ui = { path = "crates/snippets_ui" }
@@ -386,6 +395,7 @@ streaming_diff = { path = "crates/streaming_diff" }
sum_tree = { path = "crates/sum_tree" }
supermaven = { path = "crates/supermaven" }
supermaven_api = { path = "crates/supermaven_api" }
codestral = { path = "crates/codestral" }
system_specs = { path = "crates/system_specs" }
tab_switcher = { path = "crates/tab_switcher" }
task = { path = "crates/task" }
@@ -420,7 +430,9 @@ worktree = { path = "crates/worktree" }
x_ai = { path = "crates/x_ai" }
zed = { path = "crates/zed" }
zed_actions = { path = "crates/zed_actions" }
zed_env_vars = { path = "crates/zed_env_vars" }
zeta = { path = "crates/zeta" }
zeta2 = { path = "crates/zeta2" }
zlog = { path = "crates/zlog" }
zlog_settings = { path = "crates/zlog_settings" }
@@ -428,9 +440,9 @@ zlog_settings = { path = "crates/zlog_settings" }
# External crates
#
agent-client-protocol = { version = "0.2.0-alpha.4", features = ["unstable"]}
agent-client-protocol = { version = "0.7.0", features = ["unstable"] }
aho-corasick = "1.1"
alacritty_terminal = { git = "https://github.com/zed-industries/alacritty.git", branch = "add-hush-login-flag" }
alacritty_terminal = "0.25.1-rc1"
any_vec = "0.14"
anyhow = "1.0.86"
arrayvec = { version = "0.7.4", features = ["serde"] }
@@ -439,11 +451,13 @@ async-compat = "0.2.1"
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
async-dispatcher = "0.1"
async-fs = "2.1"
async-lock = "2.1"
async-pipe = { git = "https://github.com/zed-industries/async-pipe-rs", rev = "82d00a04211cf4e1236029aa03e6b6ce2a74c553" }
async-recursion = "1.0.0"
async-tar = "0.5.0"
async-tar = "0.5.1"
async-task = "4.7"
async-trait = "0.1"
async-tungstenite = "0.29.1"
async-tungstenite = "0.31.0"
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
aws-config = { version = "1.6.1", features = ["behavior-version-latest"] }
aws-credential-types = { version = "1.2.2", features = [
@@ -454,24 +468,25 @@ aws-sdk-bedrockruntime = { version = "1.80.0", features = [
] }
aws-smithy-runtime-api = { version = "1.7.4", features = ["http-1x", "client"] }
aws-smithy-types = { version = "1.3.0", features = ["http-body-1-x"] }
backtrace = "0.3"
base64 = "0.22"
bincode = "1.2.1"
bitflags = "2.6.0"
blade-graphics = { git = "https://github.com/kvark/blade", rev = "e0ec4e720957edd51b945b64dd85605ea54bcfe5" }
blade-macros = { git = "https://github.com/kvark/blade", rev = "e0ec4e720957edd51b945b64dd85605ea54bcfe5" }
blade-util = { git = "https://github.com/kvark/blade", rev = "e0ec4e720957edd51b945b64dd85605ea54bcfe5" }
blake3 = "1.5.3"
blade-graphics = { version = "0.7.0" }
blade-macros = { version = "0.3.0" }
blade-util = { version = "0.3.0" }
bytes = "1.0"
cargo_metadata = "0.19"
cargo_toml = "0.21"
cfg-if = "1.0.3"
chrono = { version = "0.4", features = ["serde"] }
ciborium = "0.2"
circular-buffer = "1.0"
clap = { version = "4.4", features = ["derive"] }
cocoa = "0.26"
cocoa-foundation = "0.2.0"
cocoa = "=0.26.0"
cocoa-foundation = "=0.2.0"
convert_case = "0.8.0"
core-foundation = "0.10.0"
core-foundation = "=0.10.0"
core-foundation-sys = "0.8.6"
core-video = { version = "0.4.3", features = ["metal"] }
cpal = "0.16"
@@ -493,9 +508,11 @@ fork = "0.2.0"
futures = "0.3"
futures-batch = "0.6.1"
futures-lite = "1.13"
gh-workflow = { git = "https://github.com/zed-industries/gh-workflow", rev = "3eaa84abca0778eb54272f45a312cb24f9a0b435" }
git2 = { version = "0.20.1", default-features = false }
globset = "0.4"
handlebars = "4.3"
hashbrown = "0.15.3"
heck = "0.5"
heed = { version = "0.21.0", features = ["read-txn-no-tls"] }
hex = "0.4.3"
@@ -511,7 +528,6 @@ indexmap = { version = "2.7.0", features = ["serde"] }
indoc = "2"
inventory = "0.3.19"
itertools = "0.14.0"
jj-lib = { git = "https://github.com/jj-vcs/jj", rev = "e18eb8e05efaa153fad5ef46576af145bba1807f" }
json_dotpath = "1.1"
jsonschema = "0.30.0"
jsonwebtoken = "9.3"
@@ -521,7 +537,7 @@ libc = "0.2"
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
linkify = "0.10.0"
log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
lsp-types = { git = "https://github.com/zed-industries/lsp-types", rev = "0874f8742fe55b4dc94308c1e3c0069710d8eeaf" }
lsp-types = { git = "https://github.com/zed-industries/lsp-types", rev = "b71ab4eeb27d9758be8092020a46fe33fbca4e33" }
mach2 = "0.5"
markup5ever_rcdom = "0.3.0"
metal = "0.29"
@@ -532,7 +548,33 @@ nanoid = "0.4"
nbformat = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734" }
nix = "0.29"
num-format = "0.4.4"
num-traits = "0.2"
objc = "0.2"
objc2-foundation = { version = "=0.3.1", default-features = false, features = [
"NSArray",
"NSAttributedString",
"NSBundle",
"NSCoder",
"NSData",
"NSDate",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSGeometry",
"NSNotification",
"NSNull",
"NSObjCRuntime",
"NSObject",
"NSProcessInfo",
"NSRange",
"NSRunLoop",
"NSString",
"NSURL",
"NSUndoManager",
"NSValue",
"objc2-core-foundation",
"std"
] }
open = "5.0.0"
ordered-float = "2.1.1"
palette = { version = "0.7.5", default-features = false, features = ["std"] }
@@ -541,13 +583,14 @@ partial-json-fixer = "0.5.3"
parse_int = "0.9"
pciid-parser = "0.8.0"
pathdiff = "0.2"
pet = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-conda = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-core = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-fs = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-pixi = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "845945b830297a50de0e24020b980a65e4820559" }
pet = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-conda = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-core = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-fs = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-pixi = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
pet-virtualenv = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "e97b9508befa0062929da65a01054d25c4be861c" }
portable-pty = "0.9.0"
postage = { version = "0.5", features = ["futures-traits"] }
pretty_assertions = { version = "1.3.0", features = ["unstable"] }
@@ -558,11 +601,12 @@ prost-build = "0.9"
prost-types = "0.9"
pulldown-cmark = { version = "0.12.0", default-features = false }
quote = "1.0.9"
rand = "0.8.5"
rand = "0.9"
rayon = "1.8"
ref-cast = "1.0.24"
regex = "1.5"
reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "951c770a32f1998d6e999cef3e59e0013e6c4415", default-features = false, features = [
# WARNING: If you change this, you must also publish a new version of zed-reqwest to crates.io
reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "c15662463bda39148ba154100dd44d3fba5873a4", default-features = false, features = [
"charset",
"http2",
"macos-system-configuration",
@@ -570,22 +614,21 @@ reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "951c77
"rustls-tls-native-roots",
"socks",
"stream",
] }
], package = "zed-reqwest", version = "0.12.15-zed" }
rsa = "0.9.6"
runtimelib = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734", default-features = false, features = [
"async-dispatcher-runtime",
] }
rust-embed = { version = "8.4", features = ["include-exclude"] }
rustc-demangle = "0.1.23"
rustc-hash = "2.1.0"
rustls = { version = "0.23.26" }
rustls-platform-verifier = "0.5.0"
scap = { git = "https://github.com/zed-industries/scap", rev = "808aa5c45b41e8f44729d02e38fd00a2fe2722e7", default-features = false }
# WARNING: If you change this, you must also publish a new version of zed-scap to crates.io
scap = { git = "https://github.com/zed-industries/scap", rev = "4afea48c3b002197176fb19cd0f9b180dd36eaac", default-features = false, package = "zed-scap", version = "0.0.8-zed" }
schemars = { version = "1.0", features = ["indexmap2"] }
semver = "1.0"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
serde = { version = "1.0.221", features = ["derive", "rc"] }
serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] }
serde_json_lenient = { version = "0.2", features = [
"preserve_order",
"raw_value",
@@ -593,21 +636,23 @@ serde_json_lenient = { version = "0.2", features = [
serde_path_to_error = "0.1.17"
serde_repr = "0.1"
serde_urlencoded = "0.7"
serde_with = "3.4.0"
sha2 = "0.10"
shellexpand = "2.1.0"
shlex = "1.3.0"
simplelog = "0.12.2"
slotmap = "1.0.6"
smallvec = { version = "1.6", features = ["union"] }
smol = "2.0"
sqlformat = "0.2"
stacksafe = "0.1"
streaming-iterator = "0.1"
strsim = "0.11"
strum = { version = "0.27.0", features = ["derive"] }
strum = { version = "0.27.2", features = ["derive"] }
subtle = "2.5.0"
syn = { version = "2.0.101", features = ["full", "extra-traits"] }
syn = { version = "2.0.101", features = ["full", "extra-traits", "visit-mut"] }
sys-locale = "0.3.1"
sysinfo = "0.31.0"
sysinfo = "0.37.0"
take-until = "0.2.0"
tempfile = "3.20.0"
thiserror = "2.0.12"
@@ -618,13 +663,15 @@ time = { version = "0.3", features = [
"serde",
"serde-well-known",
"formatting",
"local-offset",
] }
tiny_http = "0.8"
tokio = { version = "1" }
tokio-tungstenite = { version = "0.26", features = ["__rustls-tls"] }
toml = "0.8"
toml_edit = { version = "0.22", default-features = false, features = ["display", "parse", "serde"] }
tower-http = "0.4.4"
tree-sitter = { version = "0.25.6", features = ["wasm"] }
tree-sitter = { version = "0.25.10", features = ["wasm"] }
tree-sitter-bash = "0.25.0"
tree-sitter-c = "0.23"
tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "5cb9b693cfd7bfacab1d9ff4acac1a4150700609" }
@@ -634,18 +681,18 @@ tree-sitter-elixir = "0.3"
tree-sitter-embedded-template = "0.23.0"
tree-sitter-gitcommit = { git = "https://github.com/zed-industries/tree-sitter-git-commit", rev = "88309716a69dd13ab83443721ba6e0b491d37ee9" }
tree-sitter-go = "0.23"
tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "6efb59652d30e0e9cd5f3b3a669afd6f1a926d3c", package = "tree-sitter-gomod" }
tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "2e886870578eeba1927a2dc4bd2e2b3f598c5f9a", package = "tree-sitter-gomod" }
tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" }
tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" }
tree-sitter-html = "0.23"
tree-sitter-jsdoc = "0.23"
tree-sitter-json = "0.24"
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
tree-sitter-python = { git = "https://github.com/zed-industries/tree-sitter-python", rev = "218fcbf3fda3d029225f3dec005cb497d111b35e" }
tree-sitter-python = "0.25"
tree-sitter-regex = "0.24"
tree-sitter-ruby = "0.23"
tree-sitter-rust = "0.24"
tree-sitter-typescript = "0.23"
tree-sitter-typescript = { git = "https://github.com/zed-industries/tree-sitter-typescript", rev = "e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899" } # https://github.com/tree-sitter/tree-sitter-typescript/pull/347
tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a" }
unicase = "2.6"
unicode-script = "0.5.7"
@@ -670,8 +717,8 @@ wasmtime-wasi = "29"
which = "6.0.0"
windows-core = "0.61"
wit-component = "0.221"
workspace-hack = "0.1.0"
yawc = "0.2.5"
zeroize = "1.8"
zstd = "0.11"
[workspace.dependencies.windows]
@@ -698,6 +745,7 @@ features = [
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Security_Credentials",
"Win32_Security_Cryptography",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
@@ -725,15 +773,14 @@ features = [
]
[patch.crates-io]
notify = { git = "https://github.com/zed-industries/notify.git", rev = "bbb9ea5ae52b253e095737847e367c30653a2e96" }
notify-types = { git = "https://github.com/zed-industries/notify.git", rev = "bbb9ea5ae52b253e095737847e367c30653a2e96" }
notify = { git = "https://github.com/zed-industries/notify.git", rev = "b4588b2e5aee68f4c0e100f140e808cbce7b1419" }
notify-types = { git = "https://github.com/zed-industries/notify.git", rev = "b4588b2e5aee68f4c0e100f140e808cbce7b1419" }
windows-capture = { git = "https://github.com/zed-industries/windows-capture.git", rev = "f0d6c1b6691db75461b732f6d5ff56eed002eeb9" }
# Makes the workspace hack crate refer to the local one, but only when you're building locally
workspace-hack = { path = "tooling/workspace-hack" }
[profile.dev]
split-debuginfo = "unpacked"
# https://github.com/rust-lang/cargo/issues/16104
incremental = false
codegen-units = 16
# mirror configuration for crates compiled for the build platform
@@ -766,6 +813,7 @@ image_viewer = { codegen-units = 1 }
edit_prediction_button = { codegen-units = 1 }
install_cli = { codegen-units = 1 }
journal = { codegen-units = 1 }
json_schema_store = { codegen-units = 1 }
lmstudio = { codegen-units = 1 }
menu = { codegen-units = 1 }
notifications = { codegen-units = 1 }
@@ -817,6 +865,7 @@ todo = "deny"
declare_interior_mutable_const = "deny"
redundant_clone = "deny"
disallowed_methods = "deny"
# We currently do not restrict any style rules
# as it slows down shipping code to Zed.
@@ -857,5 +906,5 @@ ignored = [
"serde",
"component",
"documented",
"workspace-hack",
"sea-orm-macros",
]

View File

@@ -1,2 +0,0 @@
[build]
dockerfile = "Dockerfile-cross"

View File

@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
FROM rust:1.89-bookworm as builder
FROM rust:1.90-bookworm as builder
WORKDIR app
COPY . .

View File

@@ -1,17 +0,0 @@
# syntax=docker/dockerfile:1
ARG CROSS_BASE_IMAGE
FROM ${CROSS_BASE_IMAGE}
WORKDIR /app
ARG TZ=Etc/UTC \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive
ENV CARGO_TERM_COLOR=always
COPY script/install-mold script/
RUN ./script/install-mold "2.34.0"
COPY script/remote-server script/
RUN ./script/remote-server
COPY . .

1
GEMINI.md Symbolic link
View File

@@ -0,0 +1 @@
.rules

View File

@@ -1,2 +0,0 @@
app: postgrest crates/collab/postgrest_app.conf
llm: postgrest crates/collab/postgrest_llm.conf

View File

@@ -1,2 +1 @@
postgrest_llm: postgrest crates/collab/postgrest_llm.conf
website: cd ../zed.dev; npm run dev -- --port=3000

View File

@@ -1,7 +1,7 @@
# Zed
[![Zed](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/zed-industries/zed/main/assets/badge/v0.json)](https://zed.dev)
[![CI](https://github.com/zed-industries/zed/actions/workflows/ci.yml/badge.svg)](https://github.com/zed-industries/zed/actions/workflows/ci.yml)
[![CI](https://github.com/zed-industries/zed/actions/workflows/run_tests.yml/badge.svg)](https://github.com/zed-industries/zed/actions/workflows/run_tests.yml)
Welcome to Zed, a high-performance, multiplayer code editor from the creators of [Atom](https://github.com/atom/atom) and [Tree-sitter](https://github.com/tree-sitter/tree-sitter).
@@ -9,11 +9,10 @@ Welcome to Zed, a high-performance, multiplayer code editor from the creators of
### Installation
On macOS and Linux you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
On macOS, Linux, and Windows you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
Other platforms are not yet available:
- Windows ([tracking issue](https://github.com/zed-industries/zed/issues/5394))
- Web ([tracking issue](https://github.com/zed-industries/zed/issues/5396))
### Developing Zed

117
REVIEWERS.conl Normal file
View File

@@ -0,0 +1,117 @@
; This file contains a list of people who're interested in reviewing pull requests
; to certain parts of the code-base.
;
; This is mostly used internally for PR assignment, and may change over time.
;
; If you have permission to merge PRs (mostly equivalent to "do you work at Zed Industries"),
; we strongly encourage you to put your name in the "all" bucket, but you can also add yourself
; to other areas too.
<all>
= @cole-miller
= @ConradIrwin
= @danilo-leal
= @dinocosta
= @HactarCE
= @kubkon
= @maxdeviant
= @p1n3appl3
= @probably-neb
= @smitbarmase
= @SomeoneToIgnore
= @Veykril
ai
= @benbrandt
= @bennetbo
= @danilo-leal
= @rtfeldman
audio
= @dvdsk
crashes
= @p1n3appl3
= @Veykril
debugger
= @Anthony-Eid
= @kubkon
= @osiewicz
design
= @danilo-leal
docs
= @probably-neb
extension
= @kubkon
git
= @cole-miller
= @danilo-leal
gpui
= @Anthony-Eid
= @cameron1024
= @mikayla-maki
= @probably-neb
helix
= @kubkon
languages
= @osiewicz
= @probably-neb
= @smitbarmase
= @SomeoneToIgnore
= @Veykril
linux
= @cole-miller
= @dvdsk
= @p1n3appl3
= @probably-neb
= @smitbarmase
lsp
= @osiewicz
= @smitbarmase
= @SomeoneToIgnore
= @Veykril
multi_buffer
= @Veykril
= @SomeoneToIgnore
pickers
= @dvdsk
= @p1n3appl3
= @SomeoneToIgnore
project_panel
= @smitbarmase
settings_ui
= @Anthony-Eid
= @danilo-leal
= @probably-neb
tasks
= @SomeoneToIgnore
= @Veykril
terminal
= @kubkon
= @Veykril
vim
= @ConradIrwin
= @dinocosta
= @p1n3appl3
= @probably-neb
windows
= @localcc
= @reflectronic

4
assets/icons/at_sign.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00156 10.3996C9.32705 10.3996 10.4016 9.32509 10.4016 7.99961C10.4016 6.67413 9.32705 5.59961 8.00156 5.59961C6.67608 5.59961 5.60156 6.67413 5.60156 7.99961C5.60156 9.32509 6.67608 10.3996 8.00156 10.3996Z" stroke="black" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.4 5.6V8.6C10.4 9.07739 10.5896 9.53523 10.9272 9.8728C11.2648 10.2104 11.7226 10.4 12.2 10.4C12.6774 10.4 13.1352 10.2104 13.4728 9.8728C13.8104 9.53523 14 9.07739 14 8.6V8C14 6.64839 13.5436 5.33636 12.7048 4.27651C11.8661 3.21665 10.694 2.47105 9.37852 2.16051C8.06306 1.84997 6.68129 1.99269 5.45707 2.56554C4.23285 3.13838 3.23791 4.1078 2.63344 5.31672C2.02898 6.52565 1.85041 7.90325 2.12667 9.22633C2.40292 10.5494 3.11782 11.7405 4.15552 12.6065C5.19323 13.4726 6.49295 13.9629 7.84411 13.998C9.19527 14.0331 10.5187 13.611 11.6 12.8" stroke="black" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.3335 13.3333L8.00017 10L4.66685 13.3333" stroke="black" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.3335 2.66669L8.00017 6.00002L4.66685 2.66669" stroke="black" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 382 B

View File

@@ -1,9 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.6" d="M3.5 11V5.5L8.5 8L3.5 11Z" fill="black"/>
<path opacity="0.4" d="M8.5 14L3.5 11L8.5 8V14Z" fill="black"/>
<path opacity="0.6" d="M8.5 5.5H3.5L8.5 2.5L8.5 5.5Z" fill="black"/>
<path opacity="0.8" d="M8.5 5.5V2.5L13.5 5.5H8.5Z" fill="black"/>
<path opacity="0.2" d="M13.5 11L8.5 14L11 9.5L13.5 11Z" fill="black"/>
<path opacity="0.5" d="M13.5 11L11 9.5L13.5 5V11Z" fill="black"/>
<path d="M3.5 11V5L8.5 2.11325L13.5 5V11L8.5 13.8868L3.5 11Z" stroke="black"/>
<path d="M13.2806 4.66818L8.26042 1.76982C8.09921 1.67673 7.9003 1.67673 7.73909 1.76982L2.71918 4.66818C2.58367 4.74642 2.5 4.89112 2.5 5.04785V10.8924C2.5 11.0489 2.58367 11.1938 2.71918 11.2721L7.73934 14.1704C7.90054 14.2635 8.09946 14.2635 8.26066 14.1704L13.2808 11.2721C13.4163 11.1938 13.5 11.0491 13.5 10.8924V5.04785C13.5 4.89136 13.4163 4.74642 13.2808 4.66818H13.2806ZM12.9653 5.28212L8.11901 13.676C8.08626 13.7326 7.99977 13.7095 7.99977 13.6439V8.14771C7.99977 8.03788 7.94107 7.9363 7.84586 7.88115L3.08613 5.13317C3.02957 5.10041 3.05266 5.0139 3.11818 5.0139H12.8106C12.9483 5.0139 13.0343 5.1631 12.9655 5.28236H12.9653V5.28212Z" fill="#C4CAD4"/>
</svg>

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 769 B

5
assets/icons/link.svg Normal file
View File

@@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.2 11H5C4.20435 11 3.44129 10.6839 2.87868 10.1213C2.31607 9.55871 2 8.79565 2 8C2 7.20435 2.31607 6.44129 2.87868 5.87868C3.44129 5.31607 4.20435 5 5 5H6.2" stroke="#C4CAD4" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.80005 5H11C11.7957 5 12.5588 5.31607 13.1214 5.87868C13.684 6.44129 14 7.20435 14 8C14 8.79565 13.684 9.55871 13.1214 10.1213C12.5588 10.6839 11.7957 11 11 11H9.80005" stroke="#C4CAD4" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.6001 8H10.4001" stroke="#C4CAD4" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 735 B

11
assets/icons/linux.svg Normal file
View File

@@ -0,0 +1,11 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3010_383)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.71141 7.06133C3.76141 6.47267 3.78341 5.88133 3.81608 5.29133C4.10416 0.190201 11.896 0.190202 12.1841 5.29133C12.2174 5.898 12.2441 6.50333 12.3067 7.10733C12.6951 7.94202 14.3637 11.6214 13.4134 12.006C13.1894 12.096 12.8041 11.7227 12.3694 11.052C12.207 11.9614 11.7273 12.8132 11.0587 13.4467C11.7441 13.68 12.3334 13.998 12.3334 14.3333C12.3334 14.9176 3.66675 14.9257 3.66675 14.3333C3.66675 13.998 4.25608 13.68 4.94141 13.4467C4.26191 12.803 3.82279 11.9657 3.62408 11.056C3.19075 11.724 2.80608 12.096 2.58341 12.006C1.626 11.6185 3.31478 7.90684 3.71141 7.06133Z" stroke="#7B7B7B" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.11822 6.6L7.68822 7.89C7.85822 8.03 8.12822 8.03 8.29822 7.89L9.86822 6.6C10.1382 6.38 9.94822 6 9.56822 6H6.42822C6.04822 6 5.85822 6.38 6.12822 6.6H6.11822Z" fill="#7B7B7B"/>
</g>
<defs>
<clipPath id="clip0_3010_383">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.1645 4.45825L5.20344 9.52074C4.98225 9.74193 4.85798 10.0419 4.85798 10.3548C4.85798 10.6676 4.98225 10.9676 5.20344 11.1888C5.42464 11.41 5.72464 11.5342 6.03746 11.5342C6.35028 11.5342 6.65028 11.41 6.87148 11.1888L11.8326 6.12629C12.2749 5.68397 12.5234 5.08407 12.5234 4.45854C12.5234 3.83302 12.2749 3.23311 11.8326 2.7908C11.3902 2.34849 10.7903 2.1 10.1648 2.1C9.53928 2.1 8.93938 2.34849 8.49707 2.7908L3.55663 7.83265C3.22373 8.16017 2.95897 8.55037 2.77762 8.98072C2.59628 9.41108 2.50193 9.87308 2.50003 10.3401C2.49813 10.8071 2.58871 11.2698 2.76654 11.7017C2.94438 12.1335 3.20595 12.5258 3.53618 12.856C3.8664 13.1863 4.25873 13.4478 4.69055 13.6257C5.12237 13.8035 5.58513 13.8941 6.05213 13.8922C6.51913 13.8903 6.98114 13.7959 7.41149 13.6146C7.84185 13.4332 8.23204 13.1685 8.55957 12.8356L13.5 7.79373" stroke="#C4CAD4" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="M2.6 5v3.6h3.6"/><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="M13.4 11A5.4 5.4 0 0 0 8 5.6a5.4 5.4 0 0 0-3.6 1.38L2.6 8.6"/></svg>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.125 9.25001L3 6.125L6.125 3" stroke="#C4CAD4" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 6.125H9.56251C10.0139 6.125 10.4609 6.21391 10.878 6.38666C11.295 6.55942 11.674 6.81262 11.9932 7.13182C12.3124 7.45102 12.5656 7.82997 12.7383 8.24703C12.9111 8.66408 13 9.11108 13 9.5625C13 10.0139 12.9111 10.4609 12.7383 10.878C12.5656 11.295 12.3124 11.674 11.9932 11.9932C11.674 12.3124 11.295 12.5656 10.878 12.7383C10.4609 12.9111 10.0139 13 9.56251 13H7.375" stroke="black" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 692 B

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -16,6 +16,7 @@
"up": "menu::SelectPrevious",
"enter": "menu::Confirm",
"ctrl-enter": "menu::SecondaryConfirm",
"ctrl-escape": "menu::Cancel",
"ctrl-c": "menu::Cancel",
"escape": "menu::Cancel",
"alt-shift-enter": "menu::Restart",
@@ -30,6 +31,7 @@
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
"ctrl-,": "zed::OpenSettings",
"ctrl-alt-,": "zed::OpenSettingsFile",
"ctrl-q": "zed::Quit",
"f4": "debugger::Start",
"shift-f5": "debugger::Stop",
@@ -41,7 +43,8 @@
"f11": "zed::ToggleFullScreen",
"ctrl-alt-z": "edit_prediction::RateCompletions",
"ctrl-alt-shift-i": "edit_prediction::ToggleMenu",
"ctrl-alt-l": "lsp_tool::ToggleMenu"
"ctrl-alt-l": "lsp_tool::ToggleMenu",
"ctrl-alt-.": "project_panel::ToggleHideHidden"
}
},
{
@@ -137,7 +140,7 @@
"find": "buffer_search::Deploy",
"ctrl-f": "buffer_search::Deploy",
"ctrl-h": "buffer_search::DeployReplace",
"ctrl->": "agent::QuoteSelection",
"ctrl->": "agent::AddSelectionToThread",
"ctrl-<": "assistant::InsertIntoEditor",
"ctrl-alt-e": "editor::SelectEnclosingSymbol",
"ctrl-shift-backspace": "editor::GoToPreviousChange",
@@ -233,20 +236,24 @@
"ctrl-alt-n": "agent::NewTextThread",
"ctrl-shift-h": "agent::OpenHistory",
"ctrl-alt-c": "agent::OpenSettings",
"ctrl-alt-p": "agent::OpenRulesLibrary",
"ctrl-alt-p": "agent::ManageProfiles",
"ctrl-alt-l": "agent::OpenRulesLibrary",
"ctrl-i": "agent::ToggleProfileSelector",
"ctrl-alt-/": "agent::ToggleModelSelector",
"ctrl-shift-a": "agent::ToggleContextPicker",
"ctrl-shift-j": "agent::ToggleNavigationMenu",
"ctrl-shift-i": "agent::ToggleOptionsMenu",
"ctrl-alt-i": "agent::ToggleOptionsMenu",
"ctrl-alt-shift-n": "agent::ToggleNewThreadMenu",
"shift-alt-escape": "agent::ExpandMessageEditor",
"ctrl->": "agent::QuoteSelection",
"ctrl->": "agent::AddSelectionToThread",
"ctrl-alt-e": "agent::RemoveAllContext",
"ctrl-shift-e": "project_panel::ToggleFocus",
"ctrl-shift-enter": "agent::ContinueThread",
"super-ctrl-b": "agent::ToggleBurnMode",
"alt-enter": "agent::ContinueWithBurnMode"
"alt-enter": "agent::ContinueWithBurnMode",
"ctrl-y": "agent::AllowOnce",
"ctrl-alt-y": "agent::AllowAlways",
"ctrl-alt-z": "agent::RejectOnce"
}
},
{
@@ -264,14 +271,14 @@
}
},
{
"context": "AgentPanel && prompt_editor",
"context": "AgentPanel && text_thread",
"bindings": {
"ctrl-n": "agent::NewTextThread",
"ctrl-alt-t": "agent::NewThread"
}
},
{
"context": "AgentPanel && external_agent_thread",
"context": "AgentPanel && acp_thread",
"use_key_equivalents": true,
"bindings": {
"ctrl-n": "agent::NewExternalAgentThread",
@@ -327,6 +334,12 @@
"enter": "agent::AcceptSuggestedContext"
}
},
{
"context": "AcpThread > ModeSelector",
"bindings": {
"ctrl-enter": "menu::Confirm"
}
},
{
"context": "AcpThread > Editor && !use_modifier_to_send",
"use_key_equivalents": true,
@@ -344,7 +357,8 @@
"ctrl-enter": "agent::Chat",
"shift-ctrl-r": "agent::OpenAgentDiff",
"ctrl-shift-y": "agent::KeepAll",
"ctrl-shift-n": "agent::RejectAll"
"ctrl-shift-n": "agent::RejectAll",
"shift-tab": "agent::CycleModeSelector"
}
},
{
@@ -354,11 +368,12 @@
}
},
{
"context": "PromptLibrary",
"context": "RulesLibrary",
"bindings": {
"new": "rules_library::NewRule",
"ctrl-n": "rules_library::NewRule",
"ctrl-shift-s": "rules_library::ToggleDefaultRule"
"ctrl-shift-s": "rules_library::ToggleDefaultRule",
"ctrl-w": "workspace::CloseWindow"
}
},
{
@@ -394,6 +409,7 @@
"bindings": {
"escape": "project_search::ToggleFocus",
"shift-find": "search::FocusSearch",
"shift-enter": "project_search::ToggleAllSearchResults",
"ctrl-shift-f": "search::FocusSearch",
"ctrl-shift-h": "search::ToggleReplace",
"alt-ctrl-g": "search::ToggleRegex",
@@ -451,8 +467,8 @@
"ctrl-k ctrl-w": "workspace::CloseAllItemsAndPanes",
"back": "pane::GoBack",
"ctrl-alt--": "pane::GoBack",
"ctrl-alt-_": "pane::GoForward",
"forward": "pane::GoForward",
"ctrl-alt-_": "pane::GoForward",
"ctrl-alt-g": "search::SelectNextMatch",
"f3": "search::SelectNextMatch",
"ctrl-alt-shift-g": "search::SelectPreviousMatch",
@@ -466,6 +482,7 @@
"alt-w": "search::ToggleWholeWord",
"alt-find": "project_search::ToggleFilters",
"alt-ctrl-f": "project_search::ToggleFilters",
"shift-enter": "project_search::ToggleAllSearchResults",
"ctrl-alt-shift-r": "search::ToggleRegex",
"ctrl-alt-shift-x": "search::ToggleRegex",
"alt-r": "search::ToggleRegex",
@@ -478,15 +495,15 @@
"bindings": {
"ctrl-[": "editor::Outdent",
"ctrl-]": "editor::Indent",
"shift-alt-up": "editor::AddSelectionAbove", // Insert Cursor Above
"shift-alt-down": "editor::AddSelectionBelow", // Insert Cursor Below
"shift-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }], // Insert Cursor Above
"shift-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }], // Insert Cursor Below
"ctrl-shift-k": "editor::DeleteLine",
"alt-up": "editor::MoveLineUp",
"alt-down": "editor::MoveLineDown",
"ctrl-alt-shift-up": "editor::DuplicateLineUp",
"ctrl-alt-shift-down": "editor::DuplicateLineDown",
"alt-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
"alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
"alt-shift-right": "editor::SelectLargerSyntaxNode", // Expand selection
"alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
"ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
@@ -514,15 +531,15 @@
"ctrl-k ctrl-l": "editor::ToggleFold",
"ctrl-k ctrl-[": "editor::FoldRecursive",
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
"ctrl-k ctrl-1": ["editor::FoldAtLevel", 1],
"ctrl-k ctrl-2": ["editor::FoldAtLevel", 2],
"ctrl-k ctrl-3": ["editor::FoldAtLevel", 3],
"ctrl-k ctrl-4": ["editor::FoldAtLevel", 4],
"ctrl-k ctrl-5": ["editor::FoldAtLevel", 5],
"ctrl-k ctrl-6": ["editor::FoldAtLevel", 6],
"ctrl-k ctrl-7": ["editor::FoldAtLevel", 7],
"ctrl-k ctrl-8": ["editor::FoldAtLevel", 8],
"ctrl-k ctrl-9": ["editor::FoldAtLevel", 9],
"ctrl-k ctrl-1": "editor::FoldAtLevel_1",
"ctrl-k ctrl-2": "editor::FoldAtLevel_2",
"ctrl-k ctrl-3": "editor::FoldAtLevel_3",
"ctrl-k ctrl-4": "editor::FoldAtLevel_4",
"ctrl-k ctrl-5": "editor::FoldAtLevel_5",
"ctrl-k ctrl-6": "editor::FoldAtLevel_6",
"ctrl-k ctrl-7": "editor::FoldAtLevel_7",
"ctrl-k ctrl-8": "editor::FoldAtLevel_8",
"ctrl-k ctrl-9": "editor::FoldAtLevel_9",
"ctrl-k ctrl-0": "editor::FoldAll",
"ctrl-k ctrl-j": "editor::UnfoldAll",
"ctrl-space": "editor::ShowCompletions",
@@ -582,7 +599,7 @@
"ctrl-n": "workspace::NewFile",
"shift-new": "workspace::NewWindow",
"ctrl-shift-n": "workspace::NewWindow",
"ctrl-`": "terminal_panel::ToggleFocus",
"ctrl-`": "terminal_panel::Toggle",
"f10": ["app_menu::OpenApplicationMenu", "Zed"],
"alt-1": ["workspace::ActivatePane", 0],
"alt-2": ["workspace::ActivatePane", 1],
@@ -596,7 +613,7 @@
"ctrl-alt-b": "workspace::ToggleRightDock",
"ctrl-b": "workspace::ToggleLeftDock",
"ctrl-j": "workspace::ToggleBottomDock",
"ctrl-alt-y": "workspace::CloseAllDocks",
"ctrl-alt-y": "workspace::ToggleAllDocks",
"ctrl-alt-0": "workspace::ResetActiveDockSize",
// For 0px parameter, uses UI font size value.
"ctrl-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
@@ -608,7 +625,7 @@
"ctrl-shift-f": "pane::DeploySearch",
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"ctrl-shift-t": "pane::ReopenClosedItem",
"ctrl-k ctrl-s": "zed::OpenKeymapEditor",
"ctrl-k ctrl-s": "zed::OpenKeymap",
"ctrl-k ctrl-t": "theme_selector::Toggle",
"ctrl-alt-super-p": "settings_profile_selector::Toggle",
"ctrl-t": "project_symbols::Toggle",
@@ -627,6 +644,7 @@
"alt-save": "workspace::SaveAll",
"ctrl-alt-s": "workspace::SaveAll",
"ctrl-k m": "language_selector::Toggle",
"ctrl-k ctrl-m": "toolchain::AddToolchain",
"escape": "workspace::Unfollow",
"ctrl-k ctrl-left": "workspace::ActivatePaneLeft",
"ctrl-k ctrl-right": "workspace::ActivatePaneRight",
@@ -637,7 +655,9 @@
"ctrl-k shift-up": "workspace::SwapPaneUp",
"ctrl-k shift-down": "workspace::SwapPaneDown",
"ctrl-shift-x": "zed::Extensions",
"ctrl-shift-r": "task::Rerun",
// All task parameters are captured and unchanged between reruns by default.
// Use the `"reevaluate_context"` parameter to control this.
"ctrl-shift-r": ["task::Rerun", { "reevaluate_context": false }],
"ctrl-alt-r": "task::Rerun",
"alt-t": "task::Rerun",
"alt-shift-t": "task::Spawn",
@@ -715,6 +735,20 @@
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && in_snippet && has_next_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::NextSnippetTabstop"
}
},
{
"context": "Editor && in_snippet && has_previous_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"shift-tab": "editor::PreviousSnippetTabstop"
}
},
// Bindings for accepting edit predictions
//
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is
@@ -917,6 +951,7 @@
"ctrl-g ctrl-g": "git::Fetch",
"ctrl-g up": "git::Push",
"ctrl-g down": "git::Pull",
"ctrl-g shift-down": "git::PullRebase",
"ctrl-g shift-up": "git::ForcePush",
"ctrl-g d": "git::Diff",
"ctrl-g backspace": "git::RestoreTrackedFiles",
@@ -996,7 +1031,8 @@
"context": "CollabPanel",
"bindings": {
"alt-up": "collab_panel::MoveChannelUp",
"alt-down": "collab_panel::MoveChannelDown"
"alt-down": "collab_panel::MoveChannelDown",
"alt-enter": "collab_panel::OpenSelectedChannelNotes"
}
},
{
@@ -1027,6 +1063,13 @@
"tab": "channel_modal::ToggleMode"
}
},
{
"context": "ToolchainSelector",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-a": "toolchain::AddToolchain"
}
},
{
"context": "FileFinder || (FileFinder > Picker > Editor)",
"bindings": {
@@ -1054,6 +1097,13 @@
"ctrl-backspace": "tab_switcher::CloseSelectedItem"
}
},
{
"context": "StashList || (StashList > Picker > Editor)",
"bindings": {
"ctrl-shift-backspace": "stash_picker::DropStashItem",
"ctrl-shift-v": "stash_picker::ShowStashItem"
}
},
{
"context": "Terminal",
"bindings": {
@@ -1096,7 +1146,8 @@
"ctrl-shift-space": "terminal::ToggleViMode",
"ctrl-shift-r": "terminal::RerunTask",
"ctrl-alt-r": "terminal::RerunTask",
"alt-t": "terminal::RerunTask"
"alt-t": "terminal::RerunTask",
"ctrl-shift-5": "pane::SplitRight"
}
},
{
@@ -1113,6 +1164,13 @@
"ctrl-enter": "menu::Confirm"
}
},
{
"context": "ContextServerToolsModal",
"use_key_equivalents": true,
"bindings": {
"escape": "menu::Cancel"
}
},
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1193,9 +1251,6 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
"ctrl-1": "onboarding::ActivateBasicsPage",
"ctrl-2": "onboarding::ActivateEditingPage",
"ctrl-3": "onboarding::ActivateAISetupPage",
"ctrl-enter": "onboarding::Finish",
"alt-shift-l": "onboarding::SignIn",
"alt-shift-a": "onboarding::OpenAccount"
@@ -1207,5 +1262,77 @@
"bindings": {
"ctrl-shift-enter": "workspace::OpenWithSystem"
}
},
{
"context": "GitWorktreeSelector || (GitWorktreeSelector > Picker > Editor)",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-space": "git::WorktreeFromDefaultOnWindow",
"ctrl-space": "git::WorktreeFromDefault"
}
},
{
"context": "SettingsWindow",
"use_key_equivalents": true,
"bindings": {
"ctrl-w": "workspace::CloseWindow",
"escape": "workspace::CloseWindow",
"ctrl-m": "settings_editor::Minimize",
"ctrl-f": "search::FocusSearch",
"left": "settings_editor::ToggleFocusNav",
"ctrl-shift-e": "settings_editor::ToggleFocusNav",
// todo(settings_ui): cut this down based on the max files and overflow UI
"ctrl-1": ["settings_editor::FocusFile", 0],
"ctrl-2": ["settings_editor::FocusFile", 1],
"ctrl-3": ["settings_editor::FocusFile", 2],
"ctrl-4": ["settings_editor::FocusFile", 3],
"ctrl-5": ["settings_editor::FocusFile", 4],
"ctrl-6": ["settings_editor::FocusFile", 5],
"ctrl-7": ["settings_editor::FocusFile", 6],
"ctrl-8": ["settings_editor::FocusFile", 7],
"ctrl-9": ["settings_editor::FocusFile", 8],
"ctrl-0": ["settings_editor::FocusFile", 9],
"ctrl-pageup": "settings_editor::FocusPreviousFile",
"ctrl-pagedown": "settings_editor::FocusNextFile"
}
},
{
"context": "StashDiff > Editor",
"bindings": {
"ctrl-space": "git::ApplyCurrentStash",
"ctrl-shift-space": "git::PopCurrentStash",
"ctrl-shift-backspace": "git::DropCurrentStash"
}
},
{
"context": "SettingsWindow > NavigationMenu",
"use_key_equivalents": true,
"bindings": {
"up": "settings_editor::FocusPreviousNavEntry",
"shift-tab": "settings_editor::FocusPreviousNavEntry",
"down": "settings_editor::FocusNextNavEntry",
"tab": "settings_editor::FocusNextNavEntry",
"right": "settings_editor::ExpandNavEntry",
"left": "settings_editor::CollapseNavEntry",
"pageup": "settings_editor::FocusPreviousRootNavEntry",
"pagedown": "settings_editor::FocusNextRootNavEntry",
"home": "settings_editor::FocusFirstNavEntry",
"end": "settings_editor::FocusLastNavEntry"
}
},
{
"context": "Zeta2Feedback > Editor",
"bindings": {
"enter": "editor::Newline",
"ctrl-enter up": "dev::Zeta2RatePredictionPositive",
"ctrl-enter down": "dev::Zeta2RatePredictionNegative"
}
},
{
"context": "Zeta2Context > Editor",
"bindings": {
"alt-left": "dev::Zeta2ContextGoBack",
"alt-right": "dev::Zeta2ContextGoForward"
}
}
]

View File

@@ -40,6 +40,7 @@
"cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"cmd-0": ["zed::ResetBufferFontSize", { "persist": false }],
"cmd-,": "zed::OpenSettings",
"cmd-alt-,": "zed::OpenSettingsFile",
"cmd-q": "zed::Quit",
"cmd-h": "zed::Hide",
"alt-cmd-h": "zed::HideOthers",
@@ -48,7 +49,8 @@
"ctrl-cmd-f": "zed::ToggleFullScreen",
"ctrl-cmd-z": "edit_prediction::RateCompletions",
"ctrl-cmd-i": "edit_prediction::ToggleMenu",
"ctrl-cmd-l": "lsp_tool::ToggleMenu"
"ctrl-cmd-l": "lsp_tool::ToggleMenu",
"cmd-alt-.": "project_panel::ToggleHideHidden"
}
},
{
@@ -162,7 +164,7 @@
"cmd-alt-f": "buffer_search::DeployReplace",
"cmd-alt-l": ["buffer_search::Deploy", { "selection_search_enabled": true }],
"cmd-e": ["buffer_search::Deploy", { "focus": false }],
"cmd->": "agent::QuoteSelection",
"cmd->": "agent::AddSelectionToThread",
"cmd-<": "assistant::InsertIntoEditor",
"cmd-alt-e": "editor::SelectEnclosingSymbol",
"alt-enter": "editor::OpenSelectionsInMultibuffer"
@@ -218,7 +220,7 @@
}
},
{
"context": "Editor && !agent_diff",
"context": "Editor && !agent_diff && !AgentPanel",
"use_key_equivalents": true,
"bindings": {
"cmd-alt-z": "git::Restore",
@@ -273,20 +275,24 @@
"cmd-alt-n": "agent::NewTextThread",
"cmd-shift-h": "agent::OpenHistory",
"cmd-alt-c": "agent::OpenSettings",
"cmd-alt-p": "agent::OpenRulesLibrary",
"cmd-alt-l": "agent::OpenRulesLibrary",
"cmd-alt-p": "agent::ManageProfiles",
"cmd-i": "agent::ToggleProfileSelector",
"cmd-alt-/": "agent::ToggleModelSelector",
"cmd-shift-a": "agent::ToggleContextPicker",
"cmd-shift-j": "agent::ToggleNavigationMenu",
"cmd-shift-i": "agent::ToggleOptionsMenu",
"cmd-alt-m": "agent::ToggleOptionsMenu",
"cmd-alt-shift-n": "agent::ToggleNewThreadMenu",
"shift-alt-escape": "agent::ExpandMessageEditor",
"cmd->": "agent::QuoteSelection",
"cmd->": "agent::AddSelectionToThread",
"cmd-alt-e": "agent::RemoveAllContext",
"cmd-shift-e": "project_panel::ToggleFocus",
"cmd-ctrl-b": "agent::ToggleBurnMode",
"cmd-shift-enter": "agent::ContinueThread",
"alt-enter": "agent::ContinueWithBurnMode"
"alt-enter": "agent::ContinueWithBurnMode",
"cmd-y": "agent::AllowOnce",
"cmd-alt-y": "agent::AllowAlways",
"cmd-alt-z": "agent::RejectOnce"
}
},
{
@@ -303,7 +309,7 @@
}
},
{
"context": "AgentPanel && prompt_editor",
"context": "AgentPanel && text_thread",
"use_key_equivalents": true,
"bindings": {
"cmd-n": "agent::NewTextThread",
@@ -311,7 +317,7 @@
}
},
{
"context": "AgentPanel && external_agent_thread",
"context": "AgentPanel && acp_thread",
"use_key_equivalents": true,
"bindings": {
"cmd-n": "agent::NewExternalAgentThread",
@@ -378,6 +384,12 @@
"ctrl--": "pane::GoBack"
}
},
{
"context": "AcpThread > ModeSelector",
"bindings": {
"cmd-enter": "menu::Confirm"
}
},
{
"context": "AcpThread > Editor && !use_modifier_to_send",
"use_key_equivalents": true,
@@ -385,7 +397,8 @@
"enter": "agent::Chat",
"shift-ctrl-r": "agent::OpenAgentDiff",
"cmd-shift-y": "agent::KeepAll",
"cmd-shift-n": "agent::RejectAll"
"cmd-shift-n": "agent::RejectAll",
"shift-tab": "agent::CycleModeSelector"
}
},
{
@@ -395,7 +408,8 @@
"cmd-enter": "agent::Chat",
"shift-ctrl-r": "agent::OpenAgentDiff",
"cmd-shift-y": "agent::KeepAll",
"cmd-shift-n": "agent::RejectAll"
"cmd-shift-n": "agent::RejectAll",
"shift-tab": "agent::CycleModeSelector"
}
},
{
@@ -411,7 +425,7 @@
}
},
{
"context": "PromptLibrary",
"context": "RulesLibrary",
"use_key_equivalents": true,
"bindings": {
"cmd-n": "rules_library::NewRule",
@@ -456,6 +470,7 @@
"bindings": {
"escape": "project_search::ToggleFocus",
"cmd-shift-j": "project_search::ToggleFilters",
"shift-enter": "project_search::ToggleAllSearchResults",
"cmd-shift-f": "search::FocusSearch",
"cmd-shift-h": "search::ToggleReplace",
"alt-cmd-g": "search::ToggleRegex",
@@ -484,6 +499,7 @@
"bindings": {
"escape": "project_search::ToggleFocus",
"cmd-shift-j": "project_search::ToggleFilters",
"shift-enter": "project_search::ToggleAllSearchResults",
"cmd-shift-h": "search::ToggleReplace",
"alt-cmd-g": "search::ToggleRegex",
"alt-cmd-x": "search::ToggleRegex"
@@ -527,17 +543,21 @@
"bindings": {
"cmd-[": "editor::Outdent",
"cmd-]": "editor::Indent",
"cmd-ctrl-p": "editor::AddSelectionAbove", // Insert cursor above
"cmd-alt-up": "editor::AddSelectionAbove",
"cmd-ctrl-n": "editor::AddSelectionBelow", // Insert cursor below
"cmd-alt-down": "editor::AddSelectionBelow",
"cmd-ctrl-p": ["editor::AddSelectionAbove", { "skip_soft_wrap": false }], // Insert cursor above
"cmd-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }],
"cmd-ctrl-n": ["editor::AddSelectionBelow", { "skip_soft_wrap": false }], // Insert cursor below
"cmd-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }],
"cmd-shift-k": "editor::DeleteLine",
"alt-up": "editor::MoveLineUp",
"alt-down": "editor::MoveLineDown",
"alt-shift-up": "editor::DuplicateLineUp",
"alt-shift-down": "editor::DuplicateLineDown",
"ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
"ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
"cmd-ctrl-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"cmd-ctrl-right": "editor::SelectLargerSyntaxNode", // Expand selection
"cmd-ctrl-up": "editor::SelectPreviousSyntaxNode", // Move selection up
"ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand selection (VSCode version)
"ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink selection (VSCode version)
"cmd-ctrl-down": "editor::SelectNextSyntaxNode", // Move selection down
"cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
"cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"cmd-f2": "editor::SelectAllMatches", // Select all occurrences of current word
@@ -566,15 +586,15 @@
"cmd-k cmd-l": "editor::ToggleFold",
"cmd-k cmd-[": "editor::FoldRecursive",
"cmd-k cmd-]": "editor::UnfoldRecursive",
"cmd-k cmd-1": ["editor::FoldAtLevel", 1],
"cmd-k cmd-2": ["editor::FoldAtLevel", 2],
"cmd-k cmd-3": ["editor::FoldAtLevel", 3],
"cmd-k cmd-4": ["editor::FoldAtLevel", 4],
"cmd-k cmd-5": ["editor::FoldAtLevel", 5],
"cmd-k cmd-6": ["editor::FoldAtLevel", 6],
"cmd-k cmd-7": ["editor::FoldAtLevel", 7],
"cmd-k cmd-8": ["editor::FoldAtLevel", 8],
"cmd-k cmd-9": ["editor::FoldAtLevel", 9],
"cmd-k cmd-1": "editor::FoldAtLevel_1",
"cmd-k cmd-2": "editor::FoldAtLevel_2",
"cmd-k cmd-3": "editor::FoldAtLevel_3",
"cmd-k cmd-4": "editor::FoldAtLevel_4",
"cmd-k cmd-5": "editor::FoldAtLevel_5",
"cmd-k cmd-6": "editor::FoldAtLevel_6",
"cmd-k cmd-7": "editor::FoldAtLevel_7",
"cmd-k cmd-8": "editor::FoldAtLevel_8",
"cmd-k cmd-9": "editor::FoldAtLevel_9",
"cmd-k cmd-0": "editor::FoldAll",
"cmd-k cmd-j": "editor::UnfoldAll",
// Using `ctrl-space` / `ctrl-shift-space` in Zed requires disabling the macOS global shortcut.
@@ -649,7 +669,7 @@
"alt-shift-enter": "toast::RunAction",
"cmd-shift-s": "workspace::SaveAs",
"cmd-shift-n": "workspace::NewWindow",
"ctrl-`": "terminal_panel::ToggleFocus",
"ctrl-`": "terminal_panel::Toggle",
"cmd-1": ["workspace::ActivatePane", 0],
"cmd-2": ["workspace::ActivatePane", 1],
"cmd-3": ["workspace::ActivatePane", 2],
@@ -663,7 +683,7 @@
"cmd-alt-b": "workspace::ToggleRightDock",
"cmd-r": "workspace::ToggleRightDock",
"cmd-j": "workspace::ToggleBottomDock",
"alt-cmd-y": "workspace::CloseAllDocks",
"alt-cmd-y": "workspace::ToggleAllDocks",
// For 0px parameter, uses UI font size value.
"ctrl-alt-0": "workspace::ResetActiveDockSize",
"ctrl-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
@@ -674,7 +694,7 @@
"cmd-shift-f": "pane::DeploySearch",
"cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"cmd-shift-t": "pane::ReopenClosedItem",
"cmd-k cmd-s": "zed::OpenKeymapEditor",
"cmd-k cmd-s": "zed::OpenKeymap",
"cmd-k cmd-t": "theme_selector::Toggle",
"ctrl-alt-cmd-p": "settings_profile_selector::Toggle",
"cmd-t": "project_symbols::Toggle",
@@ -690,6 +710,7 @@
"cmd-?": "agent::ToggleFocus",
"cmd-alt-s": "workspace::SaveAll",
"cmd-k m": "language_selector::Toggle",
"cmd-k cmd-m": "toolchain::AddToolchain",
"escape": "workspace::Unfollow",
"cmd-k cmd-left": "workspace::ActivatePaneLeft",
"cmd-k cmd-right": "workspace::ActivatePaneRight",
@@ -710,7 +731,9 @@
"bindings": {
"cmd-n": "workspace::NewFile",
"cmd-shift-r": "task::Spawn",
"cmd-alt-r": "task::Rerun",
// All task parameters are captured and unchanged between reruns by default.
// Use the `"reevaluate_context"` parameter to control this.
"cmd-alt-r": ["task::Rerun", { "reevaluate_context": false }],
"ctrl-alt-shift-r": ["task::Spawn", { "reveal_target": "center" }]
// also possible to spawn tasks by name:
// "foo-bar": ["task::Spawn", { "task_name": "MyTask", "reveal_target": "dock" }]
@@ -782,6 +805,20 @@
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && in_snippet && has_next_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::NextSnippetTabstop"
}
},
{
"context": "Editor && in_snippet && has_previous_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"shift-tab": "editor::PreviousSnippetTabstop"
}
},
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -1007,6 +1044,7 @@
"ctrl-g ctrl-g": "git::Fetch",
"ctrl-g up": "git::Push",
"ctrl-g down": "git::Pull",
"ctrl-g shift-down": "git::PullRebase",
"ctrl-g shift-up": "git::ForcePush",
"ctrl-g d": "git::Diff",
"ctrl-g backspace": "git::RestoreTrackedFiles",
@@ -1058,7 +1096,8 @@
"use_key_equivalents": true,
"bindings": {
"alt-up": "collab_panel::MoveChannelUp",
"alt-down": "collab_panel::MoveChannelDown"
"alt-down": "collab_panel::MoveChannelDown",
"alt-enter": "collab_panel::OpenSelectedChannelNotes"
}
},
{
@@ -1094,6 +1133,13 @@
"tab": "channel_modal::ToggleMode"
}
},
{
"context": "ToolchainSelector",
"use_key_equivalents": true,
"bindings": {
"cmd-shift-a": "toolchain::AddToolchain"
}
},
{
"context": "FileFinder || (FileFinder > Picker > Editor)",
"use_key_equivalents": true,
@@ -1123,6 +1169,14 @@
"ctrl-backspace": "tab_switcher::CloseSelectedItem"
}
},
{
"context": "StashList || (StashList > Picker > Editor)",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-backspace": "stash_picker::DropStashItem",
"ctrl-shift-v": "stash_picker::ShowStashItem"
}
},
{
"context": "Terminal",
"use_key_equivalents": true,
@@ -1175,6 +1229,7 @@
"ctrl-alt-down": "pane::SplitDown",
"ctrl-alt-left": "pane::SplitLeft",
"ctrl-alt-right": "pane::SplitRight",
"cmd-d": "pane::SplitRight",
"cmd-alt-r": "terminal::RerunTask"
}
},
@@ -1214,6 +1269,13 @@
"cmd-enter": "menu::Confirm"
}
},
{
"context": "ContextServerToolsModal",
"use_key_equivalents": true,
"bindings": {
"escape": "menu::Cancel"
}
},
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1294,10 +1356,7 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
"cmd-1": "onboarding::ActivateBasicsPage",
"cmd-2": "onboarding::ActivateEditingPage",
"cmd-3": "onboarding::ActivateAISetupPage",
"cmd-escape": "onboarding::Finish",
"cmd-enter": "onboarding::Finish",
"alt-tab": "onboarding::SignIn",
"alt-shift-a": "onboarding::OpenAccount"
}
@@ -1308,5 +1367,78 @@
"bindings": {
"ctrl-shift-enter": "workspace::OpenWithSystem"
}
},
{
"context": "GitWorktreeSelector || (GitWorktreeSelector > Picker > Editor)",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-space": "git::WorktreeFromDefaultOnWindow",
"ctrl-space": "git::WorktreeFromDefault"
}
},
{
"context": "SettingsWindow",
"use_key_equivalents": true,
"bindings": {
"cmd-w": "workspace::CloseWindow",
"escape": "workspace::CloseWindow",
"cmd-m": "settings_editor::Minimize",
"cmd-f": "search::FocusSearch",
"left": "settings_editor::ToggleFocusNav",
"cmd-shift-e": "settings_editor::ToggleFocusNav",
// todo(settings_ui): cut this down based on the max files and overflow UI
"ctrl-1": ["settings_editor::FocusFile", 0],
"ctrl-2": ["settings_editor::FocusFile", 1],
"ctrl-3": ["settings_editor::FocusFile", 2],
"ctrl-4": ["settings_editor::FocusFile", 3],
"ctrl-5": ["settings_editor::FocusFile", 4],
"ctrl-6": ["settings_editor::FocusFile", 5],
"ctrl-7": ["settings_editor::FocusFile", 6],
"ctrl-8": ["settings_editor::FocusFile", 7],
"ctrl-9": ["settings_editor::FocusFile", 8],
"ctrl-0": ["settings_editor::FocusFile", 9],
"cmd-{": "settings_editor::FocusPreviousFile",
"cmd-}": "settings_editor::FocusNextFile"
}
},
{
"context": "StashDiff > Editor",
"use_key_equivalents": true,
"bindings": {
"ctrl-space": "git::ApplyCurrentStash",
"ctrl-shift-space": "git::PopCurrentStash",
"ctrl-shift-backspace": "git::DropCurrentStash"
}
},
{
"context": "SettingsWindow > NavigationMenu",
"use_key_equivalents": true,
"bindings": {
"up": "settings_editor::FocusPreviousNavEntry",
"shift-tab": "settings_editor::FocusPreviousNavEntry",
"down": "settings_editor::FocusNextNavEntry",
"tab": "settings_editor::FocusNextNavEntry",
"right": "settings_editor::ExpandNavEntry",
"left": "settings_editor::CollapseNavEntry",
"pageup": "settings_editor::FocusPreviousRootNavEntry",
"pagedown": "settings_editor::FocusNextRootNavEntry",
"home": "settings_editor::FocusFirstNavEntry",
"end": "settings_editor::FocusLastNavEntry"
}
},
{
"context": "Zeta2Feedback > Editor",
"bindings": {
"enter": "editor::Newline",
"cmd-enter up": "dev::Zeta2RatePredictionPositive",
"cmd-enter down": "dev::Zeta2RatePredictionNegative"
}
},
{
"context": "Zeta2Context > Editor",
"bindings": {
"alt-left": "dev::Zeta2ContextGoBack",
"alt-right": "dev::Zeta2ContextGoForward"
}
}
]

View File

@@ -17,7 +17,6 @@
"up": "menu::SelectPrevious",
"enter": "menu::Confirm",
"ctrl-enter": "menu::SecondaryConfirm",
"ctrl-escape": "menu::Cancel",
"ctrl-c": "menu::Cancel",
"escape": "menu::Cancel",
"shift-alt-enter": "menu::Restart",
@@ -25,13 +24,13 @@
"ctrl-alt-enter": ["picker::ConfirmInput", { "secondary": true }],
"ctrl-shift-w": "workspace::CloseWindow",
"shift-escape": "workspace::ToggleZoom",
"open": "workspace::Open",
"ctrl-o": "workspace::Open",
"ctrl-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
"ctrl-shift-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
"ctrl-,": "zed::OpenSettings",
"ctrl-alt-,": "zed::OpenSettingsFile",
"ctrl-q": "zed::Quit",
"f4": "debugger::Start",
"shift-f5": "debugger::Stop",
@@ -42,7 +41,8 @@
"shift-f11": "debugger::StepOut",
"f11": "zed::ToggleFullScreen",
"ctrl-shift-i": "edit_prediction::ToggleMenu",
"shift-alt-l": "lsp_tool::ToggleMenu"
"shift-alt-l": "lsp_tool::ToggleMenu",
"ctrl-alt-.": "project_panel::ToggleHideHidden"
}
},
{
@@ -68,18 +68,13 @@
"ctrl-k q": "editor::Rewrap",
"ctrl-backspace": ["editor::DeleteToPreviousWordStart", { "ignore_newlines": false, "ignore_brackets": false }],
"ctrl-delete": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }],
"cut": "editor::Cut",
"shift-delete": "editor::Cut",
"ctrl-x": "editor::Cut",
"copy": "editor::Copy",
"ctrl-insert": "editor::Copy",
"ctrl-c": "editor::Copy",
"paste": "editor::Paste",
"shift-insert": "editor::Paste",
"ctrl-v": "editor::Paste",
"undo": "editor::Undo",
"ctrl-z": "editor::Undo",
"redo": "editor::Redo",
"ctrl-y": "editor::Redo",
"ctrl-shift-z": "editor::Redo",
"up": "editor::MoveUp",
@@ -138,10 +133,9 @@
"ctrl-shift-enter": "editor::NewlineAbove",
"ctrl-k ctrl-z": "editor::ToggleSoftWrap",
"ctrl-k z": "editor::ToggleSoftWrap",
"find": "buffer_search::Deploy",
"ctrl-f": "buffer_search::Deploy",
"ctrl-h": "buffer_search::DeployReplace",
"ctrl-shift-.": "assistant::QuoteSelection",
"ctrl-shift-.": "agent::AddSelectionToThread",
"ctrl-shift-,": "assistant::InsertIntoEditor",
"shift-alt-e": "editor::SelectEnclosingSymbol",
"ctrl-shift-backspace": "editor::GoToPreviousChange",
@@ -177,7 +171,6 @@
"context": "Markdown",
"use_key_equivalents": true,
"bindings": {
"copy": "markdown::Copy",
"ctrl-c": "markdown::Copy"
}
},
@@ -225,7 +218,6 @@
"bindings": {
"ctrl-enter": "assistant::Assist",
"ctrl-s": "workspace::Save",
"save": "workspace::Save",
"ctrl-shift-,": "assistant::InsertIntoEditor",
"shift-enter": "assistant::Split",
"ctrl-r": "assistant::CycleMessageRole",
@@ -245,20 +237,24 @@
"shift-alt-n": "agent::NewTextThread",
"ctrl-shift-h": "agent::OpenHistory",
"shift-alt-c": "agent::OpenSettings",
"shift-alt-p": "agent::OpenRulesLibrary",
"shift-alt-l": "agent::OpenRulesLibrary",
"shift-alt-p": "agent::ManageProfiles",
"ctrl-i": "agent::ToggleProfileSelector",
"shift-alt-/": "agent::ToggleModelSelector",
"ctrl-shift-a": "agent::ToggleContextPicker",
"ctrl-shift-j": "agent::ToggleNavigationMenu",
"ctrl-shift-i": "agent::ToggleOptionsMenu",
"ctrl-alt-i": "agent::ToggleOptionsMenu",
// "ctrl-shift-alt-n": "agent::ToggleNewThreadMenu",
"shift-alt-escape": "agent::ExpandMessageEditor",
"ctrl-shift-.": "assistant::QuoteSelection",
"ctrl-shift-.": "agent::AddSelectionToThread",
"shift-alt-e": "agent::RemoveAllContext",
"ctrl-shift-e": "project_panel::ToggleFocus",
"ctrl-shift-enter": "agent::ContinueThread",
"super-ctrl-b": "agent::ToggleBurnMode",
"alt-enter": "agent::ContinueWithBurnMode"
"alt-enter": "agent::ContinueWithBurnMode",
"ctrl-y": "agent::AllowOnce",
"ctrl-alt-y": "agent::AllowAlways",
"ctrl-alt-z": "agent::RejectOnce"
}
},
{
@@ -272,12 +268,11 @@
"context": "AgentPanel > Markdown",
"use_key_equivalents": true,
"bindings": {
"copy": "markdown::CopyAsMarkdown",
"ctrl-c": "markdown::CopyAsMarkdown"
}
},
{
"context": "AgentPanel && prompt_editor",
"context": "AgentPanel && text_thread",
"use_key_equivalents": true,
"bindings": {
"ctrl-n": "agent::NewTextThread",
@@ -285,7 +280,7 @@
}
},
{
"context": "AgentPanel && external_agent_thread",
"context": "AgentPanel && acp_thread",
"use_key_equivalents": true,
"bindings": {
"ctrl-n": "agent::NewExternalAgentThread",
@@ -347,13 +342,31 @@
}
},
{
"context": "AcpThread > Editor",
"context": "AcpThread > ModeSelector",
"bindings": {
"ctrl-enter": "menu::Confirm"
}
},
{
"context": "AcpThread > Editor && !use_modifier_to_send",
"use_key_equivalents": true,
"bindings": {
"enter": "agent::Chat",
"ctrl-shift-r": "agent::OpenAgentDiff",
"ctrl-shift-y": "agent::KeepAll",
"ctrl-shift-n": "agent::RejectAll"
"ctrl-shift-n": "agent::RejectAll",
"shift-tab": "agent::CycleModeSelector"
}
},
{
"context": "AcpThread > Editor && use_modifier_to_send",
"use_key_equivalents": true,
"bindings": {
"ctrl-enter": "agent::Chat",
"ctrl-shift-r": "agent::OpenAgentDiff",
"ctrl-shift-y": "agent::KeepAll",
"ctrl-shift-n": "agent::RejectAll",
"shift-tab": "agent::CycleModeSelector"
}
},
{
@@ -364,12 +377,12 @@
}
},
{
"context": "PromptLibrary",
"context": "RulesLibrary",
"use_key_equivalents": true,
"bindings": {
"new": "rules_library::NewRule",
"ctrl-n": "rules_library::NewRule",
"ctrl-shift-s": "rules_library::ToggleDefaultRule"
"ctrl-shift-s": "rules_library::ToggleDefaultRule",
"ctrl-w": "workspace::CloseWindow"
}
},
{
@@ -381,7 +394,6 @@
"enter": "search::SelectNextMatch",
"shift-enter": "search::SelectPreviousMatch",
"alt-enter": "search::SelectAllMatches",
"find": "search::FocusSearch",
"ctrl-f": "search::FocusSearch",
"ctrl-h": "search::ToggleReplace",
"ctrl-l": "search::ToggleSelection"
@@ -408,7 +420,6 @@
"use_key_equivalents": true,
"bindings": {
"escape": "project_search::ToggleFocus",
"shift-find": "search::FocusSearch",
"ctrl-shift-f": "search::FocusSearch",
"ctrl-shift-h": "search::ToggleReplace",
"alt-r": "search::ToggleRegex" // vscode
@@ -468,19 +479,18 @@
"ctrl-k ctrl-w": "workspace::CloseAllItemsAndPanes",
"back": "pane::GoBack",
"alt--": "pane::GoBack",
"alt-=": "pane::GoForward",
"forward": "pane::GoForward",
"alt-=": "pane::GoForward",
"f3": "search::SelectNextMatch",
"shift-f3": "search::SelectPreviousMatch",
"shift-find": "project_search::ToggleFocus",
"ctrl-shift-f": "project_search::ToggleFocus",
"shift-alt-h": "search::ToggleReplace",
"alt-l": "search::ToggleSelection",
"alt-enter": "search::SelectAllMatches",
"alt-c": "search::ToggleCaseSensitive",
"alt-w": "search::ToggleWholeWord",
"alt-find": "project_search::ToggleFilters",
"alt-f": "project_search::ToggleFilters",
"shift-enter": "project_search::ToggleAllSearchResults",
"alt-r": "search::ToggleRegex",
// "ctrl-shift-alt-x": "search::ToggleRegex",
"ctrl-k shift-enter": "pane::TogglePinTab"
@@ -493,15 +503,15 @@
"bindings": {
"ctrl-[": "editor::Outdent",
"ctrl-]": "editor::Indent",
"ctrl-shift-alt-up": "editor::AddSelectionAbove", // Insert Cursor Above
"ctrl-shift-alt-down": "editor::AddSelectionBelow", // Insert Cursor Below
"ctrl-shift-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }], // Insert Cursor Above
"ctrl-shift-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }], // Insert Cursor Below
"ctrl-shift-k": "editor::DeleteLine",
"alt-up": "editor::MoveLineUp",
"alt-down": "editor::MoveLineDown",
"shift-alt-up": "editor::DuplicateLineUp",
"shift-alt-down": "editor::DuplicateLineDown",
"shift-alt-right": "editor::SelectLargerSyntaxNode", // Expand Selection
"shift-alt-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
"shift-alt-right": "editor::SelectLargerSyntaxNode", // Expand selection
"shift-alt-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
"ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
@@ -529,15 +539,15 @@
"ctrl-k ctrl-l": "editor::ToggleFold",
"ctrl-k ctrl-[": "editor::FoldRecursive",
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
"ctrl-k ctrl-1": ["editor::FoldAtLevel", 1],
"ctrl-k ctrl-2": ["editor::FoldAtLevel", 2],
"ctrl-k ctrl-3": ["editor::FoldAtLevel", 3],
"ctrl-k ctrl-4": ["editor::FoldAtLevel", 4],
"ctrl-k ctrl-5": ["editor::FoldAtLevel", 5],
"ctrl-k ctrl-6": ["editor::FoldAtLevel", 6],
"ctrl-k ctrl-7": ["editor::FoldAtLevel", 7],
"ctrl-k ctrl-8": ["editor::FoldAtLevel", 8],
"ctrl-k ctrl-9": ["editor::FoldAtLevel", 9],
"ctrl-k ctrl-1": "editor::FoldAtLevel_1",
"ctrl-k ctrl-2": "editor::FoldAtLevel_2",
"ctrl-k ctrl-3": "editor::FoldAtLevel_3",
"ctrl-k ctrl-4": "editor::FoldAtLevel_4",
"ctrl-k ctrl-5": "editor::FoldAtLevel_5",
"ctrl-k ctrl-6": "editor::FoldAtLevel_6",
"ctrl-k ctrl-7": "editor::FoldAtLevel_7",
"ctrl-k ctrl-8": "editor::FoldAtLevel_8",
"ctrl-k ctrl-9": "editor::FoldAtLevel_9",
"ctrl-k ctrl-0": "editor::FoldAll",
"ctrl-k ctrl-j": "editor::UnfoldAll",
"ctrl-space": "editor::ShowCompletions",
@@ -579,27 +589,21 @@
"context": "Workspace",
"use_key_equivalents": true,
"bindings": {
"alt-open": ["projects::OpenRecent", { "create_new_window": false }],
// Change the default action on `menu::Confirm` by setting the parameter
// "ctrl-alt-o": ["projects::OpenRecent", { "create_new_window": true }],
"ctrl-r": ["projects::OpenRecent", { "create_new_window": false }],
"shift-alt-open": ["projects::OpenRemote", { "from_existing_connection": false, "create_new_window": false }],
// Change to open path modal for existing remote connection by setting the parameter
// "ctrl-shift-alt-o": "["projects::OpenRemote", { "from_existing_connection": true }]",
"ctrl-shift-alt-o": ["projects::OpenRemote", { "from_existing_connection": false, "create_new_window": false }],
"shift-alt-b": "branches::OpenRecent",
"shift-alt-enter": "toast::RunAction",
"ctrl-shift-`": "workspace::NewTerminal",
"save": "workspace::Save",
"ctrl-s": "workspace::Save",
"ctrl-k ctrl-shift-s": "workspace::SaveWithoutFormat",
"shift-save": "workspace::SaveAs",
"ctrl-shift-s": "workspace::SaveAs",
"new": "workspace::NewFile",
"ctrl-n": "workspace::NewFile",
"shift-new": "workspace::NewWindow",
"ctrl-shift-n": "workspace::NewWindow",
"ctrl-`": "terminal_panel::ToggleFocus",
"ctrl-`": "terminal_panel::Toggle",
"f10": ["app_menu::OpenApplicationMenu", "Zed"],
"alt-1": ["workspace::ActivatePane", 0],
"alt-2": ["workspace::ActivatePane", 1],
@@ -613,19 +617,16 @@
"ctrl-alt-b": "workspace::ToggleRightDock",
"ctrl-b": "workspace::ToggleLeftDock",
"ctrl-j": "workspace::ToggleBottomDock",
"ctrl-shift-y": "workspace::CloseAllDocks",
"ctrl-shift-y": "workspace::ToggleAllDocks",
"alt-r": "workspace::ResetActiveDockSize",
// For 0px parameter, uses UI font size value.
"shift-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
"shift-alt-=": ["workspace::IncreaseActiveDockSize", { "px": 0 }],
"shift-alt-0": "workspace::ResetOpenDocksSize",
"ctrl-shift-alt--": ["workspace::DecreaseOpenDocksSize", { "px": 0 }],
"ctrl-shift-alt-=": ["workspace::IncreaseOpenDocksSize", { "px": 0 }],
"shift-find": "pane::DeploySearch",
"ctrl-shift-f": "pane::DeploySearch",
"ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
"ctrl-shift-t": "pane::ReopenClosedItem",
"ctrl-k ctrl-s": "zed::OpenKeymapEditor",
"ctrl-k ctrl-s": "zed::OpenKeymap",
"ctrl-k ctrl-t": "theme_selector::Toggle",
"ctrl-alt-super-p": "settings_profile_selector::Toggle",
"ctrl-t": "project_symbols::Toggle",
@@ -641,9 +642,9 @@
"ctrl-shift-g": "git_panel::ToggleFocus",
"ctrl-shift-d": "debug_panel::ToggleFocus",
"ctrl-shift-/": "agent::ToggleFocus",
"alt-save": "workspace::SaveAll",
"ctrl-k s": "workspace::SaveAll",
"ctrl-k m": "language_selector::Toggle",
"ctrl-m ctrl-m": "toolchain::AddToolchain",
"escape": "workspace::Unfollow",
"ctrl-k ctrl-left": "workspace::ActivatePaneLeft",
"ctrl-k ctrl-right": "workspace::ActivatePaneRight",
@@ -654,7 +655,9 @@
"ctrl-k shift-up": "workspace::SwapPaneUp",
"ctrl-k shift-down": "workspace::SwapPaneDown",
"ctrl-shift-x": "zed::Extensions",
"ctrl-shift-r": "task::Rerun",
// All task parameters are captured and unchanged between reruns by default.
// Use the `"reevaluate_context"` parameter to control this.
"ctrl-shift-r": ["task::Rerun", { "reevaluate_context": false }],
"alt-t": "task::Rerun",
"shift-alt-t": "task::Spawn",
"shift-alt-r": ["task::Spawn", { "reveal_target": "center" }],
@@ -736,6 +739,20 @@
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && in_snippet && has_next_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::NextSnippetTabstop"
}
},
{
"context": "Editor && in_snippet && has_previous_tabstop && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"shift-tab": "editor::PreviousSnippetTabstop"
}
},
// Bindings for accepting edit predictions
//
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is
@@ -848,9 +865,7 @@
"bindings": {
"left": "outline_panel::CollapseSelectedEntry",
"right": "outline_panel::ExpandSelectedEntry",
"alt-copy": "outline_panel::CopyPath",
"shift-alt-c": "outline_panel::CopyPath",
"shift-alt-copy": "workspace::CopyRelativePath",
"ctrl-shift-alt-c": "workspace::CopyRelativePath",
"ctrl-alt-r": "outline_panel::RevealInFileManager",
"space": "outline_panel::OpenSelectedEntry",
@@ -866,21 +881,14 @@
"bindings": {
"left": "project_panel::CollapseSelectedEntry",
"right": "project_panel::ExpandSelectedEntry",
"new": "project_panel::NewFile",
"ctrl-n": "project_panel::NewFile",
"alt-new": "project_panel::NewDirectory",
"alt-n": "project_panel::NewDirectory",
"cut": "project_panel::Cut",
"ctrl-x": "project_panel::Cut",
"copy": "project_panel::Copy",
"ctrl-insert": "project_panel::Copy",
"ctrl-c": "project_panel::Copy",
"paste": "project_panel::Paste",
"shift-insert": "project_panel::Paste",
"ctrl-v": "project_panel::Paste",
"alt-copy": "project_panel::CopyPath",
"shift-alt-c": "project_panel::CopyPath",
"shift-alt-copy": "workspace::CopyRelativePath",
"ctrl-k ctrl-shift-c": "workspace::CopyRelativePath",
"enter": "project_panel::Rename",
"f2": "project_panel::Rename",
@@ -892,7 +900,6 @@
"ctrl-alt-r": "project_panel::RevealInFileManager",
"ctrl-shift-enter": "project_panel::OpenWithSystem",
"alt-d": "project_panel::CompareMarkedFiles",
"shift-find": "project_panel::NewSearchInDirectory",
"ctrl-k ctrl-shift-f": "project_panel::NewSearchInDirectory",
"shift-down": "menu::SelectNext",
"shift-up": "menu::SelectPrevious",
@@ -953,6 +960,7 @@
"ctrl-g ctrl-g": "git::Fetch",
"ctrl-g up": "git::Push",
"ctrl-g down": "git::Pull",
"ctrl-g shift-down": "git::PullRebase",
"ctrl-g shift-up": "git::ForcePush",
"ctrl-g d": "git::Diff",
"ctrl-g backspace": "git::RestoreTrackedFiles",
@@ -1040,7 +1048,8 @@
"use_key_equivalents": true,
"bindings": {
"alt-up": "collab_panel::MoveChannelUp",
"alt-down": "collab_panel::MoveChannelDown"
"alt-down": "collab_panel::MoveChannelDown",
"alt-enter": "collab_panel::OpenSelectedChannelNotes"
}
},
{
@@ -1075,6 +1084,13 @@
"tab": "channel_modal::ToggleMode"
}
},
{
"context": "ToolchainSelector",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-a": "toolchain::AddToolchain"
}
},
{
"context": "FileFinder || (FileFinder > Picker > Editor)",
"use_key_equivalents": true,
@@ -1105,22 +1121,30 @@
"ctrl-backspace": "tab_switcher::CloseSelectedItem"
}
},
{
"context": "StashList || (StashList > Picker > Editor)",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-backspace": "stash_picker::DropStashItem",
"ctrl-shift-v": "stash_picker::ShowStashItem"
}
},
{
"context": "Terminal",
"use_key_equivalents": true,
"bindings": {
"ctrl-alt-space": "terminal::ShowCharacterPalette",
"copy": "terminal::Copy",
"ctrl-insert": "terminal::Copy",
"ctrl-shift-c": "terminal::Copy",
"paste": "terminal::Paste",
"shift-insert": "terminal::Paste",
"ctrl-v": "terminal::Paste",
"ctrl-shift-v": "terminal::Paste",
"ctrl-enter": "assistant::InlineAssist",
"alt-b": ["terminal::SendText", "\u001bb"],
"alt-f": ["terminal::SendText", "\u001bf"],
"alt-.": ["terminal::SendText", "\u001b."],
"ctrl-delete": ["terminal::SendText", "\u001bd"],
"ctrl-n": "workspace::NewTerminal",
// Overrides for conflicting keybindings
"ctrl-b": ["terminal::SendKeystroke", "ctrl-b"],
"ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
@@ -1129,7 +1153,6 @@
"ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
"ctrl-backspace": ["terminal::SendKeystroke", "ctrl-w"],
"ctrl-shift-a": "editor::SelectAll",
"find": "buffer_search::Deploy",
"ctrl-shift-f": "buffer_search::Deploy",
"ctrl-shift-l": "terminal::Clear",
"ctrl-shift-w": "pane::CloseActiveItem",
@@ -1148,7 +1171,14 @@
"ctrl-shift-space": "terminal::ToggleViMode",
"ctrl-shift-r": "terminal::RerunTask",
"ctrl-alt-r": "terminal::RerunTask",
"alt-t": "terminal::RerunTask"
"alt-t": "terminal::RerunTask",
"ctrl-shift-5": "pane::SplitRight"
}
},
{
"context": "Terminal && selection",
"bindings": {
"ctrl-c": "terminal::Copy"
}
},
{
@@ -1167,6 +1197,13 @@
"ctrl-enter": "menu::Confirm"
}
},
{
"context": "ContextServerToolsModal",
"use_key_equivalents": true,
"bindings": {
"escape": "menu::Cancel"
}
},
{
"context": "OnboardingAiConfigurationModal",
"use_key_equivalents": true,
@@ -1210,7 +1247,6 @@
"use_key_equivalents": true,
"bindings": {
"ctrl-f": "search::FocusSearch",
"alt-find": "keymap_editor::ToggleKeystrokeSearch",
"alt-f": "keymap_editor::ToggleKeystrokeSearch",
"alt-c": "keymap_editor::ToggleConflictFilter",
"enter": "keymap_editor::EditBinding",
@@ -1249,12 +1285,82 @@
"context": "Onboarding",
"use_key_equivalents": true,
"bindings": {
"ctrl-1": "onboarding::ActivateBasicsPage",
"ctrl-2": "onboarding::ActivateEditingPage",
"ctrl-3": "onboarding::ActivateAISetupPage",
"ctrl-escape": "onboarding::Finish",
"alt-tab": "onboarding::SignIn",
"ctrl-enter": "onboarding::Finish",
"alt-shift-l": "onboarding::SignIn",
"shift-alt-a": "onboarding::OpenAccount"
}
},
{
"context": "GitWorktreeSelector || (GitWorktreeSelector > Picker > Editor)",
"use_key_equivalents": true,
"bindings": {
"ctrl-shift-space": "git::WorktreeFromDefaultOnWindow",
"ctrl-space": "git::WorktreeFromDefault"
}
},
{
"context": "SettingsWindow",
"use_key_equivalents": true,
"bindings": {
"ctrl-w": "workspace::CloseWindow",
"escape": "workspace::CloseWindow",
"ctrl-m": "settings_editor::Minimize",
"ctrl-f": "search::FocusSearch",
"left": "settings_editor::ToggleFocusNav",
"ctrl-shift-e": "settings_editor::ToggleFocusNav",
// todo(settings_ui): cut this down based on the max files and overflow UI
"ctrl-1": ["settings_editor::FocusFile", 0],
"ctrl-2": ["settings_editor::FocusFile", 1],
"ctrl-3": ["settings_editor::FocusFile", 2],
"ctrl-4": ["settings_editor::FocusFile", 3],
"ctrl-5": ["settings_editor::FocusFile", 4],
"ctrl-6": ["settings_editor::FocusFile", 5],
"ctrl-7": ["settings_editor::FocusFile", 6],
"ctrl-8": ["settings_editor::FocusFile", 7],
"ctrl-9": ["settings_editor::FocusFile", 8],
"ctrl-0": ["settings_editor::FocusFile", 9],
"ctrl-pageup": "settings_editor::FocusPreviousFile",
"ctrl-pagedown": "settings_editor::FocusNextFile"
}
},
{
"context": "StashDiff > Editor",
"use_key_equivalents": true,
"bindings": {
"ctrl-space": "git::ApplyCurrentStash",
"ctrl-shift-space": "git::PopCurrentStash",
"ctrl-shift-backspace": "git::DropCurrentStash"
}
},
{
"context": "SettingsWindow > NavigationMenu",
"use_key_equivalents": true,
"bindings": {
"up": "settings_editor::FocusPreviousNavEntry",
"shift-tab": "settings_editor::FocusPreviousNavEntry",
"down": "settings_editor::FocusNextNavEntry",
"tab": "settings_editor::FocusNextNavEntry",
"right": "settings_editor::ExpandNavEntry",
"left": "settings_editor::CollapseNavEntry",
"pageup": "settings_editor::FocusPreviousRootNavEntry",
"pagedown": "settings_editor::FocusNextRootNavEntry",
"home": "settings_editor::FocusFirstNavEntry",
"end": "settings_editor::FocusLastNavEntry"
}
},
{
"context": "Zeta2Feedback > Editor",
"bindings": {
"enter": "editor::Newline",
"ctrl-enter up": "dev::Zeta2RatePredictionPositive",
"ctrl-enter down": "dev::Zeta2RatePredictionNegative"
}
},
{
"context": "Zeta2Context > Editor",
"bindings": {
"alt-left": "dev::Zeta2ContextGoBack",
"alt-right": "dev::Zeta2ContextGoForward"
}
}
]

View File

@@ -24,8 +24,8 @@
"ctrl-<": "editor::ScrollCursorCenter", // editor:scroll-to-cursor
"f3": ["editor::SelectNext", { "replace_newest": true }], // find-and-replace:find-next
"shift-f3": ["editor::SelectPrevious", { "replace_newest": true }], //find-and-replace:find-previous
"alt-shift-down": "editor::AddSelectionBelow", // editor:add-selection-below
"alt-shift-up": "editor::AddSelectionAbove", // editor:add-selection-above
"alt-shift-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }], // editor:add-selection-below
"alt-shift-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }], // editor:add-selection-above
"ctrl-j": "editor::JoinLines", // editor:join-lines
"ctrl-shift-d": "editor::DuplicateLineDown", // editor:duplicate-lines
"ctrl-up": "editor::MoveLineUp", // editor:move-line-up

View File

@@ -17,8 +17,8 @@
"bindings": {
"ctrl-i": "agent::ToggleFocus",
"ctrl-shift-i": "agent::ToggleFocus",
"ctrl-shift-l": "agent::QuoteSelection", // In cursor uses "Ask" mode
"ctrl-l": "agent::QuoteSelection", // In cursor uses "Agent" mode
"ctrl-shift-l": "agent::AddSelectionToThread", // In cursor uses "Ask" mode
"ctrl-l": "agent::AddSelectionToThread", // In cursor uses "Agent" mode
"ctrl-k": "assistant::InlineAssist",
"ctrl-shift-k": "assistant::InsertIntoEditor"
}

View File

@@ -8,11 +8,23 @@
"ctrl-g": "menu::Cancel"
}
},
{
// Workaround to avoid falling back to default bindings.
// Unbind so Zed ignores these keys and lets emacs handle them.
// NOTE: must be declared before the `Editor` override.
// NOTE: in macos the 'ctrl-x' 'ctrl-p' and 'ctrl-n' rebindings are not needed, since they default to 'cmd'.
"context": "Editor",
"bindings": {
"ctrl-g": null, // currently activates `go_to_line::Toggle` when there is nothing to cancel
"ctrl-x": null, // currently activates `editor::Cut` if no following key is pressed for 1 second
"ctrl-p": null, // currently activates `file_finder::Toggle` when the cursor is on the first character of the buffer
"ctrl-n": null // currently activates `workspace::NewFile` when the cursor is on the last character of the buffer
}
},
{
"context": "Editor",
"bindings": {
"ctrl-g": "editor::Cancel",
"ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer
"alt-g g": "go_to_line::Toggle", // goto-line
"alt-g alt-g": "go_to_line::Toggle", // goto-line
"ctrl-space": "editor::SetMark", // set-mark
@@ -29,8 +41,10 @@
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
"alt-left": "editor::MoveToPreviousWordStart", // left-word
"alt-right": "editor::MoveToNextWordEnd", // right-word
"alt-f": "editor::MoveToNextWordEnd", // forward-word
"alt-b": "editor::MoveToPreviousWordStart", // backward-word
"alt-u": "editor::ConvertToUpperCase", // upcase-word
"alt-l": "editor::ConvertToLowerCase", // downcase-word
"alt-c": "editor::ConvertToUpperCamelCase", // capitalize-word
@@ -43,6 +57,8 @@
"ctrl-x h": "editor::SelectAll", // mark-whole-buffer
"ctrl-d": "editor::Delete", // delete-char
"alt-d": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }], // kill-word
"alt-backspace": "editor::DeleteToPreviousWordStart", // backward-kill-word
"alt-delete": "editor::DeleteToPreviousWordStart", // backward-kill-word
"ctrl-k": "editor::KillRingCut", // kill-line
"ctrl-w": "editor::Cut", // kill-region
"alt-w": "editor::Copy", // kill-ring-save
@@ -52,14 +68,19 @@
"ctrl-x u": "editor::Undo", // undo
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-up": "editor::MoveToStartOfParagraph", // backward-paragraph
"ctrl-down": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-v": "editor::MovePageDown", // scroll-up
"alt-v": "editor::MovePageUp", // scroll-down
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
"ctrl-x ]": "editor::MoveToEnd", // end-of-buffer
"alt-<": "editor::MoveToBeginning", // beginning-of-buffer
"alt->": "editor::MoveToEnd", // end-of-buffer
"ctrl-home": "editor::MoveToBeginning", // beginning-of-buffer
"ctrl-end": "editor::MoveToEnd", // end-of-buffer
"ctrl-l": "editor::ScrollCursorCenterTopBottom", // recenter-top-bottom
"ctrl-s": "buffer_search::Deploy", // isearch-forward
"ctrl-r": "buffer_search::Deploy", // isearch-backward
"alt-^": "editor::JoinLines", // join-line
"alt-q": "editor::Rewrap" // fill-paragraph
}
@@ -85,10 +106,19 @@
"end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],
"ctrl-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }],
"ctrl-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],
"alt-m": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],
"alt-f": "editor::SelectToNextWordEnd",
"alt-b": "editor::SelectToPreviousSubwordStart",
"alt-b": "editor::SelectToPreviousWordStart",
"alt-{": "editor::SelectToStartOfParagraph",
"alt-}": "editor::SelectToEndOfParagraph",
"ctrl-up": "editor::SelectToStartOfParagraph",
"ctrl-down": "editor::SelectToEndOfParagraph",
"ctrl-x [": "editor::SelectToBeginning",
"ctrl-x ]": "editor::SelectToEnd",
"alt-<": "editor::SelectToBeginning",
"alt->": "editor::SelectToEnd",
"ctrl-home": "editor::SelectToBeginning",
"ctrl-end": "editor::SelectToEnd",
"ctrl-g": "editor::Cancel"
}
},
@@ -106,15 +136,28 @@
"ctrl-n": "editor::SignatureHelpNext"
}
},
// Example setting for using emacs-style tab
// (i.e. indent the current line / selection or perform symbol completion depending on context)
// {
// "context": "Editor && !showing_code_actions && !showing_completions",
// "bindings": {
// "tab": "editor::AutoIndent" // indent-for-tab-command
// }
// },
{
"context": "Workspace",
"bindings": {
"alt-x": "command_palette::Toggle", // execute-extended-command
"ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer
"ctrl-x ctrl-b": "tab_switcher::Toggle", // list-buffers
// "ctrl-x ctrl-c": "workspace::CloseWindow" // in case you only want to exit the current Zed instance
"ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal
"ctrl-x 5 0": "workspace::CloseWindow", // delete-frame
"ctrl-x 5 2": "workspace::NewWindow", // make-frame-command
"ctrl-x o": "workspace::ActivateNextPane", // other-window
"ctrl-x k": "pane::CloseActiveItem", // kill-buffer
"ctrl-x 0": "pane::CloseActiveItem", // delete-window
// "ctrl-x 1": "pane::JoinAll", // in case you prefer to delete the splits but keep the buffers open
"ctrl-x 1": "pane::CloseOtherItems", // delete-other-windows
"ctrl-x 2": "pane::SplitDown", // split-window-below
"ctrl-x 3": "pane::SplitRight", // split-window-right
@@ -125,10 +168,19 @@
}
},
{
// Workaround to enable using emacs in the Zed terminal.
// Workaround to enable using native emacs from the Zed terminal.
// Unbind so Zed ignores these keys and lets emacs handle them.
// NOTE:
// "terminal::SendKeystroke" only works for a single key stroke (e.g. ctrl-x),
// so override with null for compound sequences (e.g. ctrl-x ctrl-c).
"context": "Terminal",
"bindings": {
// If you want to perfect your emacs-in-zed setup, also consider the following.
// You may need to enable "option_as_meta" from the Zed settings for "alt-x" to work.
// "alt-x": ["terminal::SendKeystroke", "alt-x"],
// "ctrl-x": ["terminal::SendKeystroke", "ctrl-x"],
// "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
// ...
"ctrl-x ctrl-c": null, // save-buffers-kill-terminal
"ctrl-x ctrl-f": null, // find-file
"ctrl-x ctrl-s": null, // save-buffer

View File

@@ -1,7 +1,7 @@
[
{
"bindings": {
"ctrl-alt-s": "zed::OpenSettings",
"ctrl-alt-s": "zed::OpenSettingsFile",
"ctrl-{": "pane::ActivatePreviousItem",
"ctrl-}": "pane::ActivateNextItem",
"shift-escape": null, // Unmap workspace::zoom
@@ -91,7 +91,7 @@
{
"context": "Workspace",
"bindings": {
"ctrl-shift-f12": "workspace::CloseAllDocks",
"ctrl-shift-f12": "workspace::ToggleAllDocks",
"ctrl-shift-r": ["pane::DeploySearch", { "replace_enabled": true }],
"alt-shift-f10": "task::Spawn",
"ctrl-e": "file_finder::Toggle",
@@ -125,7 +125,7 @@
{
"context": "Workspace || Editor",
"bindings": {
"alt-f12": "terminal_panel::ToggleFocus",
"alt-f12": "terminal_panel::Toggle",
"ctrl-shift-k": "git::Push"
}
},

View File

@@ -28,8 +28,8 @@
{
"context": "Editor",
"bindings": {
"ctrl-alt-up": "editor::AddSelectionAbove",
"ctrl-alt-down": "editor::AddSelectionBelow",
"ctrl-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": false }],
"ctrl-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": false }],
"ctrl-shift-up": "editor::MoveLineUp",
"ctrl-shift-down": "editor::MoveLineDown",
"ctrl-shift-m": "editor::SelectLargerSyntaxNode",

View File

@@ -25,8 +25,8 @@
"cmd-<": "editor::ScrollCursorCenter",
"cmd-g": ["editor::SelectNext", { "replace_newest": true }],
"cmd-shift-g": ["editor::SelectPrevious", { "replace_newest": true }],
"ctrl-shift-down": "editor::AddSelectionBelow",
"ctrl-shift-up": "editor::AddSelectionAbove",
"ctrl-shift-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }],
"ctrl-shift-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }],
"alt-enter": "editor::Newline",
"cmd-shift-d": "editor::DuplicateLineDown",
"ctrl-cmd-up": "editor::MoveLineUp",

View File

@@ -17,8 +17,8 @@
"bindings": {
"cmd-i": "agent::ToggleFocus",
"cmd-shift-i": "agent::ToggleFocus",
"cmd-shift-l": "agent::QuoteSelection", // In cursor uses "Ask" mode
"cmd-l": "agent::QuoteSelection", // In cursor uses "Agent" mode
"cmd-shift-l": "agent::AddSelectionToThread", // In cursor uses "Ask" mode
"cmd-l": "agent::AddSelectionToThread", // In cursor uses "Agent" mode
"cmd-k": "assistant::InlineAssist",
"cmd-shift-k": "assistant::InsertIntoEditor"
}

View File

@@ -4,15 +4,24 @@
// from the command palette.
[
{
"context": "!GitPanel",
"bindings": {
"ctrl-g": "menu::Cancel"
}
},
{
// Workaround to avoid falling back to default bindings.
// Unbind so Zed ignores these keys and lets emacs handle them.
// NOTE: must be declared before the `Editor` override.
"context": "Editor",
"bindings": {
"ctrl-g": null // currently activates `go_to_line::Toggle` when there is nothing to cancel
}
},
{
"context": "Editor",
"bindings": {
"ctrl-g": "editor::Cancel",
"ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer
"alt-g g": "go_to_line::Toggle", // goto-line
"alt-g alt-g": "go_to_line::Toggle", // goto-line
"ctrl-space": "editor::SetMark", // set-mark
@@ -29,8 +38,10 @@
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
"alt-left": "editor::MoveToPreviousWordStart", // left-word
"alt-right": "editor::MoveToNextWordEnd", // right-word
"alt-f": "editor::MoveToNextWordEnd", // forward-word
"alt-b": "editor::MoveToPreviousWordStart", // backward-word
"alt-u": "editor::ConvertToUpperCase", // upcase-word
"alt-l": "editor::ConvertToLowerCase", // downcase-word
"alt-c": "editor::ConvertToUpperCamelCase", // capitalize-word
@@ -43,6 +54,8 @@
"ctrl-x h": "editor::SelectAll", // mark-whole-buffer
"ctrl-d": "editor::Delete", // delete-char
"alt-d": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }], // kill-word
"alt-backspace": "editor::DeleteToPreviousWordStart", // backward-kill-word
"alt-delete": "editor::DeleteToPreviousWordStart", // backward-kill-word
"ctrl-k": "editor::KillRingCut", // kill-line
"ctrl-w": "editor::Cut", // kill-region
"alt-w": "editor::Copy", // kill-ring-save
@@ -52,14 +65,19 @@
"ctrl-x u": "editor::Undo", // undo
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-up": "editor::MoveToStartOfParagraph", // backward-paragraph
"ctrl-down": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-v": "editor::MovePageDown", // scroll-up
"alt-v": "editor::MovePageUp", // scroll-down
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
"ctrl-x ]": "editor::MoveToEnd", // end-of-buffer
"alt-<": "editor::MoveToBeginning", // beginning-of-buffer
"alt->": "editor::MoveToEnd", // end-of-buffer
"ctrl-home": "editor::MoveToBeginning", // beginning-of-buffer
"ctrl-end": "editor::MoveToEnd", // end-of-buffer
"ctrl-l": "editor::ScrollCursorCenterTopBottom", // recenter-top-bottom
"ctrl-s": "buffer_search::Deploy", // isearch-forward
"ctrl-r": "buffer_search::Deploy", // isearch-backward
"alt-^": "editor::JoinLines", // join-line
"alt-q": "editor::Rewrap" // fill-paragraph
}
@@ -85,10 +103,19 @@
"end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],
"ctrl-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }],
"ctrl-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],
"alt-m": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],
"alt-f": "editor::SelectToNextWordEnd",
"alt-b": "editor::SelectToPreviousSubwordStart",
"alt-b": "editor::SelectToPreviousWordStart",
"alt-{": "editor::SelectToStartOfParagraph",
"alt-}": "editor::SelectToEndOfParagraph",
"ctrl-up": "editor::SelectToStartOfParagraph",
"ctrl-down": "editor::SelectToEndOfParagraph",
"ctrl-x [": "editor::SelectToBeginning",
"ctrl-x ]": "editor::SelectToEnd",
"alt-<": "editor::SelectToBeginning",
"alt->": "editor::SelectToEnd",
"ctrl-home": "editor::SelectToBeginning",
"ctrl-end": "editor::SelectToEnd",
"ctrl-g": "editor::Cancel"
}
},
@@ -106,15 +133,28 @@
"ctrl-n": "editor::SignatureHelpNext"
}
},
// Example setting for using emacs-style tab
// (i.e. indent the current line / selection or perform symbol completion depending on context)
// {
// "context": "Editor && !showing_code_actions && !showing_completions",
// "bindings": {
// "tab": "editor::AutoIndent" // indent-for-tab-command
// }
// },
{
"context": "Workspace",
"bindings": {
"alt-x": "command_palette::Toggle", // execute-extended-command
"ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer
"ctrl-x ctrl-b": "tab_switcher::Toggle", // list-buffers
// "ctrl-x ctrl-c": "workspace::CloseWindow" // in case you only want to exit the current Zed instance
"ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal
"ctrl-x 5 0": "workspace::CloseWindow", // delete-frame
"ctrl-x 5 2": "workspace::NewWindow", // make-frame-command
"ctrl-x o": "workspace::ActivateNextPane", // other-window
"ctrl-x k": "pane::CloseActiveItem", // kill-buffer
"ctrl-x 0": "pane::CloseActiveItem", // delete-window
// "ctrl-x 1": "pane::JoinAll", // in case you prefer to delete the splits but keep the buffers open
"ctrl-x 1": "pane::CloseOtherItems", // delete-other-windows
"ctrl-x 2": "pane::SplitDown", // split-window-below
"ctrl-x 3": "pane::SplitRight", // split-window-right
@@ -125,10 +165,19 @@
}
},
{
// Workaround to enable using emacs in the Zed terminal.
// Workaround to enable using native emacs from the Zed terminal.
// Unbind so Zed ignores these keys and lets emacs handle them.
// NOTE:
// "terminal::SendKeystroke" only works for a single key stroke (e.g. ctrl-x),
// so override with null for compound sequences (e.g. ctrl-x ctrl-c).
"context": "Terminal",
"bindings": {
// If you want to perfect your emacs-in-zed setup, also consider the following.
// You may need to enable "option_as_meta" from the Zed settings for "alt-x" to work.
// "alt-x": ["terminal::SendKeystroke", "alt-x"],
// "ctrl-x": ["terminal::SendKeystroke", "ctrl-x"],
// "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
// ...
"ctrl-x ctrl-c": null, // save-buffers-kill-terminal
"ctrl-x ctrl-f": null, // find-file
"ctrl-x ctrl-s": null, // save-buffer

View File

@@ -93,7 +93,7 @@
{
"context": "Workspace",
"bindings": {
"cmd-shift-f12": "workspace::CloseAllDocks",
"cmd-shift-f12": "workspace::ToggleAllDocks",
"cmd-shift-r": ["pane::DeploySearch", { "replace_enabled": true }],
"ctrl-alt-r": "task::Spawn",
"cmd-e": "file_finder::Toggle",
@@ -127,7 +127,7 @@
{
"context": "Workspace || Editor",
"bindings": {
"alt-f12": "terminal_panel::ToggleFocus",
"alt-f12": "terminal_panel::Toggle",
"cmd-shift-k": "git::Push"
}
},

View File

@@ -28,8 +28,8 @@
{
"context": "Editor",
"bindings": {
"ctrl-shift-up": "editor::AddSelectionAbove",
"ctrl-shift-down": "editor::AddSelectionBelow",
"ctrl-shift-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": false }],
"ctrl-shift-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": false }],
"cmd-ctrl-up": "editor::MoveLineUp",
"cmd-ctrl-down": "editor::MoveLineDown",
"cmd-shift-space": "editor::SelectAll",

View File

@@ -32,34 +32,6 @@
"(": "vim::SentenceBackward",
")": "vim::SentenceForward",
"|": "vim::GoToColumn",
"] ]": "vim::NextSectionStart",
"] [": "vim::NextSectionEnd",
"[ [": "vim::PreviousSectionStart",
"[ ]": "vim::PreviousSectionEnd",
"] m": "vim::NextMethodStart",
"] shift-m": "vim::NextMethodEnd",
"[ m": "vim::PreviousMethodStart",
"[ shift-m": "vim::PreviousMethodEnd",
"[ *": "vim::PreviousComment",
"[ /": "vim::PreviousComment",
"] *": "vim::NextComment",
"] /": "vim::NextComment",
"[ -": "vim::PreviousLesserIndent",
"[ +": "vim::PreviousGreaterIndent",
"[ =": "vim::PreviousSameIndent",
"] -": "vim::NextLesserIndent",
"] +": "vim::NextGreaterIndent",
"] =": "vim::NextSameIndent",
"] b": "pane::ActivateNextItem",
"[ b": "pane::ActivatePreviousItem",
"] shift-b": "pane::ActivateLastItem",
"[ shift-b": ["pane::ActivateItem", 0],
"] space": "vim::InsertEmptyLineBelow",
"[ space": "vim::InsertEmptyLineAbove",
"[ e": "editor::MoveLineUp",
"] e": "editor::MoveLineDown",
"[ f": "workspace::FollowNextCollaborator",
"] f": "workspace::FollowNextCollaborator",
// Word motions
"w": "vim::NextWordStart",
@@ -83,10 +55,6 @@
"n": "vim::MoveToNextMatch",
"shift-n": "vim::MoveToPreviousMatch",
"%": "vim::Matching",
"] }": ["vim::UnmatchedForward", { "char": "}" }],
"[ {": ["vim::UnmatchedBackward", { "char": "{" }],
"] )": ["vim::UnmatchedForward", { "char": ")" }],
"[ (": ["vim::UnmatchedBackward", { "char": "(" }],
"f": ["vim::PushFindForward", { "before": false, "multiline": false }],
"t": ["vim::PushFindForward", { "before": true, "multiline": false }],
"shift-f": ["vim::PushFindBackward", { "after": false, "multiline": false }],
@@ -127,8 +95,6 @@
"g g": "vim::StartOfDocument",
"g h": "editor::Hover",
"g B": "editor::BlameHover",
"g t": "pane::ActivateNextItem",
"g shift-t": "pane::ActivatePreviousItem",
"g d": "editor::GoToDefinition",
"g shift-d": "editor::GoToDeclaration",
"g y": "editor::GoToTypeDefinition",
@@ -219,6 +185,48 @@
".": "vim::Repeat"
}
},
{
"context": "vim_mode == normal || vim_mode == visual || vim_mode == operator",
"bindings": {
"] ]": "vim::NextSectionStart",
"] [": "vim::NextSectionEnd",
"[ [": "vim::PreviousSectionStart",
"[ ]": "vim::PreviousSectionEnd",
"] m": "vim::NextMethodStart",
"] shift-m": "vim::NextMethodEnd",
"[ m": "vim::PreviousMethodStart",
"[ shift-m": "vim::PreviousMethodEnd",
"[ *": "vim::PreviousComment",
"[ /": "vim::PreviousComment",
"] *": "vim::NextComment",
"] /": "vim::NextComment",
"[ -": "vim::PreviousLesserIndent",
"[ +": "vim::PreviousGreaterIndent",
"[ =": "vim::PreviousSameIndent",
"] -": "vim::NextLesserIndent",
"] +": "vim::NextGreaterIndent",
"] =": "vim::NextSameIndent",
"] b": "pane::ActivateNextItem",
"[ b": "pane::ActivatePreviousItem",
"] shift-b": "pane::ActivateLastItem",
"[ shift-b": ["pane::ActivateItem", 0],
"] space": "vim::InsertEmptyLineBelow",
"[ space": "vim::InsertEmptyLineAbove",
"[ e": "editor::MoveLineUp",
"] e": "editor::MoveLineDown",
"[ f": "workspace::FollowNextCollaborator",
"] f": "workspace::FollowNextCollaborator",
"] }": ["vim::UnmatchedForward", { "char": "}" }],
"[ {": ["vim::UnmatchedBackward", { "char": "{" }],
"] )": ["vim::UnmatchedForward", { "char": ")" }],
"[ (": ["vim::UnmatchedBackward", { "char": "(" }],
"[ r": "vim::GoToPreviousReference",
"] r": "vim::GoToNextReference",
// tree-sitter related commands
"[ x": "vim::SelectLargerSyntaxNode",
"] x": "vim::SelectSmallerSyntaxNode"
}
},
{
"context": "vim_mode == normal",
"bindings": {
@@ -232,6 +240,7 @@
"delete": "vim::DeleteRight",
"g shift-j": "vim::JoinLinesNoWhitespace",
"y": "vim::PushYank",
"shift-y": "vim::YankLine",
"x": "vim::DeleteRight",
"shift-x": "vim::DeleteLeft",
"ctrl-a": "vim::Increment",
@@ -249,9 +258,6 @@
"g w": "vim::PushRewrap",
"g q": "vim::PushRewrap",
"insert": "vim::InsertBefore",
// tree-sitter related commands
"[ x": "vim::SelectLargerSyntaxNode",
"] x": "vim::SelectSmallerSyntaxNode",
"] d": "editor::GoToDiagnostic",
"[ d": "editor::GoToPreviousDiagnostic",
"] c": "editor::GoToHunk",
@@ -317,10 +323,28 @@
"g w": "vim::Rewrap",
"g ?": "vim::ConvertToRot13",
// "g ?": "vim::ConvertToRot47",
"\"": "vim::PushRegister",
// tree-sitter related commands
"[ x": "editor::SelectLargerSyntaxNode",
"] x": "editor::SelectSmallerSyntaxNode"
"\"": "vim::PushRegister"
}
},
{
"context": "vim_mode == helix_select",
"bindings": {
"v": "vim::NormalBefore",
";": "vim::HelixCollapseSelection",
"~": "vim::ChangeCase",
"ctrl-a": "vim::Increment",
"ctrl-x": "vim::Decrement",
"shift-j": "vim::JoinLines",
"i": "vim::InsertBefore",
"a": "vim::InsertAfter",
"p": "vim::Paste",
"u": "vim::Undo",
"r": "vim::PushReplace",
"s": "vim::Substitute",
"ctrl-pageup": "pane::ActivatePreviousItem",
"ctrl-pagedown": "pane::ActivateNextItem",
".": "vim::Repeat",
"alt-.": "vim::RepeatFind"
}
},
{
@@ -394,59 +418,79 @@
"bindings": {
"i": "vim::HelixInsert",
"a": "vim::HelixAppend",
"ctrl-[": "editor::Cancel",
";": "vim::HelixCollapseSelection",
":": "command_palette::Toggle",
"left": "vim::WrappingLeft",
"right": "vim::WrappingRight",
"ctrl-[": "editor::Cancel"
}
},
{
"context": "vim_mode == helix_select && !menu",
"bindings": {
"escape": "vim::SwitchToHelixNormalMode"
}
},
{
"context": "(vim_mode == helix_normal || vim_mode == helix_select) && !menu",
"bindings": {
// Movement
"h": "vim::WrappingLeft",
"left": "vim::WrappingLeft",
"l": "vim::WrappingRight",
"y": "vim::HelixYank",
"alt-;": "vim::OtherEnd",
"ctrl-r": "vim::Redo",
"f": ["vim::PushFindForward", { "before": false, "multiline": true }],
"right": "vim::WrappingRight",
"t": ["vim::PushFindForward", { "before": true, "multiline": true }],
"shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }],
"f": ["vim::PushFindForward", { "before": false, "multiline": true }],
"shift-t": ["vim::PushFindBackward", { "after": true, "multiline": true }],
"shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }],
"alt-.": "vim::RepeatFind",
// Changes
"shift-r": "editor::Paste",
"`": "vim::ConvertToLowerCase",
"alt-`": "vim::ConvertToUpperCase",
"insert": "vim::InsertBefore",
"shift-u": "editor::Redo",
"ctrl-r": "vim::Redo",
"y": "vim::HelixYank",
"p": "vim::HelixPaste",
"shift-p": ["vim::HelixPaste", { "before": true }],
">": "vim::Indent",
"<": "vim::Outdent",
"=": "vim::AutoIndent",
"g u": "vim::PushLowercase",
"g shift-u": "vim::PushUppercase",
"g ~": "vim::PushOppositeCase",
"g q": "vim::PushRewrap",
"g w": "vim::PushRewrap",
"insert": "vim::InsertBefore",
"alt-.": "vim::RepeatFind",
"d": "vim::HelixDelete",
"alt-d": "editor::Delete", // Delete selection, without yanking
"c": "vim::HelixSubstitute",
"alt-c": "vim::HelixSubstituteNoYank",
// Selection manipulation
"s": "vim::HelixSelectRegex",
"alt-s": ["editor::SplitSelectionIntoLines", { "keep_selections": true }],
// tree-sitter related commands
"[ x": "editor::SelectLargerSyntaxNode",
"] x": "editor::SelectSmallerSyntaxNode",
"] d": "editor::GoToDiagnostic",
"[ d": "editor::GoToPreviousDiagnostic",
"] c": "editor::GoToHunk",
"[ c": "editor::GoToPreviousHunk",
";": "vim::HelixCollapseSelection",
"alt-;": "vim::OtherEnd",
",": "vim::HelixKeepNewestSelection",
"shift-c": "vim::HelixDuplicateBelow",
"alt-shift-c": "vim::HelixDuplicateAbove",
"%": "editor::SelectAll",
"x": "vim::HelixSelectLine",
"shift-x": "editor::SelectLine",
"ctrl-c": "editor::ToggleComments",
"alt-o": "editor::SelectLargerSyntaxNode",
"alt-i": "editor::SelectSmallerSyntaxNode",
"alt-p": "editor::SelectPreviousSyntaxNode",
"alt-n": "editor::SelectNextSyntaxNode",
// Goto mode
"g n": "pane::ActivateNextItem",
"g p": "pane::ActivatePreviousItem",
// "tab": "pane::ActivateNextItem",
// "shift-tab": "pane::ActivatePrevItem",
"shift-h": "pane::ActivatePreviousItem",
"shift-l": "pane::ActivateNextItem",
"g l": "vim::EndOfLine",
"g h": "vim::StartOfLine",
"g s": "vim::FirstNonWhitespace", // "g s" default behavior is "space s"
"g e": "vim::EndOfDocument",
"g .": "vim::HelixGotoLastModification", // go to last modification
"g r": "editor::FindAllReferences", // zed specific
"g h": "vim::StartOfLine",
"g l": "vim::EndOfLine",
"g s": "vim::FirstNonWhitespace", // "g s" default behavior is "space s"
"g t": "vim::WindowTop",
"g c": "vim::WindowMiddle",
"g b": "vim::WindowBottom",
"g r": "editor::FindAllReferences", // zed specific
"g n": "pane::ActivateNextItem",
"shift-l": "pane::ActivateNextItem",
"g p": "pane::ActivatePreviousItem",
"shift-h": "pane::ActivatePreviousItem",
"g .": "vim::HelixGotoLastModification", // go to last modification
"shift-r": "editor::Paste",
"x": "vim::HelixSelectLine",
"shift-x": "editor::SelectLine",
"%": "editor::SelectAll",
// Window mode
"space w h": "workspace::ActivatePaneLeft",
"space w l": "workspace::ActivatePaneRight",
@@ -457,6 +501,7 @@
"space w r": "pane::SplitRight",
"space w v": "pane::SplitDown",
"space w d": "pane::SplitDown",
// Space mode
"space f": "file_finder::Toggle",
"space k": "editor::Hover",
@@ -467,17 +512,18 @@
"space a": "editor::ToggleCodeActions",
"space h": "editor::SelectAllMatches",
"space c": "editor::ToggleComments",
"space y": "editor::Copy",
"space p": "editor::Paste",
// Match mode
"m m": "vim::Matching",
"m i w": ["workspace::SendKeystrokes", "v i w"],
"shift-u": "editor::Redo",
"ctrl-c": "editor::ToggleComments",
"d": "vim::HelixDelete",
"c": "vim::Substitute",
"shift-c": "editor::AddSelectionBelow",
"alt-shift-c": "editor::AddSelectionAbove"
"space y": "editor::Copy",
// Other
":": "command_palette::Toggle",
"m": "vim::PushHelixMatch",
"]": ["vim::PushHelixNext", { "around": true }],
"[": ["vim::PushHelixPrevious", { "around": true }],
"g q": "vim::PushRewrap",
"g w": "vim::PushRewrap"
// "tab": "pane::ActivateNextItem",
// "shift-tab": "pane::ActivatePrevItem",
}
},
{
@@ -540,7 +586,7 @@
}
},
{
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
"context": "vim_operator == a || vim_operator == i || vim_operator == cs || vim_operator == helix_next || vim_operator == helix_previous",
"bindings": {
"w": "vim::Word",
"shift-w": ["vim::Word", { "ignore_punctuation": true }],
@@ -556,18 +602,18 @@
// "q": "vim::AnyQuotes",
"q": "vim::MiniQuotes",
"|": "vim::VerticalBars",
"(": "vim::Parentheses",
"(": ["vim::Parentheses", { "opening": true }],
")": "vim::Parentheses",
"b": "vim::Parentheses",
// "b": "vim::AnyBrackets",
// "b": "vim::MiniBrackets",
"[": "vim::SquareBrackets",
"[": ["vim::SquareBrackets", { "opening": true }],
"]": "vim::SquareBrackets",
"r": "vim::SquareBrackets",
"{": "vim::CurlyBrackets",
"{": ["vim::CurlyBrackets", { "opening": true }],
"}": "vim::CurlyBrackets",
"shift-b": "vim::CurlyBrackets",
"<": "vim::AngleBrackets",
"<": ["vim::AngleBrackets", { "opening": true }],
">": "vim::AngleBrackets",
"a": "vim::Argument",
"i": "vim::IndentObj",
@@ -577,6 +623,48 @@
"e": "vim::EntireFile"
}
},
{
"context": "vim_operator == helix_m",
"bindings": {
"m": "vim::Matching"
}
},
{
"context": "vim_operator == helix_next",
"bindings": {
"z": "vim::NextSectionStart",
"shift-z": "vim::NextSectionEnd",
"*": "vim::NextComment",
"/": "vim::NextComment",
"-": "vim::NextLesserIndent",
"+": "vim::NextGreaterIndent",
"=": "vim::NextSameIndent",
"b": "pane::ActivateNextItem",
"shift-b": "pane::ActivateLastItem",
"x": "editor::SelectSmallerSyntaxNode",
"d": "editor::GoToDiagnostic",
"c": "editor::GoToHunk",
"space": "vim::InsertEmptyLineBelow"
}
},
{
"context": "vim_operator == helix_previous",
"bindings": {
"z": "vim::PreviousSectionStart",
"shift-z": "vim::PreviousSectionEnd",
"*": "vim::PreviousComment",
"/": "vim::PreviousComment",
"-": "vim::PreviousLesserIndent",
"+": "vim::PreviousGreaterIndent",
"=": "vim::PreviousSameIndent",
"b": "pane::ActivatePreviousItem",
"shift-b": ["pane::ActivateItem", 0],
"x": "editor::SelectLargerSyntaxNode",
"d": "editor::GoToPreviousDiagnostic",
"c": "editor::GoToPreviousHunk",
"space": "vim::InsertEmptyLineAbove"
}
},
{
"context": "vim_operator == c",
"bindings": {
@@ -745,7 +833,7 @@
}
},
{
"context": "VimControl || !Editor && !Terminal",
"context": "VimControl && !menu || !Editor && !Terminal",
"bindings": {
// window related commands (ctrl-w X)
"ctrl-w": null,
@@ -765,10 +853,10 @@
"ctrl-w shift-right": "workspace::SwapPaneRight",
"ctrl-w shift-up": "workspace::SwapPaneUp",
"ctrl-w shift-down": "workspace::SwapPaneDown",
"ctrl-w shift-h": "workspace::SwapPaneLeft",
"ctrl-w shift-l": "workspace::SwapPaneRight",
"ctrl-w shift-k": "workspace::SwapPaneUp",
"ctrl-w shift-j": "workspace::SwapPaneDown",
"ctrl-w shift-h": "workspace::MovePaneLeft",
"ctrl-w shift-l": "workspace::MovePaneRight",
"ctrl-w shift-k": "workspace::MovePaneUp",
"ctrl-w shift-j": "workspace::MovePaneDown",
"ctrl-w >": "vim::ResizePaneRight",
"ctrl-w <": "vim::ResizePaneLeft",
"ctrl-w -": "vim::ResizePaneDown",
@@ -799,7 +887,9 @@
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
"ctrl-w ctrl-n": "workspace::NewFileSplitHorizontal",
"ctrl-w n": "workspace::NewFileSplitHorizontal"
"ctrl-w n": "workspace::NewFileSplitHorizontal",
"g t": "vim::GoToTab",
"g shift-t": "vim::GoToPreviousTab"
}
},
{
@@ -818,16 +908,18 @@
"/": "project_panel::NewSearchInDirectory",
"d": "project_panel::NewDirectory",
"enter": "project_panel::OpenPermanent",
"escape": "project_panel::ToggleFocus",
"escape": "vim::ToggleProjectPanelFocus",
"h": "project_panel::CollapseSelectedEntry",
"j": "menu::SelectNext",
"k": "menu::SelectPrevious",
"j": "vim::MenuSelectNext",
"k": "vim::MenuSelectPrevious",
"down": "vim::MenuSelectNext",
"up": "vim::MenuSelectPrevious",
"l": "project_panel::ExpandSelectedEntry",
"o": "project_panel::OpenPermanent",
"shift-d": "project_panel::Delete",
"shift-r": "project_panel::Rename",
"t": "project_panel::OpenPermanent",
"v": "project_panel::OpenPermanent",
"v": "project_panel::OpenSplitVertical",
"o": "project_panel::OpenSplitHorizontal",
"p": "project_panel::Open",
"x": "project_panel::RevealInFileManager",
"s": "workspace::OpenWithSystem",
@@ -840,7 +932,22 @@
"{": "project_panel::SelectPrevDirectory",
"shift-g": "menu::SelectLast",
"g g": "menu::SelectFirst",
"-": "project_panel::SelectParent"
"-": "project_panel::SelectParent",
"ctrl-u": "project_panel::ScrollUp",
"ctrl-d": "project_panel::ScrollDown",
"z t": "project_panel::ScrollCursorTop",
"z z": "project_panel::ScrollCursorCenter",
"z b": "project_panel::ScrollCursorBottom",
"0": ["vim::Number", 0],
"1": ["vim::Number", 1],
"2": ["vim::Number", 2],
"3": ["vim::Number", 3],
"4": ["vim::Number", 4],
"5": ["vim::Number", 5],
"6": ["vim::Number", 6],
"7": ["vim::Number", 7],
"8": ["vim::Number", 8],
"9": ["vim::Number", 9]
}
},
{
@@ -885,7 +992,9 @@
"bindings": {
"ctrl-h": "editor::Backspace",
"ctrl-u": "editor::DeleteToBeginningOfLine",
"ctrl-w": "editor::DeleteToPreviousWordStart"
"ctrl-w": "editor::DeleteToPreviousWordStart",
"ctrl-p": "menu::SelectPrevious",
"ctrl-n": "menu::SelectNext"
}
},
{
@@ -917,5 +1026,16 @@
// and Windows.
"alt-l": "editor::AcceptEditPrediction"
}
},
{
"context": "SettingsWindow > NavigationMenu && !search",
"bindings": {
"l": "settings_editor::ExpandNavEntry",
"h": "settings_editor::CollapseNavEntry",
"k": "settings_editor::FocusPreviousNavEntry",
"j": "settings_editor::FocusNextNavEntry",
"g g": "settings_editor::FocusFirstNavEntry",
"shift-g": "settings_editor::FocusLastNavEntry"
}
}
]

View File

@@ -1,179 +0,0 @@
You are a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Communication
1. Be conversational but professional.
2. Refer to the user in the second person and yourself in the first person.
3. Format your responses in markdown. Use backticks to format file, directory, function, and class names.
4. NEVER lie or make things up.
5. Refrain from apologizing all the time when results are unexpected. Instead, just try your best to proceed or explain the circumstances to the user without apologizing.
{{#if has_tools}}
## Tool Use
1. Make sure to adhere to the tools schema.
2. Provide every required argument.
3. DO NOT use tools to access items that are already available in the context section.
4. Use only the tools that are currently available.
5. DO NOT use a tool that is not available just because it appears in the conversation. This means the user turned it off.
6. NEVER run commands that don't terminate on their own such as web servers (like `npm run start`, `npm run dev`, `python -m http.server`, etc) or file watchers.
7. Avoid HTML entity escaping - use plain characters instead.
## Searching and Reading
If you are unsure how to fulfill the user's request, gather more information with tool calls and/or clarifying questions.
{{! TODO: If there are files, we should mention it but otherwise omit that fact }}
If appropriate, use tool calls to explore the current project, which contains the following root directories:
{{#each worktrees}}
- `{{abs_path}}`
{{/each}}
- Bias towards not asking the user for help if you can find the answer yourself.
- When providing paths to tools, the path should always start with the name of a project root directory listed above.
- Before you read or edit a file, you must first find the full path. DO NOT ever guess a file path!
{{# if (has_tool 'grep') }}
- When looking for symbols in the project, prefer the `grep` tool.
- As you learn about the structure of the project, use that information to scope `grep` searches to targeted subtrees of the project.
- The user might specify a partial file path. If you don't know the full path, use `find_path` (not `grep`) before you read the file.
{{/if}}
{{else}}
You are being tasked with providing a response, but you have no ability to use tools or to read or write any aspect of the user's system (other than any context the user might have provided to you).
As such, if you need the user to perform any actions for you, you must request them explicitly. Bias towards giving a response to the best of your ability, and then making requests for the user to take action (e.g. to give you more context) only optionally.
The one exception to this is if the user references something you don't know about - for example, the name of a source code file, function, type, or other piece of code that you have no awareness of. In this case, you MUST NOT MAKE SOMETHING UP, or assume you know what that thing is or how it works. Instead, you must ask the user for clarification rather than giving a response.
{{/if}}
## Code Block Formatting
Whenever you mention a code block, you MUST use ONLY use the following format:
```path/to/Something.blah#L123-456
(code goes here)
```
The `#L123-456` means the line number range 123 through 456, and the path/to/Something.blah
is a path in the project. (If there is no valid path in the project, then you can use
/dev/null/path.extension for its path.) This is the ONLY valid way to format code blocks, because the Markdown parser
does not understand the more common ```language syntax, or bare ``` blocks. It only
understands this path-based syntax, and if the path is missing, then it will error and you will have to do it over again.
Just to be really clear about this, if you ever find yourself writing three backticks followed by a language name, STOP!
You have made a mistake. You can only ever put paths after triple backticks!
<example>
Based on all the information I've gathered, here's a summary of how this system works:
1. The README file is loaded into the system.
2. The system finds the first two headers, including everything in between. In this case, that would be:
```path/to/README.md#L8-12
# First Header
This is the info under the first header.
## Sub-header
```
3. Then the system finds the last header in the README:
```path/to/README.md#L27-29
## Last Header
This is the last header in the README.
```
4. Finally, it passes this information on to the next process.
</example>
<example>
In Markdown, hash marks signify headings. For example:
```/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</example>
Here are examples of ways you must never render code blocks:
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it does not include the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it has the language instead of the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
# Level 1 heading
## Level 2 heading
### Level 3 heading
</bad_example_do_not_do_this>
This example is unacceptable because it uses indentation to mark the code block
instead of backticks with a path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because the path is in the wrong place. The path must be directly after the opening backticks.
{{#if has_tools}}
## Fixing Diagnostics
1. Make 1-2 attempts at fixing diagnostics, then defer to the user.
2. Never simplify code you've written just to solve diagnostics. Complete, mostly correct code is more valuable than perfect code that doesn't solve the problem.
## Debugging
When debugging, only make code changes if you are certain that you can solve the problem.
Otherwise, follow debugging best practices:
1. Address the root cause instead of the symptoms.
2. Add descriptive logging statements and error messages to track variable and code state.
3. Add test functions and statements to isolate the problem.
{{/if}}
## Calling External APIs
1. Unless explicitly requested by the user, use the best suited external APIs and packages to solve the task. There is no need to ask the user for permission.
2. When selecting which version of an API or package to use, choose one that is compatible with the user's dependency management file(s). If no such file exists or if the package is not present, use the latest version that is in your training data.
3. If an external API requires an API Key, be sure to point this out to the user. Adhere to best security practices (e.g. DO NOT hardcode an API key in a place where it can be exposed)
## System Information
Operating System: {{os}}
Default Shell: {{shell}}
{{#if (or has_rules has_user_rules)}}
## User's Custom Instructions
The following additional instructions are provided by the user, and should be followed to the best of your ability{{#if has_tools}} without interfering with the tool use guidelines{{/if}}.
{{#if has_rules}}
There are project rules that apply to these root directories:
{{#each worktrees}}
{{#if rules_file}}
`{{root_name}}/{{rules_file.path_in_worktree}}`:
``````
{{{rules_file.text}}}
``````
{{/if}}
{{/each}}
{{/if}}
{{#if has_user_rules}}
The user has specified the following rules that should be applied:
{{#each user_rules}}
{{#if title}}
Rules title: {{title}}
{{/if}}
``````
{{contents}}
``````
{{/each}}
{{/if}}
{{/if}}

View File

@@ -29,7 +29,9 @@ Generate {{content_type}} based on the following prompt:
Match the indentation in the original file in the inserted {{content_type}}, don't include any indentation on blank lines.
Immediately start with the following format with no remarks:
Return ONLY the {{content_type}} to insert. Do NOT include any XML tags like <document>, <insert_here>, or any surrounding markup from the input.
Respond with a code block containing the {{content_type}} to insert. Replace \{{INSERTED_CODE}} with your actual {{content_type}}:
```
\{{INSERTED_CODE}}
@@ -66,7 +68,9 @@ Only make changes that are necessary to fulfill the prompt, leave everything els
Start at the indentation level in the original file in the rewritten {{content_type}}. Don't stop until you've rewritten the entire section, even if you have no more changes to make, always write out the whole section with no unnecessary elisions.
Immediately start with the following format with no remarks:
Return ONLY the rewritten {{content_type}}. Do NOT include any XML tags like <document>, <rewrite_this>, or any surrounding markup from the input.
Respond with a code block containing the rewritten {{content_type}}. Replace \{{REWRITTEN_CODE}} with your actual rewritten {{content_type}}:
```
\{{REWRITTEN_CODE}}

View File

@@ -1,4 +1,8 @@
{
"$schema": "zed://schemas/settings",
/// The displayed name of this project. If not set or null, the root directory name
/// will be displayed.
"project_name": null,
// The name of the Zed theme to use for the UI.
//
// `mode` is one of:
@@ -71,8 +75,10 @@
"ui_font_weight": 400,
// The default font size for text in the UI
"ui_font_size": 16,
// The default font size for text in the agent panel. Falls back to the UI font size if unset.
"agent_font_size": null,
// The default font size for agent responses in the agent panel. Falls back to the UI font size if unset.
"agent_ui_font_size": null,
// The default font size for user messages in the agent panel.
"agent_buffer_font_size": 12,
// How much to fade out unused code.
"unnecessary_code_fade": 0.3,
// Active pane styling settings.
@@ -114,6 +120,7 @@
// Whether to enable vim modes and key bindings.
"vim_mode": false,
// Whether to enable helix mode and key bindings.
// Enabling this mode will automatically enable vim mode.
"helix_mode": false,
// Whether to show the informational hover box when moving the mouse
// over symbols in the editor.
@@ -248,6 +255,19 @@
// Whether to display inline and alongside documentation for items in the
// completions menu
"show_completion_documentation": true,
// When to show the scrollbar in the completion menu.
// This setting can take four values:
//
// 1. Show the scrollbar if there's important information or
// follow the system's configured behavior
// "auto"
// 2. Match the system's configured behavior:
// "system"
// 3. Always show the scrollbar:
// "always"
// 4. Never show the scrollbar:
// "never" (default)
"completion_menu_scrollbar": "never",
// Show method signatures in the editor, when inside parentheses.
"auto_signature_help": false,
// Whether to show the signature help after completion or a bracket pair inserted.
@@ -304,13 +324,13 @@
"use_on_type_format": true,
// Whether to automatically add matching closing characters when typing
// opening parenthesis, bracket, brace, single or double quote characters.
// For example, when you type (, Zed will add a closing ) at the correct position.
// For example, when you type '(', Zed will add a closing ) at the correct position.
"use_autoclose": true,
// Whether to automatically surround selected text when typing opening parenthesis,
// bracket, brace, single or double quote characters.
// For example, when you select text and type (, Zed will surround the text with ().
// For example, when you select text and type '(', Zed will surround the text with ().
"use_auto_surround": true,
/// Whether indentation should be adjusted based on the context whilst typing.
// Whether indentation should be adjusted based on the context whilst typing.
"auto_indent": true,
// Whether indentation of pasted content should be adjusted based on the context.
"auto_indent_on_paste": true,
@@ -361,6 +381,11 @@
// - It is adjacent to an edge (start or end)
// - It is adjacent to a whitespace (left or right)
"show_whitespaces": "selection",
// Visible characters used to render whitespace when show_whitespaces is enabled.
"whitespace_map": {
"space": "•",
"tab": "→"
},
// Settings related to calls in Zed
"calls": {
// Join calls with the microphone live by default
@@ -400,6 +425,39 @@
// Whether to show the menus in the titlebar.
"show_menus": false
},
"audio": {
// Opt into the new audio system.
"experimental.rodio_audio": false,
// Requires 'rodio_audio: true'
//
// Automatically increase or decrease you microphone's volume. This affects how
// loud you sound to others.
//
// Recommended: off (default)
// Microphones are too quite in zed, until everyone is on experimental
// audio and has auto speaker volume on this will make you very loud
// compared to other speakers.
"experimental.auto_microphone_volume": false,
// Requires 'rodio_audio: true'
//
// Automatically increate or decrease the volume of other call members.
// This only affects how things sound for you.
"experimental.auto_speaker_volume": true,
// Requires 'rodio_audio: true'
//
// Remove background noises. Works great for typing, cars, dogs, AC. Does
// not work well on music.
"experimental.denoise": true,
// Requires 'rodio_audio: true'
//
// Use audio parameters compatible with the previous versions of
// experimental audio and non-experimental audio. When this is false you
// will sound strange to anyone not on the latest experimental audio. In
// the future we will migrate by setting this to false
//
// You need to rejoin a call for this setting to apply
"experimental.legacy_audio_compatible": true
},
// Scrollbar related settings
"scrollbar": {
// When to show the scrollbar in the editor.
@@ -547,17 +605,27 @@
// to both the horizontal and vertical delta values while scrolling. Fast scrolling
// happens when a user holds the alt or option key while scrolling.
"fast_scroll_sensitivity": 4.0,
"relative_line_numbers": false,
"sticky_scroll": {
// Whether to stick scopes to the top of the editor.
"enabled": false
},
"relative_line_numbers": "disabled",
// If 'search_wrap' is disabled, search result do not wrap around the end of the file.
"search_wrap": true,
// Search options to enable by default when opening new project and buffer searches.
"search": {
// Whether to show the project search button in the status bar.
"button": true,
// Whether to only match on whole words.
"whole_word": false,
// Whether to match case sensitively.
"case_sensitive": false,
// Whether to include gitignored files in search results.
"include_ignored": false,
"regex": false
// Whether to interpret the search query as a regular expression.
"regex": false,
// Whether to center the cursor on each search match when navigating.
"center_on_match": false
},
// When to populate a new search's query based on the text under the cursor.
// This setting can take the following three values:
@@ -580,6 +648,7 @@
// Toggle certain types of hints on and off, all switched on by default.
"show_type_hints": true,
"show_parameter_hints": true,
"show_value_hints": true,
// Corresponds to null/None LSP hint type value.
"show_other_hints": true,
// Whether to show a background for inlay hints.
@@ -676,7 +745,11 @@
// Whether to enable drag-and-drop operations in the project panel.
"drag_and_drop": true,
// Whether to hide the root entry when only one folder is open in the window.
"hide_root": false
"hide_root": false,
// Whether to hide the hidden entries in the project panel.
"hide_hidden": false,
// Whether to automatically open files when pasting them in the project panel.
"open_file_on_paste": true
},
"outline_panel": {
// Whether to show the outline panel button in the status bar
@@ -740,16 +813,6 @@
// Default width of the collaboration panel.
"default_width": 240
},
"chat_panel": {
// When to show the chat panel button in the status bar.
// Can be 'never', 'always', or 'when_in_call',
// or a boolean (interpreted as 'never'/'always').
"button": "when_in_call",
// Where to dock the chat panel. Can be 'left' or 'right'.
"dock": "right",
// Default width of the chat panel.
"default_width": 240
},
"git_panel": {
// Whether to show the git panel button in the status bar.
"button": true,
@@ -798,7 +861,7 @@
"agent": {
// Whether the agent is enabled.
"enabled": true,
/// What completion mode to start new threads in, if available. Can be 'normal' or 'burn'.
// What completion mode to start new threads in, if available. Can be 'normal' or 'burn'.
"preferred_completion_mode": "normal",
// Whether to show the agent panel button in the status bar.
"button": true,
@@ -808,6 +871,8 @@
"default_width": 640,
// Default height when the agent panel is docked to the bottom.
"default_height": 320,
// The view to use by default (thread, or text_thread)
"default_view": "thread",
// The default model to use when creating new threads.
"default_model": {
// The provider to use.
@@ -838,9 +903,10 @@
// }
],
// When enabled, the agent can run potentially destructive actions without asking for your confirmation.
//
// Note: This setting has no effect on external agents that support permission modes, such as Claude Code.
// You can set `agent_servers.claude.default_mode` to `bypassPermissions` to skip all permission requests.
"always_allow_tool_actions": false,
// When enabled, the agent will stream edits.
"stream_edits": false,
// When enabled, agent edits will be displayed in single-file editors for review
"single_file_review": true,
// When enabled, show voting thumbs for feedback on agent edits.
@@ -863,6 +929,7 @@
"now": true,
"find_path": true,
"read_file": true,
"open": true,
"grep": true,
"terminal": true,
"thinking": true,
@@ -874,7 +941,6 @@
// We don't know which of the context server tools are safe for the "Ask" profile, so we don't enable them by default.
// "enable_all_context_servers": true,
"tools": {
"contents": true,
"diagnostics": true,
"fetch": true,
"list_directory": true,
@@ -906,22 +972,22 @@
// Default: false
"play_sound_when_agent_done": false,
/// Whether to have edit cards in the agent panel expanded, showing a preview of the full diff.
///
/// Default: true
// Whether to have edit cards in the agent panel expanded, showing a preview of the full diff.
//
// Default: true
"expand_edit_card": true,
/// Whether to have terminal cards in the agent panel expanded, showing the whole command output.
///
/// Default: true
"expand_terminal_card": true
},
// The settings for slash commands.
"slash_commands": {
// Settings for the `/project` slash command.
"project": {
// Whether `/project` is enabled.
"enabled": false
}
// Whether to have terminal cards in the agent panel expanded, showing the whole command output.
//
// Default: true
"expand_terminal_card": true,
// Whether to always use cmd-enter (or ctrl-enter on Linux or Windows) to send messages in the agent panel.
//
// Default: false
"use_modifier_to_send": false,
// Minimum number of lines to display in the agent message editor.
//
// Default: 4
"message_editor_min_lines": 4
},
// Whether the screen sharing icon is shown in the os status bar.
"show_call_status_icon": true,
@@ -934,6 +1000,7 @@
//
// This is typically customized on a per-language basis.
"language_servers": ["..."],
// When to automatically save edited buffers. This setting can
// take four values.
//
@@ -962,7 +1029,7 @@
// Show git status colors in the editor tabs.
"git_status": false,
// Position of the close button on the editor tabs.
// One of: ["right", "left", "hidden"]
// One of: ["right", "left"]
"close_position": "right",
// Whether to show the file icon for a tab.
"file_icons": false,
@@ -1047,10 +1114,10 @@
// Only the file Zed had indexed will be used, not necessary all the gitignored files.
//
// Can accept 3 values:
// * `true`: Use all gitignored files
// * `false`: Use only the files Zed had indexed
// * `null`: Be smart and search for ignored when called from a gitignored worktree
"include_ignored": null
// * "all": Use all gitignored files
// * "indexed": Use only the files Zed had indexed
// * "smart": Be smart and search for ignored when called from a gitignored worktree
"include_ignored": "smart"
},
// Whether or not to remove any trailing whitespace from lines of a buffer
// before saving it.
@@ -1060,25 +1127,31 @@
// Removes any lines containing only whitespace at the end of the file and
// ensures just one newline at the end.
"ensure_final_newline_on_save": true,
// Whether or not to perform a buffer format before saving: [on, off, prettier, language_server]
// Whether or not to perform a buffer format before saving: [on, off]
// Keep in mind, if the autosave with delay is enabled, format_on_save will be ignored
"format_on_save": "on",
// How to perform a buffer format. This setting can take 4 values:
// How to perform a buffer format. This setting can take multiple values:
//
// 1. Format code using the current language server:
// 1. Default. Format files using Zed's Prettier integration (if applicable),
// or falling back to formatting via language server:
// "formatter": "auto"
// 2. Format code using the current language server:
// "formatter": "language_server"
// 2. Format code using an external command:
// 3. Format code using a specific language server:
// "formatter": {"language_server": {"name": "ruff"}}
// 4. Format code using an external command:
// "formatter": {
// "external": {
// "command": "prettier",
// "arguments": ["--stdin-filepath", "{buffer_path}"]
// }
// }
// 3. Format code using Zed's Prettier integration:
// 5. Format code using Zed's Prettier integration:
// "formatter": "prettier"
// 4. Default. Format files using Zed's Prettier integration (if applicable),
// or falling back to formatting via language server:
// "formatter": "auto"
// 6. Format code using a code action
// "formatter": {"code_action": "source.fixAll.eslint"}
// 7. An array of any format step specified above to apply in order
// "formatter": [{"code_action": "source.fixAll.eslint"}, "prettier"]
"formatter": "auto",
// How to soft-wrap long lines of text.
// Possible values:
@@ -1182,6 +1255,9 @@
// that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes
// precedence over these inclusions.
"file_scan_inclusions": [".env*"],
// Globs to match files that will be considered "hidden". These files can be hidden from the
// project panel by toggling the "hide_hidden" setting.
"hidden_files": ["**/.*"],
// Git gutter behavior configuration.
"git": {
// Control whether the git gutter is shown. May take 2 values:
@@ -1190,6 +1266,10 @@
// 2. Hide the gutter
// "git_gutter": "hide"
"git_gutter": "tracked_files",
/// Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
///
/// Default: 0
"gutter_debounce": 0,
// Control whether the git blame information is shown inline,
// in the currently focused line.
"inline_blame": {
@@ -1205,6 +1285,13 @@
// The minimum column number to show the inline blame information at
"min_column": 0
},
"blame": {
"show_avatar": true
},
// Control which information is shown in the branch picker.
"branch_picker": {
"show_author_name": true
},
// How git hunks are displayed visually in the editor.
// This setting can take two values:
//
@@ -1259,7 +1346,16 @@
// "proxy": "",
// "proxy_no_verify": false
// },
// Whether edit predictions are enabled when editing text threads.
"copilot": {
"enterprise_uri": null,
"proxy": null,
"proxy_no_verify": null
},
"codestral": {
"model": null,
"max_tokens": null
},
// Whether edit predictions are enabled when editing text threads in the agent panel.
// This setting has no effect if globally disabled.
"enabled_in_text_threads": true
},
@@ -1275,10 +1371,14 @@
},
// Status bar-related settings.
"status_bar": {
// Whether to show the status bar.
"experimental.show": true,
// Whether to show the active language button in the status bar.
"active_language_button": true,
// Whether to show the cursor position button in the status bar.
"cursor_position_button": true
"cursor_position_button": true,
// Whether to show active line endings button in the status bar.
"line_endings_button": false
},
// Settings specific to the terminal
"terminal": {
@@ -1341,8 +1441,8 @@
// 4. A box drawn around the following character
// "hollow"
//
// Default: not set, defaults to "block"
"cursor_shape": null,
// Default: "block"
"cursor_shape": "block",
// Set whether Alternate Scroll mode (code: ?1007) is active by default.
// Alternate Scroll mode converts mouse scroll events into up / down key
// presses when in the alternate screen (e.g. when running applications
@@ -1364,8 +1464,8 @@
// Whether or not selecting text in the terminal will automatically
// copy to the system clipboard.
"copy_on_select": false,
// Whether to keep the text selection after copying it to the clipboard
"keep_selection_on_copy": false,
// Whether to keep the text selection after copying it to the clipboard.
"keep_selection_on_copy": true,
// Whether to show the terminal button in the status bar
"button": true,
// Any key-value pairs added to this list will be added to the terminal's
@@ -1384,7 +1484,7 @@
// "line_height": {
// "custom": 2
// },
"line_height": "comfortable",
"line_height": "standard",
// Activate the python virtual environment, if one is found, in the
// terminal's working directory (as resolved by the working_directory
// setting). Set this to "off" to disable this behavior.
@@ -1395,7 +1495,11 @@
// in your project's settings, rather than globally.
"directories": [".env", "env", ".venv", "venv"],
// Can also be `csh`, `fish`, `nushell` and `power_shell`
"activate_script": "default"
"activate_script": "default",
// Preferred Conda manager to use when activating Conda environments.
// Values: "auto", "conda", "mamba", "micromamba"
// Default: "auto"
"conda_manager": "auto"
}
},
"toolbar": {
@@ -1404,7 +1508,7 @@
//
// The shell running in the terminal needs to be configured to emit the title.
// Example: `echo -e "\e]2;New Title\007";`
"breadcrumbs": true
"breadcrumbs": false
},
// Scrollbar-related settings
"scrollbar": {
@@ -1484,7 +1588,8 @@
// }
//
"file_types": {
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json", "tsconfig*.json"],
"Markdown": [".rules", ".cursorrules", ".windsurfrules", ".clinerules"],
"Shell Script": [".env.*"]
},
// Settings for which version of Node.js and NPM to use when installing
@@ -1510,6 +1615,14 @@
"auto_install_extensions": {
"html": true
},
// The capabilities granted to extensions.
//
// This list can be customized to restrict what extensions are able to do.
"granted_extension_capabilities": [
{ "kind": "process:exec", "command": "*", "args": ["**"] },
{ "kind": "download_file", "host": "*", "path": ["**"] },
{ "kind": "npm:install", "package": "*" }
],
// Controls how completions are processed for this language.
"completions": {
// Controls how words are completed.
@@ -1617,6 +1730,7 @@
"preferred_line_length": 72
},
"Go": {
"hard_tabs": true,
"code_actions_on_format": {
"source.organizeImports": true
},
@@ -1635,6 +1749,9 @@
"allowed": true
}
},
"HTML+ERB": {
"language_servers": ["herb", "!ruby-lsp", "..."]
},
"Java": {
"prettier": {
"allowed": true,
@@ -1657,8 +1774,11 @@
"allowed": true
}
},
"JS+ERB": {
"language_servers": ["!ruby-lsp", "..."]
},
"Kotlin": {
"language_servers": ["kotlin-language-server", "!kotlin-lsp", "..."]
"language_servers": ["!kotlin-language-server", "kotlin-lsp", "..."]
},
"LaTeX": {
"formatter": "language_server",
@@ -1671,6 +1791,7 @@
"Markdown": {
"format_on_save": "off",
"use_on_type_format": false,
"remove_trailing_whitespace_on_save": false,
"allow_rewrap": "anywhere",
"soft_wrap": "editor_width",
"prettier": {
@@ -1686,10 +1807,20 @@
}
},
"Plain Text": {
"allow_rewrap": "anywhere"
"allow_rewrap": "anywhere",
"soft_wrap": "editor_width"
},
"Python": {
"debuggers": ["Debugpy"]
"code_actions_on_format": {
"source.organizeImports.ruff": true
},
"formatter": {
"language_server": {
"name": "ruff"
}
},
"debuggers": ["Debugpy"],
"language_servers": ["basedpyright", "ruff", "!ty", "!pyrefly", "!pyright", "!pylsp", "..."]
},
"Ruby": {
"language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "!sorbet", "!steep", "..."]
@@ -1731,10 +1862,11 @@
},
"SystemVerilog": {
"format_on_save": "off",
"language_servers": ["!slang", "..."],
"use_on_type_format": false
},
"Vue.js": {
"language_servers": ["vue-language-server", "..."],
"language_servers": ["vue-language-server", "vtsls", "..."],
"prettier": {
"allowed": true
}
@@ -1750,6 +1882,9 @@
"allowed": true
}
},
"YAML+ERB": {
"language_servers": ["!ruby-lsp", "..."]
},
"Zig": {
"language_servers": ["zls", "..."]
}
@@ -1759,6 +1894,7 @@
"anthropic": {
"api_url": "https://api.anthropic.com"
},
"bedrock": {},
"google": {
"api_url": "https://generativelanguage.googleapis.com"
},
@@ -1780,27 +1916,41 @@
},
"mistral": {
"api_url": "https://api.mistral.ai/v1"
}
},
"vercel": {
"api_url": "https://api.v0.dev/v1"
},
"x_ai": {
"api_url": "https://api.x.ai/v1"
},
"zed.dev": {}
},
"session": {
// Whether or not to restore unsaved buffers on restart.
//
// If this is true, user won't be prompted whether to save/discard
// dirty files when closing the application.
//
// Default: true
"restore_unsaved_buffers": true
},
// Zed's Prettier integration settings.
// Allows to enable/disable formatting with Prettier
// and configure default Prettier, used when no project-level Prettier installation is found.
"prettier": {
// // Whether to consider prettier formatter or not when attempting to format a file.
// "allowed": false,
//
// // Use regular Prettier json configuration.
// // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// // the project has no other Prettier installed.
// "plugins": [],
//
// // Use regular Prettier json configuration.
// // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
// // the project has no other Prettier installed.
// Enables or disables formatting with Prettier for any given language.
"allowed": false,
// Forces Prettier integration to use a specific parser name when formatting files with the language.
"plugins": [],
// Default Prettier options, in the format as in package.json section for Prettier.
// If project installs Prettier via its package.json, these options will be ignored.
// "trailingComma": "es5",
// "tabWidth": 4,
// "semi": false,
// "singleQuote": true
// Forces Prettier integration to use a specific parser name when formatting files with the language
// when set to a non-empty string.
"parser": ""
},
// Settings for auto-closing of JSX tags.
"jsx_tag_auto_close": {
@@ -1820,6 +1970,15 @@
// }
// }
},
// DAP Specific settings.
"dap": {
// Specify the DAP name as a key here.
"CodeLLDB": {
"env": {
"RUST_LOG": "info"
}
}
},
// Common language server settings.
"global_lsp_settings": {
// Whether to show the LSP servers button in the status bar.
@@ -1827,13 +1986,23 @@
},
// Jupyter settings
"jupyter": {
"enabled": true
"enabled": true,
"kernel_selections": {}
// Specify the language name as the key and the kernel name as the value.
// "kernel_selections": {
// "python": "conda-base"
// "typescript": "deno"
// }
},
// REPL settings.
"repl": {
// Maximum number of columns to keep in REPL's scrollback buffer.
// Clamped with [20, 512] range.
"max_columns": 128,
// Maximum number of lines to keep in REPL's scrollback buffer.
// Clamped with [4, 256] range.
"max_lines": 32
},
// Vim settings
"vim": {
"default_mode": "normal",
@@ -1936,7 +2105,7 @@
// Examples:
// "profiles": {
// "Presenting": {
// "agent_font_size": 20.0,
// "agent_ui_font_size": 20.0,
// "buffer_font_size": 20.0,
// "theme": "One Light",
// "ui_font_size": 20.0
@@ -1949,5 +2118,11 @@
// }
// }
// }
"profiles": []
"profiles": {},
// A map of log scopes to the desired log level.
// Useful for filtering out noisy logs or enabling more verbose logging.
//
// Example: {"log": {"client": "warn"}}
"log": {}
}

View File

@@ -43,7 +43,11 @@
// "args": ["--login"]
// }
// }
"shell": "system"
"shell": "system",
// Whether to show the task line in the output of the spawned task, defaults to `true`.
"show_summary": true,
// Whether to show the command line in the output of the spawned task, defaults to `true`.
"show_command": true
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
}

Binary file not shown.

View File

@@ -192,7 +192,7 @@
"font_weight": null
},
"comment": {
"color": "#abb5be8c",
"color": "#5c6773ff",
"font_style": null,
"font_weight": null
},
@@ -239,7 +239,7 @@
"hint": {
"color": "#628b80ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#ff8f3fff",
@@ -316,6 +316,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#a6a5a0ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#d2a6ffff",
"font_style": null,
@@ -578,7 +583,7 @@
"font_weight": null
},
"comment": {
"color": "#787b8099",
"color": "#abb0b6ff",
"font_style": null,
"font_weight": null
},
@@ -625,7 +630,7 @@
"hint": {
"color": "#8ca7c2ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#fa8d3eff",
@@ -702,6 +707,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#73777bff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#a37accff",
"font_style": null,
@@ -964,7 +974,7 @@
"font_weight": null
},
"comment": {
"color": "#b8cfe680",
"color": "#5c6773ff",
"font_style": null,
"font_weight": null
},
@@ -1011,7 +1021,7 @@
"hint": {
"color": "#7399a3ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#ffad65ff",
@@ -1088,6 +1098,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#b4b3aeff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#dfbfffff",
"font_style": null,

View File

@@ -6,8 +6,8 @@
{
"name": "Gruvbox Dark",
"appearance": "dark",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#5b534dff",
"border.variant": "#494340ff",
"border.focused": "#303a36ff",
@@ -49,8 +49,9 @@
"panel.background": "#3a3735ff",
"panel.focused_border": "#83a598ff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#fbf1c74c",
"scrollbar.thumb.hover_background": "#494340ff",
"scrollbar.thumb.active_background": "#83a598ac",
"scrollbar.thumb.hover_background": "#fbf1c74c",
"scrollbar.thumb.background": "#a899844c",
"scrollbar.thumb.border": "#494340ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#373432ff",
@@ -248,7 +249,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -325,6 +326,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#e5d5adff",
"font_style": null,
@@ -406,8 +412,8 @@
{
"name": "Gruvbox Dark Hard",
"appearance": "dark",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#5b534dff",
"border.variant": "#494340ff",
"border.focused": "#303a36ff",
@@ -449,8 +455,9 @@
"panel.background": "#393634ff",
"panel.focused_border": "#83a598ff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#fbf1c74c",
"scrollbar.thumb.hover_background": "#494340ff",
"scrollbar.thumb.active_background": "#83a598ac",
"scrollbar.thumb.hover_background": "#fbf1c74c",
"scrollbar.thumb.background": "#a899844c",
"scrollbar.thumb.border": "#494340ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#343130ff",
@@ -648,7 +655,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -725,6 +732,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#e5d5adff",
"font_style": null,
@@ -806,8 +818,8 @@
{
"name": "Gruvbox Dark Soft",
"appearance": "dark",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#5b534dff",
"border.variant": "#494340ff",
"border.focused": "#303a36ff",
@@ -849,8 +861,9 @@
"panel.background": "#3b3735ff",
"panel.focused_border": null,
"pane.focused_border": null,
"scrollbar.thumb.background": "#fbf1c74c",
"scrollbar.thumb.hover_background": "#494340ff",
"scrollbar.thumb.active_background": "#83a598ac",
"scrollbar.thumb.hover_background": "#fbf1c74c",
"scrollbar.thumb.background": "#a899844c",
"scrollbar.thumb.border": "#494340ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#393634ff",
@@ -1048,7 +1061,7 @@
"hint": {
"color": "#8c957dff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#fb4833ff",
@@ -1125,6 +1138,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#e5d5adff",
"font_style": null,
@@ -1206,8 +1224,8 @@
{
"name": "Gruvbox Light",
"appearance": "light",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#c8b899ff",
"border.variant": "#ddcca7ff",
"border.focused": "#adc5ccff",
@@ -1249,8 +1267,9 @@
"panel.background": "#ecddb4ff",
"panel.focused_border": null,
"pane.focused_border": null,
"scrollbar.thumb.background": "#2828284c",
"scrollbar.thumb.hover_background": "#ddcca7ff",
"scrollbar.thumb.active_background": "#458588ac",
"scrollbar.thumb.hover_background": "#2828284c",
"scrollbar.thumb.background": "#7c6f644c",
"scrollbar.thumb.border": "#ddcca7ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#eee0b7ff",
@@ -1448,7 +1467,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#9d0006ff",
@@ -1525,6 +1544,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#066578ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#413d3aff",
"font_style": null,
@@ -1606,8 +1630,8 @@
{
"name": "Gruvbox Light Hard",
"appearance": "light",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#c8b899ff",
"border.variant": "#ddcca7ff",
"border.focused": "#adc5ccff",
@@ -1649,8 +1673,9 @@
"panel.background": "#ecddb5ff",
"panel.focused_border": null,
"pane.focused_border": null,
"scrollbar.thumb.background": "#2828284c",
"scrollbar.thumb.hover_background": "#ddcca7ff",
"scrollbar.thumb.active_background": "#458588ac",
"scrollbar.thumb.hover_background": "#2828284c",
"scrollbar.thumb.background": "#7c6f644c",
"scrollbar.thumb.border": "#ddcca7ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#eee1bbff",
@@ -1848,7 +1873,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#9d0006ff",
@@ -1925,6 +1950,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#066578ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#413d3aff",
"font_style": null,
@@ -2006,8 +2036,8 @@
{
"name": "Gruvbox Light Soft",
"appearance": "light",
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"style": {
"accents": ["#cc241dff", "#98971aff", "#d79921ff", "#458588ff", "#b16286ff", "#689d6aff", "#d65d0eff"],
"border": "#c8b899ff",
"border.variant": "#ddcca7ff",
"border.focused": "#adc5ccff",
@@ -2049,8 +2079,9 @@
"panel.background": "#ecdcb3ff",
"panel.focused_border": null,
"pane.focused_border": null,
"scrollbar.thumb.background": "#2828284c",
"scrollbar.thumb.hover_background": "#ddcca7ff",
"scrollbar.thumb.active_background": "#458588ac",
"scrollbar.thumb.hover_background": "#2828284c",
"scrollbar.thumb.background": "#7c6f644c",
"scrollbar.thumb.border": "#ddcca7ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#eddeb5ff",
@@ -2248,7 +2279,7 @@
"hint": {
"color": "#677562ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#9d0006ff",
@@ -2325,6 +2356,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#066578ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#413d3aff",
"font_style": null,

View File

@@ -244,7 +244,7 @@
"hint": {
"color": "#788ca6ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#b477cfff",
@@ -321,6 +321,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#d07277ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#b1574bff",
"font_style": null,
@@ -638,7 +643,7 @@
"hint": {
"color": "#7274a7ff",
"font_style": null,
"font_weight": 700
"font_weight": null
},
"keyword": {
"color": "#a449abff",
@@ -715,6 +720,11 @@
"font_style": null,
"font_weight": null
},
"punctuation.markup": {
"color": "#d3604fff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#b92b46ff",
"font_style": null,

21
ci/Dockerfile.namespace Normal file
View File

@@ -0,0 +1,21 @@
ARG NAMESPACE_BASE_IMAGE_REF=""
# Your image must build FROM NAMESPACE_BASE_IMAGE_REF
FROM ${NAMESPACE_BASE_IMAGE_REF} AS base
# Remove problematic git-lfs packagecloud source
RUN sudo rm -f /etc/apt/sources.list.d/*git-lfs*.list
# Install git and SSH for cloning private repositories
RUN sudo apt-get update && \
sudo apt-get install -y git openssh-client
# Clone the Zed repository
RUN git clone https://github.com/zed-industries/zed.git ~/zed
# Run the Linux installation script
WORKDIR /home/runner/zed
RUN ./script/linux
# Clean up unnecessary files to reduce image size
RUN sudo apt-get clean && sudo rm -rf \
/home/runner/zed

View File

@@ -3,5 +3,21 @@ avoid-breaking-exported-api = false
ignore-interior-mutability = [
# Suppresses clippy::mutable_key_type, which is a false positive as the Eq
# and Hash impls do not use fields with interior mutability.
"agent::context::AgentContextKey"
"agent_ui::context::AgentContextKey"
]
disallowed-methods = [
{ path = "std::process::Command::spawn", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::spawn" },
{ path = "std::process::Command::output", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::output" },
{ path = "std::process::Command::status", reason = "Spawning `std::process::Command` can block the current thread for an unknown duration", replacement = "smol::process::Command::status" },
{ path = "std::process::Command::stdin", reason = "`smol::process::Command::from()` does not preserve stdio configuration", replacement = "smol::process::Command::stdin" },
{ path = "std::process::Command::stdout", reason = "`smol::process::Command::from()` does not preserve stdio configuration", replacement = "smol::process::Command::stdout" },
{ path = "std::process::Command::stderr", reason = "`smol::process::Command::from()` does not preserve stdio configuration", replacement = "smol::process::Command::stderr" },
{ path = "serde_json::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892. Use `serde_json::from_slice` instead." },
{ path = "serde_json_lenient::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892, Use `serde_json_lenient::from_slice` instead." },
]
disallowed-types = [
# { path = "std::collections::HashMap", replacement = "collections::HashMap" },
# { path = "std::collections::HashSet", replacement = "collections::HashSet" },
# { path = "indexmap::IndexSet", replacement = "collections::IndexSet" },
# { path = "indexmap::IndexMap", replacement = "collections::IndexMap" },
]

View File

@@ -1,6 +1,6 @@
services:
postgres:
image: postgres:15
image: docker.io/library/postgres:15
container_name: zed_postgres
ports:
- 5432:5432
@@ -23,7 +23,7 @@ services:
- ./.blob_store:/data
livekit_server:
image: livekit/livekit-server
image: docker.io/livekit/livekit-server
container_name: livekit_server
entrypoint: /livekit-server --config /livekit.yaml
ports:
@@ -33,34 +33,8 @@ services:
volumes:
- ./livekit.yaml:/livekit.yaml
postgrest_app:
image: postgrest/postgrest
container_name: postgrest_app
ports:
- 8081:8081
environment:
PGRST_DB_URI: postgres://postgres@postgres:5432/zed
volumes:
- ./crates/collab/postgrest_app.conf:/etc/postgrest.conf
command: postgrest /etc/postgrest.conf
depends_on:
- postgres
postgrest_llm:
image: postgrest/postgrest
container_name: postgrest_llm
ports:
- 8082:8082
environment:
PGRST_DB_URI: postgres://postgres@postgres:5432/zed_llm
volumes:
- ./crates/collab/postgrest_llm.conf:/etc/postgrest.conf
command: postgrest /etc/postgrest.conf
depends_on:
- postgres
stripe-mock:
image: stripe/stripe-mock:v0.178.0
image: docker.io/stripe/stripe-mock:v0.178.0
ports:
- 12111:12111
- 12112:12112

View File

@@ -18,8 +18,8 @@ test-support = ["gpui/test-support", "project/test-support", "dep:parking_lot"]
[dependencies]
action_log.workspace = true
agent-client-protocol.workspace = true
anyhow.workspace = true
agent_settings.workspace = true
anyhow.workspace = true
buffer_diff.workspace = true
collections.workspace = true
editor.workspace = true
@@ -39,14 +39,13 @@ serde_json.workspace = true
settings.workspace = true
smol.workspace = true
task.workspace = true
telemetry.workspace = true
terminal.workspace = true
ui.workspace = true
url.workspace = true
util.workspace = true
uuid.workspace = true
watch.workspace = true
which.workspace = true
workspace-hack.workspace = true
[dev-dependencies]
env_logger.workspace = true
@@ -58,3 +57,4 @@ rand.workspace = true
tempfile.workspace = true
util.workspace = true
settings.workspace = true
zlog.workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,8 @@ impl UserMessageId {
}
pub trait AgentConnection {
fn telemetry_id(&self) -> &'static str;
fn new_thread(
self: Rc<Self>,
project: Entity<Project>,
@@ -68,13 +70,22 @@ pub trait AgentConnection {
///
/// If the agent does not support model selection, returns [None].
/// This allows sharing the selector in UI components.
fn model_selector(&self) -> Option<Rc<dyn AgentModelSelector>> {
fn model_selector(&self, _session_id: &acp::SessionId) -> Option<Rc<dyn AgentModelSelector>> {
None
}
fn telemetry(&self) -> Option<Rc<dyn AgentTelemetry>> {
None
}
fn session_modes(
&self,
_session_id: &acp::SessionId,
_cx: &App,
) -> Option<Rc<dyn AgentSessionModes>> {
None
}
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
}
@@ -97,9 +108,6 @@ pub trait AgentSessionSetTitle {
}
pub trait AgentTelemetry {
/// The name of the agent used for telemetry.
fn agent_name(&self) -> String;
/// A representation of the current thread state that can be serialized for
/// storage with telemetry events.
fn thread_data(
@@ -109,6 +117,14 @@ pub trait AgentTelemetry {
) -> Task<Result<serde_json::Value>>;
}
pub trait AgentSessionModes {
fn current_mode(&self) -> acp::SessionModeId;
fn all_modes(&self) -> Vec<acp::SessionMode>;
fn set_mode(&self, mode: acp::SessionModeId, cx: &mut App) -> Task<Result<()>>;
}
#[derive(Debug)]
pub struct AuthRequired {
pub description: Option<String>,
@@ -160,61 +176,48 @@ pub trait AgentModelSelector: 'static {
/// If the session doesn't exist or the model is invalid, it returns an error.
///
/// # Parameters
/// - `session_id`: The ID of the session (thread) to apply the model to.
/// - `model`: The model to select (should be one from [list_models]).
/// - `cx`: The GPUI app context.
///
/// # Returns
/// A task resolving to `Ok(())` on success or an error.
fn select_model(
&self,
session_id: acp::SessionId,
model_id: AgentModelId,
cx: &mut App,
) -> Task<Result<()>>;
fn select_model(&self, model_id: acp::ModelId, cx: &mut App) -> Task<Result<()>>;
/// Retrieves the currently selected model for a specific session (thread).
///
/// # Parameters
/// - `session_id`: The ID of the session (thread) to query.
/// - `cx`: The GPUI app context.
///
/// # Returns
/// A task resolving to the selected model (always set) or an error (e.g., session not found).
fn selected_model(
&self,
session_id: &acp::SessionId,
cx: &mut App,
) -> Task<Result<AgentModelInfo>>;
fn selected_model(&self, cx: &mut App) -> Task<Result<AgentModelInfo>>;
/// Whenever the model list is updated the receiver will be notified.
fn watch(&self, cx: &mut App) -> watch::Receiver<()>;
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct AgentModelId(pub SharedString);
impl std::ops::Deref for AgentModelId {
type Target = SharedString;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl fmt::Display for AgentModelId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
/// Optional for agents that don't update their model list.
fn watch(&self, _cx: &mut App) -> Option<watch::Receiver<()>> {
None
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AgentModelInfo {
pub id: AgentModelId,
pub id: acp::ModelId,
pub name: SharedString,
pub description: Option<SharedString>,
pub icon: Option<IconName>,
}
impl From<acp::ModelInfo> for AgentModelInfo {
fn from(info: acp::ModelInfo) -> Self {
Self {
id: info.model_id,
name: info.name.into(),
description: info.description.map(|desc| desc.into()),
icon: None,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct AgentModelGroupName(pub SharedString);
@@ -314,6 +317,10 @@ mod test_support {
}
impl AgentConnection for StubAgentConnection {
fn telemetry_id(&self) -> &'static str {
"stub"
}
fn auth_methods(&self) -> &[acp::AuthMethod] {
&[]
}
@@ -337,8 +344,8 @@ mod test_support {
image: true,
audio: true,
embedded_context: true,
meta: None,
}),
vec![],
cx,
)
});
@@ -377,7 +384,10 @@ mod test_support {
response_tx.replace(tx);
cx.spawn(async move |_| {
let stop_reason = rx.await?;
Ok(acp::PromptResponse { stop_reason })
Ok(acp::PromptResponse {
stop_reason,
meta: None,
})
})
} else {
for update in self.next_prompt_updates.lock().drain(..) {
@@ -398,6 +408,7 @@ mod test_support {
thread.request_tool_call_authorization(
tool_call.clone().into(),
options.clone(),
false,
cx,
)
})??
@@ -415,6 +426,7 @@ mod test_support {
try_join_all(tasks).await?;
Ok(acp::PromptResponse {
stop_reason: acp::StopReason::EndTurn,
meta: None,
})
})
}

View File

@@ -6,12 +6,7 @@ use itertools::Itertools;
use language::{
Anchor, Buffer, Capability, LanguageRegistry, OffsetRangeExt as _, Point, Rope, TextBuffer,
};
use std::{
cmp::Reverse,
ops::Range,
path::{Path, PathBuf},
sync::Arc,
};
use std::{cmp::Reverse, ops::Range, path::Path, sync::Arc};
use util::ResultExt;
pub enum Diff {
@@ -21,7 +16,7 @@ pub enum Diff {
impl Diff {
pub fn finalized(
path: PathBuf,
path: String,
old_text: Option<String>,
new_text: String,
language_registry: Arc<LanguageRegistry>,
@@ -36,7 +31,7 @@ impl Diff {
let buffer = new_buffer.clone();
async move |_, cx| {
let language = language_registry
.language_for_file_path(&path)
.load_language_for_file_path(Path::new(&path))
.await
.log_err();
@@ -152,12 +147,15 @@ impl Diff {
let path = match self {
Diff::Pending(PendingDiff {
new_buffer: buffer, ..
}) => buffer.read(cx).file().map(|file| file.path().as_ref()),
Diff::Finalized(FinalizedDiff { path, .. }) => Some(path.as_path()),
}) => buffer
.read(cx)
.file()
.map(|file| file.path().display(file.path_style(cx))),
Diff::Finalized(FinalizedDiff { path, .. }) => Some(path.as_str().into()),
};
format!(
"Diff: {}\n```\n{}\n```\n",
path.unwrap_or(Path::new("untitled")).display(),
path.unwrap_or("untitled".into()),
buffer_text
)
}
@@ -238,21 +236,21 @@ impl PendingDiff {
fn finalize(&self, cx: &mut Context<Diff>) -> FinalizedDiff {
let ranges = self.excerpt_ranges(cx);
let base_text = self.base_text.clone();
let language_registry = self.new_buffer.read(cx).language_registry();
let new_buffer = self.new_buffer.read(cx);
let language_registry = new_buffer.language_registry();
let path = self
.new_buffer
.read(cx)
let path = new_buffer
.file()
.map(|file| file.path().as_ref())
.unwrap_or(Path::new("untitled"))
.map(|file| file.path().display(file.path_style(cx)))
.unwrap_or("untitled".into())
.into();
let replica_id = new_buffer.replica_id();
// Replace the buffer in the multibuffer with the snapshot
let buffer = cx.new(|cx| {
let language = self.new_buffer.read(cx).language().cloned();
let buffer = TextBuffer::new_normalized(
0,
replica_id,
cx.entity_id().as_non_zero_u64().into(),
self.new_buffer.read(cx).line_ending(),
self.new_buffer.read(cx).as_rope().clone(),
@@ -348,7 +346,7 @@ impl PendingDiff {
}
pub struct FinalizedDiff {
path: PathBuf,
path: String,
base_text: Arc<String>,
new_buffer: Entity<Buffer>,
multibuffer: Entity<MultiBuffer>,

View File

@@ -7,10 +7,10 @@ use std::{
fmt,
ops::RangeInclusive,
path::{Path, PathBuf},
str::FromStr,
};
use ui::{App, IconName, SharedString};
use url::Url;
use util::paths::PathStyle;
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Hash)]
pub enum MentionUri {
@@ -49,7 +49,7 @@ pub enum MentionUri {
}
impl MentionUri {
pub fn parse(input: &str) -> Result<Self> {
pub fn parse(input: &str, path_style: PathStyle) -> Result<Self> {
fn parse_line_range(fragment: &str) -> Result<RangeInclusive<u32>> {
let range = fragment
.strip_prefix("L")
@@ -74,25 +74,34 @@ impl MentionUri {
let path = url.path();
match url.scheme() {
"file" => {
let path = url.to_file_path().ok().context("Extracting file path")?;
let path = if path_style.is_windows() {
path.trim_start_matches("/")
} else {
path
};
if let Some(fragment) = url.fragment() {
let line_range = parse_line_range(fragment)?;
if let Some(name) = single_query_param(&url, "symbol")? {
Ok(Self::Symbol {
name,
abs_path: path,
abs_path: path.into(),
line_range,
})
} else {
Ok(Self::Selection {
abs_path: Some(path),
abs_path: Some(path.into()),
line_range,
})
}
} else if input.ends_with("/") {
Ok(Self::Directory { abs_path: path })
Ok(Self::Directory {
abs_path: path.into(),
})
} else {
Ok(Self::File { abs_path: path })
Ok(Self::File {
abs_path: path.into(),
})
}
}
"zed" => {
@@ -126,6 +135,39 @@ impl MentionUri {
abs_path: None,
line_range,
})
} else if let Some(name) = path.strip_prefix("/agent/symbol/") {
let fragment = url
.fragment()
.context("Missing fragment for untitled buffer selection")?;
let line_range = parse_line_range(fragment)?;
let path =
single_query_param(&url, "path")?.context("Missing path for symbol")?;
Ok(Self::Symbol {
name: name.to_string(),
abs_path: path.into(),
line_range,
})
} else if path.starts_with("/agent/file") {
let path =
single_query_param(&url, "path")?.context("Missing path for file")?;
Ok(Self::File {
abs_path: path.into(),
})
} else if path.starts_with("/agent/directory") {
let path =
single_query_param(&url, "path")?.context("Missing path for directory")?;
Ok(Self::Directory {
abs_path: path.into(),
})
} else if path.starts_with("/agent/selection") {
let fragment = url.fragment().context("Missing fragment for selection")?;
let line_range = parse_line_range(fragment)?;
let path =
single_query_param(&url, "path")?.context("Missing path for selection")?;
Ok(Self::Selection {
abs_path: Some(path.into()),
line_range,
})
} else {
bail!("invalid zed url: {:?}", input);
}
@@ -162,7 +204,7 @@ impl MentionUri {
FileIcons::get_icon(abs_path, cx).unwrap_or_else(|| IconName::File.path().into())
}
MentionUri::PastedImage => IconName::Image.path().into(),
MentionUri::Directory { .. } => FileIcons::get_folder_icon(false, cx)
MentionUri::Directory { abs_path } => FileIcons::get_folder_icon(false, abs_path, cx)
.unwrap_or_else(|| IconName::Folder.path().into()),
MentionUri::Symbol { .. } => IconName::Code.path().into(),
MentionUri::Thread { .. } => IconName::Thread.path().into(),
@@ -180,19 +222,23 @@ impl MentionUri {
pub fn to_uri(&self) -> Url {
match self {
MentionUri::File { abs_path } => {
Url::from_file_path(abs_path).expect("mention path should be absolute")
let mut url = Url::parse("file:///").unwrap();
url.set_path(&abs_path.to_string_lossy());
url
}
MentionUri::PastedImage => Url::parse("zed:///agent/pasted-image").unwrap(),
MentionUri::Directory { abs_path } => {
Url::from_directory_path(abs_path).expect("mention path should be absolute")
let mut url = Url::parse("file:///").unwrap();
url.set_path(&abs_path.to_string_lossy());
url
}
MentionUri::Symbol {
abs_path,
name,
line_range,
} => {
let mut url =
Url::from_file_path(abs_path).expect("mention path should be absolute");
let mut url = Url::parse("file:///").unwrap();
url.set_path(&abs_path.to_string_lossy());
url.query_pairs_mut().append_pair("symbol", name);
url.set_fragment(Some(&format!(
"L{}:{}",
@@ -202,11 +248,13 @@ impl MentionUri {
url
}
MentionUri::Selection {
abs_path: path,
abs_path,
line_range,
} => {
let mut url = if let Some(path) = path {
Url::from_file_path(path).expect("mention path should be absolute")
let mut url = if let Some(path) = abs_path {
let mut url = Url::parse("file:///").unwrap();
url.set_path(&path.to_string_lossy());
url
} else {
let mut url = Url::parse("zed:///").unwrap();
url.set_path("/agent/untitled-buffer");
@@ -245,14 +293,6 @@ impl MentionUri {
}
}
impl FromStr for MentionUri {
type Err = anyhow::Error;
fn from_str(s: &str) -> anyhow::Result<Self> {
Self::parse(s)
}
}
pub struct MentionLink<'a>(&'a MentionUri);
impl fmt::Display for MentionLink<'_> {
@@ -296,10 +336,10 @@ mod tests {
#[test]
fn test_parse_file_uri() {
let file_uri = uri!("file:///path/to/file.rs");
let parsed = MentionUri::parse(file_uri).unwrap();
let parsed = MentionUri::parse(file_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::File { abs_path } => {
assert_eq!(abs_path.to_str().unwrap(), path!("/path/to/file.rs"));
assert_eq!(abs_path, Path::new(path!("/path/to/file.rs")));
}
_ => panic!("Expected File variant"),
}
@@ -309,10 +349,10 @@ mod tests {
#[test]
fn test_parse_directory_uri() {
let file_uri = uri!("file:///path/to/dir/");
let parsed = MentionUri::parse(file_uri).unwrap();
let parsed = MentionUri::parse(file_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Directory { abs_path } => {
assert_eq!(abs_path.to_str().unwrap(), path!("/path/to/dir/"));
assert_eq!(abs_path, Path::new(path!("/path/to/dir/")));
}
_ => panic!("Expected Directory variant"),
}
@@ -320,7 +360,7 @@ mod tests {
}
#[test]
fn test_to_directory_uri_with_slash() {
fn test_to_directory_uri_without_slash() {
let uri = MentionUri::Directory {
abs_path: PathBuf::from(path!("/path/to/dir/")),
};
@@ -328,26 +368,17 @@ mod tests {
assert_eq!(uri.to_uri().to_string(), expected);
}
#[test]
fn test_to_directory_uri_without_slash() {
let uri = MentionUri::Directory {
abs_path: PathBuf::from(path!("/path/to/dir")),
};
let expected = uri!("file:///path/to/dir/");
assert_eq!(uri.to_uri().to_string(), expected);
}
#[test]
fn test_parse_symbol_uri() {
let symbol_uri = uri!("file:///path/to/file.rs?symbol=MySymbol#L10:20");
let parsed = MentionUri::parse(symbol_uri).unwrap();
let parsed = MentionUri::parse(symbol_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Symbol {
abs_path: path,
name,
line_range,
} => {
assert_eq!(path.to_str().unwrap(), path!("/path/to/file.rs"));
assert_eq!(path, Path::new(path!("/path/to/file.rs")));
assert_eq!(name, "MySymbol");
assert_eq!(line_range.start(), &9);
assert_eq!(line_range.end(), &19);
@@ -360,16 +391,13 @@ mod tests {
#[test]
fn test_parse_selection_uri() {
let selection_uri = uri!("file:///path/to/file.rs#L5:15");
let parsed = MentionUri::parse(selection_uri).unwrap();
let parsed = MentionUri::parse(selection_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Selection {
abs_path: path,
line_range,
} => {
assert_eq!(
path.as_ref().unwrap().to_str().unwrap(),
path!("/path/to/file.rs")
);
assert_eq!(path.as_ref().unwrap(), Path::new(path!("/path/to/file.rs")));
assert_eq!(line_range.start(), &4);
assert_eq!(line_range.end(), &14);
}
@@ -381,7 +409,7 @@ mod tests {
#[test]
fn test_parse_untitled_selection_uri() {
let selection_uri = uri!("zed:///agent/untitled-buffer#L1:10");
let parsed = MentionUri::parse(selection_uri).unwrap();
let parsed = MentionUri::parse(selection_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Selection {
abs_path: None,
@@ -398,7 +426,7 @@ mod tests {
#[test]
fn test_parse_thread_uri() {
let thread_uri = "zed:///agent/thread/session123?name=Thread+name";
let parsed = MentionUri::parse(thread_uri).unwrap();
let parsed = MentionUri::parse(thread_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Thread {
id: thread_id,
@@ -415,7 +443,7 @@ mod tests {
#[test]
fn test_parse_rule_uri() {
let rule_uri = "zed:///agent/rule/d8694ff2-90d5-4b6f-be33-33c1763acd52?name=Some+rule";
let parsed = MentionUri::parse(rule_uri).unwrap();
let parsed = MentionUri::parse(rule_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Rule { id, name } => {
assert_eq!(id.to_string(), "d8694ff2-90d5-4b6f-be33-33c1763acd52");
@@ -429,7 +457,7 @@ mod tests {
#[test]
fn test_parse_fetch_http_uri() {
let http_uri = "http://example.com/path?query=value#fragment";
let parsed = MentionUri::parse(http_uri).unwrap();
let parsed = MentionUri::parse(http_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Fetch { url } => {
assert_eq!(url.to_string(), http_uri);
@@ -442,7 +470,7 @@ mod tests {
#[test]
fn test_parse_fetch_https_uri() {
let https_uri = "https://example.com/api/endpoint";
let parsed = MentionUri::parse(https_uri).unwrap();
let parsed = MentionUri::parse(https_uri, PathStyle::local()).unwrap();
match &parsed {
MentionUri::Fetch { url } => {
assert_eq!(url.to_string(), https_uri);
@@ -454,40 +482,55 @@ mod tests {
#[test]
fn test_invalid_scheme() {
assert!(MentionUri::parse("ftp://example.com").is_err());
assert!(MentionUri::parse("ssh://example.com").is_err());
assert!(MentionUri::parse("unknown://example.com").is_err());
assert!(MentionUri::parse("ftp://example.com", PathStyle::local()).is_err());
assert!(MentionUri::parse("ssh://example.com", PathStyle::local()).is_err());
assert!(MentionUri::parse("unknown://example.com", PathStyle::local()).is_err());
}
#[test]
fn test_invalid_zed_path() {
assert!(MentionUri::parse("zed:///invalid/path").is_err());
assert!(MentionUri::parse("zed:///agent/unknown/test").is_err());
assert!(MentionUri::parse("zed:///invalid/path", PathStyle::local()).is_err());
assert!(MentionUri::parse("zed:///agent/unknown/test", PathStyle::local()).is_err());
}
#[test]
fn test_invalid_line_range_format() {
// Missing L prefix
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#10:20")).is_err());
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#10:20"), PathStyle::local()).is_err()
);
// Missing colon separator
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L1020")).is_err());
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#L1020"), PathStyle::local()).is_err()
);
// Invalid numbers
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L10:abc")).is_err());
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#Labc:20")).is_err());
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#L10:abc"), PathStyle::local()).is_err()
);
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#Labc:20"), PathStyle::local()).is_err()
);
}
#[test]
fn test_invalid_query_parameters() {
// Invalid query parameter name
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L10:20?invalid=test")).is_err());
assert!(
MentionUri::parse(
uri!("file:///path/to/file.rs#L10:20?invalid=test"),
PathStyle::local()
)
.is_err()
);
// Too many query parameters
assert!(
MentionUri::parse(uri!(
"file:///path/to/file.rs#L10:20?symbol=test&another=param"
))
MentionUri::parse(
uri!("file:///path/to/file.rs#L10:20?symbol=test&another=param"),
PathStyle::local()
)
.is_err()
);
}
@@ -495,8 +538,14 @@ mod tests {
#[test]
fn test_zero_based_line_numbers() {
// Test that 0-based line numbers are rejected (should be 1-based)
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L0:10")).is_err());
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L1:0")).is_err());
assert!(MentionUri::parse(uri!("file:///path/to/file.rs#L0:0")).is_err());
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#L0:10"), PathStyle::local()).is_err()
);
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#L1:0"), PathStyle::local()).is_err()
);
assert!(
MentionUri::parse(uri!("file:///path/to/file.rs#L0:0"), PathStyle::local()).is_err()
);
}
}

View File

@@ -1,10 +1,13 @@
use agent_client_protocol as acp;
use anyhow::Result;
use futures::{FutureExt as _, future::Shared};
use gpui::{App, AppContext, Context, Entity, Task};
use gpui::{App, AppContext, AsyncApp, Context, Entity, Task};
use language::LanguageRegistry;
use markdown::Markdown;
use project::Project;
use std::{path::PathBuf, process::ExitStatus, sync::Arc, time::Instant};
use task::Shell;
use util::get_default_system_shell_preferring_bash;
pub struct Terminal {
id: acp::TerminalId,
@@ -28,7 +31,7 @@ pub struct TerminalOutput {
impl Terminal {
pub fn new(
id: acp::TerminalId,
command: String,
command_label: &str,
working_dir: Option<PathBuf>,
output_byte_limit: Option<usize>,
terminal: Entity<terminal::Terminal>,
@@ -40,7 +43,7 @@ impl Terminal {
id,
command: cx.new(|cx| {
Markdown::new(
format!("```\n{}\n```", command).into(),
format!("```\n{}\n```", command_label).into(),
Some(language_registry.clone()),
None,
cx,
@@ -75,6 +78,7 @@ impl Terminal {
acp::TerminalExitStatus {
exit_code: exit_status.as_ref().map(|e| e.exit_code()),
signal: exit_status.and_then(|e| e.signal().map(Into::into)),
meta: None,
}
})
.shared(),
@@ -105,7 +109,9 @@ impl Terminal {
exit_status: Some(acp::TerminalExitStatus {
exit_code: exit_status.as_ref().map(|e| e.exit_code()),
signal: exit_status.and_then(|e| e.signal().map(Into::into)),
meta: None,
}),
meta: None,
}
} else {
let (current_content, original_len) = self.truncated_output(cx);
@@ -114,6 +120,7 @@ impl Terminal {
truncated: current_content.len() < original_len,
output: current_content,
exit_status: None,
meta: None,
}
}
}
@@ -166,3 +173,60 @@ impl Terminal {
)
}
}
pub async fn create_terminal_entity(
command: String,
args: &[String],
env_vars: Vec<(String, String)>,
cwd: Option<PathBuf>,
project: &Entity<Project>,
cx: &mut AsyncApp,
) -> Result<Entity<terminal::Terminal>> {
let mut env = if let Some(dir) = &cwd {
project
.update(cx, |project, cx| {
project.environment().update(cx, |env, cx| {
env.directory_environment(dir.clone().into(), cx)
})
})?
.await
.unwrap_or_default()
} else {
Default::default()
};
// Disables paging for `git` and hopefully other commands
env.insert("PAGER".into(), "".into());
env.extend(env_vars);
// Use remote shell or default system shell, as appropriate
let shell = project
.update(cx, |project, cx| {
project
.remote_client()
.and_then(|r| r.read(cx).default_system_shell())
.map(Shell::Program)
})?
.unwrap_or_else(|| Shell::Program(get_default_system_shell_preferring_bash()));
let is_windows = project
.read_with(cx, |project, cx| project.path_style(cx).is_windows())
.unwrap_or(cfg!(windows));
let (task_command, task_args) = task::ShellBuilder::new(&shell, is_windows)
.redirect_stdin_to_dev_null()
.build(Some(command.clone()), &args);
project
.update(cx, |project, cx| {
project.create_terminal_task(
task::SpawnInTerminal {
command: Some(task_command),
args: task_args,
cwd,
env,
..Default::default()
},
cx,
)
})?
.await
}

View File

@@ -26,5 +26,4 @@ settings.workspace = true
theme.workspace = true
ui.workspace = true
util.workspace = true
workspace-hack.workspace = true
workspace.workspace = true

View File

@@ -4,22 +4,26 @@ use std::{
fmt::Display,
rc::{Rc, Weak},
sync::Arc,
time::Duration,
};
use agent_client_protocol as acp;
use collections::HashMap;
use gpui::{
App, Empty, Entity, EventEmitter, FocusHandle, Focusable, Global, ListAlignment, ListState,
StyleRefinement, Subscription, Task, TextStyleRefinement, Window, actions, list, prelude::*,
App, ClipboardItem, Empty, Entity, EventEmitter, FocusHandle, Focusable, Global, ListAlignment,
ListState, StyleRefinement, Subscription, Task, TextStyleRefinement, Window, actions, list,
prelude::*,
};
use language::LanguageRegistry;
use markdown::{CodeBlockRenderer, Markdown, MarkdownElement, MarkdownStyle};
use project::Project;
use settings::Settings;
use theme::ThemeSettings;
use ui::prelude::*;
use ui::{Tooltip, WithScrollbar, prelude::*};
use util::ResultExt as _;
use workspace::{Item, Workspace};
use workspace::{
Item, ItemHandle, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView, Workspace,
};
actions!(dev, [OpenAcpLogs]);
@@ -89,8 +93,8 @@ struct WatchedConnection {
messages: Vec<WatchedConnectionMessage>,
list_state: ListState,
connection: Weak<acp::ClientSideConnection>,
incoming_request_methods: HashMap<i32, Arc<str>>,
outgoing_request_methods: HashMap<i32, Arc<str>>,
incoming_request_methods: HashMap<acp::RequestId, Arc<str>>,
outgoing_request_methods: HashMap<acp::RequestId, Arc<str>>,
_task: Task<()>,
}
@@ -171,7 +175,7 @@ impl AcpTools {
}
};
method_map.insert(id, method.clone());
method_map.insert(id.clone(), method.clone());
(Some(id), method.into(), MessageType::Request, Ok(params))
}
acp::StreamMessageContent::Response { id, result } => {
@@ -227,6 +231,43 @@ impl AcpTools {
cx.notify();
}
fn serialize_observed_messages(&self) -> Option<String> {
let connection = self.watched_connection.as_ref()?;
let messages: Vec<serde_json::Value> = connection
.messages
.iter()
.filter_map(|message| {
let params = match &message.params {
Ok(Some(params)) => params.clone(),
Ok(None) => serde_json::Value::Null,
Err(err) => serde_json::to_value(err).ok()?,
};
Some(serde_json::json!({
"_direction": match message.direction {
acp::StreamMessageDirection::Incoming => "incoming",
acp::StreamMessageDirection::Outgoing => "outgoing",
},
"_type": message.message_type.to_string().to_lowercase(),
"id": message.request_id,
"method": message.name.to_string(),
"params": params,
}))
})
.collect();
serde_json::to_string_pretty(&messages).ok()
}
fn clear_messages(&mut self, cx: &mut Context<Self>) {
if let Some(connection) = self.watched_connection.as_mut() {
connection.messages.clear();
connection.list_state.reset(0);
self.expanded.clear();
cx.notify();
}
}
fn render_message(
&mut self,
index: usize,
@@ -250,17 +291,19 @@ impl AcpTools {
let expanded = self.expanded.contains(&index);
v_flex()
.w_full()
.px_4()
.py_3()
.border_color(colors.border)
.border_b_1()
.gap_2()
.items_start()
.font_buffer(cx)
.text_size(base_size)
.id(index)
.group("message")
.cursor_pointer()
.font_buffer(cx)
.w_full()
.py_3()
.pl_4()
.pr_5()
.gap_2()
.items_start()
.text_size(base_size)
.border_color(colors.border)
.border_b_1()
.hover(|this| this.bg(colors.element_background.opacity(0.5)))
.on_click(cx.listener(move |this, _, _, cx| {
if this.expanded.contains(&index) {
@@ -282,15 +325,14 @@ impl AcpTools {
h_flex()
.w_full()
.gap_2()
.items_center()
.flex_shrink_0()
.child(match message.direction {
acp::StreamMessageDirection::Incoming => {
ui::Icon::new(ui::IconName::ArrowDown).color(Color::Error)
}
acp::StreamMessageDirection::Outgoing => {
ui::Icon::new(ui::IconName::ArrowUp).color(Color::Success)
}
acp::StreamMessageDirection::Incoming => Icon::new(IconName::ArrowDown)
.color(Color::Error)
.size(IconSize::Small),
acp::StreamMessageDirection::Outgoing => Icon::new(IconName::ArrowUp)
.color(Color::Success)
.size(IconSize::Small),
})
.child(
Label::new(message.name.clone())
@@ -306,6 +348,7 @@ impl AcpTools {
.children(
message
.request_id
.as_ref()
.map(|req_id| div().child(ui::Chip::new(req_id.to_string()))),
),
)
@@ -357,7 +400,7 @@ impl AcpTools {
struct WatchedConnectionMessage {
name: SharedString,
request_id: Option<i32>,
request_id: Option<acp::RequestId>,
direction: acp::StreamMessageDirection,
message_type: MessageType,
params: Result<Option<serde_json::Value>, acp::Error>,
@@ -459,7 +502,7 @@ impl Focusable for AcpTools {
}
impl Render for AcpTools {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
v_flex()
.track_focus(&self.focus_handle)
.size_full()
@@ -474,13 +517,19 @@ impl Render for AcpTools {
.child("No messages recorded yet")
.into_any()
} else {
list(
connection.list_state.clone(),
cx.processor(Self::render_message),
)
.with_sizing_behavior(gpui::ListSizingBehavior::Auto)
.flex_grow()
.into_any()
div()
.size_full()
.flex_grow()
.child(
list(
connection.list_state.clone(),
cx.processor(Self::render_message),
)
.with_sizing_behavior(gpui::ListSizingBehavior::Auto)
.size_full(),
)
.vertical_scrollbar_for(connection.list_state.clone(), window, cx)
.into_any()
}
}
None => h_flex()
@@ -492,3 +541,103 @@ impl Render for AcpTools {
})
}
}
pub struct AcpToolsToolbarItemView {
acp_tools: Option<Entity<AcpTools>>,
just_copied: bool,
}
impl AcpToolsToolbarItemView {
pub fn new() -> Self {
Self {
acp_tools: None,
just_copied: false,
}
}
}
impl Render for AcpToolsToolbarItemView {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let Some(acp_tools) = self.acp_tools.as_ref() else {
return Empty.into_any_element();
};
let acp_tools = acp_tools.clone();
let has_messages = acp_tools
.read(cx)
.watched_connection
.as_ref()
.is_some_and(|connection| !connection.messages.is_empty());
h_flex()
.gap_2()
.child({
let acp_tools = acp_tools.clone();
IconButton::new(
"copy_all_messages",
if self.just_copied {
IconName::Check
} else {
IconName::Copy
},
)
.icon_size(IconSize::Small)
.tooltip(Tooltip::text(if self.just_copied {
"Copied!"
} else {
"Copy All Messages"
}))
.disabled(!has_messages)
.on_click(cx.listener(move |this, _, _window, cx| {
if let Some(content) = acp_tools.read(cx).serialize_observed_messages() {
cx.write_to_clipboard(ClipboardItem::new_string(content));
this.just_copied = true;
cx.spawn(async move |this, cx| {
cx.background_executor().timer(Duration::from_secs(2)).await;
this.update(cx, |this, cx| {
this.just_copied = false;
cx.notify();
})
})
.detach();
}
}))
})
.child(
IconButton::new("clear_messages", IconName::Trash)
.icon_size(IconSize::Small)
.tooltip(Tooltip::text("Clear Messages"))
.disabled(!has_messages)
.on_click(cx.listener(move |_this, _, _window, cx| {
acp_tools.update(cx, |acp_tools, cx| {
acp_tools.clear_messages(cx);
});
})),
)
.into_any()
}
}
impl EventEmitter<ToolbarItemEvent> for AcpToolsToolbarItemView {}
impl ToolbarItemView for AcpToolsToolbarItemView {
fn set_active_pane_item(
&mut self,
active_pane_item: Option<&dyn ItemHandle>,
_window: &mut Window,
cx: &mut Context<Self>,
) -> ToolbarItemLocation {
if let Some(item) = active_pane_item
&& let Some(acp_tools) = item.downcast::<AcpTools>()
{
self.acp_tools = Some(acp_tools);
cx.notify();
return ToolbarItemLocation::PrimaryRight;
}
if self.acp_tools.take().is_some() {
cx.notify();
}
ToolbarItemLocation::Hidden
}
}

View File

@@ -20,10 +20,10 @@ futures.workspace = true
gpui.workspace = true
language.workspace = true
project.workspace = true
telemetry.workspace = true
text.workspace = true
util.workspace = true
watch.workspace = true
workspace-hack.workspace = true
[dev-dependencies]

View File

@@ -3,15 +3,14 @@ use buffer_diff::BufferDiff;
use clock;
use collections::BTreeMap;
use futures::{FutureExt, StreamExt, channel::mpsc};
use gpui::{App, AppContext, AsyncApp, Context, Entity, Subscription, Task, WeakEntity};
use gpui::{
App, AppContext, AsyncApp, Context, Entity, SharedString, Subscription, Task, WeakEntity,
};
use language::{Anchor, Buffer, BufferEvent, DiskState, Point, ToPoint};
use project::{Project, ProjectItem, lsp_store::OpenLspBufferHandle};
use std::{cmp, ops::Range, sync::Arc};
use text::{Edit, Patch, Rope};
use util::{
RangeExt, ResultExt as _,
paths::{PathStyle, RemotePathBuf},
};
use util::{RangeExt, ResultExt as _};
/// Tracks actions performed by tools in a thread
pub struct ActionLog {
@@ -34,65 +33,6 @@ impl ActionLog {
&self.project
}
pub fn latest_snapshot(&self, buffer: &Entity<Buffer>) -> Option<text::BufferSnapshot> {
Some(self.tracked_buffers.get(buffer)?.snapshot.clone())
}
/// Return a unified diff patch with user edits made since last read or notification
pub fn unnotified_user_edits(&self, cx: &Context<Self>) -> Option<String> {
let diffs = self
.tracked_buffers
.values()
.filter_map(|tracked| {
if !tracked.may_have_unnotified_user_edits {
return None;
}
let text_with_latest_user_edits = tracked.diff_base.to_string();
let text_with_last_seen_user_edits = tracked.last_seen_base.to_string();
if text_with_latest_user_edits == text_with_last_seen_user_edits {
return None;
}
let patch = language::unified_diff(
&text_with_last_seen_user_edits,
&text_with_latest_user_edits,
);
let buffer = tracked.buffer.clone();
let file_path = buffer
.read(cx)
.file()
.map(|file| RemotePathBuf::new(file.full_path(cx), PathStyle::Posix).to_proto())
.unwrap_or_else(|| format!("buffer_{}", buffer.entity_id()));
let mut result = String::new();
result.push_str(&format!("--- a/{}\n", file_path));
result.push_str(&format!("+++ b/{}\n", file_path));
result.push_str(&patch);
Some(result)
})
.collect::<Vec<_>>();
if diffs.is_empty() {
return None;
}
let unified_diff = diffs.join("\n\n");
Some(unified_diff)
}
/// Return a unified diff patch with user edits made since last read/notification
/// and mark them as notified
pub fn flush_unnotified_user_edits(&mut self, cx: &Context<Self>) -> Option<String> {
let patch = self.unnotified_user_edits(cx);
self.tracked_buffers.values_mut().for_each(|tracked| {
tracked.may_have_unnotified_user_edits = false;
tracked.last_seen_base = tracked.diff_base.clone();
});
patch
}
fn track_buffer_internal(
&mut self,
buffer: Entity<Buffer>,
@@ -142,31 +82,26 @@ impl ActionLog {
let diff = cx.new(|cx| BufferDiff::new(&text_snapshot, cx));
let (diff_update_tx, diff_update_rx) = mpsc::unbounded();
let diff_base;
let last_seen_base;
let unreviewed_edits;
if is_created {
diff_base = Rope::default();
last_seen_base = Rope::default();
unreviewed_edits = Patch::new(vec![Edit {
old: 0..1,
new: 0..text_snapshot.max_point().row + 1,
}])
} else {
diff_base = buffer.read(cx).as_rope().clone();
last_seen_base = diff_base.clone();
unreviewed_edits = Patch::default();
}
TrackedBuffer {
buffer: buffer.clone(),
diff_base,
last_seen_base,
unreviewed_edits,
snapshot: text_snapshot,
status,
version: buffer.read(cx).version(),
diff,
diff_update: diff_update_tx,
may_have_unnotified_user_edits: false,
_open_lsp_handle: open_lsp_handle,
_maintain_diff: cx.spawn({
let buffer = buffer.clone();
@@ -317,10 +252,9 @@ impl ActionLog {
let new_snapshot = buffer_snapshot.clone();
let unreviewed_edits = tracked_buffer.unreviewed_edits.clone();
let edits = diff_snapshots(&old_snapshot, &new_snapshot);
let mut has_user_changes = false;
async move {
if let ChangeAuthor::User = author {
has_user_changes = apply_non_conflicting_edits(
apply_non_conflicting_edits(
&unreviewed_edits,
edits,
&mut base_text,
@@ -328,22 +262,13 @@ impl ActionLog {
);
}
(Arc::new(base_text.to_string()), base_text, has_user_changes)
(Arc::new(base_text.to_string()), base_text)
}
});
anyhow::Ok(rebase)
})??;
let (new_base_text, new_diff_base, has_user_changes) = rebase.await;
this.update(cx, |this, _| {
let tracked_buffer = this
.tracked_buffers
.get_mut(buffer)
.context("buffer not tracked")
.unwrap();
tracked_buffer.may_have_unnotified_user_edits |= has_user_changes;
})?;
let (new_base_text, new_diff_base) = rebase.await;
Self::update_diff(
this,
@@ -562,14 +487,17 @@ impl ActionLog {
&mut self,
buffer: Entity<Buffer>,
buffer_range: Range<impl language::ToPoint>,
telemetry: Option<ActionLogTelemetry>,
cx: &mut Context<Self>,
) {
let Some(tracked_buffer) = self.tracked_buffers.get_mut(&buffer) else {
return;
};
let mut metrics = ActionLogMetrics::for_buffer(buffer.read(cx));
match tracked_buffer.status {
TrackedBufferStatus::Deleted => {
metrics.add_edits(tracked_buffer.unreviewed_edits.edits());
self.tracked_buffers.remove(&buffer);
cx.notify();
}
@@ -578,7 +506,6 @@ impl ActionLog {
let buffer_range =
buffer_range.start.to_point(buffer)..buffer_range.end.to_point(buffer);
let mut delta = 0i32;
tracked_buffer.unreviewed_edits.retain_mut(|edit| {
edit.old.start = (edit.old.start as i32 + delta) as u32;
edit.old.end = (edit.old.end as i32 + delta) as u32;
@@ -610,6 +537,7 @@ impl ActionLog {
.collect::<String>(),
);
delta += edit.new_len() as i32 - edit.old_len() as i32;
metrics.add_edit(edit);
false
}
});
@@ -621,19 +549,24 @@ impl ActionLog {
tracked_buffer.schedule_diff_update(ChangeAuthor::User, cx);
}
}
if let Some(telemetry) = telemetry {
telemetry_report_accepted_edits(&telemetry, metrics);
}
}
pub fn reject_edits_in_ranges(
&mut self,
buffer: Entity<Buffer>,
buffer_ranges: Vec<Range<impl language::ToPoint>>,
telemetry: Option<ActionLogTelemetry>,
cx: &mut Context<Self>,
) -> Task<Result<()>> {
let Some(tracked_buffer) = self.tracked_buffers.get_mut(&buffer) else {
return Task::ready(Ok(()));
};
match &tracked_buffer.status {
let mut metrics = ActionLogMetrics::for_buffer(buffer.read(cx));
let task = match &tracked_buffer.status {
TrackedBufferStatus::Created {
existing_file_content,
} => {
@@ -683,6 +616,7 @@ impl ActionLog {
}
};
metrics.add_edits(tracked_buffer.unreviewed_edits.edits());
self.tracked_buffers.remove(&buffer);
cx.notify();
task
@@ -696,6 +630,7 @@ impl ActionLog {
.update(cx, |project, cx| project.save_buffer(buffer.clone(), cx));
// Clear all tracked edits for this buffer and start over as if we just read it.
metrics.add_edits(tracked_buffer.unreviewed_edits.edits());
self.tracked_buffers.remove(&buffer);
self.buffer_read(buffer.clone(), cx);
cx.notify();
@@ -735,6 +670,7 @@ impl ActionLog {
}
if revert {
metrics.add_edit(edit);
let old_range = tracked_buffer
.diff_base
.point_to_offset(Point::new(edit.old.start, 0))
@@ -755,12 +691,25 @@ impl ActionLog {
self.project
.update(cx, |project, cx| project.save_buffer(buffer, cx))
}
};
if let Some(telemetry) = telemetry {
telemetry_report_rejected_edits(&telemetry, metrics);
}
task
}
pub fn keep_all_edits(&mut self, cx: &mut Context<Self>) {
self.tracked_buffers
.retain(|_buffer, tracked_buffer| match tracked_buffer.status {
pub fn keep_all_edits(
&mut self,
telemetry: Option<ActionLogTelemetry>,
cx: &mut Context<Self>,
) {
self.tracked_buffers.retain(|buffer, tracked_buffer| {
let mut metrics = ActionLogMetrics::for_buffer(buffer.read(cx));
metrics.add_edits(tracked_buffer.unreviewed_edits.edits());
if let Some(telemetry) = telemetry.as_ref() {
telemetry_report_accepted_edits(telemetry, metrics);
}
match tracked_buffer.status {
TrackedBufferStatus::Deleted => false,
_ => {
if let TrackedBufferStatus::Created { .. } = &mut tracked_buffer.status {
@@ -771,13 +720,24 @@ impl ActionLog {
tracked_buffer.schedule_diff_update(ChangeAuthor::User, cx);
true
}
});
}
});
cx.notify();
}
pub fn reject_all_edits(&mut self, cx: &mut Context<Self>) -> Task<()> {
pub fn reject_all_edits(
&mut self,
telemetry: Option<ActionLogTelemetry>,
cx: &mut Context<Self>,
) -> Task<()> {
let futures = self.changed_buffers(cx).into_keys().map(|buffer| {
let reject = self.reject_edits_in_ranges(buffer, vec![Anchor::MIN..Anchor::MAX], cx);
let reject = self.reject_edits_in_ranges(
buffer,
vec![Anchor::MIN..Anchor::MAX],
telemetry.clone(),
cx,
);
async move {
reject.await.log_err();
@@ -785,8 +745,7 @@ impl ActionLog {
});
let task = futures::future::join_all(futures);
cx.spawn(async move |_, _| {
cx.background_spawn(async move {
task.await;
})
}
@@ -816,6 +775,61 @@ impl ActionLog {
}
}
#[derive(Clone)]
pub struct ActionLogTelemetry {
pub agent_telemetry_id: &'static str,
pub session_id: Arc<str>,
}
struct ActionLogMetrics {
lines_removed: u32,
lines_added: u32,
language: Option<SharedString>,
}
impl ActionLogMetrics {
fn for_buffer(buffer: &Buffer) -> Self {
Self {
language: buffer.language().map(|l| l.name().0),
lines_removed: 0,
lines_added: 0,
}
}
fn add_edits(&mut self, edits: &[Edit<u32>]) {
for edit in edits {
self.add_edit(edit);
}
}
fn add_edit(&mut self, edit: &Edit<u32>) {
self.lines_added += edit.new_len();
self.lines_removed += edit.old_len();
}
}
fn telemetry_report_accepted_edits(telemetry: &ActionLogTelemetry, metrics: ActionLogMetrics) {
telemetry::event!(
"Agent Edits Accepted",
agent = telemetry.agent_telemetry_id,
session = telemetry.session_id,
language = metrics.language,
lines_added = metrics.lines_added,
lines_removed = metrics.lines_removed
);
}
fn telemetry_report_rejected_edits(telemetry: &ActionLogTelemetry, metrics: ActionLogMetrics) {
telemetry::event!(
"Agent Edits Rejected",
agent = telemetry.agent_telemetry_id,
session = telemetry.session_id,
language = metrics.language,
lines_added = metrics.lines_added,
lines_removed = metrics.lines_removed
);
}
fn apply_non_conflicting_edits(
patch: &Patch<u32>,
edits: Vec<Edit<u32>>,
@@ -946,14 +960,12 @@ enum TrackedBufferStatus {
struct TrackedBuffer {
buffer: Entity<Buffer>,
diff_base: Rope,
last_seen_base: Rope,
unreviewed_edits: Patch<u32>,
status: TrackedBufferStatus,
version: clock::Global,
diff: Entity<BufferDiff>,
snapshot: text::BufferSnapshot,
diff_update: mpsc::UnboundedSender<(ChangeAuthor, text::BufferSnapshot)>,
may_have_unnotified_user_edits: bool,
_open_lsp_handle: OpenLspBufferHandle,
_maintain_diff: Task<()>,
_subscription: Subscription,
@@ -984,7 +996,6 @@ mod tests {
use super::*;
use buffer_diff::DiffHunkStatusKind;
use gpui::TestAppContext;
use indoc::indoc;
use language::Point;
use project::{FakeFs, Fs, Project, RemoveOptions};
use rand::prelude::*;
@@ -1002,8 +1013,6 @@ mod tests {
cx.update(|cx| {
let settings_store = SettingsStore::test(cx);
cx.set_global(settings_store);
language::init(cx);
Project::init_settings(cx);
});
}
@@ -1063,7 +1072,7 @@ mod tests {
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Point::new(3, 0)..Point::new(4, 3), cx)
log.keep_edits_in_range(buffer.clone(), Point::new(3, 0)..Point::new(4, 3), None, cx)
});
cx.run_until_parked();
assert_eq!(
@@ -1079,7 +1088,7 @@ mod tests {
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Point::new(0, 0)..Point::new(4, 3), cx)
log.keep_edits_in_range(buffer.clone(), Point::new(0, 0)..Point::new(4, 3), None, cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
@@ -1164,7 +1173,7 @@ mod tests {
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Point::new(1, 0)..Point::new(1, 0), cx)
log.keep_edits_in_range(buffer.clone(), Point::new(1, 0)..Point::new(1, 0), None, cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
@@ -1261,111 +1270,7 @@ mod tests {
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Point::new(0, 0)..Point::new(1, 0), cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
}
#[gpui::test(iterations = 10)]
async fn test_user_edits_notifications(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
path!("/dir"),
json!({"file": indoc! {"
abc
def
ghi
jkl
mno"}}),
)
.await;
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
let action_log = cx.new(|_| ActionLog::new(project.clone()));
let file_path = project
.read_with(cx, |project, cx| project.find_project_path("dir/file", cx))
.unwrap();
let buffer = project
.update(cx, |project, cx| project.open_buffer(file_path, cx))
.await
.unwrap();
// Agent edits
cx.update(|cx| {
action_log.update(cx, |log, cx| log.buffer_read(buffer.clone(), cx));
buffer.update(cx, |buffer, cx| {
buffer
.edit([(Point::new(1, 2)..Point::new(2, 3), "F\nGHI")], None, cx)
.unwrap()
});
action_log.update(cx, |log, cx| log.buffer_edited(buffer.clone(), cx));
});
cx.run_until_parked();
assert_eq!(
buffer.read_with(cx, |buffer, _| buffer.text()),
indoc! {"
abc
deF
GHI
jkl
mno"}
);
assert_eq!(
unreviewed_hunks(&action_log, cx),
vec![(
buffer.clone(),
vec![HunkStatus {
range: Point::new(1, 0)..Point::new(3, 0),
diff_status: DiffHunkStatusKind::Modified,
old_text: "def\nghi\n".into(),
}],
)]
);
// User edits
buffer.update(cx, |buffer, cx| {
buffer.edit(
[
(Point::new(0, 2)..Point::new(0, 2), "X"),
(Point::new(3, 0)..Point::new(3, 0), "Y"),
],
None,
cx,
)
});
cx.run_until_parked();
assert_eq!(
buffer.read_with(cx, |buffer, _| buffer.text()),
indoc! {"
abXc
deF
GHI
Yjkl
mno"}
);
// User edits should be stored separately from agent's
let user_edits = action_log.update(cx, |log, cx| log.unnotified_user_edits(cx));
assert_eq!(
user_edits.expect("should have some user edits"),
indoc! {"
--- a/dir/file
+++ b/dir/file
@@ -1,5 +1,5 @@
-abc
+abXc
def
ghi
-jkl
+Yjkl
mno
"}
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Point::new(0, 0)..Point::new(1, 0), cx)
log.keep_edits_in_range(buffer.clone(), Point::new(0, 0)..Point::new(1, 0), None, cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
@@ -1424,7 +1329,7 @@ mod tests {
);
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), 0..5, cx)
log.keep_edits_in_range(buffer.clone(), 0..5, None, cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
@@ -1476,7 +1381,7 @@ mod tests {
action_log
.update(cx, |log, cx| {
log.reject_edits_in_ranges(buffer.clone(), vec![2..5], cx)
log.reject_edits_in_ranges(buffer.clone(), vec![2..5], None, cx)
})
.await
.unwrap();
@@ -1556,7 +1461,7 @@ mod tests {
action_log
.update(cx, |log, cx| {
log.reject_edits_in_ranges(buffer.clone(), vec![2..5], cx)
log.reject_edits_in_ranges(buffer.clone(), vec![2..5], None, cx)
})
.await
.unwrap();
@@ -1739,6 +1644,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(4, 0)..Point::new(4, 0)],
None,
cx,
)
})
@@ -1773,6 +1679,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(0, 0)..Point::new(1, 0)],
None,
cx,
)
})
@@ -1800,6 +1707,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(4, 0)..Point::new(4, 0)],
None,
cx,
)
})
@@ -1874,7 +1782,7 @@ mod tests {
let range_2 = buffer.read(cx).anchor_before(Point::new(5, 0))
..buffer.read(cx).anchor_before(Point::new(5, 3));
log.reject_edits_in_ranges(buffer.clone(), vec![range_1, range_2], cx)
log.reject_edits_in_ranges(buffer.clone(), vec![range_1, range_2], None, cx)
.detach();
assert_eq!(
buffer.read_with(cx, |buffer, _| buffer.text()),
@@ -1935,6 +1843,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(0, 0)..Point::new(0, 0)],
None,
cx,
)
})
@@ -1990,6 +1899,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(0, 0)..Point::new(0, 11)],
None,
cx,
)
})
@@ -2052,6 +1962,7 @@ mod tests {
log.reject_edits_in_ranges(
buffer.clone(),
vec![Point::new(0, 0)..Point::new(100, 0)],
None,
cx,
)
})
@@ -2099,7 +2010,7 @@ mod tests {
// User accepts the single hunk
action_log.update(cx, |log, cx| {
log.keep_edits_in_range(buffer.clone(), Anchor::MIN..Anchor::MAX, cx)
log.keep_edits_in_range(buffer.clone(), Anchor::MIN..Anchor::MAX, None, cx)
});
cx.run_until_parked();
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]);
@@ -2120,7 +2031,7 @@ mod tests {
// User rejects the hunk
action_log
.update(cx, |log, cx| {
log.reject_edits_in_ranges(buffer.clone(), vec![Anchor::MIN..Anchor::MAX], cx)
log.reject_edits_in_ranges(buffer.clone(), vec![Anchor::MIN..Anchor::MAX], None, cx)
})
.await
.unwrap();
@@ -2164,7 +2075,7 @@ mod tests {
cx.run_until_parked();
// User clicks "Accept All"
action_log.update(cx, |log, cx| log.keep_all_edits(cx));
action_log.update(cx, |log, cx| log.keep_all_edits(None, cx));
cx.run_until_parked();
assert!(fs.is_file(path!("/dir/new_file").as_ref()).await);
assert_eq!(unreviewed_hunks(&action_log, cx), vec![]); // Hunks are cleared
@@ -2183,7 +2094,7 @@ mod tests {
// User clicks "Reject All"
action_log
.update(cx, |log, cx| log.reject_all_edits(cx))
.update(cx, |log, cx| log.reject_all_edits(None, cx))
.await;
cx.run_until_parked();
assert!(fs.is_file(path!("/dir/new_file").as_ref()).await);
@@ -2218,12 +2129,12 @@ mod tests {
action_log.update(cx, |log, cx| log.buffer_read(buffer.clone(), cx));
for _ in 0..operations {
match rng.gen_range(0..100) {
match rng.random_range(0..100) {
0..25 => {
action_log.update(cx, |log, cx| {
let range = buffer.read(cx).random_byte_range(0, &mut rng);
log::info!("keeping edits in range {:?}", range);
log.keep_edits_in_range(buffer.clone(), range, cx)
log.keep_edits_in_range(buffer.clone(), range, None, cx)
});
}
25..50 => {
@@ -2231,13 +2142,13 @@ mod tests {
.update(cx, |log, cx| {
let range = buffer.read(cx).random_byte_range(0, &mut rng);
log::info!("rejecting edits in range {:?}", range);
log.reject_edits_in_ranges(buffer.clone(), vec![range], cx)
log.reject_edits_in_ranges(buffer.clone(), vec![range], None, cx)
})
.await
.unwrap();
}
_ => {
let is_agent_edit = rng.gen_bool(0.5);
let is_agent_edit = rng.random_bool(0.5);
if is_agent_edit {
log::info!("agent edit");
} else {
@@ -2252,7 +2163,7 @@ mod tests {
}
}
if rng.gen_bool(0.2) {
if rng.random_bool(0.2) {
quiesce(&action_log, &buffer, cx);
}
}
@@ -2301,7 +2212,7 @@ mod tests {
.await;
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
&[("file.txt".into(), "a\nb\nc\nd\ne\nf\ng\nh\ni\nj".into())],
&[("file.txt", "a\nb\nc\nd\ne\nf\ng\nh\ni\nj".into())],
"0000000",
);
cx.run_until_parked();
@@ -2384,7 +2295,7 @@ mod tests {
// - Ignores the last line edit (j stays as j)
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
&[("file.txt".into(), "A\nb\nc\nf\nG\nh\ni\nj".into())],
&[("file.txt", "A\nb\nc\nf\nG\nh\ni\nj".into())],
"0000001",
);
cx.run_until_parked();
@@ -2415,10 +2326,7 @@ mod tests {
// Make another commit that accepts the NEW line but with different content
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
&[(
"file.txt".into(),
"A\nb\nc\nf\nGGG\nh\nDIFFERENT\ni\nj".into(),
)],
&[("file.txt", "A\nb\nc\nf\nGGG\nh\nDIFFERENT\ni\nj".into())],
"0000002",
);
cx.run_until_parked();
@@ -2444,7 +2352,7 @@ mod tests {
// Final commit that accepts all remaining edits
fs.set_head_for_repo(
path!("/project/.git").as_ref(),
&[("file.txt".into(), "A\nb\nc\nf\nGGG\nh\nNEW\ni\nJ".into())],
&[("file.txt", "A\nb\nc\nf\nGGG\nh\nNEW\ni\nJ".into())],
"0000003",
);
cx.run_until_parked();
@@ -2488,61 +2396,4 @@ mod tests {
.collect()
})
}
#[gpui::test]
async fn test_format_patch(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
path!("/dir"),
json!({"test.txt": "line 1\nline 2\nline 3\n"}),
)
.await;
let project = Project::test(fs.clone(), [path!("/dir").as_ref()], cx).await;
let action_log = cx.new(|_| ActionLog::new(project.clone()));
let file_path = project
.read_with(cx, |project, cx| {
project.find_project_path("dir/test.txt", cx)
})
.unwrap();
let buffer = project
.update(cx, |project, cx| project.open_buffer(file_path, cx))
.await
.unwrap();
cx.update(|cx| {
// Track the buffer and mark it as read first
action_log.update(cx, |log, cx| {
log.buffer_read(buffer.clone(), cx);
});
// Make some edits to create a patch
buffer.update(cx, |buffer, cx| {
buffer
.edit([(Point::new(1, 0)..Point::new(1, 6), "CHANGED")], None, cx)
.unwrap(); // Replace "line2" with "CHANGED"
});
});
cx.run_until_parked();
// Get the patch
let patch = action_log.update(cx, |log, cx| log.unnotified_user_edits(cx));
// Verify the patch format contains expected unified diff elements
assert_eq!(
patch.unwrap(),
indoc! {"
--- a/dir/test.txt
+++ b/dir/test.txt
@@ -1,3 +1,3 @@
line 1
-line 2
+CHANGED
line 3
"}
);
}
}

View File

@@ -17,6 +17,7 @@ anyhow.workspace = true
auto_update.workspace = true
editor.workspace = true
extension_host.workspace = true
fs.workspace = true
futures.workspace = true
gpui.workspace = true
language.workspace = true
@@ -25,7 +26,6 @@ proto.workspace = true
smallvec.workspace = true
ui.workspace = true
util.workspace = true
workspace-hack.workspace = true
workspace.workspace = true
[dev-dependencies]

View File

@@ -1,4 +1,4 @@
use auto_update::{AutoUpdateStatus, AutoUpdater, DismissErrorMessage, VersionCheckType};
use auto_update::{AutoUpdateStatus, AutoUpdater, DismissMessage, VersionCheckType};
use editor::Editor;
use extension_host::{ExtensionOperation, ExtensionStore};
use futures::StreamExt;
@@ -11,8 +11,7 @@ use language::{
LanguageServerStatusUpdate, ServerHealth,
};
use project::{
EnvironmentErrorMessage, LanguageServerProgress, LspStoreEvent, Project,
ProjectEnvironmentEvent,
LanguageServerProgress, LspStoreEvent, ProgressToken, Project, ProjectEnvironmentEvent,
git_store::{GitStoreEvent, Repository},
};
use smallvec::SmallVec;
@@ -20,7 +19,6 @@ use std::{
cmp::Reverse,
collections::HashSet,
fmt::Write,
path::Path,
sync::Arc,
time::{Duration, Instant},
};
@@ -53,6 +51,7 @@ pub struct ActivityIndicator {
project: Entity<Project>,
auto_updater: Option<Entity<AutoUpdater>>,
context_menu_handle: PopoverMenuHandle<ContextMenu>,
fs_jobs: Vec<fs::JobInfo>,
}
#[derive(Debug)]
@@ -63,7 +62,7 @@ struct ServerStatus {
struct PendingWork<'a> {
language_server_id: LanguageServerId,
progress_token: &'a str,
progress_token: &'a ProgressToken,
progress: &'a LanguageServerProgress,
}
@@ -84,7 +83,6 @@ impl ActivityIndicator {
) -> Entity<ActivityIndicator> {
let project = workspace.project().clone();
let auto_updater = AutoUpdater::get(cx);
let workspace_handle = cx.entity();
let this = cx.new(|cx| {
let mut status_events = languages.language_server_binary_statuses();
cx.spawn(async move |this, cx| {
@@ -102,18 +100,25 @@ impl ActivityIndicator {
})
.detach();
cx.subscribe_in(
&workspace_handle,
window,
|activity_indicator, _, event, window, cx| {
if let workspace::Event::ClearActivityIndicator = event
&& activity_indicator.statuses.pop().is_some()
{
activity_indicator.dismiss_error_message(&DismissErrorMessage, window, cx);
let fs = project.read(cx).fs().clone();
let mut job_events = fs.subscribe_to_jobs();
cx.spawn(async move |this, cx| {
while let Some(job_event) = job_events.next().await {
this.update(cx, |this: &mut ActivityIndicator, cx| {
match job_event {
fs::JobEvent::Started { info } => {
this.fs_jobs.retain(|j| j.id != info.id);
this.fs_jobs.push(info);
}
fs::JobEvent::Completed { id } => {
this.fs_jobs.retain(|j| j.id != id);
}
}
cx.notify();
}
},
)
})?;
}
anyhow::Ok(())
})
.detach();
cx.subscribe(
@@ -218,7 +223,8 @@ impl ActivityIndicator {
statuses: Vec::new(),
project: project.clone(),
auto_updater,
context_menu_handle: Default::default(),
context_menu_handle: PopoverMenuHandle::default(),
fs_jobs: Vec::new(),
}
});
@@ -227,7 +233,8 @@ impl ActivityIndicator {
server_name,
status,
} => {
let create_buffer = project.update(cx, |project, cx| project.create_buffer(cx));
let create_buffer =
project.update(cx, |project, cx| project.create_buffer(false, cx));
let status = status.clone();
let server_name = server_name.clone();
cx.spawn_in(window, async move |workspace, cx| {
@@ -294,18 +301,13 @@ impl ActivityIndicator {
});
}
fn dismiss_error_message(
&mut self,
_: &DismissErrorMessage,
_: &mut Window,
cx: &mut Context<Self>,
) {
let error_dismissed = if let Some(updater) = &self.auto_updater {
updater.update(cx, |updater, cx| updater.dismiss_error(cx))
fn dismiss_message(&mut self, _: &DismissMessage, _: &mut Window, cx: &mut Context<Self>) {
let dismissed = if let Some(updater) = &self.auto_updater {
updater.update(cx, |updater, cx| updater.dismiss(cx))
} else {
false
};
if error_dismissed {
if dismissed {
return;
}
@@ -334,9 +336,9 @@ impl ActivityIndicator {
let mut pending_work = status
.pending_work
.iter()
.map(|(token, progress)| PendingWork {
.map(|(progress_token, progress)| PendingWork {
language_server_id: server_id,
progress_token: token.as_str(),
progress_token,
progress,
})
.collect::<SmallVec<[_; 4]>>();
@@ -347,27 +349,23 @@ impl ActivityIndicator {
.flatten()
}
fn pending_environment_errors<'a>(
&'a self,
cx: &'a App,
) -> impl Iterator<Item = (&'a Arc<Path>, &'a EnvironmentErrorMessage)> {
self.project.read(cx).shell_environment_errors(cx)
fn pending_environment_error<'a>(&'a self, cx: &'a App) -> Option<&'a String> {
self.project.read(cx).peek_environment_error(cx)
}
fn content_to_render(&mut self, cx: &mut Context<Self>) -> Option<Content> {
// Show if any direnv calls failed
if let Some((abs_path, error)) = self.pending_environment_errors(cx).next() {
let abs_path = abs_path.clone();
if let Some(message) = self.pending_environment_error(cx) {
return Some(Content {
icon: Some(
Icon::new(IconName::Warning)
.size(IconSize::Small)
.into_any_element(),
),
message: error.0.clone(),
message: message.clone(),
on_click: Some(Arc::new(move |this, window, cx| {
this.project.update(cx, |project, cx| {
project.remove_environment_error(&abs_path, cx);
project.pop_environment_error(cx);
});
window.dispatch_action(Box::new(workspace::OpenLog), cx);
})),
@@ -383,11 +381,7 @@ impl ActivityIndicator {
..
}) = pending_work.next()
{
let mut message = progress
.title
.as_deref()
.unwrap_or(progress_token)
.to_string();
let mut message = progress.title.clone().unwrap_or(progress_token.to_string());
if let Some(percentage) = progress.percentage {
write!(&mut message, " ({}%)", percentage).unwrap();
@@ -461,6 +455,23 @@ impl ActivityIndicator {
});
}
// Show any long-running fs command
for fs_job in &self.fs_jobs {
if Instant::now().duration_since(fs_job.start) >= GIT_OPERATION_DELAY {
return Some(Content {
icon: Some(
Icon::new(IconName::ArrowCircle)
.size(IconSize::Small)
.with_rotate_animation(2)
.into_any_element(),
),
message: fs_job.message.clone().into(),
on_click: None,
tooltip_message: None,
});
}
}
// Show any language server installation info.
let mut downloading = SmallVec::<[_; 3]>::new();
let mut checking_for_update = SmallVec::<[_; 3]>::new();
@@ -527,7 +538,7 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |this, window, cx| {
this.statuses
.retain(|status| !downloading.contains(&status.name));
this.dismiss_error_message(&DismissErrorMessage, window, cx)
this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
});
@@ -556,7 +567,7 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |this, window, cx| {
this.statuses
.retain(|status| !checking_for_update.contains(&status.name));
this.dismiss_error_message(&DismissErrorMessage, window, cx)
this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
});
@@ -664,13 +675,14 @@ impl ActivityIndicator {
.and_then(|updater| match &updater.read(cx).status() {
AutoUpdateStatus::Checking => Some(Content {
icon: Some(
Icon::new(IconName::Download)
Icon::new(IconName::LoadCircle)
.size(IconSize::Small)
.with_rotate_animation(3)
.into_any_element(),
),
message: "Checking for Zed updates…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
this.dismiss_error_message(&DismissErrorMessage, window, cx)
this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: None,
}),
@@ -682,19 +694,20 @@ impl ActivityIndicator {
),
message: "Downloading Zed update…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
this.dismiss_error_message(&DismissErrorMessage, window, cx)
this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
AutoUpdateStatus::Installing { version } => Some(Content {
icon: Some(
Icon::new(IconName::Download)
Icon::new(IconName::LoadCircle)
.size(IconSize::Small)
.with_rotate_animation(3)
.into_any_element(),
),
message: "Installing Zed update…".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
this.dismiss_error_message(&DismissErrorMessage, window, cx)
this.dismiss_message(&DismissMessage, window, cx)
})),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
@@ -704,17 +717,18 @@ impl ActivityIndicator {
on_click: Some(Arc::new(move |_, _, cx| workspace::reload(cx))),
tooltip_message: Some(Self::version_tooltip_message(version)),
}),
AutoUpdateStatus::Errored => Some(Content {
AutoUpdateStatus::Errored { error } => Some(Content {
icon: Some(
Icon::new(IconName::Warning)
.size(IconSize::Small)
.into_any_element(),
),
message: "Auto update failed".to_string(),
message: "Failed to update Zed".to_string(),
on_click: Some(Arc::new(|this, window, cx| {
this.dismiss_error_message(&DismissErrorMessage, window, cx)
window.dispatch_action(Box::new(workspace::OpenLog), cx);
this.dismiss_message(&DismissMessage, window, cx);
})),
tooltip_message: None,
tooltip_message: Some(format!("{error}")),
}),
AutoUpdateStatus::Idle => None,
})
@@ -752,7 +766,7 @@ impl ActivityIndicator {
})),
message,
on_click: Some(Arc::new(|this, window, cx| {
this.dismiss_error_message(&Default::default(), window, cx)
this.dismiss_message(&Default::default(), window, cx)
})),
tooltip_message: None,
})
@@ -791,11 +805,11 @@ impl Render for ActivityIndicator {
let result = h_flex()
.id("activity-indicator")
.on_action(cx.listener(Self::show_error_message))
.on_action(cx.listener(Self::dismiss_error_message));
.on_action(cx.listener(Self::dismiss_message));
let Some(content) = self.content_to_render(cx) else {
return result;
};
let this = cx.entity().downgrade();
let activity_indicator = cx.entity().downgrade();
let truncate_content = content.message.len() > MAX_MESSAGE_LEN;
result.gap_2().child(
PopoverMenu::new("activity-indicator-popover")
@@ -837,22 +851,21 @@ impl Render for ActivityIndicator {
)
.anchor(gpui::Corner::BottomLeft)
.menu(move |window, cx| {
let strong_this = this.upgrade()?;
let strong_this = activity_indicator.upgrade()?;
let mut has_work = false;
let menu = ContextMenu::build(window, cx, |mut menu, _, cx| {
for work in strong_this.read(cx).pending_language_server_work(cx) {
has_work = true;
let this = this.clone();
let activity_indicator = activity_indicator.clone();
let mut title = work
.progress
.title
.as_deref()
.unwrap_or(work.progress_token)
.to_owned();
.clone()
.unwrap_or(work.progress_token.to_string());
if work.progress.is_cancellable {
let language_server_id = work.language_server_id;
let token = work.progress_token.to_string();
let token = work.progress_token.clone();
let title = SharedString::from(title);
menu = menu.custom_entry(
move |_, _| {
@@ -864,18 +877,23 @@ impl Render for ActivityIndicator {
.into_any_element()
},
move |_, cx| {
this.update(cx, |this, cx| {
this.project.update(cx, |project, cx| {
project.cancel_language_server_work(
language_server_id,
Some(token.clone()),
let token = token.clone();
activity_indicator
.update(cx, |activity_indicator, cx| {
activity_indicator.project.update(
cx,
|project, cx| {
project.cancel_language_server_work(
language_server_id,
Some(token),
cx,
);
},
);
});
this.context_menu_handle.hide(cx);
cx.notify();
})
.ok();
activity_indicator.context_menu_handle.hide(cx);
cx.notify();
})
.ok();
},
);
} else {

View File

@@ -5,74 +5,100 @@ edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lib]
path = "src/agent.rs"
[features]
test-support = ["db/test-support"]
eval = []
unit-eval = []
e2e = []
[lints]
workspace = true
[lib]
path = "src/agent.rs"
doctest = false
[features]
test-support = [
"gpui/test-support",
"language/test-support",
]
[dependencies]
acp_thread.workspace = true
action_log.workspace = true
agent-client-protocol.workspace = true
agent_servers.workspace = true
agent_settings.workspace = true
anyhow.workspace = true
assistant_context.workspace = true
assistant_tool.workspace = true
assistant_text_thread.workspace = true
chrono.workspace = true
client.workspace = true
cloud_llm_client.workspace = true
collections.workspace = true
component.workspace = true
context_server.workspace = true
convert_case.workspace = true
db.workspace = true
derive_more.workspace = true
fs.workspace = true
futures.workspace = true
git.workspace = true
gpui.workspace = true
heed.workspace = true
handlebars = { workspace = true, features = ["rust-embed"] }
html_to_markdown.workspace = true
http_client.workspace = true
icons.workspace = true
indoc.workspace = true
itertools.workspace = true
language.workspace = true
language_model.workspace = true
language_models.workspace = true
log.workspace = true
open.workspace = true
parking_lot.workspace = true
paths.workspace = true
postage.workspace = true
project.workspace = true
prompt_store.workspace = true
ref-cast.workspace = true
rope.workspace = true
regex.workspace = true
rust-embed.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
smallvec.workspace = true
smol.workspace = true
sqlez.workspace = true
streaming_diff.workspace = true
strsim.workspace = true
task.workspace = true
telemetry.workspace = true
text.workspace = true
theme.workspace = true
thiserror.workspace = true
time.workspace = true
ui.workspace = true
util.workspace = true
uuid.workspace = true
workspace-hack.workspace = true
watch.workspace = true
web_search.workspace = true
zed_env_vars.workspace = true
zstd.workspace = true
[dev-dependencies]
assistant_tools.workspace = true
agent_servers = { workspace = true, "features" = ["test-support"] }
assistant_text_thread = { workspace = true, "features" = ["test-support"] }
client = { workspace = true, "features" = ["test-support"] }
clock = { workspace = true, "features" = ["test-support"] }
context_server = { workspace = true, "features" = ["test-support"] }
ctor.workspace = true
db = { workspace = true, "features" = ["test-support"] }
editor = { workspace = true, "features" = ["test-support"] }
env_logger.workspace = true
fs = { workspace = true, "features" = ["test-support"] }
git = { workspace = true, "features" = ["test-support"] }
gpui = { workspace = true, "features" = ["test-support"] }
indoc.workspace = true
gpui_tokio.workspace = true
language = { workspace = true, "features" = ["test-support"] }
language_model = { workspace = true, "features" = ["test-support"] }
parking_lot.workspace = true
lsp = { workspace = true, "features" = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
project = { workspace = true, "features" = ["test-support"] }
rand.workspace = true
reqwest_client.workspace = true
settings = { workspace = true, "features" = ["test-support"] }
tempfile.workspace = true
terminal = { workspace = true, "features" = ["test-support"] }
theme = { workspace = true, "features" = ["test-support"] }
tree-sitter-rust.workspace = true
unindent = { workspace = true }
worktree = { workspace = true, "features" = ["test-support"] }
zlog.workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -1,341 +0,0 @@
use std::sync::Arc;
use agent_settings::{AgentProfileId, AgentProfileSettings, AgentSettings};
use assistant_tool::{Tool, ToolSource, ToolWorkingSet, UniqueToolName};
use collections::IndexMap;
use convert_case::{Case, Casing};
use fs::Fs;
use gpui::{App, Entity, SharedString};
use settings::{Settings, update_settings_file};
use util::ResultExt;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AgentProfile {
id: AgentProfileId,
tool_set: Entity<ToolWorkingSet>,
}
pub type AvailableProfiles = IndexMap<AgentProfileId, SharedString>;
impl AgentProfile {
pub fn new(id: AgentProfileId, tool_set: Entity<ToolWorkingSet>) -> Self {
Self { id, tool_set }
}
/// Saves a new profile to the settings.
pub fn create(
name: String,
base_profile_id: Option<AgentProfileId>,
fs: Arc<dyn Fs>,
cx: &App,
) -> AgentProfileId {
let id = AgentProfileId(name.to_case(Case::Kebab).into());
let base_profile =
base_profile_id.and_then(|id| AgentSettings::get_global(cx).profiles.get(&id).cloned());
let profile_settings = AgentProfileSettings {
name: name.into(),
tools: base_profile
.as_ref()
.map(|profile| profile.tools.clone())
.unwrap_or_default(),
enable_all_context_servers: base_profile
.as_ref()
.map(|profile| profile.enable_all_context_servers)
.unwrap_or_default(),
context_servers: base_profile
.map(|profile| profile.context_servers)
.unwrap_or_default(),
};
update_settings_file::<AgentSettings>(fs, cx, {
let id = id.clone();
move |settings, _cx| {
settings.create_profile(id, profile_settings).log_err();
}
});
id
}
/// Returns a map of AgentProfileIds to their names
pub fn available_profiles(cx: &App) -> AvailableProfiles {
let mut profiles = AvailableProfiles::default();
for (id, profile) in AgentSettings::get_global(cx).profiles.iter() {
profiles.insert(id.clone(), profile.name.clone());
}
profiles
}
pub fn id(&self) -> &AgentProfileId {
&self.id
}
pub fn enabled_tools(&self, cx: &App) -> Vec<(UniqueToolName, Arc<dyn Tool>)> {
let Some(settings) = AgentSettings::get_global(cx).profiles.get(&self.id) else {
return Vec::new();
};
self.tool_set
.read(cx)
.tools(cx)
.into_iter()
.filter(|(_, tool)| Self::is_enabled(settings, tool.source(), tool.name()))
.collect()
}
pub fn is_tool_enabled(&self, source: ToolSource, tool_name: String, cx: &App) -> bool {
let Some(settings) = AgentSettings::get_global(cx).profiles.get(&self.id) else {
return false;
};
Self::is_enabled(settings, source, tool_name)
}
fn is_enabled(settings: &AgentProfileSettings, source: ToolSource, name: String) -> bool {
match source {
ToolSource::Native => *settings.tools.get(name.as_str()).unwrap_or(&false),
ToolSource::ContextServer { id } => settings
.context_servers
.get(id.as_ref())
.and_then(|preset| preset.tools.get(name.as_str()).copied())
.unwrap_or(settings.enable_all_context_servers),
}
}
}
#[cfg(test)]
mod tests {
use agent_settings::ContextServerPreset;
use assistant_tool::ToolRegistry;
use collections::IndexMap;
use gpui::SharedString;
use gpui::{AppContext, TestAppContext};
use http_client::FakeHttpClient;
use project::Project;
use settings::{Settings, SettingsStore};
use super::*;
#[gpui::test]
async fn test_enabled_built_in_tools_for_profile(cx: &mut TestAppContext) {
init_test_settings(cx);
let id = AgentProfileId::default();
let profile_settings = cx.read(|cx| {
AgentSettings::get_global(cx)
.profiles
.get(&id)
.unwrap()
.clone()
});
let tool_set = default_tool_set(cx);
let profile = AgentProfile::new(id, tool_set);
let mut enabled_tools = cx
.read(|cx| profile.enabled_tools(cx))
.into_iter()
.map(|(_, tool)| tool.name())
.collect::<Vec<_>>();
enabled_tools.sort();
let mut expected_tools = profile_settings
.tools
.into_iter()
.filter_map(|(tool, enabled)| enabled.then_some(tool.to_string()))
// Provider dependent
.filter(|tool| tool != "web_search")
.collect::<Vec<_>>();
// Plus all registered MCP tools
expected_tools.extend(["enabled_mcp_tool".into(), "disabled_mcp_tool".into()]);
expected_tools.sort();
assert_eq!(enabled_tools, expected_tools);
}
#[gpui::test]
async fn test_custom_mcp_settings(cx: &mut TestAppContext) {
init_test_settings(cx);
let id = AgentProfileId("custom_mcp".into());
let profile_settings = cx.read(|cx| {
AgentSettings::get_global(cx)
.profiles
.get(&id)
.unwrap()
.clone()
});
let tool_set = default_tool_set(cx);
let profile = AgentProfile::new(id, tool_set);
let mut enabled_tools = cx
.read(|cx| profile.enabled_tools(cx))
.into_iter()
.map(|(_, tool)| tool.name())
.collect::<Vec<_>>();
enabled_tools.sort();
let mut expected_tools = profile_settings.context_servers["mcp"]
.tools
.iter()
.filter_map(|(key, enabled)| enabled.then(|| key.to_string()))
.collect::<Vec<_>>();
expected_tools.sort();
assert_eq!(enabled_tools, expected_tools);
}
#[gpui::test]
async fn test_only_built_in(cx: &mut TestAppContext) {
init_test_settings(cx);
let id = AgentProfileId("write_minus_mcp".into());
let profile_settings = cx.read(|cx| {
AgentSettings::get_global(cx)
.profiles
.get(&id)
.unwrap()
.clone()
});
let tool_set = default_tool_set(cx);
let profile = AgentProfile::new(id, tool_set);
let mut enabled_tools = cx
.read(|cx| profile.enabled_tools(cx))
.into_iter()
.map(|(_, tool)| tool.name())
.collect::<Vec<_>>();
enabled_tools.sort();
let mut expected_tools = profile_settings
.tools
.into_iter()
.filter_map(|(tool, enabled)| enabled.then_some(tool.to_string()))
// Provider dependent
.filter(|tool| tool != "web_search")
.collect::<Vec<_>>();
expected_tools.sort();
assert_eq!(enabled_tools, expected_tools);
}
fn init_test_settings(cx: &mut TestAppContext) {
cx.update(|cx| {
let settings_store = SettingsStore::test(cx);
cx.set_global(settings_store);
Project::init_settings(cx);
AgentSettings::register(cx);
language_model::init_settings(cx);
ToolRegistry::default_global(cx);
assistant_tools::init(FakeHttpClient::with_404_response(), cx);
});
cx.update(|cx| {
let mut agent_settings = AgentSettings::get_global(cx).clone();
agent_settings.profiles.insert(
AgentProfileId("write_minus_mcp".into()),
AgentProfileSettings {
name: "write_minus_mcp".into(),
enable_all_context_servers: false,
..agent_settings.profiles[&AgentProfileId::default()].clone()
},
);
agent_settings.profiles.insert(
AgentProfileId("custom_mcp".into()),
AgentProfileSettings {
name: "mcp".into(),
tools: IndexMap::default(),
enable_all_context_servers: false,
context_servers: IndexMap::from_iter([("mcp".into(), context_server_preset())]),
},
);
AgentSettings::override_global(agent_settings, cx);
})
}
fn context_server_preset() -> ContextServerPreset {
ContextServerPreset {
tools: IndexMap::from_iter([
("enabled_mcp_tool".into(), true),
("disabled_mcp_tool".into(), false),
]),
}
}
fn default_tool_set(cx: &mut TestAppContext) -> Entity<ToolWorkingSet> {
cx.new(|cx| {
let mut tool_set = ToolWorkingSet::default();
tool_set.insert(Arc::new(FakeTool::new("enabled_mcp_tool", "mcp")), cx);
tool_set.insert(Arc::new(FakeTool::new("disabled_mcp_tool", "mcp")), cx);
tool_set
})
}
struct FakeTool {
name: String,
source: SharedString,
}
impl FakeTool {
fn new(name: impl Into<String>, source: impl Into<SharedString>) -> Self {
Self {
name: name.into(),
source: source.into(),
}
}
}
impl Tool for FakeTool {
fn name(&self) -> String {
self.name.clone()
}
fn source(&self) -> ToolSource {
ToolSource::ContextServer {
id: self.source.clone(),
}
}
fn description(&self) -> String {
unimplemented!()
}
fn icon(&self) -> icons::IconName {
unimplemented!()
}
fn needs_confirmation(
&self,
_input: &serde_json::Value,
_project: &Entity<Project>,
_cx: &App,
) -> bool {
unimplemented!()
}
fn ui_text(&self, _input: &serde_json::Value) -> String {
unimplemented!()
}
fn run(
self: Arc<Self>,
_input: serde_json::Value,
_request: Arc<language_model::LanguageModelRequest>,
_project: Entity<Project>,
_action_log: Entity<action_log::ActionLog>,
_model: Arc<dyn language_model::LanguageModel>,
_window: Option<gpui::AnyWindowHandle>,
_cx: &mut App,
) -> assistant_tool::ToolResult {
unimplemented!()
}
fn may_perform_edits(&self) -> bool {
unimplemented!()
}
}
}

View File

@@ -1,140 +0,0 @@
use std::sync::Arc;
use action_log::ActionLog;
use anyhow::{Result, anyhow, bail};
use assistant_tool::{Tool, ToolResult, ToolSource};
use context_server::{ContextServerId, types};
use gpui::{AnyWindowHandle, App, Entity, Task};
use icons::IconName;
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
use project::{Project, context_server_store::ContextServerStore};
pub struct ContextServerTool {
store: Entity<ContextServerStore>,
server_id: ContextServerId,
tool: types::Tool,
}
impl ContextServerTool {
pub fn new(
store: Entity<ContextServerStore>,
server_id: ContextServerId,
tool: types::Tool,
) -> Self {
Self {
store,
server_id,
tool,
}
}
}
impl Tool for ContextServerTool {
fn name(&self) -> String {
self.tool.name.clone()
}
fn description(&self) -> String {
self.tool.description.clone().unwrap_or_default()
}
fn icon(&self) -> IconName {
IconName::ToolHammer
}
fn source(&self) -> ToolSource {
ToolSource::ContextServer {
id: self.server_id.clone().0.into(),
}
}
fn needs_confirmation(&self, _: &serde_json::Value, _: &Entity<Project>, _: &App) -> bool {
true
}
fn may_perform_edits(&self) -> bool {
true
}
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
let mut schema = self.tool.input_schema.clone();
assistant_tool::adapt_schema_to_format(&mut schema, format)?;
Ok(match schema {
serde_json::Value::Null => {
serde_json::json!({ "type": "object", "properties": [] })
}
serde_json::Value::Object(map) if map.is_empty() => {
serde_json::json!({ "type": "object", "properties": [] })
}
_ => schema,
})
}
fn ui_text(&self, _input: &serde_json::Value) -> String {
format!("Run MCP tool `{}`", self.tool.name)
}
fn run(
self: Arc<Self>,
input: serde_json::Value,
_request: Arc<LanguageModelRequest>,
_project: Entity<Project>,
_action_log: Entity<ActionLog>,
_model: Arc<dyn LanguageModel>,
_window: Option<AnyWindowHandle>,
cx: &mut App,
) -> ToolResult {
if let Some(server) = self.store.read(cx).get_running_server(&self.server_id) {
let tool_name = self.tool.name.clone();
cx.spawn(async move |_cx| {
let Some(protocol) = server.client() else {
bail!("Context server not initialized");
};
let arguments = if let serde_json::Value::Object(map) = input {
Some(map.into_iter().collect())
} else {
None
};
log::trace!(
"Running tool: {} with arguments: {:?}",
tool_name,
arguments
);
let response = protocol
.request::<context_server::types::requests::CallTool>(
context_server::types::CallToolParams {
name: tool_name,
arguments,
meta: None,
},
)
.await?;
let mut result = String::new();
for content in response.content {
match content {
types::ToolResponseContent::Text { text } => {
result.push_str(&text);
}
types::ToolResponseContent::Image { .. } => {
log::warn!("Ignoring image content from tool response");
}
types::ToolResponseContent::Audio { .. } => {
log::warn!("Ignoring audio content from tool response");
}
types::ToolResponseContent::Resource { .. } => {
log::warn!("Ignoring resource content from tool response");
}
}
}
Ok(result.into())
})
.into()
} else {
Task::ready(Err(anyhow!("Context server not found"))).into()
}
}
}

Some files were not shown because too many files have changed in this diff Show More