161d128
Handle model refusal in ACP threads (#37383)
Click to expand commit body
If the model refuses a prompt, we now:
* Show an error if it was a user prompt (and truncate it out of the
history)
* Respond with a failed tool call if the refusal was for a tool call
<img width="607" height="260" alt="Screenshot 2025-09-02 at 5 11 45 PM"
src="https://github.com/user-attachments/assets/070b5ee7-6ad6-4a63-8395-f9a5093cc40e"
/>
<img width="607" height="265" alt="Screenshot 2025-09-02 at 5 11 38 PM"
src="https://github.com/user-attachments/assets/98862586-390b-494e-b1f8-71d8341c8d9d"
/>
Release Notes:
- Improve handling of model refusals in ACP threads
Richard Feldman
created
e1b0a98
ci: Remove Windows crash analysis CI scripts (#36694)
Click to expand commit body
We'll just SSH into the Windows runners and look for crashes there.
Reverts #35926
Release Notes:
- N/A
---------
Co-authored-by: Peter Tripp <petertripp@gmail.com>
Cole Miller
and
Peter Tripp
created
ae0ee70
Add configurable timeout for context server tool calls (#33348)
Click to expand commit body
Closes: #32668
- Add
[tool_call_timeout_millis](https://github.com/cline/cline/pull/1904)
field to ContextServerCommand, like in Cline
- Update ModelContextServerBinary to include timeout configuration
- Modify Client to store and use configurable request timeout
- Replace hardcoded REQUEST_TIMEOUT with self.request_timeout
- Rename REQUEST_TIMEOUT to DEFAULT_REQUEST_TIMEOUT for clarity
- Maintain backward compatibility with 60-second default
Release Notes:
- context_server: Add support for configurable timeout for MCP tool
calls
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Rafał Krzyważnia
and
Ben Brandt
created
893eb92
docs: Note edge case for macOS 26 (#37392)
Click to expand commit body
- I believe this is caused by metal not being found due to it being on
the XcodeBeta path, not sure if there's a better fix for this but it'll
work until 26 is the latest release
Release Notes:
- N/A
versecafe
created
45fa6d8
tailwind: Add `HTML+ERB` to the list of supported languages (#36797)
Click to expand commit body
Hi! As part of https://github.com/zed-extensions/ruby/issues/162 we
would like to rename HTML/ERB to HTML+ERB since it is more syntactically
correct to treat such language as ERB on top of HTML rather than HTML or
ERB.
To keep the user experience intact, we outlined the prerequisites in the
linked issue. This is the first PR that adds the HTML+ERB language name
to the list of enabled languages for the Emmet extension. We will do the
same for the Tailwind configuration in the Zed codebase. Once the new
versions of Emmet and Zed are released, we will merge the pull request
in the Ruby extension repository and release the updated version. After
that, we will remove the old HTML/ERB and YAML/ERB languages. Let me
know if that sounds good. Thanks!
Release Notes:
- N/A
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
564ded7
acp: Disable external agents over SSH (#37402)
Click to expand commit body
Follow-up to #37377
Show a clearer error here until SSH support is implemented.
Release Notes:
- N/A
Cole Miller
created
63b3839
language_models: Prevent sending the tools object to unsupported models for Ollama (#37221)
Click to expand commit body
Closes #32758
Release Notes:
- Resolved an issue with the Ollama provider that caused requests to
fail with a 400 error for models that don't support tools. The tools
object is now only sent to compatible models to ensure successful
requests.
Umesh Yadav
created
9f74988
language_models: Fix tool_choice null issue for other providers (#34554)
Click to expand commit body
Follow up: #34532
Closes #35434
Mostly fixes a issue were when the tool_choice is none it was getting
serialised as null. This was fixed for openrouter just wanted to follow
up and cleanup for other providers which might have this issue as this
is against the spec.
Release Notes:
- N/A
Umesh Yadav
created
946efb0
Add option for code context menu items to have dynamic width (#37404)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/30598
This PR introduces the `display_options` field in the
`CompletionResponse`, allowing a code context menu width to be
dynamically dictated based on its larger item. This will allow us to
have the @-mentions and slash commands completion menus in the agent
panel not be bigger than it needs to be. It may also be relevant/useful
in the future for other use cases.
For now, we set all instances of code context menus to use a fixed
width, as defined in the PR linked above, which means this PR shouldn't
cause any visual change.
Release Notes:
- N/A
Co-authored-by: Michael Sloan <mgsloan+github@gmail.com>
This PR removes the `http_client` feature from the `gpui` crate, as it
wasn't really doing anything.
It only controlled whether we depend on the `http_client` crate, but
from what I can tell we always depended on it anyways.
Obviates https://github.com/zed-industries/zed/pull/36615.
Release Notes:
- N/A
Marshall Bowers
created
4368c1b
language_models: Add OpenRouterError and map OpenRouter errors to LanguageModelCompletionError (#34227)
Click to expand commit body
Improves the error handling for openrouter and adds automatic retry like
anthropic for few of the status codes.
Release Notes:
- Improves error messages for Openrouter provider
- Automatic retry when rate limited or Server error from Openrouter
Umesh Yadav
created
e5a968b
vim: Fix change surround with any brackets text object (#37386)
Click to expand commit body
This commit fixes an issue with how the `AnyBrackets` object was handled
with change surrounds (`cs`). With the keymap below, if one was to use
`csb{` with the text `(bracketed)` and the cursor inside the
parentheses, the text would not change.
```json
{
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
"bindings": {
"b": "vim::AnyBrackets"
}
}
```
Unfortunately there was no implementation for finding a corresponding
`BracketPair` for the `AnyBrackets` object, meaning that, when using
`cs` (change surrounds) the code would simply do nothing.
This commit updates this logic so as to try and find the nearest
surrounding bracket (parentheses, curly brackets, square brackets or
angle brackets), ensuring that `cs` also works with `AnyBrackets`.
Closes #24439
Release Notes:
- Fixed handling of `AnyBrackets` in vim's change surrounds (`cs`)
Dino
created
7aecab8
agent2: Only setup real client for real models (#37403)
Click to expand commit body
Before we were setting up lots of test setup regardless of if we were
actually going to be making real requests or not.
This will hopefully help with intermittent test errors we're seeing on
Windows in CI.
Release Notes:
- N/A
Ben Brandt
created
e4df866
editor: Do not show edit prediction during in-progress IME composition (#37400)
Click to expand commit body
Closes #37249
We no longer show edit prediction when composing IME since it isn't
useful for unfinished alphabet.
Release Notes:
- Fixed edit predictions showing up during partial IME composition.
Smit Barmase
created
8770fcc
acp: Enable claude code feature flag for everyone (#37390)
Click to expand commit body
Release Notes:
- N/A
Bennet Bo Fenner
created
6dcae27
terminal: Fix not able to select text during continuous output (#37395)
Click to expand commit body
Closes #37211
Regressed in https://github.com/zed-industries/zed/pull/33305
Every time the terminal updates, we emit
`SearchEvent::MatchesInvalidated` to trigger a re-run of the buffer
search, which calls `clear_matches` to drop stale results.
https://github.com/zed-industries/zed/pull/33305 PR also cleared the
selection when clearing matches, which caused this issue. We could fix
it by only clearing matches and selection when they’re non-empty, but
it’s better to not clear the selection at all. This matches how the
editor behaves and keeps it consistent. This PR reverts that part of
code.
Release Notes:
- Fixed an issue where text selection was lost during continuous
terminal output.
Smit Barmase
created
5e01fb8
Nice errors for unsupported ACP slash commands (#37393)
Click to expand commit body
If we get back slash-commands that aren't supported, tell the user that
this is the problem.
Release Notes:
- Improve error messages for unsupported ACP slash-commands
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Richard Feldman
and
Conrad Irwin
created
88a7975
Disable external agents over collab (#37377)
Click to expand commit body
Release Notes:
- Disable UI to boot external agents in collab projects (as they don't
work)
Conrad Irwin
created
4c411b9
language_models: Make `JsonSchemaSubset` the default `tool_input_format` for the OpenAI-compatible provider (#34921)
Click to expand commit body
Closes #30188
Closes #34911
Closes #34906
Many OpenAI-compatible providers do not automatically filter the tool
schema to comply with the underlying model's requirements; they simply
proxy the request. This creates issues, as models like **Gemini**,
**Grok**, and **Claude** (when accessed via LiteLLM on Bedrock) are
incompatible with Zed's default tool schema.
This PR addresses this by defaulting to a more compatible schema subset
instead of the full schema.
### Why this approach?
* **Avoids Poor User Experience:** One alternative was to add an option
for users to manually set the JSON schema for models that return a `400
Bad Request` due to an invalid tool schema. This was discarded as it
provides a poor user experience.
* **Simplifies Complex Logic:** Another option was to filter the schema
based on the model ID. However, as demonstrated in the attached issues,
this is unreliable. For instance, `claude-4-sonnet` fails when proxied
through LiteLLM on Bedrock. Reliably determining behavior would require
a non-trivial implementation to manage provider-and-model combinations.
* **Better Default Behavior:** The current approach ensures that tool
usage works out-of-the-box for the majority of cases by default,
providing the most robust and user-friendly solution.
Release Notes:
- Improved tool compatibility with OpenAI API-compatible providers
Signed-off-by: Umesh Yadav <git@umesh.dev>
Co-authored-by: Peter Tripp <peter@zed.dev>
Follow-up to: https://github.com/zed-industries/zed/pull/37360
Add glossary.md to SUMMARY.md so it's linked to the public
documentation.
Release Notes:
- N/A
Peter Tripp
created
c01f12b
zeta: Small refactoring in license detection check - rfind instead of iterated ends_with (#37329)
Displays the slash command's argument hint while it hasn't been
provided:
https://github.com/user-attachments/assets/f3bb148c-247d-43bc-810d-92055a313514
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Agus Zubiaga
and
Bennet Bo Fenner
created
ac8c653
Fix race condition between feature flag and deserialization (#37381)
Click to expand commit body
Right now if you open Zed, and we deserialize an agent that's behind a
feature flag (e.g. CC), we don't restore it because the feature flag
check hasn't happened yet at the time we're deserializing (due to auth
not having finished yet).
This is a simple fix: assume that if you had serialized it in the first
place, you must have had the feature flag enabled, so go ahead and
reopen it for you.
Release Notes:
- N/A
Richard Feldman
created
d2318be
terminal view: Hide inline assist button if AI is disabled (#37378)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/37372
Release Notes:
- Fix the terminal inline assistant button showing despite `disable_ai`
being turned on.
---------
Co-authored-by: MrSubidubi <finn@zed.dev>
Danilo Leal
and
MrSubidubi
created
a026163
inline assistant: Adjust completion menu item font size (#37375)
Click to expand commit body
Now the @ completion menu items font size respect/match the buffer's
font size, as opposed to being rendered a bit bigger.
| Before | After |
|--------|--------|
| <img width="1226" height="468" alt="Screenshot 2025-09-02 at 11
09@2x"
src="https://github.com/user-attachments/assets/a6d37110-b544-40c3-bf7a-447ea003d4d7"
/> | <img width="1218" height="462" alt="Screenshot 2025-09-02 at 11 09
2@2x"
src="https://github.com/user-attachments/assets/19e58bf8-2db5-442e-8f60-02dd9ee1308f"
/> |
Release Notes:
- inline assistant: Improved @-mention menu item font size, better
matching the buffer's font size.
Danilo Leal
created
ad3ddd3
Revert "gpui: Do not render ligatures between different styled text runs (#37175) (#37382)
Click to expand commit body
This reverts commit 62083fe7963dd5bed4579bb12abac1b7800cdbaa.
We're reverting this as it causes layout shift when typing/selecting
with ligatures:
https://github.com/user-attachments/assets/80b78909-62f5-404f-8cca-3535c5594ceb
Release Notes:
- Reverted #37175
Marshall Bowers
created
7e3fbeb
Add the Glossary from the channel into Zed (#37360)
Click to expand commit body
This should make it easier for contributors to learn all the terms used
in the Zed code base.
Release Notes:
- N/A
David Kleingeld
created
8e7caa4
remove extra brace in rules template (#37356)
Click to expand commit body
Release Notes:
- Fixed: remove extra brace in rules template
Jonathan Camp
created
c894351
vim: Fix change surrounding quotes with whitespace within (#37321)
Click to expand commit body
This commit fixes a bug with Zed's vim mode surrounds plugin when
dealing with replacing pairs with quote and the contents between the
pairs had some whitespace within them.
For example, with the following string:
```
' str '
```
If one was to use the `cs'"` command, to replace single quotes with
double quotes, the result would actually be:
```
"str"
```
As the whitespace before and after the closing character was removed.
This happens because of the way the plugin decides whether to add or
remove whitespace after and before the opening and closing characters,
repsectively. For example, using `cs{[` yields a different result from
using `cs{]`, the former adds a space while the latter does not.
However, since for quotes the opening and closing character is exactly
the same, this behavior is not possible, so this commit updates the code
in `vim::surrounds::Vim.change_surrounds` so that it never adds or
removes whitespace when dealing with any type of quotes.
Closes #12247
Release Notes:
- Fixed whitespace handling when changing surrounding pairs to quotes in
vim mode
Dino
created
a96015b
activity_indicator: Show extension installation and updates (#37374)
Click to expand commit body
This PR fixes an issue where extension operations would never show in
the activity indicator despite this being implemented for ages. This
happened because we were always returning `None` whenever the app has a
global auto updater, which is always the case, so the code path for
showing extension updates in the indicator could never be hit despite
existing prior. Also slightly improves the messages shown for ongoing
extension operations, as these were previously context unaware.
While I was at this, I also quickly took a stab at cleaning up some
remotely related stuff, namely:
- The `AnimationExt` trait is now by default only implemented for
anything that also implements `IntoElement`. This prevents
`with_animation` from showing up for e.g. `u32` within the suggestions
(finally).
- Commonly used animations are now implemented in the
`CommonAnimationExt` trait within the `ui` crate so the needed code does
not always need to be copied and element IDs for the animations are
truly unique.
Relevant change here regarding the original issue is the change from the
`return match` to just a `match` within the activitiy indicator, which
solved the issue at hand.
If we find this to be too noisy at some point, we can easily revisit,
but I think this holds important enough information to be shown in the
activity indicator, especially whilst developing extensions.
Release Notes:
- Extension installation and updates will now be shown in the activity
indicator.
Finn Evers
created
2eb7ac9
windows: Use a message-only window for `WindowsPlatform` (#37313)
Click to expand commit body
Previously, we were using `PostThreadMessage` to pass messages to
`WindowsPlatform`. This PR switches to an approach similar to `winit`
which using a hidden window as the message window (I guess that’s why
winit uses a hidden window?). The difference is that this PR creates it
as a message-only window.
Thanks to @reflectronic for the original PR #37255, this implementation
just fits better with the current code style.
Release Notes:
- N/A
---------
Co-authored-by: reflectronic <john-tur@outlook.com>
张小白
and
reflectronic
created
f06c187
Rename from `create_ssh_worktree` to `create_remote_worktree` (#37358)
Click to expand commit body
This is a left-over issue of #37035
Release Notes:
- N/A
张小白
created
2f279c5
Fix small errors preventing WSL support from working (#37350)
Click to expand commit body
On nightly, when I run `zed` under WSL, I get an error parsing the
shebang line
```
/usr/bin/env: ‘sh\r’: No such file or directory
```
I believe that this is because in CI, Git checks out the file with CRLF
line endings, and that is how it is copied into the installer.
Also, the file extension was incorrect when downloading the production
remote server (a gzipped binary), preventing extraction from working
properly.
Release Notes:
- N/A
Max Brunsfeld
created
60b95d9
Use premultiplied alpha for emoji rendering (#37370)
Click to expand commit body
This improves emoji rendering on windows removing artifacts at the edges
by using premultiplied alpha. A bit more context can be found in #37167
Release Notes:
- N/A
localcc
created
47ad1b2
agent2: Fix terminal tool call content not being shown once truncated (#37318)
Click to expand commit body
We render terminals as inline if their content is below a certain line
count, and scrollable past that point. In the scrollable case we weren't
setting a height for the terminal's container, causing it to be rendered
at height 0, which means no lines would be displayed. This PR fixes that
by setting an explicit height for the scrollable case, like we do in the
agent1 UI code.
Release Notes:
- agent: Fixed a bug that caused terminals in the panel to be empty
after their content reached a certain size.
Cole Miller
created
35c0d02
project: Temporarily disable terminal activation scripts on windows (#37361)
Click to expand commit body
They seem to break things on window right now
Release Notes:
- N/A
Lukas Wirth
created
374a8bc
acp: Add support for slash commands (#37304)
Click to expand commit body
Depends on
https://github.com/zed-industries/agent-client-protocol/pull/45
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Bennet Bo Fenner
,
Antonio Scandurra
, and
Agus Zubiaga
created
f06be6f
docs: Add link to msys2 docs page (#37327)
Click to expand commit body
it was removed earlier. better to keep this link because the page
contains some useful information
Release Notes:
- N/A
Maksim Bondarenkov
created
9702424
settings_ui: Improve case handling (#37342)
Click to expand commit body
Closes #ISSUE
Improves the derive macro for `SettingsUi` so that titles generated from
struct and field names are shown in title case, and toggle button groups
use title case for rendering, while using lower case/snake case in JSON
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle
created
54cec5b
settings_ui: Get editor settings working (#37330)
Click to expand commit body
Closes #ISSUE
This PR includes the necessary work to get `EditorSettings` showing up
in the settings UI. Including making the `path` field on
`SettingsUiItem`'s optional so that top level items such as
`EditorSettings` which have `Settings::KEY = None` (i.e. are treated
like `serde(flatten)`) have their paths computed correctly for JSON
reading/updating.
It includes the first examples of a pattern I expect to continue with
the `SettingsUi` work with respect to settings reorganization, that
being adding missing defaults, and adding explicit values (or aliases)
to settings which previously relied on `null` being a value for optional
fields.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle
created
60d17cc
settings_ui: Move settings UI trait to file content (#37337)
Click to expand commit body
Closes #ISSUE
Initially, the `SettingsUi` trait was tied to `Settings`, however, given
that the `Settings::FileContent` type (which may be the same as the type
that implements `Settings`) will be the type that more directly maps to
the JSON structure (and therefore have the documentation, correct field
names (or `serde` rename attributes), etc) it makes more sense to have
the deriving of `SettingsUi` occur on the `FileContent` type rather than
the `Settings` type.
In order for this to work a relatively important change had to be made
to the derive macro, that being that it now "unwraps" options into their
inner type, so a field with type `Option<Foo>` where `Foo: SettingsUi`
will treat the field as if it were just `Foo`, expecting there to be a
default set in `default.json`. This imposes some restrictions on what
`Settings::FileContent` can be as seen in 1e19398 where `FileContent`
itself can't be optional without manually implementing `SettingsUi`, as
well as introducing some risk that if the `FileContent` type has
`serde(default)`, the default value will override the default value from
`default.json` in the UI even though it may differ (but it should!).
A future PR should probably replace the other settings with `FileContent
= Option<T>` (all of which currently have `T == bool`) with wrapper
structs and have `KEY = None` so the further niceties
`derive(SettingsUi)` will provide such as path renaming, custom UI, auto
naming and doc comment extraction can be used.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes #ISSUE
Adds a first draft of a way for "Dynamic" settings items to be added,
where Dynamic means settings where multiple sets of options are possible
(i.e. discriminated union, rust enum, etc). The implementation is very
similar to that of `Group`, except that instead of rendering all of it's
descendants, it contains a function to determine _which_ descendant to
render, whether that be a single item or a nested group of items.
Currently this is done in a type-unsafe way with indices, a future
improvement could be to make the API more type safe, and easier to
manually implement correctly.
An example of a "Dynamic" setting is `theme`, where it can either be a
string of the desired theme name, or an object with `mode: "light" |
"dark" | "system"` as well as theme names for `light` and `dark`. In the
system implemented by this PR, this would become a dynamic settings UI
item, where option `0` is a single item, the theme name selector, and
option `1` is a group, containing items for the `mode`, and
`light`/`dark` options.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Deals with https://github.com/zed-industries/zed/security/dependabot/65
Release Notes:
- N/A
Kirill Bulatov
created
2ba25b5
editor: Support rewrap in block comments (#34418)
Click to expand commit body
This updates `editor: rewrap` to work within doc comments, based on the
code that extends such comments on newline. I added some tests, and I've
tested it out in JS, C and PHP. (Though PHP depends on
https://github.com/zed-extensions/php/pull/40)
Closes #19794
Closes #18221
**Caveat:**
~~This will not rewrap an existing single-line block comment, such as
the one provided in #18221:~~ this will now rewrap as expected
```c
/* we can triangulate any convex polygon by picking a vertex and connecting it to the next two vertices; we first read two vertices, and then, for every subsequent vertex, we can form a triangle by connecting it to the first and previous vertex */
```
However, it will rewrap a similar comment if it is shaped like a doc
comment. In other words, this will rewrap as expected:
```c
/*
* we can triangulate any convex polygon by picking a vertex and connecting it to the next two vertices; we first read two vertices, and then, for every subsequent vertex, we can form a triangle by connecting it to the first and previous vertex
*/
```
This seems like a reasonable improvement and limitation to me,
especially as a first step.
cc @smitbarmase because I think that you've been making a lot of the
`newline` and `rewrap` changes recently. (Thank you for those, by the
way!)
Release Notes:
- Added support for rewrap in block comments.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
claytonrcarter
and
Smit Barmase
created
965dbc9
gpui: Fix typo in Windows alpha correction shader (#37328)
Click to expand commit body
This PR fixes a typo in the Windows alpha correction shader that is now
caught by https://github.com/zed-industries/zed/pull/37314.
Another case that could be addressed by Bors.
Release Notes:
- N/A
Closes #36023
This improves font rendering quality by doing perceptual gamma+contrast
correction which makes font edges look nicer and more legible.
A comparison image: (left is old, right is new)
<img width="1638" height="854" alt="Screenshot 2025-08-29 140015"
src="https://github.com/user-attachments/assets/85ca9818-0d55-4af0-a796-19e8cf9ed36b"
/>
This is most noticeable on smaller fonts / low-dpi displays
Release Notes:
- Improved font rendering quality
localcc
created
61175ab
windows: Don’t skip the typo check for the windows folder (#37314)
Click to expand commit body
Try to narrow down the scope of typo checking
Release Notes:
- N/A