Commit graph

37922 commits

Author SHA1 Message Date
zed-zippy[bot]
ce85db149e
v1.4.x stable for @JosephTLyons 2026-05-27 17:21:24 +00:00
zed-zippy[bot]
539c17350d
Avoid duplicate migrated skills (#57853) (cherry-pick to preview) (#57854)
Cherry-pick of #57853 to preview

----
## Summary

- Track existing skill file contents and instruction bodies before
migrating Rules to Skills
- Skip writing migrated skills when an equivalent skill already exists
- Cover duplicate detection across differently named skills

## Tests

- cargo test -p prompt_store rules_to_skills_migration

Release Notes:

- Fixed duplicate Skills being created when migrating Rules.

Co-authored-by: Richard Feldman <richard@zed.dev>
2026-05-27 17:13:52 +00:00
zed-zippy[bot]
9c9bf41e7b
Add Actions to open AGENTS.md (#57847) (cherry-pick to preview) (#57852)
Cherry-pick of #57847 to preview

----
<img width="620" height="172" alt="Screenshot 2026-05-27 at 12 08 26 PM"

src="https://github.com/user-attachments/assets/226b3d0c-003b-44ac-a16f-10af4f2952b3"
/>


Add command palette actions for opening global and project-specific
AGENTS.md files

Closes AI-324

Release Notes:

- Added commands to open global and project-specific AGENTS.md rules

Co-authored-by: Richard Feldman <richard@zed.dev>
2026-05-27 16:42:59 +00:00
zed-zippy[bot]
3965f7133f
Stop loading deprecated agent rules (#57844) (cherry-pick to preview) (#57851)
Cherry-pick of #57844 to preview

----
Summary:

- Stop loading persisted default Zed Rules into native agent project
context.
- Remove legacy user-rules rendering from agent system prompt templates.
- Keep Skills and project rules file support unchanged.

Tests:

- cargo test -p agent
test_system_prompt_does_not_render_legacy_zed_rules_section --lib
- cargo test -p prompt_store test_empty_skills_sets_has_skills_false
- cargo test -p prompt_store
test_project_context_does_not_filter_by_budget

Closes AI-325
Release Notes:

- Fixed deprecated Rules being automatically included in new agent
requests.

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 16:34:01 +00:00
Richard Feldman
e0ecfa8225
agent_skills: Read SKILL.md in one shot via fs.load (#57510) (cherry-pick to preview) (#57831)
Cherry-pick of #57510 to preview

----
Follow-up to #57466 simplifying `load_skill_frontmatter` rather than
fixing a separate bug.

the frontmatter boundary, preventing `str::from_utf8` from failing on a
multi-byte grapheme split across chunks. That fix is correct, but the
chunked read it's working around isn't pulling its weight:
`MAX_SKILL_FILE_SIZE` is 100KB and there's already a metadata pre-check,
so "stop reading early once we've seen the closing `---`" saves at most
~25 pages per file while forcing the use of `open_sync`, a hand-rolled
loop, and a long comment about `smol::unblock` vs the GPUI test
scheduler.

This PR:

- replaces the chunked `open_sync` + read loop with a single
`fs.load(...)` call (the same primitive `read_skill_body` already uses);
- deletes `closing_delimiter_end`, `SKILL_READ_CHUNK_SIZE`, the
`std::io::{self, Read}` import, and the `Parking forbidden` paragraph;
- tightens the metadata pre-check so a metadata error (permissions, I/O,
etc.) bails out instead of silently falling through to a blind read;
- removes the now-obsolete
`test_load_skill_frontmatter_with_emoji_at_chunk_boundary` test — by
construction, a single full read can't split a UTF-8 sequence at any
boundary.

Closes AI-303

Release Notes:

- N/A
2026-05-27 09:14:14 -07:00
Danilo Leal
4e21227a11
git_ui: Respect global AGENTS.md when generating commit message (#57827) (cherry-pick to preview) (#57841)
Some checks are pending
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 / miri_scheduler (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
Cherry-pick of #57827 to preview

----
Release Notes:

- agent: Fixed an issue where commit message generation would not
respect instructions from global `AGENTS.md`

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-05-27 15:14:39 +00:00
Danilo Leal
4b5083072b
skills_creator: Improve header alignment (#57834) (cherry-pick to preview) (#57842)
Cherry-pick of #57834 to preview

----
Tiny UI tweak here to improve the label/traffic lights alignment in the
skills creator header.

Release Notes:

- N/A

Co-authored-by: Martin Ye <martin@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Co-authored-by: Martin Ye <martin@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-05-27 15:10:58 +00:00
Danilo Leal
a051652545
Allow path tools to operate on global agent skills (#57760) (cherry-pick to preview) (#57840)
Cherry-pick of #57760 to preview

----
Extends the same `~/.agents/skills` special case that
`create_directory`, `edit_file`, and `write_file` already use to the
path tools, so the agent can copy or move skills into and out of the
global skills folder and delete individual skills or skill resources
beneath it.

- `copy_path` now allows source and/or destination to be a descendant of
`~/.agents/skills`, going through `fs::copy_recursive` directly when one
side is outside the project.
- `move_path` now allows source and/or destination to be a descendant of
`~/.agents/skills`, going through `fs.rename` directly when one side is
outside the project. Moving the `~/.agents/skills` root itself is
rejected.
- `delete_path` now allows deleting any file or directory beneath
`~/.agents/skills`, going through `fs.remove_dir` / `fs.remove_file`
directly. Deleting the `~/.agents/skills` root itself is rejected.
- All three tools still always prompt for approval on agent-skill paths,
even when default tool permissions are set to allow.
- Added shared helpers in `tool_permissions.rs` for resolving global
skill descendants and rejecting operations on the skills root where
needed.
- Added tests covering copying and moving skills in both directions,
deleting a global skill directory/file, and rejecting deletion of the
skills root.

Release Notes:

- Agent can now copy or move skills into and out of `~/.agents/skills`
and delete individual skills, with an explicit confirmation prompt for
each operation

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 08:04:58 -07:00
Danilo Leal
824e687d27
skill_creator: Make window resizable and form scrollable (#57754) (cherry-pick to preview) (#57839)
Cherry-pick of #57754 to preview

----
The Skill Creator window previously couldn't be resized — its minimum
size was set to the same dimensions as its initial size, so users
couldn't make it smaller or shorter. Its contents also didn't scroll, so
on smaller windows the Skill Content editor would be squeezed below its
usable size.

This change:

- Lowers the window's minimum size to 500×420 so it can be resized in
both directions.
- Wraps the form body in a scrollable container with a vertical
scrollbar.
- Replaces `flex_1 + min_h_0` on the form fields and Skill Content
wrapper with `flex_grow + flex_shrink_0`. Combined with the existing
`min_h(160)` on the body editor, this means:
- When there's extra vertical space, the Skill Content editor grows to
fill it.
- When the window is short, the form keeps its content at natural size
and the outer container scrolls instead of crushing the editor.

Closes AI-315
Release Notes:

- Made the Skill Creator window resizable and its contents scrollable
when the window is smaller than the form.

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 08:01:50 -07:00
Danilo Leal
67e5465fc2
Allow agent tools to edit global skills (#57678) (cherry-pick to preview) (#57837)
Cherry-pick of #57678 to preview

----
Summary

- Allow write_file and edit_file to create or modify files under
~/.agents/skills.
- Keep the global skills exception constrained to that directory and
preserve existing project-path behavior.
- Document global skill file editing support in the built-in
create-skill instructions.

Tests

- cargo fmt -p agent
- cargo test -p agent global_skill_file
- cargo test -p agent
test_create_directory_allows_global_skill_directory

Release Notes:

- Fixed agent file editing for global skills

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-05-27 16:52:40 +02:00
Danilo Leal
d8a151ee29
agent_ui: Show global skill paths in edits summary (#57767) (cherry-pick to preview) (#57838)
Cherry-pick of #57767 to preview

----
Summary

- Display the full path for global skill files in the agent edits
summary when they do not have a project-relative file name.

Closes AI-320

Validation

- cargo check -p agent_ui --lib

Release Notes:

- Fixed global skill edits appearing without a file path in the agent
changes summary.

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 07:50:59 -07:00
Danilo Leal
fa687c0f87
Add skill import from GitHub URL (#57458) (cherry-pick to preview) (#57836)
Cherry-pick of #57458 to preview

----
Summary:

- Added a URL mode to Skill Creator for importing GitHub Markdown files.
- Added clipboard prefill and command palette entry for creating a skill
from URL.
- Reused skill frontmatter parsing so imported skills prefill metadata
and content.
- Added Command Palette command to add skills via URL.

Closes AI-301
Release Notes:

- Added Skill Creator support for importing skills from GitHub Markdown
URLs

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 16:49:35 +02:00
zed-zippy[bot]
bae26d4edd
agent_ui: Improve menu items related to rules (#57828) (cherry-pick to preview) (#57830)
Cherry-pick of #57828 to preview

----
Also adds a menu item called "Rules Library" that takes to the
documentation, which will explain the removal of the feature as a whole.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-05-27 14:18:55 +00:00
zed-zippy[bot]
4ffc6a6f02
Fix skill creator remote project scopes (#57453) (cherry-pick to preview) (#57816)
Cherry-pick of #57453 to preview

----
Summary:

- Include remote worktrees as project-scope options in the skill
creator.
- Reuse workspace root path detection for project scope paths.

Validation:

- cargo check -p skill_creator
- cargo test -p skill_creator

Release Notes:

- Fixed project-local skill creation for remote projects.

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 14:03:52 +00:00
zed-zippy[bot]
4d0cde92a6
docs: Update information regarding rules/skills (#57824) (cherry-pick to preview) (#57826)
Cherry-pick of #57824 to preview

----
Update some content regarding the skills migration and its impact on the
Git commit prompt.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-05-27 13:45:05 +00:00
zed-zippy[bot]
2175af2b33
agent_ui: Add section for skills and rules in ellipsis menu (#57404) (cherry-pick to preview) (#57822)
Cherry-pick of #57404 to preview

----
Closes AI-291

This PR adds some new menu items in the agent panel's ellipsis menu to
make it easier to 1) create a new skill, 2) manage all existing skills
through the settings window, 3) open project and global AGENTS.md file,
if it exists.

Minor UI note: I'm adding an ellipsis character to the menu items in
which you need to do something else in a different view to fulfill the
item's label. For example, "Create Skill…" takes the ellipsis because
clicking on the menu item itself doesn't create the skill, but it takes
you to the place where you'll do that.

<img width="600" alt="Screenshot 2026-05-21 at 10  32@2x"

src="https://github.com/user-attachments/assets/1bfdd423-bd75-4c62-97ba-84130035ede8"
/>

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-05-27 13:10:40 +00:00
zed-zippy[bot]
3311c2ac5d
Iterate on skill announcement copywriting (#57532) (cherry-pick to preview) (#57821)
Cherry-pick of #57532 to preview

----
Tweaking a bit the content that will be displayed in the announcement
toast.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-05-27 13:10:18 +00:00
zed-zippy[bot]
17d29fdd5d
agent_ui: Remove count for user rules in context tooltip (#57456) (cherry-pick to preview) (#57819)
Cherry-pick of #57456 to preview

----
The circular progress in the agent panel's message editor would
previously display the number of default user rules auto-embedded into
the thread. However, given default rules are all migrated to a global
AGENTS.md file, that feature doesn't make a lot of sense anymore. So,
this PR fixes it by adding a button that opens up the global file when
it exists.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-05-27 13:09:30 +00:00
zed-zippy[bot]
943c16a299
skills_creator: Add some UI adjustments (#57452) (cherry-pick to preview) (#57818)
Cherry-pick of #57452 to preview

----
Tiny changes: improving keyboard nav by fixing the tab order, and
improving styles by making the dropdown take just the width of the label
instead of a fixed width.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-05-27 13:08:07 +00:00
zed-zippy[bot]
a71a734d15
agent_ui: Add skills menu item in message editor's context menu (#57407) (cherry-pick to preview) (#57820)
Cherry-pick of #57407 to preview

----
Closes AI-295

This PR adds a skills submenu within the "add context" menu in the agent
panel's message editor. This will hopefully be yet another way to find
skills in the app.

<img width="600" alt="Screenshot 2026-05-21 at 11  24@2x"

src="https://github.com/user-attachments/assets/43652081-3929-4ca0-a32b-464077d84dd5"
/>

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-05-27 13:06:42 +00:00
zed-zippy[bot]
a8594df7a4
Update skill settings immediately after changes (#57447) (cherry-pick to preview) (#57817)
Cherry-pick of #57447 to preview

----
## Summary
- Hide deleted skills immediately in Settings while deletion completes
- Refresh the skill index after creating a skill so Settings updates
without reopening

Closes AI-299
Release Notes:

- Fixed skill management so newly created and deleted skills update in
Settings immediately.

Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-05-27 13:04:37 +00:00
zed-zippy[bot]
f763dffd2a
Fall back to default text when no command is available for the resolved lens (#57790) (cherry-pick to preview) (#57797)
Cherry-pick of #57790 to preview

----
Follow-up to https://github.com/zed-industries/zed/pull/54100

LSP [code

lens](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeLens)
has the only textual data in

[`command`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command),
which we use for rendering (`command.title`).

Certain language servers do not send the command by default until
resolved, and this is the only field worth resolving in the code lens
which we have to fetch asynchronously as the user types.

Not including such lens at all caused flickering and
https://github.com/zed-industries/zed/pull/55075 had dealt with this by
reserving the block for all code lens and swapping them with the
resolved data later.

Yet, certain language servers return empty commands even after
resolving, to indicate "nothing referencing this", as it is shown in
VSCode:

<img width="951" height="424" alt="image"

src="https://github.com/user-attachments/assets/19c8db24-c312-4c33-9da3-003da11e27a3"
/>

Before, we have removed blocks for such lens with no command after the
resolve, but this caused flickering as reported in
https://github.com/zed-industries/zed/pull/55075#issuecomment-4549779927

Thus, this PR falls back to the placeholder for such lens, to avoid any
flickering and odd empty blocks.
Also, this PR reworks the tests to have the assertions more readable.

Before:



https://github.com/user-attachments/assets/6af50fc5-92fb-4ce0-b07b-b2867be75c02


After:



https://github.com/user-attachments/assets/4aa91c12-ae3c-4fb8-9bbd-a61d6edb79df



Release Notes:

- Fixed code lens flickering when resolved to no commands

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-05-27 09:38:05 +00:00
zed-zippy[bot]
85d922eb33
open_ai: Fix error message not showing up when using ChatGPT subscription (#57750) (cherry-pick to preview) (#57795)
Cherry-pick of #57750 to preview

----
The API seems to return nested errors, so made the error deserialise
properly in case we get `{ "error": {...} }` instead of a top-level
error

Closes #57024

For testing, you can prompt something like: `tell me about
https://registry.npmjs.org/vite-plus.`

Before:

<img width="631" height="69" alt="image"

src="https://github.com/user-attachments/assets/5d02e7ec-8176-4bff-87d7-908ac8f0b498"
/>

After:

<img width="697" height="61" alt="image"

src="https://github.com/user-attachments/assets/97fac249-8b76-463c-8483-a150f5db9857"
/>


Release Notes:

- openai: Fixed an issue where error messages would not show up properly

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2026-05-27 09:35:11 +00:00
zed-zippy[bot]
deeebb7d02
anthropic: Pass beta header for speed in BYOK (#57707) (cherry-pick to preview) (#57711)
Some checks are pending
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 / miri_scheduler (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
Cherry-pick of #57707 to preview

----
We were sending the `speed` field set to `"standard"` for BYOK Anthropic
but without the corresponding beta header. leading the requests to fail
with "invalid request format to Anthropic's API: speed: Extra inputs are
not permitted".

This makes sure to attach the beta header whenever the `speed` parameter
is used.

Release Notes:

- Fixed "speed: Extra inputs are not permitted" errors for Opus 4.6 and
4.7 in the Anthropic API provider.

Co-authored-by: Tom Houlé <13155277+tomhoule@users.noreply.github.com>
2026-05-26 09:49:43 +00:00
zed-zippy[bot]
29542ace02
Bump to 1.4.2 for @maxbrunsfeld
Some checks are pending
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 / miri_scheduler (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
2026-05-25 17:39:51 +00:00
zed-zippy[bot]
4e516997d4
Fix git hang caused by accidental inheritance of stdin FD (#57572) (cherry-pick to preview) (#57661)
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>
2026-05-25 16:45:04 +00:00
zed-zippy[bot]
2525caf684
docs: Add more information for releasing extensions (#57261) (cherry-pick to preview) (#57646)
Cherry-pick of #57261 to preview

----
Release Notes:

- N/A

Co-authored-by: Finn Evers <finn@zed.dev>
2026-05-25 14:11:19 +00:00
zed-zippy[bot]
084505b1bb
Bump to 1.4.1 for @probably-neb
Some checks failed
run_tests / orchestrate (push) Has been cancelled
run_tests / check_style (push) Has been cancelled
run_tests / clippy_windows (push) Has been cancelled
run_tests / clippy_linux (push) Has been cancelled
run_tests / clippy_mac (push) Has been cancelled
run_tests / clippy_mac_x86_64 (push) Has been cancelled
run_tests / run_tests_windows (push) Has been cancelled
run_tests / run_tests_linux (push) Has been cancelled
run_tests / run_tests_mac (push) Has been cancelled
run_tests / miri_scheduler (push) Has been cancelled
run_tests / doctests (push) Has been cancelled
run_tests / check_workspace_binaries (push) Has been cancelled
run_tests / build_visual_tests_binary (push) Has been cancelled
run_tests / check_wasm (push) Has been cancelled
run_tests / check_dependencies (push) Has been cancelled
run_tests / check_docs (push) Has been cancelled
run_tests / check_licenses (push) Has been cancelled
run_tests / check_scripts (push) Has been cancelled
run_tests / check_postgres_and_protobuf_migrations (push) Has been cancelled
run_tests / extension_tests (push) Has been cancelled
run_tests / tests_pass (push) Has been cancelled
2026-05-21 21:47:38 +00:00
zed-zippy[bot]
71240f10f8
ep: Don't open unnecessary files during context collection (#57318) (cherry-pick to preview) (#57444)
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>
2026-05-21 21:21:20 +00:00
zed-zippy[bot]
41e61f95d0
agent_ui: Fix crash when opening built-in skill mention in remote projects (#57432) (cherry-pick to preview) (#57442)
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>
2026-05-21 20:54:25 +00:00
zed-zippy[bot]
a48289ab7d
agent_ui: Add keybindable action for terminal threads (#57399) (cherry-pick to preview) (#57400)
Some checks are pending
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 / miri_scheduler (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
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>
2026-05-21 12:50:03 +00:00
zed-zippy[bot]
35d06eb236
google: Add Google thinking level support (#57358) (cherry-pick to preview) (#57377)
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>
2026-05-21 10:43:39 +00:00
zed-zippy[bot]
0928a7e871
google_ai: Support Gemini 3.5 Flash (#57299) (cherry-pick to preview) (#57373)
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>
2026-05-21 10:34:50 +00:00
zed-zippy[bot]
c52c2d4b77
ui: Don't panic on invalid highlight indices in HighlightedLabel (#57291) (cherry-pick to preview) (#57367)
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>
2026-05-21 09:47:10 +00:00
zed-zippy[bot]
24beeafa11
v1.4.x preview for @JosephTLyons 2026-05-20 14:31:48 +00:00
Kirill Bulatov
80c0f7de0a
Stop building semantic highlights on the main thread (#57264)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
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 / miri_scheduler (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
deploy_nightly_docs / deploy_docs (push) Has been skipped
Trace on `main` that showed the hogged main thread: 
[Sample of Zed
Nightly.txt](https://github.com/user-attachments/files/28060310/Sample.of.Zed.Nightly.txt)


Release Notes:

- N/A
2026-05-20 14:12:42 +00:00
María Craig
dd528e3efb
docs: Add Skills documentation (#57095)
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>
2026-05-20 14:10:59 +00:00
Danilo Leal
a4c6a8392d
settings_ui: Fix skills link (#57265)
This PR ensures clicking to copy the skills link in the settings UI
works properly.

Release Notes:

- N/A
2026-05-20 14:00:43 +00:00
Ben Brandt
43b7ca9cc2
terminal: Fix pty info change detection race (#57257)
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
2026-05-20 13:13:00 +00:00
Ben Brandt
1103bd8055
agent_ui: Improve agent terminal notification visibility logic (#57248)
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
2026-05-20 12:47:18 +00:00
Oleksiy Syvokon
d33a3186aa
Respect max line limit for invisible character replacements (#57137)
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.
2026-05-20 12:41:02 +00:00
Marshall Bowers
bc363322af
Upgrade tree-sitter to v0.26.9 (#57183)
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.
2026-05-20 10:46:54 +00:00
Cameron Mcloughlin
e82c04b356
agent: Pull diagnostics (#56663)
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 ...
2026-05-20 08:57:46 +00:00
Bennet Bo Fenner
80d41375e5
agent: Save files when model uses rename tool (#57228)
Release Notes:

- N/A
2026-05-20 08:36:32 +00:00
Tom Houlé
5656f3eb3f
client: Use cloud as source of truth for the selected organization (#57140)
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>
2026-05-20 07:00:02 +00:00
Tom Houlé
0f6ebdd269
cli: Respect --new when opening URLs from the CLI (#54408)
`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.
2026-05-20 06:58:10 +00:00
Liber
068d64edd6
vim: Fix n/N and */# selecting text after cmd+f search (#54027)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
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 / miri_scheduler (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
deploy_nightly_docs / deploy_docs (push) Has been skipped
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>
2026-05-20 03:39:36 +00:00
MartinYe1234
e2c38b5358
Replace Rules UI with Skills creation UI (#56924)
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>
2026-05-20 02:40:57 +00:00
David
661f185f9f
Add file icon for Ballerina (.bal) files (#56799)
## 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>
2026-05-20 02:33:07 +00:00
Agus Zubiaga
7c10059340
ui: Add thousands separators to diff stats (#56754)
<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.
2026-05-20 02:22:25 +00:00