9450bca
ollama: Properly format tool calls fed back to the model (#34750)
Click to expand commit body
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
marius851000
created
69bdef3
editor: Fix inconsistent search behavior for untitled/temporary tabs (#37086)
Click to expand commit body
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()
}
}
```
Liu Jinyi
created
0e33a3a
zeta: Check whether data collection is allowed for recent edit history (#37680)
Click to expand commit body
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.
Michael Sloan
created
76aaf6a
Fix docs for `tabs.close_position` in `default.json` (#37729)
Click to expand commit body
Minor docs fix.
Seems like 0a4ff2f47536c872ebd1ac3e672538a6251832e8 accidentally added
"hidden" to the docs of both – `close_position` and `show_close_button`.
Release Notes:
- N/A
Co-authored-by: tastenbier <>
Bruno Taschenbier
and
tastenbier
created
0ef7ee1
windows: Remove some unused keys from the keymap (#37722)
Click to expand commit body
AFAIK, we dont handle these keys on Windows.
Release Notes:
- N/A
Pickup the changes from #37009
Release Notes:
- N/A
张小白
created
5c30578
linux: Fix IME preedit text not showing in Terminal on Wayland (#37701)
Click to expand commit body
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.
Smit Barmase
created
1552afd
docs: Use `#action` throughout `configuring-zed.md` (#37709)
This reverts commit 4124bedab796d2ac0a1e57f8b94f72500969797a.
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
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
1d828b6
Fix broken link in `CONTRIBUTING.md` (#37688)
Click to expand commit body
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
Marco Groot
created
777ce7c
Fixed LSP binary info not being shown in full (#37682)
Click to expand commit body
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
Kirill Bulatov
created
1f37fbd
language_models: Use `/models/user` for fetching OpenRouter models (#37534)
Click to expand commit body
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
Umesh Yadav
created
8c9442a
language_models: Skip empty delta text content in OpenAI and OpenAI compatible provider (#37626)
Click to expand commit body
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>
Umesh Yadav
created
47a4756
Optimize Chunks::seek when offset is in current chunk (#37659)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
23dc1f5
Disable foreign keys in sqlite when running migrations (#37572)
Click to expand commit body
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.
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"
/> |
chbk
created
6a7b84e
toolchains: Allow users to provide custom paths to toolchains (#37009)
Click to expand commit body
- **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>
A collection of fixups of possibly-unsound code and removing some small
useless writes.
Release Notes:
- N/A
Nia
created
64b6e8b
debugger: Fix allow showing more than 1 compact session item (#37036)
Click to expand commit body
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>
ea36346
Fix attach modal showing local processes in SSH sessions (#37608)
Click to expand commit body
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
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.
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
Finn Evers
created
1c5c855
Show actual error in InvalidBufferView (#37657)
Click to expand commit body
Release Notes:
- Update error view to show the error
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>
Conrad Irwin
and
Brandan
created
b65fb06
editor: Fix text manipulation on line mode selections (#37646)
Click to expand commit body
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
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>
Matin Aniss
and
Conrad Irwin
created
638320b
Improve macOS version information in telemetry (#37185)
Click to expand commit body
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.
https://github.com/zed-industries/zed/blob/1ebc69a44708f344449c0c9d47e33b414277adec/tooling/workspace-hack/Cargo.toml#L355
Release Notes:
- N/A
Peter Tripp
created
91ab063
windows: Make sure `zed.sh` using the correct line ending (#37650)
Click to expand commit body
This got missed in the changes from #37631
Release Notes:
- N/A
张小白
created
fb6cc87
Fix typo in development docs for macOS (#37607)
Click to expand commit body
Release Notes:
- N/A
Yacine Hmito
created
3d37611
cli: Rename script zed-wsl to zed, and enable on non-WSL (#37631)
Click to expand commit body
Closes #23026
With this hotfix, git committing from the built-in Zed terminal (well,
PowerShell), now works.
Release Notes:
- N/A
Jakub Konka
created
360e372
linux: Restore ctrl-escape to keymap (#37636)
Click to expand commit body
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.
Peter Tripp
created
74e8afe
Fix logic for default values for task variables (#37588)
Click to expand commit body
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
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.
Finn Evers
created
16c4fd4
gpui: move Option -> Result conversion out of closure in App::update_window_id (#37624)
Click to expand commit body
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
Jakub Konka
created
ec58adc
languages: Invoke conda activate in conda environments (#37627)
Click to expand commit body
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\
Lukas Wirth
created
bed3587
agent_ui: Fix index panic in `SlashCommandCompletion::try_parse` (#37612)
Click to expand commit body
Release Notes:
- N/A
Lukas Wirth
created
4124bed
gpui: Skip `test` attribute expansion for rust-analyzer (#37611)
Click to expand commit body
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
Lukas Wirth
created
57c6dbd
linux: Fix IME positioning on scaled display on Wayland (#37600)
Click to expand commit body
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.
Smit Barmase
created
fded3fb
zeta: Scope edit prediction event history to current project (#37595)
Click to expand commit body
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).
Michael Sloan
created
a660527
Make entry_for_path return a reference instead of cloning (#37591)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
0cb8a89
settings ui: Improve setting proc macro and add scroll to UI (#37581)
Click to expand commit body
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>
Anthony Eid
and
Ben Kunkle
created
c790247
acp: Pass project environment to external agent servers (#37568)
Click to expand commit body
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>
Cole Miller
,
Richard Feldman
, and
Nia Espera
created
This PR bumps the snippets extension to v0.0.6.
Changes:
- https://github.com/zed-industries/zed/pull/37565
Release Notes:
- N/A
Marshall Bowers
created
4c32d5b
snippets: Disable `feature_paths` by default (#37565)
Click to expand commit body
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
Marshall Bowers
created
ccae033
Make fallback open picker more intuitive (#37564)
Click to expand commit body
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>
Kirill Bulatov
,
Peter Tripp
, and
David Kleingeld
created