Merge upstream Zed (8bdd78e023..1399540715, 261 commits) into Helix fork - #58
Merged
Conversation
Make up to ten retries to avoid placing cursor on files that are typically machine generated (like Cargo.lock) Release Notes: - N/A
Correctness and efficiency fixes to `imitate_human_edits`. Release Notes: - N/A
…election (zed-industries#57236) Make non-singleton editors to return project paths by adding a `fn active_project_path`: this had been added as `fn project_path` and similar already, so the PR replaced those methods with the generic one now. Before: https://github.com/user-attachments/assets/d0773e18-3910-4c5b-bcb3-a742f9bf9691 After: https://github.com/user-attachments/assets/e7a3f13e-9649-4564-a7e6-dccf54f8c000 Release Notes: - Made project panel to auto reveal multi buffer excerpts with latest selection
We regularly get a certain amount of 'blank' issues on github — those created bypassing all our templates — and since a fair share of them are bug reports, it would be helpful for the person triaging if the duplicates bot has left suggestions on these issues too. Release Notes: - N/A
…7261) Release Notes: - N/A
…s#57586) When shift is held during a single click, extend the existing selection from its anchor point to the clicked position instead of starting a new selection. 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: - Added markdown support shift+click to extend text selection
Summary: - Added a rename action for agent threads in the sidebar. - Persisted renamed thread titles and kept open thread views in sync. Release Notes: - Improved agent threads by allowing them to be renamed directly from the sidebar.
In addition to the user-facing suggestions with potential duplicates, the bot will now also have a separate collapsible block in the same comment that's meant more for the triagers. This block will list the duplicates we're less sure about as well as recently closed issues that seem related to the issue at hand. This commit updates the bot to V3 for the tracking-effectiveness purposes and fixes some leftovers from the previous dupe bot change (activating the bot for issues with no type). It also improves the reliability of the script a bit, wrapping some calls to the GitHub API into retries. Release Notes: - N/A
…7285) cc @cole-miller 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 branch enumeration when a broken Git ref prevents commit metadata from being read. --------- Co-authored-by: Cole Miller <cole@zed.dev>
Following up on our recent extension outage, this PR adds an action to quickly visit our status page (which with the help of @\gaauwe was recently updated to a more up to date design 🎉 ). While already invokable through the command palette, we can later use this to also add buttons where appropriate for a quick lookup of our current status. Release Notes: - Added the `zed::OpenStatusPage` action to be able to easily visit the Zed status page.
…tries#57330) When viewing the diff for a commit where one of the files has a large number (hundreds or thousands) of diff hunks, we can get a hang on the main thread, since there's a large amount of work to recompute diff transforms for thousands of excerpts. This PR makes it so that we batch the addition of excerpts, with yield points in between batches so the UI remains responsive. We should have something similar for the project diff, but that's a bit trickier; will address it in a separate PR. 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 performance when opening the commit view with files that have many diff hunks.
Reverts zed-industries#57521 Forgot review approval Release Notes: - N/A
This PR changes the git store's `compute_snapshot`, which runs to update state that depends on the contents of `.git`, to degrade gracefully when fetching individual pieces of state fails. For example, when fetching the list of branches fails, instead of returning early from the function (leaving the previous git state snapshot in place with stale state), we continue with an empty list of branches. This prevents failures of individual git commands from making the entire git UI get stuck indefinitely. 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: - Fixed an issue where failing to fetch branches using the git CLI would prevent other git-related state from being updated.
…ries#57572) 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](https://github.com/zed-industries/zed/blob/e2bbdb19b6da2ee157ca1d36100acde2134a1663/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.
- don't fail to parse json when Claude ignores the instructions and returns fenced json - don't fail to search for issues by area labels when Claude ignores the instructions and returns prose instead of comma-separated list - don't mark workflow runs as successful when json parsing blew up or posting the comment failed Release Notes: - N/A
…ndustries#57582) Release Notes: - N/A
…e-latest-zed Spec-Ref: helix-specs@f5f507183:002029_merge-latest-zed
Upstream commit cfd0461 ("Prefix read_file tool output with line numbers") added a code_span_resolver field to ConversationView and a new positional argument to ThreadView::new. Helix's from_existing_thread constructor needs to mirror what the upstream new() does: build the resolver from project.downgrade() and thread it through. Pattern matches conversation_view.rs:725. Spec-Ref: helix-specs@f5f507183:002029_merge-latest-zed
…, 2026-05-25) Records the second upstream merge stacked onto the 002029 feature branch: zero manual conflicts (ort strategy), one signature-drift repair for ThreadView::new / ConversationView (code_span_resolver from cfd0461), ancillary notes for the new ACP logout/additional-directories defaults that compose cleanly with PR #50, and E2E validation results. Spec-Ref: helix-specs@f5f507183:002029_merge-latest-zed
…iew (zed-industries#57632) Closes zed-industries#53266 When a tool call awaiting permission is below the viewport, it’s easy to miss why the agent has stopped working. This PR adds a floating row at the bottom of the panel that mirrors the pending permission request. It reuses the same permission prompt, so you can allow or deny it and see the raw input without scrolling to the end of the thread. It offers a "Scroll to" button to jump back to the inline prompt in the thread. Once the inline prompt is in view, the floating row disappears. If multiple tool calls need permission, including a subagent’s, they’re shown one at a time so rows don’t stack on top of each other. <img width="508" height="181" alt="image" src="https://github.com/user-attachments/assets/7d5fedd6-bc4d-4674-8ea2-5c8f2ed3aff6" /> Release Notes: - Improved visibility of pending tool call confirmations in the Agent Panel when its scrolled out of view. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
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>
…zed-industries#57500) Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] ~Unsafe blocks (if any) have justifying comments~ (N/A) - [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 Improves zed-industries#44738 by including icons for more non-GitHub remotes instead of a generic link icon. The SVG icons I added in `assets/icons` are sourced from [simpleicons.org](https://simpleicons.org) as placeholders. They most definitely aren't in Zed's style and need design team input. Previews from History tab in Git panel (clicking on a commit in git graph also shows matched icons):      Release Notes: - Added icons for Bitbucket, Codeberg, Forgejo, Gitea, and GitLab remote providers. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes zed-industries#33587 https://github.com/user-attachments/assets/bbaea8a9-402e-485b-800e-2f4486142956 Release Notes: - Supported LSP document links (enabled by default, use `"lsp_document_links": false` to turn it off)
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 zed-industries#53486 Note that this builds off of zed-industries#55117 because both touched similar code areas; I thought it best to in order to avoid conflicts. Release Notes: - Added support for local features in dev containers
## Context This PR updates a misleading comment in the remote edit merge path in the text CRDT. At `crates/text/src/text.rs`, the code skips fragments when `fragment.timestamp > timestamp`, but the comment described this as "lower lamport timestamp." In this codebase, Lamport ordering is ascending (`value`, then `replica_id`), so `>` means a higher Lamport timestamp. This change is comment-only and does not change runtime behavior. ## How to Review 1. Open `crates/text/src/text.rs` and inspect the updated two-line comment above the `while let Some(fragment) = old_fragments.item()` loop in `apply_remote_edit`. 2. Confirm the condition directly below is unchanged: `fragment.timestamp > timestamp`. 3. (Optional) Cross-check Lamport ordering in `crates/clock/src/clock.rs` (`impl Ord for Lamport`) to confirm the wording. ## 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 (comment-only change; no behavior changes) - [x] Performance impact has been considered and is acceptable Release Notes: - N/A Co-authored-by: Lukas Wirth <lukas@zed.dev>
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.
For long threads we will spend more and more time cloning the messages just to save them to the database, as we need a copy of everything to do so asynchronously. Messages are really expensive to clone though and we accumulate a lot of them really fast, so even for smaller threads we start seeing pauses in the millisecond range. The fix to this is fairly simple though, we never mutate the messages once pushed to the vec, so just Arc them. This PR also slightly changes `UserMessage` to be a bit faster to clone as well. Release Notes: - Fixed a cause of stutters when interacting with the agent
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 ...
Fixed width mode wouldn't reliably take the sidebar width into account when laying out the content of the agent panel. This fixes it Release Notes: - N/A or Added/Fixed/Improved ...
Instead of mixing row dimensions accidentally, this will now target the rows in the current active excerpt, clamping to the nearest excerpt if out of bounds. Release Notes: - Fixed go to line going to arbitrary lines in multibuffers
Just a small tweak here making sure the recent project's list items truncate properly, instead of being hard cut off. Release Notes: - N/A
Closes zed-industries#57992 Closes AI-349 ## Summary - Run rules-to-skills migration during agent UI init instead of waiting for feature flags in production. - Add a command palette action to rerun the migration manually. - Make AGENTS.md migration appends idempotent to avoid duplicated default-rule prompts. Release Notes: - Added a manual way to trigger the Rules to Skills migration
…ies#57987) Adds two built-in agent tools, behind the staff-only `create-thread-tool` feature flag, that let the agent spawn independent sibling threads: - **`create_thread`** creates a new thread with a title and initial prompt. It runs on the user's behalf and shows up in the agent sidebar like a thread the user started themselves, but it runs in the background — the active thread is never interrupted — and it does **not** report results back to the caller. (Use `spawn_agent` when you want the results.) - **`list_agents_and_models`** enumerates the configured agents and, for the native agent, the available models, so the agent can pick a cheaper/faster model for bulk work. The motivating stress test was "spawn 100 threads that each write a haiku, using Haiku instead of Opus." By default the sibling shares the parent's project and worktree. If `use_new_worktree` is set, `create_thread` instead opens a new background workspace backed by fresh linked git worktrees of the project's repos — the same flow you get from the worktree picker's "Create worktree" — and starts the thread there. The new workspace opens as a background tab so it doesn't pull you away from what you're doing. A few notes on the design: - The `agent` crate can't depend on the UI, so there's a `SiblingThreadHost` trait that `agent_ui::AgentPanel` implements and installs on the `NativeAgent`. Tool calls in a native-agent thread route through it. - Sibling threads go through the same `create_agent_thread` → `ConversationView` path as the user-facing "new thread" action, so eviction, persistence, and sidebar rendering match user-created threads. - An explicit `agent`/`model` override doesn't clobber the panel's selected agent or the last-used-agent preference — those are snapshotted and restored around the call. - The worktree path reuses the existing "Create worktree" machinery rather than reimplementing it; the agent flow just opens the new workspace in the background instead of activating it. A couple of things I left out or want to call out: - There's no tool to operate on an already-created sibling by session id. The success payload deliberately omits it, since the session is populated asynchronously and nothing consumes it yet. - When a project has multiple worktrees that are linked worktrees of the *same* underlying repo, they collapse into a single new worktree (they resolve to the same target path). The tool returns a warning in that case rather than failing — and this also fixes a latent collision the manual "Create worktree" flow would hit in the same situation. Release Notes: - N/A
Extraction done from zed-industries#53453 I removed the default Oid implementation we had and added support back for SHA264 back as well. I also removed the hex dependency and just added some of those functions we needed in house so we can avoid building yet another dependency 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
zed-industries#57972) Adds granular, per-path write permissions to the agent's sandboxed `terminal` tool. Previously a command could only request unrestricted filesystem writes (`allow_fs_write: true`) as an all-or-nothing escape hatch. Now the model can request write access to specific paths via `fs_write_paths`, and each granted directory covers its whole subtree. The broad escape hatch is still available as `allow_fs_write_all: true` for cases where the paths can't be enumerated up front. Approval prompts now let the user grant a write request either just for that command or for the rest of the conversation. Conversation grants are tracked in memory (never persisted) using pure subtree containment, so later commands writing under an already-granted path run without prompting again. Closes AI-335 Release Notes: - Improved the agent's terminal sandbox so commands can request write access to specific paths instead of all-or-nothing filesystem access, with the option to grant access for a single command or the rest of the conversation. --------- Co-authored-by: Anant Goel <anantdgoel@gmail.com> Co-authored-by: Richard Feldman <oss@rtfeldman.com>
zed-industries#58260) Release Notes: - N/A or Added/Fixed/Improved ...
## Summary - Remove the `git2` crate and its C dependencies (`libgit2-sys`, `libz-sys`), replacing all remaining usage with the git CLI and other previously used rust crates - Replace `git2::Patch` in `buffer_diff` with `imara-diff` (used elsewhere in the codebase for word diffing) - Replace `git2::Oid` with `[u8; 20]` and the `hex` crate - Replace `git2::Repository` in `RealGitRepository` with stored paths and git CLI calls via the existing `GitBinary` - Fixes a bug where linked worktree git dir events could cause the repository entry to be dropped ### Motivation libgit2 does not support the [reftable](https://github.blog/2024-04-29-highlights-from-git-2-45/#preliminary-reftable-support) storage format that was introduced in git 2.45 (see [libgit2#7117](libgit2/libgit2#7117)), meaning that git operations in the app using these (like git status, branch names, diffs, e.g.) appeared broken for any repository using `--ref-format=reftable`. [Git 3 will use reftables by default](https://www.deployhq.com/blog/git-3-0-on-the-horizon-what-git-users-need-to-know-about-the-next-major-release), so this needs to be supported eventually. Most operations used the git binary already, but there were still a handfull of stragglers using libgit2. By swapping out the remaining uses, we can remove the dependancy of libgit2 and eliminate ~30k lines of vendored C and the associated build complexity (cmake, libz, pkg-config), as well as ensure that all git operations go through similar codepaths. Closes zed-industries#46747 Closes zed-industries#45702 fixes ZED-76X fixes ZED-73N ### Notes - `reload_index` is removed from the `GitRepository` trait since both implementations were no-ops (the CLI always reads from disk) - `change_branch` is simplified to `git checkout <name>`, which natively handles local/remote branch resolution - `load_index_text` and `load_committed_text` no longer explicitly filter symlinks (the old code returned `None` for symlinked entries) ## Test plan - [x] `cargo test -p git` (34 tests) - [x] `cargo test -p buffer_diff` (14 tests) - [x] `cargo test -p worktree -- test_linked_worktree_git_dir_events_do_not_panic` - [x] `cargo test -p util` (108 tests) - [x] `cargo test -p project -- test_file_status test_repository_subfolder_git_status test_update_gitignore` - [ ] Manual testing of diff gutter, staging, branch switching, remote operations - [ ] Manual testing with a reftable repository Release Notes: - Fixed git integration not working with repositories using the reftable reference storage format --------- Co-authored-by: Anthony Eid <anthony@zed.dev>
…cker (zed-industries#58299) Closes ZED-8SQ This PR uses the same pattern for `can_select` as other delegates and also guards `can_select` call in `Picker::render_element` which was regressed in zed-industries#50705. Release Notes: - Fixed a crash that could occur when searching or configuring tools in agent profile settings.
Updates the agent server extension documentation to account for the ACP server extension deprecation. Release Notes: - N/A --------- Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
…ries#58151) 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 zed-industries#56602. Creating a branch from the branch picker normalizes the typed name with `replace(' ', "-")`, so leading or trailing spaces became leading or trailing hyphens (e.g. ` fix-leak ` -> `-fix-leak-`). git rejects such names, so branch creation failed. Trimming the query before replacing spaces yields a valid name. Release Notes: - git_ui: Fixed branch creation failing when a branch name had leading or trailing whitespace --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
…tries#58156) 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
Release Notes: - agent: Indicate when ACP servers are downloading --------- Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This updates docs to reflect changes threshold billing behavior for individual Zed Pro subscriptions. - Scope threshold billing language explicitly to individual Zed Pro subscriptions. - Remove stale language saying each $10 threshold crossing resets the threshold to $0. - Document that threshold invoices start at $10, may rise in $10 increments up to $100, and are not automatically lowered during the same subscription. - Split spend-limit docs between Zed Pro and Zed Business, with Business readers linked to organization billing. Release Notes: - N/A
We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those. We will now log tasks running longer then 100ms on the foreground or background. Hanging actions will also be logged including their name. We simultaneously collect statistics on task and action performance and send those to telemetry. This includes quantiles and averages for each hanging task. Finally this adds tree dev actions: - hang action - hang foreground - hang background These cause a hang to check if hang reporting is working and in the future telemetry. 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: - Added logging and telemetry of tasks and actions with performance issues
Closes AI-351 This PR builds on top of zed-industries#57692 by improving the draft threads UX in the context of worktrees. If you have more than one worktree loaded for a given group, clicking on the plus button will now display a menu allowing you to choose for which worktree you'd like to open a new thread in. This felt particularly relevant in the case of discarding a draft within a worktree when that was the only thread item for that worktree, making it hard to come back to it. Added some extra stuff in here as well with regards to better draft management. Most notably, if you created a new thread and then typed something, this draft thread would show a timestamp that's relative to the creation time of the thread. However, if you moments later deleted the draft content and then typed something up again, the timestamp would be stuck in the creation time. That felt wrong because by erasing the content you effectively reset the draft. So, this branch makes it so, in this context, the timestamp would be reset to now. Release Notes: - Agents: Added improvements for the draft thread UX particularly in the context of worktrees, allowing to choose for which worktree to open a thread in when the group contains more than one.
…ed-industries#58325) Closes FR-49 This PR fixes stack overflow in flowcharts with deeply nested subgraphs. Rewrote recursive call to iterate with an explicit stack on heap. Added test which reproduces the overflow. We use our fork now, with patch on existing v0.4.0: zed-industries/merman@1c765dc Release Notes: - Fixed a crash in when rendering Mermaid diagram flowcharts with deeply nested subgraphs.
…ed-industries#55246) Add a `custom_headers` setting to each HTTP-based language model provider (Anthropic, Bedrock, DeepSeek, Google, LM Studio, Mistral, Ollama, OpenAI, OpenAI-compatible, OpenCode, OpenRouter, Vercel AI Gateway, and xAI) so users can attach extra headers to every outgoing request. Headers managed by Zed (authentication, content-type, etc.) cannot be overridden and are skipped with a warning. 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: - Added support for configuring custom HTTP headers on language model providers via `language_models.<provider>.custom_headers`. Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
… a filter (zed-industries#54944) ## Context When a file is opened outside any project, Zed creates a single-file worktree for it where the file's relative path is `""` (the worktree root IS the file). Typing to filter in the file picker (Ctrl-P) caused a crash: `Error: opening project path "/home/user/foo.txt/foo.txt"`. Two bugs combined to produce this: 1. **History lookup mismatch** : `fuzzy_nucleo` detects `root_is_file = true` for single-file worktrees and moves the worktree root name into `path_match.path` (so `"" → "foo.txt"`). `matching_history_items` stored the entry under key `""`but looked it up by `"foo.txt"` → miss → item dropped from history matches. 2. **Search confirm duplication** : because the history match was dropped, the file appeared as `Match::Search` with `path_match.path = "foo.txt"`. Confirming the constructed `ProjectPath { path: "foo.txt" }` inside a worktree rooted at `/home/user/foo.txt` → resolved to `/home/user/foo.txt/foo.txt`. Fix 1 adds a fallback empty-path lookup in `matching_history_items` so single-file worktree entries are found correctly and deduplication suppresses the search duplicate. Fix 2 is defense-in-depth: if a single-file worktree file ever reaches the `Match::Search` confirm handler, it detects `is_single_file()` and uses an empty path instead. **Edit :** After further work, two additional edge cases were fixed: - `Match::Search` split-open handling now uses the same single-file worktree path normalization as normal confirm. This prevents split-opening a single-file worktree search result from resolving `notes.txt` inside `/path/to/notes.txt` as `/path/to/notes.txt/notes.txt`. - History matching now still includes root names for single-file worktrees when `project_panel.hide_root = true`. Normal folder worktree roots remain hidden in this mode, but single-file worktrees need their root name included because the root name is the filename users type into the picker. Additional test coverage: - Added `test_non_project_file_matches_history_with_hidden_root` for the `hide_root=true` history matching edge case. - Added `test_single_file_search_result_split_open` for split-opening a single-file worktree search result. Closes zed-industries#54934 Manual test after fix below : [Screencast from 2026-04-26 23-58-00.webm](https://github.com/user-attachments/assets/3de564d8-cc94-4624-98e3-54dd124bfa2f) ## How to Review - `crates/file_finder/src/file_finder.rs` : Two targeted changes: - `matching_history_items` (~line 757): added `.or_else` fallback that retries the candidates lookup with an empty path when the first lookup misses, covering the `root_is_file` key mismatch for single-file worktrees. - `Match::Search` confirm handler (~line 1640): checks `wt.read(cx).is_single_file()` and substitutes `RelPath::empty()` for `path_match.path` to prevent duplication. - `crates/file_finder/src/file_finder_tests.rs` — Two test changes: - New test `test_non_project_file_open_with_filter`: opens a file outside the project, filters for it by name, confirms, and asserts the correct path is opened. - Updated `test_search_results_refreshed_on_standalone_file_creation`: the fix correctly promotes single-file worktree files to `Match::History`, which activates `skip_focus_for_active_in_search` when the file is currently open. The test now asserts the match type directly and closes the picker with `menu::Cancel` instead of confirming. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed file picker failing to open non-project files when a filter is typed
…er match (zed-industries#57276) Sets up infra for fixing zed-industries#46881. Follow-up to the approach discussed in zed-industries#36802 (comment). The initial problem: Go table tests weren't being detected reliably in larger files. The old approach created one tree-sitter match per table row, which hit the cursor match limit (64) and caused rows to be silently dropped. The suggested fix was to use query repetition to capture all rows in a single match, then post-process in Rust. But this hit another problem: some captured rows aren't valid runnables (e.g., when a struct has multiple string fields and the query can't tell which one is the test name). Tree-sitter predicates can't validate subsets of captures within a match, that logic needs to happen in Rust. This PR adds a `RunnableResolver` trait that lets languages post-process multi-capture matches. When a query uses `@_run_item` to mark item boundaries, we split the captures into per-item groups and pass them to the resolver. The resolver can then: - Pick which `@run` to use: e.g., compare field names against `t.Run(tc.name, ...)` to find the right string field. - Return per-item extras: only the captures that correspond to the chosen `@run`. Release Notes: - N/A
…T Subscription (zed-industries#58340) Closes zed-industries#58305 OpenAI sunset GPT-5.2 and GPT-5.3-Codex in Codex for ChatGPT account logins on June 2nd, so sending to them via the ChatGPT Subscription provider now fails with error. This PR removes those models from ChatGPT Subscription model list. Release Notes: - Removed the retired GPT-5.2 and GPT-5.3 Codex models from the ChatGPT Subscription provider.
This debug assert was actually invalid, and panicked in debug builds on valid diagrams. We start building a node only when we find a `translate()` that we need to fix up, but unconditionally call `finish_node`. But since `finish_node` does `if let Some(...) = self.building.take()`, it's a no-op if there is no node being built, so it's safe to call. Renamed to `maybe_finish_node` to communicate this fact Release Notes: - N/A or Added/Fixed/Improved ...
Release Notes: - N/A --------- Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl> Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Brings stable logout and additional directories support as well as removing dep on rmcp + tokio This also removed the unstable model selector (replaced awhile ago by session config options) so it removes all of that code. Native agent still uses it because we have a special model selector that would need more work to rip out 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
Why: denoise was used on the "new" removed audio pipeline. While we will (hopefully) reintroduce that later it is currently dead code! Worse dead code causing issues as the denoise crate breaks compilation on old arm targets. denoise (through candle-core) eventually depends on gemm which does not compile on older arm targets. This is a known issue in gemm (see sarah-quinones/gemm#31). Hopefully this will be addressed in gemm before we re-land denoise/new audio. If it is not we can always compile denoise only for supported platforms. 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 zed-industries#57770 Release Notes: - Fixed Zed not compiling on pre ARMv8.2-A machines
Use `std::path::absolute` instead of `RealFs::canonicalize` to make the path absolute in `RealFs::trash` as `canonicalize` also resolves symlinks, so trashing a symlink moved its target to the trash and left the link dangling. 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 - Not applicable as we don't have a good infrastructure for testing `RealFs` changes without hitting the machine's actual filesystem and testing this on `FakeFs` implementation wouldn't prevent a future regression, unfortunately. - [x] Performance impact has been considered and is acceptable Closes zed-industries#54900 Release Notes: - Fixed trashing of symlinks in project panel to actually trash the link and not its target.
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] 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 Hello Zed Team, this is my first contribution. I use Zed every day and have always wanted to see the total for the plus/minus counts in the Git diff panel. Here is my attempt to make that happen. Please let me know if there are any issues and I will fix them. Thank you. Adds git diff stats to the Git panel so users can see the total number of added and removed lines while reviewing changes. Verified locally by compiling and running Zed, then confirming the Git panel displays the diff count as expected. Release Notes: - Improved Git panel diff visibility by showing total added and removed line counts. <img width="1540" height="1098" alt="zed-add-git-diff-plus-minus-count" src="https://github.com/user-attachments/assets/5051944e-7cf5-4bb0-81d3-10228e619690" />
…e-latest-zed # Conflicts: # .gitignore # crates/agent_servers/src/acp.rs # crates/agent_settings/src/agent_settings.rs # crates/settings_content/src/agent.rs # crates/zed/src/main.rs Spec-Ref: helix-specs@61a7d4188:002029_merge-latest-zed
Three drift repairs forced by the 242-commit upstream merge: 1. AgentServerDelegate::new gained a third arg (loading_status_tx). Three thread_service.rs callsites pass None. 2. build_application() needed to take headless: bool — upstream extracted it as a wrapper that always passed false; we need args.headless so the --headless CLI flag actually selects the headless platform. 3. prompt_store removed from ConversationView, AgentPanel, EntryViewState, ModelSelectorPopover, ThreadView. Mirror upstream by dropping it from from_existing_thread's signature and all internal usage; both callers in agent_panel.rs no longer pass it. Add loading_status: None to the from_existing_thread Self block (matches upstream new()). Spec-Ref: helix-specs@61a7d4188:002029_merge-latest-zed
… commits) Spec-Ref: helix-specs@61a7d4188:002029_merge-latest-zed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Helix fork up to date with upstream Zed
1399540715(2026-05-21), 261 commits over 10 days since 001996's8bdd78e023. All 10 surviving Critical Fixes preserved, all PRs #50/#55/#56/#57 + thefd26c1a113Dockerfile.ci fix carried through. Critical Fix #10 (180s context-server timeout) is retired —e60a1b2789on fork main reverted it intentionally as a wrong diagnosis. Full E2E (17 phases × 2 agents) green.Changes
Merge commit
6b39672e5f:git merge upstream/main. Six conflicts resolved (full reasoning inportingguide.md§"Merge 002029"):.github/workflows/compare_perf.ymlandrelease_nightly.yml: accept upstream (Helix doesn't use Zed's CI).crates/title_bar/Cargo.toml: kept Helixexternal_websocket_syncdep, dropped now-unusedfeature_flags.workspace = true(upstream2e70059cd9removed its only consumer).crates/title_bar/src/title_bar.rsrender_restricted_mode: kept Helix cfg-gated early-return, adopted upstream's free-functionTrustedWorktrees::has_restricted_worktreesAPI.crates/project/src/agent_server_store.rsreregister_agentsdestructure: droppedextension_agents(removed byc84c22dab5), kept Helix's_subscriptions/registry_subscribed, added trailing...crates/agent_ui/src/agent_panel.rsload_panelthread-restoration: kept Helixwait_for_websocket_connectedandsend_agent_readyin the no-restore branch; adopted upstream589dc95c87's newthread_to_restorelookup,load_agent_thread(thread_id, ...)call, andrestore_new_draft.crates/agent_ui/src/agent_panel.rsload_agent_threadCritical Fix Upstream merge 2026 02 26 #11: upstream changed the signature fromsession_idtothread_id. Adapted the Helix entity-identity guard to look up the session_id viaThreadMetadataStore::entry(thread_id).session_idbefore queryingexternal_websocket_sync::get_thread.crates/agent_ui/src/agent_panel.rsensure_thread_initialized: kept Helix Fix 1b cfg-gated early-return as the FIRST statement of theBaseView::Uninitializedbranch, before upstream589dc95c87's newpending_terminal_spawn/should_create_terminal_for_new_entry/ ACP-restoration branches.Build fix
edbc05cf99: upstream signature drift forced four compile-driven repairs:agent_servers/acp.rs: PR fix(agent_servers): serialize ACP session-creation per connection #50 chain log-labels now usedirectories.cwd.display()(upstreamc3951af24fremoved the localcwdbinding;new_session/load_session/open_or_create_sessionnow passSessionDirectoriesto the rpc_call closure).agent_ui/conversation_view.rs::from_existing_thread: hoistedlet root_thread_id = ThreadId::new();to pass to upstream's new 24-argThreadView::new; addedvec![]for the newavailable_skillsarg onSessionCapabilities::new; initialised new struct fieldslast_theme_id: Some(cx.theme().id.clone()),draft_prompt_persist_task: None.agent_ui/agent_panel.rs+zed/main.rs: addedContextServerStatus::ClientSecretRequired { .. } => "client_secret_required"arm to the two Helix UI-state-query loops (upstream MCP work added the variant).AgentSessionList::supports_delete(&self)→supports_delete(&self, &App)migration acrossagent_ui/src/acp/thread_history.rs(10 references).Re-merge
8841edb2b1-style (actuallyMerge made by 'ort'after manual merge): mergedorigin/mainonce more after our work was done to pick upe60a1b2789 revert(context_server): DEFAULT_REQUEST_TIMEOUT back to upstream 60s. Critical Fix build(deps): bump the cargo group across 1 directory with 2 updates #10 retired inportingguide.mdaccordingly.Porting guide updated (
5da4b2f5f0,8692f073b2): new## Merge 002029 (2026-05-21)section with full conflict trail + Pre-existing Breakage Repaired subsections + commit-history extension + retirement of Critical Fix build(deps): bump the cargo group across 1 directory with 2 updates #10.Validation
./stack build-zed dev: green, both builds (post-merge + post-revert).zed-agent: ALL 17 phases passed.claude: ALL 17 phases passed, including Phase 17 (live Claude process count == real thread count — the hard gate that Helix PR fix(external_websocket_sync): defer UserCreatedThread until first user message #56 Fix 1b draft-suppression survived the merge).e60a1b2789.ActiveView/set_active_view/draft_threads/selected_agent_typenot present;AcpThreadEvent::Stopped\b([^(]|$)only matches doc comments;--allow-multiple-instances/--headless/debug-embed/external_websocket_sync::get_threadall present;wait_for_tools_readypresent; nosmol::Timer).Release Notes:
🔗 Open in Helix
📋 Spec:
🚀 Built with Helix