Commit graph

37790 commits

Author SHA1 Message Date
morgankrey
1db20d56dc Standardize AI agent terminology 2026-05-26 09:44:29 -05:00
morgankrey
e6c46deb69 Clarify AI model and layout docs 2026-05-26 09:38:07 -05:00
morgankrey
324dcf382d Add AI docs trust and instruction links 2026-05-26 09:35:01 -05:00
morgankrey
03b1a79b85 Tighten AI by Company API fallback 2026-05-26 09:33:19 -05:00
morgankrey
268fb86c7b Document only stable AI tools 2026-05-26 09:01:07 -05:00
morgankrey
b91b64c06f Update hosted models and AI tools docs 2026-05-26 08:29:50 -05:00
morgankrey
1c0de13b45 Nest AI feedback training sections 2026-05-26 08:20:53 -05:00
morgankrey
a094da7b07 Address AI privacy docs review 2026-05-26 08:14:01 -05:00
morgankrey
6f6182ab31 Clarify AI privacy and training data docs 2026-05-26 08:00:51 -05:00
morgankrey
655569d01a Nest AI improvement under privacy 2026-05-26 07:35:05 -05:00
morgankrey
8607d1b0bb Nest AI docs navigation 2026-05-26 07:20:32 -05:00
morgankrey
6ba0410c48 Address AI docs review findings 2026-05-26 05:42:14 -05:00
morgankrey
1328589960 Combine AI setup into quick start 2026-05-26 04:59:40 -05:00
morgankrey
ddb7505512 Move AI docs below remote development 2026-05-25 07:32:54 -05:00
morgankrey
020a373ee7 Remove invalid external agent keymap example 2026-05-25 07:28:47 -05:00
morgankrey
e102242d61 Fix external agents debugging anchor 2026-05-24 21:51:06 -05:00
morgankrey
79f0068000 Restructure AI docs 2026-05-24 21:33:19 -05:00
morgankrey
c0819735dd Document ChatGPT Subscription provider
Add documentation for the new ChatGPT Subscription provider (PR #53166)
that lets users authenticate with their ChatGPT Plus or Pro subscription
to use OpenAI models directly in Zed without a separate API key.
2026-05-14 22:55:18 -05:00
Danilo Leal
700b0b5de6
agent_ui: Render skills as creases (#56689)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Closes AI-230

This PR makes skills, added as /-mentions, be rendered in the agent
panel as creases, like anything you'd @-mention. Naturally, clicking on
the crease button opens the corresponding skill file in a buffer.

It turned out to be quite a bit of plumbing to make this work,
particularly as I am also introducing an interface to display dividers
and headers in the completion menu. This was relevant to me to add
because it sets a good foundation to convert many agent panel-related
actions as slash commands.

Release Notes:

- N/A

---------

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-14 22:20:34 +00:00
Ben Kunkle
f511076cdb
fs: Fix unwatching causing os unwatch dispatch for recursively watched directories (#56796)
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/zed-industries/zed/issues/55746

Release Notes:

- Fixed an issue where file system events or language server events that
resulted in Zed unwatching many paths would result in high CPU usage
2026-05-14 21:41:37 +00:00
morgankrey
37f6d7a15c
Add ChatGPT subscription provider via OAuth 2.0 PKCE (#53166)
Adds a new language model provider that lets users authenticate with
their ChatGPT Plus/Pro subscription and use OpenAI models
(codex-mini-latest, o4-mini, o3) directly in the Zed agent — without
needing a separate API key.

## How it works

1. **OAuth 2.0 + PKCE sign-in**: Uses OpenAI's official Codex CLI client
ID to run an authorization code flow. A local HTTP server on
`127.0.0.1:1455` captures the callback, exchanges the code for tokens,
and stores them in the system keychain.

2. **Token refresh**: Access tokens are automatically refreshed when
they're within 5 minutes of expiry, using the stored refresh token.

3. **Responses API**: Requests go to
`https://chatgpt.com/backend-api/codex/responses` using the existing
`open_ai::responses` client (Responses API format, not Chat Completions
which was deprecated for this endpoint in Feb 2026).

4. **Required headers**: `originator: zed`, `OpenAI-Beta:
responses=experimental`, `ChatGPT-Account-Id` (extracted from JWT),
`store: false` in the body.

## Files changed

- `crates/open_ai/src/responses.rs`: Add `store: Option<bool>` field to
`Request`; add `extra_headers` param to `stream_response` for
per-provider header injection
- `crates/language_models/src/provider/openai_subscribed.rs`: New
provider (sign-in UI, OAuth flow, token storage/refresh, model list)
- `crates/language_models/src/provider/open_ai.rs`,
`open_ai_compatible.rs`, `opencode.rs`: Pass `vec![]` for new
`extra_headers` param
- `crates/language_models/src/language_models.rs`: Register the new
provider
- `crates/language_models/Cargo.toml`: Add `rand` and `sha2` deps for
PKCE

## Open questions / known gaps

- [ ] **Terms of service**: Usage appears to be within OpenAI's ToS
(interactive use via their official CLI client ID), but needs legal
sign-off before shipping
- [ ] **Redirect URI**: Currently `http://localhost:1455/auth/callback`
— may need to match exactly what OpenAI's Codex CLI uses
- [ ] **UI polish**: The sign-in card is functional but minimal; needs
design review
- [ ] **Error messages**: OAuth error responses from the callback URL
aren't surfaced to the user yet
- [ ] **`o3` availability**: o3 may require a higher subscription tier;
consider gating it

## Testing

Sign-in flow was designed to match the Copilot Chat provider pattern.
Manual testing against the live OAuth endpoint is needed.

Release Notes:

- Added ChatGPT subscription provider, allowing users to use their
ChatGPT Plus/Pro subscription with the Zed agent

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-05-14 21:03:56 +00:00
Lee Nussbaum
003e821177
markdown_preview: Independent code font family (#56744)
Adds a `markdown_preview_code_font_family` setting that overrides the
font used in the markdown preview for code — inline `code` spans and
fenced code blocks.
This is the counterpart to `markdown_preview_font_family` (#54003),
which already does this for body text. Together they let you choose a
typographically matched body + code font pair for the preview without
forcing the code font onto editor buffers, where it may not be a good
coding font:

```json
{
  "markdown_preview_font_family": "Noto Serif",
  "markdown_preview_code_font_family": "Noto Sans Mono"
}
```

Behavior mirrors `markdown_preview_font_family`:
- Scoped to the markdown preview only (`MarkdownFont::Preview`). The
agent panel, notifications, hover popovers, and REPL output are
unaffected — they keep using the buffer font for code.
- Falls back to the buffer font family when unset, so existing previews
are unchanged.
- Overrides the font family only; fallbacks and features still come from
the buffer font.

Before (uses buffer font, here Iosevka):

<img width="509" height="368" alt="Screenshot 2026-05-14 at 1 39 51 PM"
src="https://github.com/user-attachments/assets/6b7e49b2-fc6e-4db1-9679-392b3447f411"
/>

After (uses specified font, here Noto Sans Mono):

<img width="508" height="368" alt="Screenshot 2026-05-14 at 1 40 51 PM"
src="https://github.com/user-attachments/assets/f911c99b-08f8-4336-83eb-54b555f11c54"
/>

Release Notes:

- Added `markdown_preview_code_font_family` to override the code font in
the markdown preview
2026-05-14 20:03:29 +00:00
Aleksei Gusev
f22650bca5
Respect sort_mode in workspace: open files (#56720)
It's possible to configure `sort_mode` for the project panel like that:

```json
"project_panel": {
"sort_mode":"directories_first"
}
```

However, `workspace: open files` doesn't respect this setting and always
shows files and directories mixed. This change fixes the issue.

Release Notes:

- Improved sorting in `workspace: open files`

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-05-14 19:51:10 +00:00
Kai Dinghofer
1f8bb4d525
docs: Update dev-containers requirements for podman (#56739)
Added a hint for `use_podman` setting.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] 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 to be created, but it's just about an outdated doc)
2026-05-14 19:43:08 +00:00
Finn Evers
b058edab18
extension_ci: Fix formatting check failing on grammar queries (#56788)
Since we download the grammars into the `./grammars` directory, the
formatting check can fail on unformatted query files that are present in
the grammars directory, as observed in
https://github.com/zed-extensions/log/pull/18

Thus, this PR changes the check to be more specific to just the queries
in the `languages` directory.

Release Notes:

- N/A
2026-05-14 19:17:01 +00:00
山吹色御守
ffed860261
project: Always pass null when body is non-existent in Vue language server request (#56625)
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

fix vuejs/language-tools#5956

Align with
3fb3329dfb/extensions/vscode/src/extension.ts (L223).

Release Notes:

- Always pass null when body is non-existent in Vue language server
request

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-05-14 18:47:09 +00:00
Conrad Irwin
e36d293a34
Revert vim mode colors in One theme (#56772)
We originally added support for these keys to allow people to customize
the pill. As I noted at the time, we'd like the default to be more
visually minimal.

Release Notes:

- Reverted the colored vim mode indicator pill in the One Light and One
Dark themes (#56662)
2026-05-14 17:33:59 +00:00
Richard Feldman
5f5dd7ae30
Migrate Rules to global Skills and AGENTS.md (#56672)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Adds a one-time, idempotent startup migration that moves every user Rule
out of the `PromptStore` LMDB database into the new Skills + AGENTS.md
world, in a single pass:

- **Non-Default Rules → global Skills.** Each one becomes
`~/.agents/skills/<slug>/SKILL.md` with `disable-model-invocation:
true`, preserving the original behavior that non-Default Rules were only
ever invoked when the user named them. They're now invokable via
`/skill-name` (and still `@`-mentions).
- **Default Rules → global AGENTS.md.** Each one is appended to
`paths::agents_file()` (e.g. `~/.config/zed/AGENTS.md` on macOS/Linux,
`%APPDATA%\Zed\AGENTS.md` on Windows) under an `## H2` heading
containing the rule's title. Default Rules used to be auto-included in
every conversation; the global AGENTS.md is loaded into the system
prompt of every conversation, so the behavior is preserved.
- **Customized built-in prompts → global AGENTS.md** (currently just the
commit-message prompt). If the user has edited a built-in away from
Zed's shipped `default_content()`, the edited body is appended at the
top of the AGENTS.md block. Uncustomized built-ins (still on the shipped
default) are skipped so we don't pollute AGENTS.md with text the user
never wrote.

The migration is gated on the `skills` feature flag — users without the
flag never have their Rules touched in any way. A single global KVP flag
(`rules_to_skills_migration_done`) short-circuits the migration on
subsequent launches, so it runs at most once per machine even across
release channels. A process-lifetime `AtomicBool` guard additionally
prevents racing duplicate spawns when the underlying `cx.on_flags_ready`
callback fires multiple times at startup.

Migration is intentionally non-destructive: rule rows in the LMDB
database stay in place. Users can still see and edit them through the
existing UI, and a downgrade to a Zed build without skills support won't
lose anything.

Slug generation (`agent_skills::slugify_skill_name`) lowercases ASCII
letters, turns spaces into dashes, and drops every other
non-alphanumeric character entirely — so `foo!bar` becomes `foobar`, not
`foo-bar`. `&` is special-cased to become `and` (so `rock&roll` →
`rock-and-roll`). Slug collisions and pre-existing skill directories are
handled by appending `-2`, `-3`, etc.

A title-bar onboarding banner ("Skills have replaced Rules") surfaces
for every user on the `skills` feature flag. Clicking it opens a small
`AlertModal`-based explainer that summarizes the two destinations and
points users at the new `/skill-name` slash command (and notes that
`@`-mentions still work).

Closes AI-227
Closes AI-232

Release Notes:

- N/A
2026-05-14 16:30:08 +00:00
Cole McAnelly
697cf0ccee
Revert: "languages: Improve function parameter highlighting for Bash" (#52245)
## Context

<!-- What does this PR do, and why? How is it expected to impact users?
     Not just what changed, but what motivated it and why this approach.

Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
     if one exists — helps with traceability. -->

Closes https://github.com/zed-industries/zed/issues/52242

This PR reverts a change that highlights shell script arguments as
variables rather than strings. Because of how shell scripts work, all
parameters are strings by default and are regularly represented as such.
The original PR (https://github.com/zed-industries/zed/pull/48067) aimed
to improve highlighting by capturing all arguments as
`variable.parameter`s, but this doesn't align with the idiomatic usage
of shell scripts.

| Current Behavior | Expected Behavior |
|---|---|
| <img width="242" height="84" alt="Image"
src="https://github.com/user-attachments/assets/50c87198-e4be-4627-a742-88060b2b9d14"
/> | <img width="227" height="83" alt="Image"
src="https://github.com/user-attachments/assets/f08b1c62-9c7a-460e-b306-4ac6b9e5a897"
/> |
| Text arguments are highlighted as variable | Text arguments are
highlighted as "string" |

## Self-Review Checklist

<!-- Check before requesting review: -->
- [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
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-05-14 16:22:49 +00:00
liam
5e36ec8256
Highlight bash conditionals and arithmetic operators (#56484)
Resolves https://github.com/zed-industries/zed/issues/56478

This diff fixes Bash syntax highlighting for conditional and arithmetic
expressions. The Bash parser already recognizes tokens like `[[`, `]]`,
`((`, `))`, `$((`, `!=`, and `||`, but Zed’s Bash highlight query was
not capturing several of them.

With this change, the Bash highlight query styles those operators and
delimiters consistently with existing shell operators, brackets, and
special punctuation.

| Before | After |
| --- | --- |
| <img width="1667" height="1088" alt="ayu-old"
src="https://github.com/user-attachments/assets/0a89bd71-0a13-4ebe-8bc9-abc27ab42ed8"
/> | <img width="1667" height="1088" alt="ayu-new"
src="https://github.com/user-attachments/assets/afa5e8ab-f94a-4f5e-8fe8-770bac07559a"
/> |

Release Notes:
- Fixed bash syntax highlighting for conditional expressions, arithmetic
expressions, and related operators.
2026-05-14 16:17:52 +00:00
Nguyen Anh Tu (Elior)
a221a86d49
Fix GPUI crash when using cached view with Input (#50665)
The `draw()` method was calling `.pop()` on `next_frame.input_handlers`
to extract the active input handler for the platform window. This
reduced the Vec length, making cached `paint_range` indices stale. On
the next frame, when a cached view called `reuse_paint()`, it would
index into `rendered_frame.input_handlers` with out-of-bounds indices,
causing a panic: `range start index 1 out of range for slice of length
0`.

**Fix:** Use `.last_mut().and_then(|h| h.take())` instead of `.pop()` to
extract the handler without changing the Vec length. The slot becomes
`None`, which is already handled by `reuse_paint`'s `.take()` logic.

Closes #50456

### Testing

- All 83 existing GPUI unit tests pass
- Manually verified with
[longbridge/gpui-component](https://github.com/longbridge/gpui-component)
`cargo run --example dock`:
  - Switch to Input panel → type text → no crash 
  - Before fix: crash immediately on first keystroke

---

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
*(N/A — no UI changes)*

Release Notes:

- Fixed a crash in GPUI when typing into an Input widget inside a cached
view ([#50456](https://github.com/zed-industries/zed/issues/50456))

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2026-05-14 15:31:46 +00:00
Richard Feldman
29ca37fdcc
Load global AGENTS.md into native agent system prompt (#56757)
Watches a user-global `AGENTS.md` file alongside `settings.json` (at
`~/.config/zed/AGENTS.md` on macOS/Linux, `%APPDATA%\Zed\AGENTS.md` on
Windows) and includes its trimmed contents in the native agent's system
prompt.

This matches the pattern used by Codex (`CODEX_HOME/AGENTS.md`,
defaulting to `~/.codex/AGENTS.md`) and OpenCode
(`~/.config/opencode/AGENTS.md`): personal instructions live next to
other app config and apply across every project the user opens.

## Behavior

- Native Zed agent only. Not passed to ACP / external agents.
- Reads the local config dir, so SSH-remoted projects still get the
local user's personal `AGENTS.md` (project rules continue to come from
the remote workspace).
- Missing, empty, or whitespace-only files are silently treated as no
`AGENTS.md`.
- Read errors surface through the same notification UI as settings
errors, with a stable notification ID that's dismissed once the file
becomes readable again.
- The file is read in full, matching how existing project rules / repo
`AGENTS.md` files are loaded today.

## System prompt rendering

In the system prompt, the user-global `AGENTS.md` appears as `###
Personal AGENTS.md` immediately before `### Project Rules`, so the model
sees personal defaults first and project guidance later (project rules
take precedence on conflicts).

## Tests

- `user_agents_md` watcher: initial load, empty/whitespace ignored,
reacts to file edits.
- `SystemPromptTemplate`: renders personal `AGENTS.md` before project
rules; omits the section when no user `AGENTS.md` is present.

Closes AI-231

Release Notes:

- Added support for a global `AGENTS.md` file alongside `settings.json`
that is automatically included in the agent's instructions for every
project.
2026-05-14 15:02:33 +00:00
Ben Brandt
d4a3e0d5c9
sidebar: Track terminal agent thread telemetry (#56723)
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
2026-05-14 14:47:30 +00:00
Danilo Leal
e80b7443ea
git_ui: Improve GitHub avatar display (#56755)
We had a problem that became more evident to me in the newly-introduced
History tab in the Git panel where the avatars wouldn't show up for a
long time. Problem was that we were trying to render the avatar before
the GitHub user email came in, and that wouldn't work well because it
would 1) skip the fast CDN (which could get rate-limited fast), and 2)
cache the `None` result. So this improvement works by only attempting to
render the avatar when the email is available.

Release Notes:

- Git UI: Improve the display of user avatars in Git-related surfaces.
2026-05-14 14:43:03 +00:00
Marshall Bowers
58d24a610b
client: Attach system ID to sign-in request (#56675)
This PR makes it so we send up the system ID as a query parameter
alongside the native app sign-in request.

Closes CLO-769.

Release Notes:

- N/A
2026-05-14 13:29:49 +00:00
Danilo Leal
c937fc6e33
git_panel: Allow to switch between changes and history tab with keyboard (#56743)
Follow-up to https://github.com/zed-industries/zed/pull/56500. Was
missing this ability very much :)

Release Notes:

- Git Panel: Added the ability to switch between the changes and history
tabs with the keyboard.
2026-05-14 13:11:14 +00:00
Cameron Mcloughlin
80b11f4839
git: Add setting to hide stage/restore buttons (#56740)
With long lines or a small viewport, the stage/restore buttons often
cover code.

Adds a setting to hide the buttons altogether. Defaults to showing them.

Release Notes:

- Added: Setting to hide Git Stage/Restore buttons
2026-05-14 12:37:00 +00:00
Ben Kunkle
4742e75bc9
ep: Send settled data to cloud (#56572)
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 #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-05-14 11:55:18 +00:00
Danilo Leal
29db565437
markdown: Fix default UI font rendering in Mermaid diagrams (#56695)
Release Notes:

- Fixed Mermaid diagrams not rendering with the default UI typeface.
2026-05-14 11:15:08 +00:00
procr1337
9fe2931297
agent: Fix tool paths preferring files in subdirectories named after the project root (#56230)
The tool definition is very clearly contradicting the previous behavior.
Performance impact is unclear to me, we increase the work in a
potentially expensive loop, but it seems necessary to have both the
specified behavior from the tool definition, as well as the
heuristic/fallback for misbehaving models that seems to be intended.

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 #56225

Release Notes:

- Fixed tool paths preferring files in subdirectories named after the
project root
2026-05-14 10:12:56 +00:00
Kirill Bulatov
1376b200c8
Remove code lens from the diff view (#56726)
RHS does not show code runnables already, and lens blocks break the
background highlights, hence remove them too.

Before:

<img width="1728" height="1084" alt="before"
src="https://github.com/user-attachments/assets/6e942568-dcbf-4624-86f6-7f3f31d01d31"
/>

After:

<img width="1728" height="1084" alt="Screenshot 2026-05-14 at 11 13 05"
src="https://github.com/user-attachments/assets/ec3bfcb9-daab-4a33-b799-db86ac352488"
/>

Release Notes:

- Removed code lens from the diff view
2026-05-14 09:39:44 +00:00
Mikhail Pertsev
b01a145fd0
editor: Extract navigation out of editor.rs (#56634)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
cc @SomeoneToIgnore

## Summary

Follow-up to #56409. I addressed the formatting issues and other stuff
from the previous PR

This keeps `editor.rs` around 15k lines.

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
2026-05-14 07:20:51 +00:00
HuaGu-Dragon
75f0940a58
Vim/Helix: Prevent undo grouping when any LSP completion (#53980)
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

## Summary  
Prevent undo grouping when an LSP completion includes extra edits so
that the completion and its extra edits are applied and reverted
atomically.

## Problem
When applying an LSP completion that also applies extra edits, the
editor may merge that completion into the surrounding undo group or
split the transaction while waiting for edits, causing undo to leave the
buffer in an inconsistent state.

## Solution
* Always block undo merging for completions

Closes #ISSUE

Release Notes:

- Prevent undo grouping when any LSP completion
2026-05-14 06:39:33 +00:00
Ben Brandt
cad7406d52
agent_ui: Require an open project for agent panel (#56577)
A bit brute force, but it works.

<img width="1106" height="988" alt="image"
src="https://github.com/user-attachments/assets/d23f9a80-01c5-4ad3-a280-faf8b8bc9dbe"
/>


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: Danilo Leal <daniloleal09@gmail.com>
2026-05-14 01:24:30 +00:00
Nathan Sobo
3a8d012d1a
Fix macOS find query seeding (#56681)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Closes #55619

### Summary

- Route `buffer_search::UseSelectionForFind` through
`BufferSearchBar::deploy` instead of updating the query editor directly.
- Add an explicit seed-query override to `deploy`, so the Cmd-E action
can force `SeedQuerySetting::Always` while regular deploy callers
continue to pass `None` and respect the user’s
`seed_search_query_from_cursor` setting.
- By going through `deploy`, Cmd-E now also runs the search path that
keeps buffer-search navigation state in sync:
  - shows/initializes the search bar for the active searchable item
  - applies the seeded query via `search_suggested`
- calls `search`, which updates the query editor, search options, active
search query, search history, and macOS find pasteboard
  - refreshes `searchable_items_with_matches` and `active_match_index`
  - activates the current match after the search completes
- This ensures the subsequent Cmd-G action has the expected active
query, match list, search token, and active match index to select the
next result.
- Add a macOS-only end-to-end regression test using the default macOS
keymap with `simulate_keystrokes("cmd-e")` and
`simulate_keystrokes("cmd-g")`.

### Validation

- `cargo test -p search test_cmd_e_then_cmd_g_uses_selection_for_find`
- `cargo fmt --check --package search --package zed_actions`
- `./script/check-keymaps`
- `cargo check -p search`
- `cargo check -p workspace`
- `cargo check -p vim`

Release Notes:

- Fixed macOS Cmd-E/Cmd-G find behavior so Cmd-E seeds find from the
cursor or selection and Cmd-G advances through the newly seeded matches.
2026-05-13 23:35:10 +00:00
Anthony Eid
41c710b0a2
git: Allow choosing branch diff target in branch diff view (#56569)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
### Summary

Added a branch diff base branch picker that shows the selected diff base
and prioritizes branches on the active branch’s remote. This also
generalizes the branch picker’s checkout vs. select only behavior so its
UI/search/rendering can be reused by a future git graph picker, and
makes branch diff drop stale in progress base update tasks when the base
or repository changes for faster response.

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  #54050

Release Notes:

- git: Allow choosing branch diff base in branch diff view

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2026-05-13 23:15:35 +00:00
Ben Brandt
ffe4f4f5be
agent_ui: Fix full-width thread view layout (#56684)
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 #56677

Release Notes:

- Agent: Fix squashed message editor when `limit_content_width=false`
2026-05-13 21:29:21 +00:00
Ben Brandt
a7f037d94b
sidebar: Remove agent panel terminal feature flag (#56678)
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 the ability to create Terminal Threads in the Sidebar and Agent
Panel.
2026-05-13 21:21:52 +00:00
zed-zippy[bot]
7d8fe38b56
Bump Zed to v1.4.0 (#56653)
Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-05-13 17:25:55 +00:00
Caio Piccirillo
ae9e177300
Add colors for vim mode in One theme (#56662)
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:

- Update vim mode colors on One theme

# Screenshots:
## Dark

### Vim:
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/5d74753e-d79f-4507-874e-eee8e8ad77de"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/cf3a1945-1a14-48a8-aeb2-ed1a525f91b7"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/77b83ff3-ee1c-465c-a783-4e1deefbe65b"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/2e4ebb69-7bfc-407c-b04e-d4a8fc6df220"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/2d736682-54c1-4db3-9fd1-9ab72b1e1497"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/d796c7a9-c8c9-4bc8-81de-0a44f8b5b0e3"
/>

### Helix:
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/9de5d340-db45-4597-b3fe-2ea503f11909"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/fcdce0e4-3a90-44da-80ff-6d524495dfe8"
/>

## Light

### Vim:
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/34b74e45-4bb4-4388-b7de-50351bf3860c"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/3a66fa4b-0911-4a02-931a-1dda2cf0a33c"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/7bd4492d-4dec-4f1d-b05c-7e60ecc8d549"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/b510107d-39d5-4841-9859-ed27261c9809"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/fb80f295-dcc6-4a73-8d65-15dc133eb3ce"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/d21249ce-fd29-48a3-9c0f-e92e1aacba36"
/>

### Helix:
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/f748cfb4-4584-481b-b880-e77b6be92041"
/>
<img width="338" height="28" alt="image"
src="https://github.com/user-attachments/assets/5cad3bf0-591d-4436-82a6-cb65af9f9be7"
/>
2026-05-13 17:19:00 +00:00