Cherry-pick of #57572 to preview
----
When restarting Zed, I hit a bug where all Git operations were hung. I
realized that there was a hanging git process running `git cat-file
--batch-check=%(objectname)`. The process was waiting on stdin. This was
surprising, because [the
code](e2bbdb19b6/crates/git/src/repository.rs (L1665-L1709))
that spawns this process explicitly closes the pipe that is attached to
the process's stdin after writing a list of ref names.
Using Claude, I found that this could be caused by that pipe file
descriptor being cloned due to file descriptor inheritance when another
child process is `exec`'d while that stdin pipe is open. The fix is to
enhance our Darwin process spawning layer to set the close-on-exec flag
for the pipe file descriptors, so that they are not inherited by child
processes spawned using code paths that don't set
`POSIX_SPAWN_CLOEXEC_DEFAULT`.
Release Notes:
- Fixed a bug on macOS where Git operations could be blocked depending
on the timing of spawning child processes.
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Cherry-pick of #57318 to preview
----
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- N/A or Added/Fixed/Improved ...
Co-authored-by: Ben Kunkle <ben@zed.dev>
Cherry-pick of #57432 to preview
----
Clicking a built-in skill mention while connected to a remote project
(SSH or collab) caused Zed to abort with `called create_local_buffer on
a remote project`.
## Root cause
`agent_ui::ui::mention_crease::open_skill_file` was calling
`Project::create_local_buffer` to display the embedded read-only content
of a built-in skill:
```rust
let buffer = project.update(cx, |project, cx| {
project.create_local_buffer(content, None, false, cx)
});
```
`Project::create_local_buffer` has an explicit panic guard for remote
projects, so any user who clicked a built-in skill mention while in an
SSH or collab project would crash Zed.
## Fix
The buffer is purely a display surface for binary-embedded skill content
— it has no on-disk backing, isn't searchable, and never needs to be
tracked by the project's buffer store. Build it directly with
`language::Buffer::local(content, cx)` instead, matching the pattern
used elsewhere in `agent_ui` (`thread_view.rs`, `message_editor.rs`,
`inline_assistant.rs`, etc.). This works for both local and remote
projects.
## Repro (before fix)
1. Connect Zed to a remote (SSH) project.
2. In the agent panel, click on a built-in skill mention (e.g. one
referencing `create-skill`).
3. Zed aborts with SIGABRT.
After the fix, the mention opens a read-only editor with the embedded
markdown content, identical behavior to local projects.
Release Notes:
- Fixed a crash when clicking a built-in skill mention in the agent
panel while connected to a remote project (Preview only).
Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
Cherry-pick of #57399 to preview
----
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Add `agent::NewTerminalThread` for defining custom shortcuts to launch
an Agent Panel terminal thread.
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Cherry-pick of #57358 to preview
----
Also makes sure we are properly catching and processing thinking events.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- google: Support thinking levels for Google models.
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Cherry-pick of #57299 to preview
----
Implements the [official upgrade
instructions](https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.5#migrate-from-3-flash-preview)
for Gemini 3.5 Flash, and adds BYOK support.
The changes about thinking_level and temperature apply to our situation,
but they are only recommendations, and we have to support older models,
so I preferred not trying to force the preferred / remove the
discouraged parameters for now.
`temperature` becomes optional - we don't fill in a default anymore,
since passing it is now discouraged.
This commit also adds support for `thinking_level`, since it is now
preferred to `thinking_budget`.
`FunctionCall` and `FunctionResponse` now support passing an `id` to
properly maintain chain-of-thought preservation and match execution IDs
across turns. When resolving incoming tool uses, the mapper prefers the
execution ID returned by Gemini, falling back to sequential naming in
other scenarios.
Release Notes:
- Added support for Gemini 3.5 Flash in the Google AI model provider.
Co-authored-by: Tom Houlé <13155277+tomhoule@users.noreply.github.com>
Cherry-pick of #57291 to preview
----
HighlightedLabel would crash the application if any provided highlight
index was invalid. In theory, this should never happen. In practice,
this can happen due to race conditions at call sites.
After this change, we only panic in debug builds. In release builds, we
log an error and return a label with no highlights. The error message
includes the call site so that it's easier to fix the root cause.
Related to #57290
Part of FR-11.
Release Notes:
- N/A
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Adds documentation for the new Skills feature, which replaces Rules
starting in Zed v1.4.0.
## Changes
- **New page**: `docs/src/ai/skills.md` — covers what skills are,
finding and installing skills from skills.sh, using skills via slash
commands and model invocation, creating a skill (folder structure,
SKILL.md format, frontmatter fields, bundled resources), where skills
live (global vs project-local), security model, and limitations
- **Updated**: `docs/src/ai/rules.md` — added deprecation notice
pointing to Skills
- **Updated**: `docs/src/SUMMARY.md` — added Skills entry above Rules in
the AI section
- **Updated**: `docs/src/ai/agent-panel.md` — replaced reference to
"rules files" with "skills" in the Adding Context section
Release Notes:
- Added documentation for the Skills feature
---------
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
I think I introduced this at some point in the terminal agent situation.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Aligns Terminal notifications much closer to Thread notifications
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
This change makes sure that `LineWithInvisibles::from_chunks` applies
the max line length limit to invisible character replacements as it does
to normal text chunks.
Without this change, pathological lines containing many invisible
characters could produce unbounded number of line fragments.
Closes FR-6.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed a rare panic that could occur when lines in the editor contained
many invisible characters.
This PR upgrades `tree-sitter` to v0.26.9.
We're interested in
https://github.com/tree-sitter/tree-sitter/pull/5605, which should fix a
panic when loading certain grammars.
Closes FR-1.
Release Notes:
- Fixed a panic when loading certain Tree-sitter grammars containing
supertypes.
Currently, the `diagnostics` tool queries the current state of the
workspace. However, if the LSP is slow to update diagnostics, this can
lead to stale diagnostics being given to the agent.
This PR changes the `diagnostics` tool to attempt to pull fresh
diagnostics. If it fails, it informs the agent and falls back to the old
behaviour (not all LSPs support pull-based diagnostics).
Release Notes:
- N/A or Added/Fixed/Improved ...
Now that the cloud platform exposes a system-settings endpoint for the
user's selected organization, switch `UserStore` over to it and drop the
local database persistence. The server already returns the current
selected organization for `get_authenticated_user()`.
set_current_organization becomes a optimistic, with the in-memory
selection updated immediately. hen a background task POSTs to the system
settings endpoint.
Stale current_organization_id rows from older installs are left dangling
— harmless and not worth a migration. This is the second step in moving
organization selection to cloud; the first added the
update_system_settings client method.
Part of CLO-716
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
`zed --new ssh://host/path/to/file` only created a new window on the
first call. Subsequent invocations silently reused the existing SSH
workspace for the same host, which then tried to open the new path
against the existing worktree and surfaced a
`DevServerProjectPathDoesNotExist` popup when the path didn't belong to
any open worktree.
The CLI correctly translated `--new` to `OpenBehavior::AlwaysNew`, but
the URL branch of `handle_cli_connection` dropped the `open_behavior`.
`handle_open_request` then called `open_remote_project` (and
`open_paths_with_positions` for `file://`) with
`OpenOptions::default()`, which is `WorkspaceMatching::MatchExact`, so
any existing SSH window for the same host won the match. The issue
applies to `file://` URLs and `-a` / `-e` / `--reuse` for URL-shaped
arguments in general; `--new` was just the most visible symptom.
The fix is making sure the translation of `OpenRequest` is uniform
across plain paths and URL-shaped arguments.
Closes#52679.
Release Notes:
- Fixed `zed --new ssh://host/path` reusing an existing SSH window
instead of opening a new one. This also applied to other URL-shaped path
arguments.
The cmd_f_search flag introduced in #51073 was never cleared when
switching to vim-style search commands, causing collapse_matches to
remain false and match ranges to appear as visual selections.
Reset cmd_f_search when n/N or */# are used, restore Normal mode if
Visual was entered due to the non-collapsed selection, and fix an early
return in visual select_match that leaked collapse_matches.
Fixes#53896
Self-Review Checklist:
- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- N/A or Added/Fixed/Improved ...
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Replaces the legacy Rules creation UI with a focused "New Skill"
creation window when the `SkillsFeatureFlag` is on.
The new `skills_library` crate provides a single-skill form with:
- Name, Description, and Body fields (placeholders double as labels)
- Live validation matching the SKILL.md spec (name: 1–64 lowercase +
digits + hyphens, no leading/trailing hyphen; description: non-empty,
≤1024 chars)
- A scope dropdown listing every local worktree in the originating
workspace plus "Global"
- An Optional Parameters card with the `disable-model-invocation`
checkbox
- Save writes `<scope>/.agents/skills/<name>/SKILL.md` via
`serde_yaml_ng` (YAML-safe escaping), refuses to overwrite existing
skills, shows a success toast in the originating workspace, then closes
the window
The "Rules" entry in the agent panel triple-dot menu is renamed to
"Skills" when the flag is on. The existing `cmd-alt-l` keyboard shortcut
still works: `AgentPanel::deploy_rules_library` reroutes to
`deploy_skills_library` when the flag is on, so any persisted keymaps
and the menu's automatic shortcut lookup keep functioning without
changes to the default keymap files.
The old `rules_library` crate is intentionally left in place for this PR
— once the flag rolls out and the few remaining `OpenRulesLibrary {
prompt_to_select }` call sites (in thread_view link handlers and
@-mention crease) are migrated to an "open existing skill" flow, a
follow-up can delete the crate entirely.
15 unit tests cover the validation rules, frontmatter formatting
(including YAML-special-character round-tripping), and disk write
behavior (creates directory, refuses overwrite).
Closes AI-247
Release Notes:
- Added a new Skills creation UI that replaces the old Rules library
when the Skills feature flag is enabled.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
## Summary
- Adds a `ballerina` icon key to the default icon theme, mapping the
`.bal` file suffix to a new SVG under
`assets/icons/file_icons/ballerina.svg`.
- Icon is the monochrome Ballerina mark from the official WSO2 VS Code
extension, rescaled to Zed's 16×16 viewBox.
## Icon source / license
The SVG is adapted from `ballerina-inverse.svg` in
[wso2/vscode-extensions](https://github.com/wso2/vscode-extensions),
which is Apache-2.0 licensed. The original 400×400 geometry is preserved
via the existing `translate`/`scale` transform; only the viewBox and
fill were normalized to match the convention used by the other icons in
`assets/icons/file_icons/`.
## Test plan
- [x] `cargo build --release --bin zed`
- [x] Opened a folder containing `.bal` files and confirmed the icon
renders in the project panel and tabs.
- [x] Alphabetical ordering preserved in both
`FILE_SUFFIXES_BY_ICON_KEY` and `FILE_ICONS`.
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
<img width="282" height="90" alt="CleanShot 2026-05-14 at 11 28 40@2x"
src="https://github.com/user-attachments/assets/34516022-0e26-4380-9e80-568256483309"></img>
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Improved diff stats by formatting large line counts with thousand
separators.
Closes AI-244
This PR changes the approach for announcing skills support. It uses the
announcement toast, the same thing used for parallel agents, which
observes a specific version number to be displayed. I ended up
simplifying things a bit by thinking we could rely on documentation for
more detailed information (with more extensive paths and whatnot).
Release Notes:
- N/A
---------
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
Co-authored-by: Martin Ye <martinye022@gmail.com>
Removes the `skills` feature flag now that Skills are ready to ship to
all users. Cleans up all `cx.has_flag::<SkillsFeatureFlag>()` gates
across the agent, agent_ui, prompt_store, and title_bar crates, drops
the now-unused `feature_flags` dependency from `prompt_store` and
`title_bar`, and removes the dead `update_flags(true, vec!["skills"])`
calls from the agent's skills tests.
Closes AI-269
Release Notes:
- Enabled Skills for all users.
---------
Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
Co-authored-by: Martin Ye <martinye022@gmail.com>
Closes ZED-86Q
Fixes this (rare) crash by making entity creation via a window context
infallible.
The shape of the result is a bit clunky due to the type signatures
involved. The real solution is to remove AsyncWindowContext entirely and
move it's fallible APIs into WindowHandle, but until then this will give
you a simple starting point.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Self-Review Checklist:
- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable
Closes https://github.com/zed-industries/zed/issues/57073
Release Notes:
- Fixed running Zed on Ubuntu 20.04 installed via the installer by
bundling the required `libstdc++.so`.
Auto watch's lifespan should be tied to that of the call and it should
not be assumed the user wants to have this on indefinitely (until app
restart), as it's more of a niche feature. This PR disables it when the
user leaves a call.
Self-Review Checklist:
- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Closes AI-267
This PR adds a skills subpage in the settings UI, where we display
global skills in the user tab and project skills in the corresponding
project tab. The approach taken here was the simplest one out of the
possible avenues we could've taken to implement this (which would
possibly require bigger refactors), given this is potentially the very
first page in the settings UI where we're displaying stuff that does not
correspond to data available in the `settings.json`.
Important to note that a major limitation of the global approach is that
it's dependent on the native agent having loaded the skill index,
meaning there's an edge case where, if you open the settings UI _before_
having opened the agent panel, you won't immediately see the available
skills. Something to discuss but that it felt like a viable option for a
first ship.
Release Notes:
- Agent: Added a skills section to the settings UI.
If we have empty drafts, they don't show up in the UI, so you can't get
rid of them. But they currently blocked worktree archival. Which is
particularly troublesome with terminal agents in a few cases.
This should hopefully solve the issue for terminals, but I think I need
to do a follow-up to investigate what happens when the last draft is
closed.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Technically we don't know if a `virtiofs` file system supports `inotify`
or not, but it seems like it's mostly used inside virtual machines
provided by:
- OrbStack (`inotify` works)
- Docker Desktop (`inotify` works)
- Lima (`inotify` works with flag)
- Colima (`inotify` works with flag)
- QEMU + virtiofs setup (`inotify` doesn't work without extra setup)
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes#57103
Closes FR-9
Release Notes:
- Fixed an issue where file system watching would default to the polling
backend inside of `OrbStack` VMs on MacOS
Replaces "workspace" labels in the sidebar with more accurate
terminology:
- "Focus Last Workspace" → "Focus Last Project"
- "Focus Workspace" → "Focus Project"
- "Close Workspace" tooltip → "Close Worktree"
Release Notes:
- N/A
Adds documentation for the Terminal Threads feature — the ability to
open interactive terminals in the Agent Panel alongside threads.
## Changes
- **`agent-panel.md`**: Adds a new `## Terminals` section covering how
to open terminals, terminal titles, bell notifications, and closing.
Also adds a Terminal bullet to the `+` menu description in "Creating New
Threads".
- **`parallel-agents.md`**: Updates the page title, description, and
opening paragraph to include terminals alongside threads. Adds a note in
the Threads Sidebar section that terminals appear there too.
Release Notes:
- N/A
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Follow-up to #49292:
- **Bug fix in `push_any_of_constraint`**: when both an `anyOf` and a
non-empty `allOf` were already present at the same level, the existing
`anyOf` was silently dropped. Now it's always preserved.
- **Canonical OpenAPI nullability**: collapse `{nullable: true}`-only
entries out of `anyOf` onto the parent so `anyOf: [{type: "string"},
{type: "null"}]` becomes `{type: "string", nullable: true}` (the form
Gemini actually expects) instead of `anyOf: [{type: "string"},
{nullable: true}]`.
- **Compile-time path consistency**: route `ToJsonSchemaSubsetTransform`
through the same `convert_null_in_types_to_nullable` helper so
Rust-defined tools using `Option<T>` also keep nullability on Gemini,
instead of silently truncating to the non-null type.
- Drop an unnecessary clone in `push_any_of_constraint` and simplify
`convert_types_to_any_of_defs`.
- Add a small `obj()` test helper and a regression test for the `anyOf +
allOf + multi-type` case.
Release Notes:
- Fixed `Option<T>` tool parameters being sent to Gemini without their
nullability, and fixed tool schemas with `anyOf` + `allOf` losing
constraints during the OpenAPI 3.0 conversion
Co-authored-by: Daniel Strobusch <1438302+dastrobu@users.noreply.github.com>
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Part of FR-9.
Release Notes:
- N/A or Added/Fixed/Improved ...
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
In the interactive MCP OAuth flow, the MCP client registers itself with
the authorization in one of three ways:
- Client ID Metadata Document aka CIMD (recommended default). This is
already implemented: https://zed.dev/oauth/client-metadata.json.
- Dynamic Client Registration (DCR). This is the traditional method.
Also already implemented in Zed.
- Pre-registration: the client is registered out of band, typically in
the IdP or SaaS provider's UI. You get a client id and maybe a client
secret, that have to be provided by the MCP client when it wants to
exchange an access token. This is what this pull request is about.
This PR has two main parts:
- Allow users to configure a client id and optional client secret for an
MCP server in their configuration, under a new `oauth` key, and take it
into account
- Make the MCP server state and the configuration modal aware of the
intermediate states (client secret missing) and error cases stemming
from client pre-registration.
The client secret can be stored either in the system keychain or in
plain text in the MCP server configuration. The UI tries to steer user
towards the more secure option: the keychain.
<img width="715" height="201" alt="Screenshot 2026-04-10 at 16 48 06"
src="https://github.com/user-attachments/assets/5e64103e-6746-4ef0-8bd9-533d492b6912"
/>
<img width="884" height="544" alt="Screenshot 2026-04-10 at 16 47 07"
src="https://github.com/user-attachments/assets/0e35bb3c-cbc4-4e8c-a713-66323597b2e2"
/>
<img width="785" height="558" alt="Screenshot 2026-04-10 at 16 47 23"
src="https://github.com/user-attachments/assets/03339187-1508-461a-87ae-a7c2647df9a5"
/>
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes
https://github.com/issues/assigned?issue=zed-industries%7Czed%7C52198
**Note for the reviewer: I know how busy the AI team is at the moment so
please treat this as low priority, we don't have signal that this is a
highly desired feature. It's a rather large PR, so I'm happy to pair
review / walk through it.**
Release Notes:
- Added support for OAuth client pre-registration (client id, client
secret) to the built-in MCP client.
Fixes#55704
The `escape` function in `crates/markdown/src/markdown.rs` was calling
`c as u8` on the `char`s before passing to `MarkdownEscaper::next()`.
This strips non ASCII Unicode codepoints down to just their low 8 bits
which might be in the ASCII punctuation range and thus cause an extra
backslash to be added in front of these non ASCII chars.
Release Notes:
- Fixed a bug where non-ASCII chars in diagnostic messages were
incorrectly rendered with spurious `\` characters
In `Editor::manipulate_text`, we computed selection boundaries for the
updated text assuming the requested edit would be applied exactly. This
is not always true. As a result, we could produce an invalid selection
range and panic.
This change replaces manual selection boundary computation with anchors.
It also skips edits when `new_text == old_text`.
Closes FR-10.
Release Notes:
- N/A
There was a case where if you archived or closed all threads, you
wouldn't see the empty state again.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Follow up to https://github.com/zed-industries/zed/pull/57056 — This PR
ensures we're refreshing the security modal so that it consumes the
trust given to the main worktree when creating a new linked (Git)
worktree.
Release Notes:
- N/A
Makes sure we can reload the last terminal, and also keeps track more
globally what your last agent type was so we can carry that over to new
workspaces
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A