Commit log

112b5c1 Add QuitMode policy to GPUI (#42391)

Click to expand commit body
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

John Tur created

32ec103 collab: Remove unused models left over from chat (#42390)

Click to expand commit body
This PR removes some database models that were left over from the chat
feature.

Release Notes:

- N/A

Marshall Bowers created

a44fc9a Rename `ThemeMode` to `ThemeAppearanceMode` (#42279)

Click to expand commit body
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>

Connor Tsui created

efcd7f7 Slightly improve completion in settings.json (for lsp.<language-server>.) (#42263)

Click to expand commit body
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>

Ole Jørgen Brønner and Kirill Bulatov created

aaf2f9d Ignore "Option as Meta" setting outside of macOS (#42367)

Click to expand commit body
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

John Tur created

62e3a49 editor: Fix rare panic in wrap map (#39379)

Click to expand commit body
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.

Finn Evers created

87d0401 editor: Show relative line numbers for deleted rows (#42378)

Click to expand commit body
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

Finn Evers created

2c375e2 agent_ui: Ensure message editor placeholder text is accurate (#42375)

Click to expand commit body
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.

Danilo Leal created

c24f9e4 Try to download wasi-sdk ahead of time (#42377)

Click to expand commit body
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>

Conrad Irwin and Ben Kunkle created

3fbfea4 Support relative paths in LSP & DAP binaries (#42135)

Click to expand commit body
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>

Andrew Farkas , Cole Miller , and Julia Ryan created

2b369d7 rust: Explicitly capture lifetime identifier (#42372)

Click to expand commit body
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.

Finn Evers created

ed61a79 agent_ui: Fix history view losing focus when empty (#42374)

Click to expand commit body
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.

Danilo Leal created

aa6270e editor: Add sticky scroll (#42242)

Click to expand commit body
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>

Tim Vermeulen , KyleBarton , and Conrad Irwin created

d896af2 git: Handle buffer file path changes (#41944)

Click to expand commit body
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

Dino created

c748b17 zeta2 cli: Cache at LLM request level (#42371)

Click to expand commit body
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>

Agus Zubiaga and Oleksiy Syvokon created

ddf5937 gpui: Move 'app closing on last window closed' behavior to app-side (#41436)

Click to expand commit body
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>

Tryanks and Mikayla Maki created

6e1d86f fs: Handle io::ErrorKind::NotADirectory in fs::metadata (#42370)

Click to expand commit body
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>

Piotr Osiewicz and Dino created

a3f04e8 agent_ui: Fix thread history item showing GMT time instead of local time on Windows (#42198)

Click to expand commit body
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.

Abul Hossain Khan created

3c81ee6 agent_ui: Allow to configure a default model for profiles through modal (#42359)

Click to expand commit body
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

Danilo Leal created

35ae2f5 typo: Use tips from proselint (#42362)

Click to expand commit body
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>

Miguel Raz Guzmán Macedo created

d420dd6 zeta: Improve unified diff prompt (#42354)

Click to expand commit body
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>

Agus Zubiaga and Max Brunsfeld created

42ed032 Fix circular reference issue between EditPredictionButton and PopoverMenuHandle (#42351)

Click to expand commit body
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 

https://github.com/zed-industries/zed/blob/5f8226457ee6e1346a224ae6b0329f014ea883f7/crates/zed/src/zed.rs#L386-L394

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

https://github.com/zed-industries/zed/blob/5fc54986c72f2863645302c5e6a99277f8c38cab/crates/edit_prediction_button/src/edit_prediction_button.rs#L382-L389


https://github.com/zed-industries/zed/blob/a9bc890497f1edaf4f177385cf96785de60e910c/crates/ui/src/components/popover_menu.rs#L376-L384


Release Notes:

- N/A

feeiyu created

2d84af9 agent: Add ability to set a default_model per profile (#39220)

Click to expand commit body
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>

David and Danilo Leal created

7aacc75 Add support for closing window tabs with middle mouse click (#41628)

Click to expand commit body
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.

Abdugani Toshmukhamedov created

7594849 Add failing test

MrSubidubi created

8d63295 Add better labels for completions for ty lsp (#42233)

Click to expand commit body
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.

Caleb Van Dyke created

5ee71aa Simplify & clippify

Kirill Bulatov created

a26ae18 Adjust brackets.scm docs

Kirill Bulatov created

643ae30 Extend tests

MrSubidubi created

327ee05 Add support for skipping brackets in rainbow colorization

MrSubidubi created

0149de4 git: Fix panic in `git2` due to empty repo paths (#42304)

Click to expand commit body
Fixes ZED-1VR

Release Notes:

- Fixed sporadic panic in git features

Lukas Wirth created

359160c git: Add askpass delegate to git-commit handlers (#42239)

Click to expand commit body
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

Jakub Konka created

b8081ad Make it easy to point zeta2 at ollama (#42329)

Click to expand commit body
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

Max Brunsfeld created

35c5815 git: Fix support for self-hosted Bitbucket (#42002)

Click to expand commit body
Closes #41995

Release Notes:

- Fixed support for self-hosted Bitbucket

ᴀᴍᴛᴏᴀᴇʀ created

e025ee6 git: Add base branch support to create_branch (#42151)

Click to expand commit body
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>

Ayush Chandekar created

c60d31a git: Track worktree references to resolve stale repository state (#41592)

Click to expand commit body
Closes #35997
Closes #38018
Closes #41516

Release Notes:
- Fixes stale git repositories persisting after removal

Mayank Verma created

e12178c Merge remote-tracking branch 'origin/main' into kb/rainbow-brackets

Kirill Bulatov created

ed7238f Properly store merged bracket highlights

Kirill Bulatov created

6df0839 Properly select applicable ranges

Kirill Bulatov created

0bcf607 agent_ui: Always allow to include symbols (#42261)

Click to expand commit body
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

Bennet Bo Fenner created

431a195 acp: Fix issue with mentions when `embedded_context` is set to `false` (#42260)

Click to expand commit body
Release Notes:

- acp: Fixed an issue where Zed would not respect
`PromptCapabilities::embedded_context`

Bennet Bo Fenner created

6db6251 agent_ui: Fix external agent icons in configuration view (#42313)

Click to expand commit body
This PR makes the icons for external agents in the configuration view
use `from_external_svg` instead of `from_path`.

Release Notes:

- N/A

Danilo Leal created

2fb3d59 agent_ui: Add component to standardize the configured LLM card (#42314)

Click to expand commit body
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

Danilo Leal created

cc1d66b agent_ui: Improve API key configuration UI display (#42306)

Click to expand commit body
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

chenmi created

5d08c1b Surpress more rust-analyzer error logs (#42299)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

b7d4d17 diagnostics: Keep diagnostic excerpt ranges properly ordered (#42298)

Click to expand commit body
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 ...

Lukas Wirth created

81d38d9 Additional Windows keyboard input fixes (#42294)

Click to expand commit body
- 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

John Tur created

5ae3b15 Fix previous bracket coloring overwriting

Kirill Bulatov created

21f73d9 Use ButtonLike and add OpenExcerptsSplit and dispatches on click (#42283)

Click to expand commit body
Closes #42099 

Release Notes:

- N/A

Matt Miller created

12857a7 agent: Improve `AddSelectionToThread` action display (#42280)

Click to expand commit body
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

Danilo Leal created