mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-24 17:40:47 +01:00
7fecbb2c4b0cb296e8bb91dc6ff654c4a076c8ff
40098 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7fecbb2c4b |
which_key: Unify preparation and rendering for which-key and the pending keystrokes indicator (#64522)
This PR shares grouping, sorting, duplicate handling, and list rendering between which-key and the pending keystrokes indicator. Which-key keeps its existing list behavior. The indicator adopts that behavior and replaces its 10-entry limit with scrolling. **What changes?** | Area | Which-key popup | Indicator popover | |---|---|---| | Grouping | Unchanged | ***Groups bindings with the same next key under `+N keybinds`, instead of listing each action*** | | Sorting and duplicates | Unchanged | ***Uses which-key's existing rules***, detailed below | | Key display | ***Uses keybinding components instead of standalone text labels***, preserving Vim-style notation | Keeps keybinding components | | Header | ***Adds "is waiting for more keys…" beside the pending keys***; keeps the divider | Keeps the waiting message; ***adds a divider*** | | Rows | Keeps aligned columns and truncated action labels; ***uses smaller labels and fixed row heights*** | ***Adds aligned columns, fixed row heights, truncated action labels, and highlighted group counts*** | | Long lists | Remains scrollable | ***Shows all prepared rows in a scrollable list, instead of the first 10*** | | Scroll position | ***Resets when pending keys change or clear*** | ***Resets when pending keys change or clear*** | Sorting puts individual bindings before groups, then sorts by remaining key count, key-label length, and key text. Within each group, duplicate handling removes adjacent identical key sequences even if their actions differ. After sorting, it removes adjacent identical key/action rows. **What is shared?** - Grouping, sorting, duplicate handling, and the resulting rows. - The pending-key header, divider, key formatting, columns, action labels, and scrollable list. - Tests for list preparation and key display. **What remains separate?** | Part | Which-key popup | Pending keystrokes indicator | |---|---|---| | Filtering | Excludes a hardcoded set of Vim-related sequences | Does not apply those exclusions | | Container | Bottom-right modal with its own size limits | Tooltip-styled popover anchored to the status bar item | | Interaction | Automatic opening, modal focus, and dismissal | Status bar button, countdown, click action, hover handling, and timeout pausing/resuming | The pending keystrokes indicator is hidden in Vim/Helix mode, so it does not need which-key's Vim-related filtering. This refactor preserves each view's existing filtering and visibility behavior. **Screenshots** | | Before | After | |---|---|---| | Which-key | <img width="300" src="https://github.com/user-attachments/assets/892313c8-ad07-4c8b-b2b2-8a14944e8a37" /> | <img width="300" src="https://github.com/user-attachments/assets/9475b17d-e254-497c-99e9-55f812ff8fad" /> | | Which-key (Vim mode) | <img width="300" src="https://github.com/user-attachments/assets/8aae5c73-7d73-4f19-a4f0-1d82574b79db" /> | <img width="300" src="https://github.com/user-attachments/assets/98576381-e208-4658-95e0-40544026f2c2" /> | | Indicator popover | <img width="300" src="https://github.com/user-attachments/assets/cbf9fa63-2766-4b85-bc0f-f5b3ae2e4c68" /> | <img width="300" src="https://github.com/user-attachments/assets/a94180e6-d910-474f-8d74-fc83cec83aec" /> | Release Notes: - Improved the pending keystrokes indicator with grouped bindings, a scrollable list, and a clearer layout. |
||
|
|
ba42ab9d98 |
gpui: Fix keystroke interception for standalone modifiers (#64537)
I ran into this while working on keybindings for the pending-keystrokes
indicator. Keystroke interceptors never received standalone modifiers.
GPUI recognizes a standalone modifier on release through a
`ModifiersChangedEvent`. But interception only handled `KeyDownEvent`s,
so the stroke went straight to keymap dispatch. This change passes the
recognized keystroke to interceptors instead of checking the raw event
type.
1. Recording standalone modifiers
With this binding in `keymap.json`, start recording a binding, then
press and release Shift:
```json
[
{
"bindings": {
"shift": "command_palette::Toggle"
}
}
]
```
- Before, the command palette opens and Shift is not recorded.
- After, the recorder captures `shift` without opening the command
palette.
2. Searching for standalone modifiers
With these bindings, enable keystroke search, turn exact matching off,
then press and release Control:
```json
[
{
"context": "Editor",
"bindings": {
"ctrl": "command_palette::Toggle",
"ctrl-k": "command_palette::Toggle"
}
}
]
```
- Before, holding Control finds Ctrl-K but not Control alone. Releasing
Control clears the modifier query.
- After, releasing Control records it as a standalone key, and non-exact
search finds both Ctrl-K and Control alone.
Release Notes:
- Fixed recording and searching for standalone modifier-key bindings in
the keymap editor.
- [GPUI] Fixed keystroke interceptors to receive standalone modifier
keystrokes.
|
||
|
|
5299a14401 |
markdown: Add macOS lookup support for Markdown preview (#59297)
# Objective Enable macOS three-finger Look Up / translation for rendered Markdown, including Markdown Preview when it is the active focused item. ## Solution - Register a read-only input handler for rendered Markdown when either the Markdown view itself is focused or Markdown Preview provides the active focus handle. - Reuse the existing rendered Markdown text mapping for visible text extraction, hit testing, and bounds calculation. - Add UTF-16 range conversion so AppKit lookup requests map correctly between macOS text ranges and Markdown source ranges, including CJK text and emoji. Release Notes: - Improved Markdown Preview by supporting macOS Look Up / translation gestures when focused. --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
bc6dd34d4c |
open_ai: Add GPT-6 Sol and Luna BYOK support (#64628)
# Objective - Make GPT-6 Sol and GPT-6 Luna available through OpenAI API keys. ## Solution - Add both models with their documented limits and capabilities, including effort-dependent sampling behavior. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added GPT-6 Sol and GPT-6 Luna support to the OpenAI provider. Co-authored-by: Anant Goel <anant@zed.dev> |
||
|
|
75e9bb2fea |
anthropic: Add Claude Opus 5.5 BYOK support (#64627)
# Objective - Make Claude Opus 5.5 usable through Anthropic API keys. ## Solution - Apply Opus 5.5's adaptive-thinking, sampling, tool-choice, Fast mode, compaction, and prefix-binding requirements through the shared Anthropic request path. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added Claude Opus 5.5 support to the Anthropic provider. Co-authored-by: Anant Goel <anant@zed.dev> |
||
|
|
ee8dd5f861 |
Expose current ChatGPT subscription models (#64625)
# Objective - Show newly available account models in the ChatGPT subscription picker. ## Solution - Request the ChatGPT model catalog with client version `0.999.0` so current model-version gates pass. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed newly available ChatGPT subscription models not appearing in the model picker. Co-authored-by: Anant Goel <anant@zed.dev> |
||
|
|
96e95edac4 |
gpui: Skip sprites whose atlas texture was released instead of panicking (#64623)
## Objective Each rendering backend looked up the atlas texture for a sprite batch with an `unwrap`, so a scene referencing a texture the atlas had already released aborted the process (`metal_atlas.rs:196` in the Delta crash reports). This happens when an image is dropped while a cached view still replays a paint from before the drop — Delta hit it when re-rasterizing a zoomed Mermaid diagram. ## Solution Texture lookups now return `Option`, and the Metal, wgpu, and DirectX sprite draws skip a batch whose texture is gone. The stale paint is replaced as soon as its view re-renders, so nothing is lost beyond that frame. wgpu also drops the cached bind group for a released texture and no longer fails the whole frame on a missing one. This is a renderer-level safety net and is complementary to #64619, which fixes the lifetime rule in `Window` so that atlas entries are not released while a retained frame still references them. Both can land independently. ## Testing - `corgi test -p gpui_apple metal_atlas` — 4 passed, including a new regression that the lookup reports `None` after the last tile is removed. - `cargo test -p gpui_wgpu wgpu_atlas` — 5 passed (extended the generation test to assert `None` after removal). - `corgi check -p gpui_wgpu`. - DirectX changes are the same shape but have **not been compiled**; no Windows target available. Release Notes: - N/A - [GPUI] Fixed a crash when an image was removed from the sprite atlas while a cached view still referenced it. |
||
|
|
e5221fa295 |
agent: Add subagent model selection (#64498)
Adds optional model selection to `spawn_agent`, allowing a newly spawned subagent to use a specific configured model. This is an additive change. Existing `spawn_agent` behavior remains unchanged when `model` is omitted: Zed continues to use the configured subagent model when one is set, otherwise the subagent inherits the parent model. The resulting selection order is: `explicit model override` → `configured subagent model` → `parent model` Explicit model IDs use the `provider/model-id` format returned by `list_agents_and_models`. When an explicit model is supplied, it is validated against the currently available models. If it is unavailable, the spawn fails instead of silently substituting another model. Resumed subagent sessions keep their original model, so `model` cannot be supplied together with `session_id`. This follows the model-selection use case discussed here: https://github.com/zed-industries/zed/discussions/60993#discussioncomment-18450658 The change also makes the active model visible in native subagent cards, including when the subagent happens to use the same model as its parent. ## Screenshot <img width="820" height="959" alt="Screenshot From 2026-09-19 22-53-26" src="https://github.com/user-attachments/assets/210db6e7-0068-45cc-aa96-f3a5aca3f90c" /> ## Implementation - Add an optional `model` field to `spawn_agent`. - Preserve the existing configured-subagent-model and parent-model fallback behavior when no explicit model is supplied. - Validate explicit model selections against currently available models. - Reject model overrides when resuming an existing subagent session. - Keep `list_agents_and_models` available independently of the create-thread feature flag so `spawn_agent` can use it for model discovery. - Allow native model discovery to work without the sibling-thread host, while still including external agents when that host is available. - Display the active model name in native subagent card headers. ## Testing Manually tested explicit model selection by first calling `list_agents_and_models`, then spawning five subagents concurrently with exact discovered model IDs: - `openai-subscribed/gpt-5.6-sol` - `openai-subscribed/gpt-5.6-luna` - `openrouter/inclusionai/ling-3.0-flash-vl:free` - `openrouter/nex-agi/nex-n2.5-mini:free` - `openrouter/nex-agi/nex-n2.5-pro:free` All five subagents completed successfully, returned distinct session IDs, and displayed their selected model names in the subagent cards. Also added coverage for: - forwarding an explicit model selection through `spawn_agent` - rejecting a model override when resuming a session - preserving the existing configured subagent model behavior when no override is provided - preserving parent-model fallback behavior - exposing `list_agents_and_models` independently of sibling-thread creation ## Self-Review Checklist - [x] I have reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks: none added - [x] The content adheres to Zed UI standards - [x] Tests cover the new and changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added model selection for spawned subagents. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
16c9aa7ea6 |
Add Grok 4.7 to Supergrok and XAi (#64567)
# Objective With the release of Grok 4.7 https://x.ai/news/grok-4-7 I would like to add Grok 4.7 to the xAI provider and the supergrok provider ## Solution - Added Grok 4.7 with tests - Set Grok 4.7 as recommended / default for supergrok and xai - reused tests from Grok 4.6 as they have the same params as 4.7 is a later checkpoint of 4.6 ## Testing Manually verified all thinking efforts <img width="500" height="" alt="CleanShot 2026-09-21 at 21 26 21@2x" src="https://github.com/user-attachments/assets/45806942-df83-4862-ac34-483e2b0ffc02" /> ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Supergrok <img width="300" height="" alt="CleanShot 2026-09-21 at 21 27 39@2x" src="https://github.com/user-attachments/assets/f63633b4-c2e6-46ab-92f2-a3dfaa3aa882" /> XAi <img width="300" height="" alt="CleanShot 2026-09-21 at 21 36 34@2x" src="https://github.com/user-attachments/assets/fe739833-1a46-415b-8e5c-f0e3ae671fb6" /> --- Release Notes: - Added Grok 4.7 to supergrok and xai providers |
||
|
|
a982949071 |
editor: Fix crash when a row highlight's anchors are reversed (#64604)
# Objective Fixes ZED-BJQ (`slice index starts at N but ends at N-1` in `Editor::highlighted_display_rows_in_range`). Since #63395, rendering only looks at the row highlights that intersect the viewport, found with two binary searches over the stored ranges. If a stored range has `start > end`, the two searches can cross and we panic. That happens with merge conflicts where one side is empty (one branch deleted the block). The conflict parser built every side as `anchor_after(start)..anchor_before(end)`, so an empty side became a zero-width range whose start sorts after its end. When you type your resolution at that spot, the start anchor moves past the new text while the end stays put, and until the conflict set re-parses the highlight is inside out. If the viewport lands inside the typed text on that frame, Zed crashes. ## Solution We now search for the start index only within the prefix that ends at the end index, so an inverted range can never produce an inverted slice; the existing per-highlight filter drops it. The parser also emits empty sides as `anchor_before..anchor_after`, so they stay ordered and grow around text typed into them, which also means the typed lines get the "ours"/"theirs" color immediately instead of after the re-parse. ## Testing - `test_row_highlights_for_empty_conflict_side_after_edit` parses an empty-side conflict, stores its highlight plus a hand-built inside-out range, types into the empty side, and renders every viewport. It panics without the editor change. - `test_parse_conflicts_with_empty_sides` checks the parser emits ordered ranges for empty sides and that typed text lands inside them. - To reproduce manually on `main`: open a file with a conflict whose `ours` side is empty, put the cursor at the start of the `=======` line, paste more lines than fit on screen, then scroll so only the pasted text is visible before the conflict re-parses (easiest with a nonzero `git.gutter_debounce`). ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed a crash when typing into an empty side of a merge conflict. |
||
|
|
18ad8d1195 |
agent_ui: Remove redundant non-empty check (#64589)
This is already handled a few lines below, and early returns on an empty selection which breaks the `Ctrl + >` shortcut. Release Notes: - Allow `Ctrl + >` to be used with empty selections. |
||
|
|
d3600d664a |
agent_servers: Drain ACP output before reporting agent exit (#64603)
Fix a race where an external agent's process exit can be reported before its final session updates have been applied. Builds on the now-merged stdio extraction in #64598. A scripted-agent regression reproduced this with a successful final prompt response: at the `LoadError::Exited` event, the transcript contained only the user prompt; after the foreground queue settled, the final assistant answer appeared. - Keep child-process status separate from exit-error construction. - After exit, wait for clean SDK inbound closure and an acknowledgment behind queued foreground updates, concurrently with stderr completion. - Bound the drain to 250ms so inherited open pipes or transport errors cannot indefinitely delay exit reporting. - Preserve the separate initialization-error grace period and existing explicit-drop cancellation behavior. The source change is confined to `crates/agent_servers/src/acp.rs`. No SDK changes, protocol negotiation, restart policy, or general session coordinator are introduced. ### Behavior boundaries - The deadline bounds exit reporting, not descendant lifetime while a caller retains the connection. Timeout is best effort and cannot guarantee complete final traffic. - Existing trailing-stderr selection is unchanged, but the diagnostic is sampled after draining. Independent pipe reads can place protocol messages after stderr in the debug log, so captured stderr is not necessarily included in `LoadError.stderr`. - The mixed-stream regressions assert transcript contents, inbound-close state, and diagnostic capture at exit-event delivery. The stderr-only startup regression retains an exact error-text assertion. Release Notes: - acp: Fixed external-agent exit errors appearing before the agent's final response updates were applied. |
||
|
|
674dd790c5 |
agent_servers: Extract ACP stdio construction (#64598)
Extract ACP process/stdio construction so it can be reused independently of protocol initialization, while keeping the existing v1 connection behavior unchanged. - Move command resolution, environment/CWD handling, pipe creation, line framing, and debug taps into a private `spawn_stdio` factory. - Keep task startup, child-process ownership, initialization, authentication fallback, and shutdown in `AcpConnection`. The factory returns an unpolled stderr future rather than starting another task. - Move the existing debug log and its tests into a dedicated module, preserving public message types, reexports, parsing, and subscription behavior. - Add a bounded real-process regression covering repeated fresh spawns, environment/CWD, newline framing, incoming/outgoing debug capture, and stderr trimming. This does not add automatic restart, protocol negotiation, or new shutdown/drain behavior. The larger diff is primarily relocation of existing code and tests. Release Notes: - N/A |
||
|
|
189839eef5 |
editor: Keep deleted gutter markers visible at narrow widths (#64469)
Closes #62923 # Objective Deleted Git gutter markers collapse into a lens and disappear when the configured gutter width is narrow relative to the buffer line height. ## Solution - Clamp the deleted marker's corner radii to the marker quad. - Keep the existing proportional width calculation for default and custom gutter widths. - Restore the width helper and its unit test to their behavior on `main`. ## Testing - `cargo build -p zed` passes on macOS with Apple's Metal Toolchain installed. - `git diff --check` passes. - Checked before and after at default width, custom width 1, and custom width 3 with 15 px and 19 px buffer fonts. - The deleted marker remains full line height in all six patched cases. The green added-line strip still follows the configured gutter width. ## 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 adheres to Zed's UI standards - [x] Tests cover the new behavior - [x] Performance impact has been considered and is acceptable ## Showcase Before/after comparison: see the latest visual verification in the PR conversation. ## AI assistance Codex helped trace the paint geometry, prepare the focused patch, and assemble the visual comparison. I reviewed the diff and the rendered results before submission. --- Release Notes: - Fixed deleted Git gutter markers disappearing at narrow custom widths. --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> |
||
|
|
62e5991dd0 |
Keep the grid top-anchored when growing on Windows (#63699)
# Objective fixes https://github.com/zed-industries/zed/issues/39453. ## Solution - Bump bundled ConPTY to 1.25.260710002 ## Testing - ## Showcase before : https://github.com/user-attachments/assets/8d3fd721-20fb-4d9d-a468-db3e5dc7ae21 after : https://github.com/user-attachments/assets/af0c70ce-503b-45cd-b74b-7098f713c7d8 --- Release Notes: - Keep the grid top-anchored when growing on Windows --------- Co-authored-by: Finn Evers <finn.evers@outlook.de> |
||
|
|
a4b9dc5f52 |
mistral: Add Z.ai GLM (latest version) and show thinking toggle for supported models (#63535)
# Objective - Add Z.ai GLM, now hosted by Mistral as a third-party open model, to the built-in Mistral model list. - Fix the thinking selector never appearing for Mistral models that support reasoning (mistral-medium-latest, mistral-small-latest). ## Solution - Added a `ZaiGlmLatest` variant to `mistral::Model` that uses Mistral's `zai-glm-latest` model id: 1M token context window, tool calling enabled, image input disabled, thinking enabled. The provider builds its model list by iterating this enum, so no further wiring was needed. - This PR initially targeted GLM 5.2 (`zai-glm-5-2`), but Mistral released 5.3 while it was open. Switching to the `zai-glm-latest` alias keeps Zed on the newest GLM release without requiring a new PR each time Mistral bumps the version, mirroring how Mistral's own model ids work for their flagship models. - Implemented the missing `LanguageModel::supports_thinking()` override in the Mistral provider, delegating to `mistral::Model::supports_thinking()`. The request-building code already sent `reasoning_effort` and serialized thinking parts, but the UI toggle was hidden because the trait method fell back to the default `false`. ## Testing - `./script/clippy -p mistral` and `cargo check -p language_models` pass. - Existing unit tests in the provider cover the `reasoning_effort` request mapping; no new behavior beyond the enum variant and the trait delegation. - Reviewers can test with a Mistral API key: `zai-glm-latest` appears in the model dropdown, and the thinking toggle now shows for zai-glm-latest, mistral-medium-latest, and mistral-small-latest. - Tested on macOS; changes are platform-independent. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added Z.ai GLM to the Mistral provider and fixed the thinking toggle for Mistral Small and Medium. --------- Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|
|
02238cd4b7 |
project_panel: Allow renaming a root to match a child directory (#64268)
# Objective - Allow renaming a project root folder to the same name as one of its child folders. - Fixes #64255 ## Solution - Skip child-entry collision checks when renaming a project root. - Keep existing collision checks for other entries. ## Testing - Updated and ran `test_rename_root_of_worktree`. - Manually tested on macOS. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed an issue where a project root folder could not be renamed to match a child folder. --------- Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|
|
05c2c9aba0 |
terminal: Separate raw byte ingestion from text normalization (#64586)
Separate byte-exact terminal ingestion from the existing text-output normalization as a small preparatory step for ACP terminal streams. - Extract a private `write_raw_output` primitive that feeds bytes unchanged into the existing persistent parser. - Keep `write_output`'s exact per-call LF-to-CRLF behavior, then delegate to the raw primitive. Current ACP and REPL callers remain unchanged. - Reuse lazy parser allocation, startup-marker detection, wakeups, and existing side-effect filtering. No new parser, state fields, or ingestion-mode flags. This ended up being rather small given we aren't adding the streaming support yet, but mostly wanted to verify that this would work before the larger change. Release Notes: - N/A |
||
|
|
2a4157111c |
Fix two FakeFs inaccuracies (#64569)
This PR fixes two inconsistencies in our FS testing code: - Copying a file with `overwrite: true` would not actually update the file in the FS. - Deletion of symlinks that would not work otherwise. Moving this out of some other changes I am currently working on. Release Notes: - N/A |
||
|
|
b54cc1d0ac |
editor: Paint block cursor text upon arrival during animation (#64521)
Follow-up to #63195. # Objective When `cursor_animation` is enabled, moving a block cursor (e.g. in Vim mode) leaves the character underneath hidden until the spring animation fully finishes, after which the letter pops in. This happens because `CursorLayout::paint` returned early while animating, skipping `block_text`. ## Solution Paint `block_text` upon the animated cursor's arrival at the target cell, rather than waiting for the entire spring settling phase to complete: - Check if any animated corner has reached the target bounds (`bounds.dilate(...)`). - If the cursor is still in mid-air, return early so we don't draw the destination letter prematurely. - Once it touches the target cell, fall through and paint `block_text` over the cursor polygon. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Left: before, Right: after https://github.com/user-attachments/assets/7057f40a-64a7-4035-b8e2-7c0b7dc40069 --- Release Notes: - Fixed an issue where the block cursor hid the character underneath until cursor animation completed. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
f25434f3c5 |
gpui_linux: Force a full render on X11 Expose after GPU recovery (#64570)
# Objective Zed on X11 could crash with `index out of bounds: the len is 0 but the index is 0` in `WgpuAtlas::get_texture_info` right after recovering from a lost GPU device (Sentry ZED-BVQ, Linear FR-488). ## Solution When the device is lost, `X11Window::draw` recreates the renderer, which clears the sprite atlas, and sets `force_render_after_recovery` so the next frame rebuilds the scene instead of replaying the cached one. Only the periodic refresh timer consumed that flag though. An `Expose` event handled in the same event loop turn (a compositor repainting after the same GPU reset, for example) requested a presentation-only frame with `force_render: false`, so GPUI presented the previously rendered scene, whose sprites still pointed at atlas textures that no longer exist. We now consume the flag in `X11WindowStatePtr::refresh`, so every frame request, Expose or timer, forces a full render after recovery. The field is private now so a caller can't bypass it again. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed a crash on Linux (X11) that could occur when a window was redrawn immediately after recovering from a lost GPU device. - [GPUI] Fixed a crash on Linux (X11) when an `Expose` event presented a cached frame immediately after GPU device recovery. |
||
|
|
fcee4a5a4c |
xtask: Add more helpers for querying information on GPUI crates (#64333)
Primarily, add a - helper to easily get information on what pulls in a crate (hey Mr Piotr we can consider moving this up in the namespace to also use this elsewhere) - helper to extract a list of GPUI crates in order which need publishing Release Notes: - N/A |
||
|
|
bd61c4a2e3 |
diagnostics: Add back links to nearby related diagnostics (#64134)
# Objective Fixes #63835. Nearby related diagnostics omitted the link back to their primary diagnostic. ## Solution Always include the existing back link on related diagnostic blocks, regardless of line distance. The primary diagnostic still suppresses nearby related hints as before. ## 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 adheres to Zed's UI standards - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Improved diagnostic navigation by showing back links to the primary diagnostic even for nearby related diagnostics. --------- Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|
|
a434bb7ee2 |
wgpu: Cache atlas bind groups (#64434)
Previously, we created texture atlas bind groups every frame (once per sprite group). This showed up in delta web mobile profiling. This PR reuses them across frames, which saved ~5% frame time on the delta web thread view on a pixel 10 pro. --- Release Notes: - [GPUI]: Improved performance on wgpu by caching atlas bind groups |
||
|
|
4ab9b90bdb |
language_models: Remove Baseten provider (#64463)
Remove Baseten from the hosted language model provider protocol and cloud model routing. Release Notes: - N/A |
||
|
|
b3f5de1fd1 |
Reduce nightly build cadence (#64557)
Reduce the nightly release workflow from six runs per day to two runs per day, at 02:00 and 14:00 UTC. Update both the workflow generator and generated workflow. Validated by regenerating workflows with `cargo xtask workflows`. Release Notes: - N/A --------- Co-authored-by: Amp <amp@ampcode.com> |
||
|
|
a49db374b6 |
ci: Disable library backtrace capture in macOS test jobs (#64555)
Based on https://github.com/zed-industries/zed/pull/64464#issuecomment-5763255028 With `RUST_BACKTRACE=1` set, `anyhow` captures a backtrace for every error it constructs; on macOS this costs ~30ms per error, on Linux ~µs. `Project::test` alone hits several such errors during setup (`canonicalize`/`load` of the non-existent global `tasks.json` and `debug.json`, worktree creation, buffer open), adding ~0.8s of fixed cost per test on macOS. `RUST_LIB_BACKTRACE=0` is checked by std before `RUST_BACKTRACE`, so panics keep their backtraces while library error captures stop. Set only on the macOS test jobs (`run_tests.yml`, `release.yml`), since Linux and Windows pay nothing for the captures and keep the error-origin backtraces in failure output. Measured with `cargo nextest run -p editor --lib`: macOS 119s → 72s, Linux 78s → 76s (noise). Trade-off on macOS: a failing `.unwrap()` on an `anyhow::Error` in CI output loses the backtrace of where the error was constructed; the panic backtrace at the unwrap site is unaffected. Release Notes: - N/A |
||
|
|
63b29c2edd |
Add support for the "..." entry in terminal.path_hyperlink_regexes (#64552)
## Objective Allow custom terminal path regexes to extend inherited entries without copying them. This PR also corrects the existing mismatch between the documented and shipped default regexes. This is the last submission in the #64399 series, following #62769, #64222, #64440, #64484, and #64540. ## Solution The `"..."` entry is intentionally supported at the top level only. A `"..."` line inside a multiline entry remains regex text. Existing configurations that use bare `...` as a three-character regex can preserve that behavior by writing `["..."]` as an entry instead. The shipped regexes and hyperlink matching behavior are unchanged. ## Testing All focused tests and all hyperlink tests pass on macOS. The documented default expressions were checked against the shipped values. ## 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 adheres to Zed’s UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added support for `"..."` in `terminal.path_hyperlink_regexes` to extend inherited regexes without repeating them. |
||
|
|
dc0bbb2b43 |
Speedup completions test (#64464)
Follow-up to https://github.com/zed-industries/zed/pull/64139 Fixes CI flacks like https://github.com/zed-industries/zed/actions/runs/35351932842/job/105623037967?pr=64405#step:15:7107 Halve the test runtime by avoiding the entire `MultiWorkspace` creation and redraws. Release Notes: - N/A |
||
|
|
ca49b5dac8 |
agent_ui: Make provider-owned terminals read-only (#64550)
Make provider-owned terminal cards read-only for user input while preserving local inspection. This builds on the explicit terminal ownership introduced in #64544. - Add a construction-time `TerminalView::with_read_only` option, selected from ACP process ownership rather than PTY presence. Existing views remain interactive by default, including client-owned headless terminals. - Reject typing, send actions, paste, file/path drops, IME input, clear/rerun actions, and focus reports in read-only views. - Preserve selection, copying, links, scrolling, search, and local Vi navigation. Leaving Vi mode does not enable terminal input. - Pass an explicit mouse-routing policy to the existing lower terminal handlers so provider-requested mouse and alternate-scroll modes cannot consume inspection gestures. Real modifiers remain unchanged, and Linux/FreeBSD middle-click paste is suppressed. Release Notes: - N/A |
||
|
|
36726df0c3 |
sidebar: Group threads sidebar settings (#64395)
## Objective Group the threads sidebar settings together in JSON and the Settings Editor, using consistent “Threads Sidebar” terminology. This follows up on #63452 now that #62883 has added configurable default width, and includes the auto-open setting added since then. ## Solution - Group `position`, `default_width`, and `auto_open` under `agent.threads_sidebar`, and display their controls together in Settings. - Automatically migrate `agent.sidebar_side`, `agent.threads_sidebar_default_width`, and `agent.threads_sidebar_auto_open` across supported settings scopes, preserving existing nested values. - Apply changes to the default width immediately, including when the sidebar was manually resized, and clear the saved width override. Unrelated settings changes preserve manual sizing. - Document all three settings, including the previously missing position entry. ## Testing The following targeted checks passed on the local changes: - `cargo test -p migrator nest_agent_threads_sidebar_settings` — 7 tests passed. - `cargo test -p sidebar -p workspace -p agent_settings -p gpui_platform --features gpui_platform/runtime_shaders --lib -- width threads_sidebar_settings test_open_directory_in_existing_window` — 9 tests passed. - `cargo fmt --all` completed successfully. - `git diff --check` passed. - From `docs`: `npx prettier --check src/reference/all-settings.md src/ai/parallel-agents.md` passed. Coverage includes migration precedence and supported scopes, settings defaults and width limits, manual sizing and resets, persisted widths, and auto-open behavior. Full application tests and manual UI testing were not run. Clippy was not rerun after the final terminology changes. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Improved threads sidebar settings by grouping position, default width, and auto-open together, and applying default-width changes even after manual resizing. |
||
|
|
418f897148 |
Prevent multibuffer items from switching active repository (#58795)
Fixes the git panel's active repository being silently overridden by the cursor position in `ProjectDiff`. Closes #58792 Closes #61530 ## Summary When a multi-buffer item (e.g. `ProjectDiff`) gains focus, the workspace calls `set_active_repo_for_path` with the cursor's project path to automatically switch the active git repository. This was safe when multi-buffer items returned `None` from `active_project_path`, but PR #57236 changed `ProjectDiff` to return the cursor-based path (for project panel highlighting), inadvertently allowing the cursor position to override the user's explicit repository selection. Fix the issue by restoring the `Singleton` guard that was removed in PR #57236: only call `set_active_repo_for_path` when the active item is backed by a single buffer. ## Changes - **`workspace.rs`**: Only call `set_active_repo_for_path` when the active item's `buffer_kind` is `Singleton`. Multi-buffer items (e.g. `ProjectDiff`, diagnostics, search results) span multiple repositories, so their cursor position should not trigger an automatic repository switch. ## Before https://github.com/user-attachments/assets/6ca4fa61-b42a-447b-9de7-8b6ec1f1181a ## After https://github.com/user-attachments/assets/9b045ad9-2bb5-4862-ac45-41e9fdd3dc96 Closes #58792 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 the Git panel unexpectedly switching repositories when viewing changes in multi-repository projects. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|
|
4c7f3574f2 |
Add support for "..." in edit_predictions_disabled_in (#64546)
## Objective Let projects and language-specific settings add scopes where edit predictions are disabled without repeating inherited scopes. Part of #64399. ## Solution Extend the `"..."` convention from #62769, #64222, #64440, #64484, and #64540 to `edit_predictions_disabled_in`. For example, a global `["comment"]` and a language override of `["string", "..."]` disable predictions in both scopes. Inherited scopes are inserted at `"..."`, and duplicates keep their first occurrence. Omitting the marker replaces the list, `[]` clears it, and omitting the setting preserves inheritance. The default remains `[]`. ## Testing Tested on macOS through settings loading, covering project and language-specific overrides, inheritance, replacement, and clearing. The language settings tests passed. Live editor behavior has not been checked manually. To check manually, configure global `["comment"]` and a language override of `["string", "..."]`. Confirm predictions are disabled in both scopes, then remove `"..."` and repeat with `[]` to check replacement and clearing. ## 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 adheres to Zed’s UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added support for `"..."` in `edit_predictions_disabled_in` so project and language-specific settings can extend inherited scopes. --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> |
||
|
|
51c0320392 |
Fix ctrl/cmd-w closing the project panel instead of the active pane (#64515)
Closes https://github.com/zed-industries/zed/issues/34865 Closes https://github.com/zed-industries/zed/discussions/41122 Follows an Intellij Idea approach, where these bindings are separate. Release Notes: - Fixed `ctrl/cmd-w` closing the project panel instead of the active pane. BREAKING: closing the active dock moved from `cmd/ctrl-w` to `ctrl-alt-w` |
||
|
|
5a137cbc9b |
Add support for "..." in edit_predictions.disabled_globs (#64540)
## Objective Let users and projects add edit prediction exclusion patterns without repeating defaults or inherited patterns. Part of #64399. ## Solution Extend the `"..."` convention from #62769, #64222, #64440, and #64484 to `edit_predictions.disabled_globs` using `SplicingVec`. Inherited patterns are inserted at `"..."`, and duplicates retain their first occurrence. Omitting the marker replaces the list, `[]` clears it, and omitting the setting preserves inheritance. Opening an absent setting now initializes it with `["..."]` instead of clearing inherited patterns, and the selection is located by parsing the JSON instead of a regex, so a commented-out or nested `"disabled_globs"` can no longer capture it. Cursor imports append `"..."` like the `files.exclude` import does, so Zed's sensitive-file defaults survive an import; empty lists and empty or literal `"..."` entries are dropped, matching `enabled_patterns`. ## Testing Tested on macOS with settings merge and loading tests, Cursor import tests, the UI settings update and selection path (including commented-out and nested decoy keys), the new `settings_json` key-path lookup, and Copilot integration coverage. To check manually, configure custom disabled patterns alongside `"..."` and confirm that both custom patterns and inherited sensitive-file patterns remain disabled. Repeat without `"..."` and with `[]` to verify replacement and clearing. Opening the setting when it is absent should preserve inherited patterns. ## 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 adheres to Zed’s UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added support for `"..."` in `edit_predictions.disabled_globs` so custom patterns can extend inherited exclusions, and fixed "Configure Excluded Files" selecting the wrong list when a commented-out `disabled_globs` precedes it. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
656e3aed84 |
acp: Fix provider-owned terminal lifecycle (#64544)
Provider terminal metadata creates a display buffer, not a client-owned process. These terminals previously entered the process-completion path, which completed immediately when no local task existed and cached empty output. Provider exit status was also discarded. - Distinguish client-owned processes from provider-owned display terminals, including headless processes that use the same lower-level display renderer. - Complete display terminals on provider exit and retain ACP exit codes/signals. Duplicate creation and exit events preserve identity and completion; late output refreshes cached content without changing exit time or status. - Refresh tool-card metadata when provider completion arrives without another tool update. - Show Stop only for client-owned processes and avoid treating display terminals as background processes when their tool completes. - Preserve the full unsigned exit-code range without manufacturing `-1` for signal-only exits. Process wait/kill behavior, PTY release, and sandbox cleanup remain intact. Header rendering continues to use cached metadata rather than extracting terminal contents. Release Notes: - acp: Fixed premature completion and incorrect exit-status reporting for external-agent terminals, and removed Stop controls from terminals managed by the agent. |
||
|
|
af431aeef4 |
ui: Add buttons to switch diff view when diffing buffers (#64529)
# Objective - This PR enables users to switch between unified/split diff views when comparing buffers. - Fixes #64419 . ## Solution - The unified/split toggle (`DiffStyleControls`) is normally surfaced automatically by `BufferSearchBar`, which detects any active item exposing a `SplittableEditor`. That auto-detection is gated to multi-buffer views, since it's paired with an expand/collapse-all-hunks control that only makes sense across multiple files. `FileDiffView` (used by `zed --diff <old> <new>`) is a singleton buffer, so it's intentionally excluded from that generic path. - Git's own single-file diff view, [`SoloDiffView`](https://github.com/zed-industries/zed/blob/395def7a067b32ed598fcb3f048969ada9b54942/crates/git_ui/src/solo_diff_view.rs#L52), hits the same limitation and works around it with a small, dedicated `ToolbarItemView` (`SoloDiffStyleToolbar`) that renders `DiffStyleControls` directly, independent of `BufferSearchBar`. - This PR follows the same pattern: a new `FileDiffStyleToolbar` (in `git_ui_core::file_diff_view`) activates whenever a `FileDiffView` is the focused pane item, and renders just the unified/split toggle, no expand/collapse or file-status controls, since neither concept applies to a plain two-file diff. It's registered in `initialize_pane` alongside the existing git toolbars. ## Testing - Did you test these changes? If so, how? Ran `cargo test -p git_ui_core`, all passed. I've also attached the results of manual testing in the Showcase section below. - Are there any parts that need more testing? I think more tests can be added. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Adds a unified/split toggle to the diff view opened via `zed --diff <old> <new>`, matching the toggle already available in git's diff views. <details> <summary>Click to view before/after</summary> **Before**: <img width="1920" height="1080" alt="screenshot_20260921_020610" src="https://github.com/user-attachments/assets/92cbcf75-0cac-4555-8d2d-ce927064515f" /> **After**: <img width="1920" height="1080" alt="screenshot_20260921_020355" src="https://github.com/user-attachments/assets/56f9ebc6-11df-41cc-a44d-99bfa8caa130" /> </details> --- Release Notes: - Added a unified/split toggle to the diff view opened via `zed --diff <old> <new>` command. --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
df673c1b85 |
acp_thread: Preserve ordered mixed content in agent messages (#64456)
Preserve ordered mixed content in agent messages without disrupting text streaming for existing native/v1 agents. The previous single-block reduction could replace images with placeholders or lose non-text content as subsequent chunks arrived. - Introduce [ordered message display content](https://github.com/zed-industries/zed/blob/929fba3e16f7a378eb1dca3d85ac2f1df2b902c6/crates/acp_thread/src/acp_thread.rs#L1500), reusing adjacent text entities while retaining image/resource-preview boundaries. - Update rendering, text search, response copy/export, Mermaid cache invalidation, and CLI output to visit the collection. - Use block-local context menus and existing Markdown getters so copy commands target the clicked part rather than another part's cached state. - Keep existing link/mention formatting, resource-button and blob-label search behavior, compact prompt mentions, and original user-message chunks. - Preserve the separator between a leading resource link and subsequent direct or streamed text. Release Notes: - N/A |
||
|
|
85b8198e86 |
acp: Update the ACP SDK to 2.2.0 (#64457)
Pick up the published ACP Rust SDK 2.2.0 release, including the schema 1.9.1 compatibility fix for agents returning `null` for empty/defaultable payloads. Upstream changes: - https://github.com/agentclientprotocol/agent-client-protocol/pull/2178 - https://github.com/agentclientprotocol/rust-sdk/pull/367 Release Notes: - acp: Fixed errors when ACP agents return `null` for empty response payloads. |
||
|
|
bcf6582ce3 |
gpui_util: Respect custom Scoop installation paths (#62473)
# Objective - Fix PowerShell discovery when Scoop is installed outside the default `%USERPROFILE%\scoop` directory. - Zed currently ignores Scoop's `SCOOP` environment variable, so it can miss `pwsh.exe` and fall back to another shell. ## Solution - Use the `SCOOP` environment variable as the Scoop root when it is set. - Fall back to `%USERPROFILE%\scoop` when `SCOOP` is unset. - Preserve the PowerShell discovery order and file validation from the current `main` branch. The original change also covered Git Bash. That is no longer needed after #63339 changed Git Bash discovery to follow the active Git installation. ## Testing - `cargo fmt --all --check` - `cargo test -p gpui_util` — 2 passed, 0 failed. - `cargo check -p gpui_util --tests --target x86_64-pc-windows-msvc` — passed. - Did not runtime-test the Windows-specific path on this macOS host because Windows test binaries cannot run natively here. - To test manually on Windows, set `SCOOP` to a custom Scoop root containing `shims\pwsh.exe`, launch Zed, and verify that PowerShell is selected. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed PowerShell installed by Scoop not being detected when Scoop uses a custom installation directory. - [GPUI] Fixed PowerShell discovery for custom Scoop installations on Windows. Signed-off-by: jliu666 <jliu666@hotmail.com> |
||
|
|
a51d23c93d |
Windows: Fix files opened by UNC path getting no language servers (#56553)
Opening a file like `zed "\\server\share\file.txt"` leaves it with no language servers attached, and the tab shows the ugly `\\?\UNC\...` path. The problem is the verbatim `\\?\UNC\` prefix Windows adds during path canonicalization. We rely on dunce to strip these prefixes, but it doesn't handle the UNC case, so the path stays in a form that breaks LSP URL conversion. Fixed by stripping the prefix ourselves in `SanitizedPath` before handing off to dunce. Before: <img width="446" height="257" alt="Screenshot 2026-06-12 075128" src="https://github.com/user-attachments/assets/4177e8de-8d13-42f1-a19b-d7dd52c10b32" /> After: (note the correct tooltip and the syntax error highlighting) <img width="423" height="268" alt="Screenshot 2026-06-12 083651" src="https://github.com/user-attachments/assets/83e98200-6bed-4a9e-b463-abbc067f6a5d" /> 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) — N/A, no UI changes - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable — one extra string-prefix check per worktree creation Release Notes: - Fixed: language servers now run when opening files via UNC paths on Windows (e.g. `\\server\share\file.txt`). --------- Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com> |
||
|
|
395def7a06 |
Exclude non-Linux remote-server checks from the merge queue runs (#64528)
Given that the rest of the checks are run for Linux only in the merge queue, follow the pattern here too. Release Notes: - N/A |
||
|
|
8d085f1928 |
Import VS Code files.exclude into file_scan_exclusions (#64492)
## Objective Import VS Code’s `files.exclude` into `file_scan_exclusions`. The previous `files.watcherExclude` mapping was dead code: it expected an array, while VS Code stores an object of `pattern: bool`. `files.watcherExclude` only stops watching, and the files stay visible in VS Code, so it is not a match for `file_scan_exclusions`. `files.exclude` hides files from the explorer and search, which matches `file_scan_exclusions`, and its default set is nearly identical to Zed's. Related to #62769, reported during the review of #64484. A meta follow-up to #64399. ## Solution Import nonempty `files.exclude` patterns enabled with `true`, ignoring disabled and malformed entries, including VS Code's `{"when": ...}` form. Append `"..."` so the imported list extends inherited exclusions instead of replacing them. Inputs with no usable patterns leave the inherited list unchanged. `files.watcherExclude` is no longer imported. ## Testing The new regression tests reproduce the bug and verify the fix. To check manually, import `{"files.exclude":{"**/build/**":true,"**/cache/**":false}}` and verify that `file_scan_exclusions` becomes `["**/build/**", "..."]`, and that `.git` stays hidden in the project panel. ## 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 adheres to Zed’s UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed importing VS Code `files.exclude` into `file_scan_exclusions`. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
887149bbdd |
Ignore invalid file patterns individually (#64525)
## Objective Prevent one invalid file pattern from discarding valid patterns or causing settings loading to panic. The pre-existing exclusion-matcher bug was reported during review of #64492 (part of #64399). ## Solution Ignore invalid entries individually and log their errors in `file_scan_exclusions`, `file_scan_inclusions`, `file_types`, `hidden_files`, `private_files`, and `read_only_files`. Preserve valid inherited entries without changing `"..."`, replacement, or empty list behavior. Valid brace inclusion patterns remain usable, including when an alternative spans multiple directories. ## Testing Reproduced matcher loss and inclusion and file type panic paths before fixing them. Targeted tests pass on macOS for mixed, inherited, replacement, empty, and all-invalid lists, including inherited `.git` exclusions, private file protections, and inclusion rescans with brace patterns. Windows and Linux execution remains untested. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed invalid file patterns discarding valid exclusions, hidden file rules, or read-only rules, or causing inclusion settings to panic. Also fixed invalid private file patterns discarding valid protections and invalid file type patterns causing settings loading to panic. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
0eda7703f6 |
gpui_macos: Release the accessibility adapter when a window is dropped (#64143)
## Objective Closing a GPUI window on macOS does not release that window's native view tree, so every open/close cycle leaves a `GPUIView`, its `CAMetalLayer` and the renderer's command queue alive in the process. A long-running app that opens and closes windows grows without bound; this is the mechanism described in #50737. The reason is a retain cycle: ``` MacWindowState -> accesskit_adapter (crates/gpui_macos/src/window.rs:710) -> NSWindow.contentView (strongly retained by accesskit_macos) -> GPUIView (a subview of that content view) -> Arc<Mutex<MacWindowState>> in its ivar (back to the start) ``` `accesskit_macos::SubclassingAdapter::for_window` keeps a strong `Id<NSView>` of the window's content view, and both the `NSWindow` and the `GPUIView` store an `Arc<Mutex<MacWindowState>>` in their `windowState` ivar. `MacWindow::drop` resets the delegate and tears down the frame source and the visibility callback, but nothing drops the adapter, so the native view tree outlives the window. Worth noting while reading the existing teardown: `gpui_apple::metal_renderer::destroy()` is currently a no-op (`crates/gpui_apple/src/metal_renderer.rs`), so the `renderer.destroy()` call that is already there is not evidence that GPU-side resources were released — what matters is whether the state that owns the renderer can run its destructor at all. ## Solution One line in `MacWindow::drop`: ```rust let mut this = self.0.lock(); drop(this.accesskit_adapter.take()); this.renderer.destroy(); ``` Nothing else in the teardown changes: - `frame_source.take()` stays. `WindowFrameSource`'s `Drop` cancels `frame_requests`, and that dispatch source's context points at the native view, so it has to be cancelled while the view is still valid. - `visibility_callback.take()` stays, as do the sheet handling and the delegate reset. - No view or layer is released by hand. The native view is already handed to its parent view via `autorelease`; the problem is the cycle, not the ownership. ## Testing Done locally on macOS (aarch64), with `stable`: - `cargo fmt -p gpui_macos -- --check` — clean. - `cargo test -p gpui_macos --lib` — 7 passed, 0 failed. - `cargo clippy -p gpui_macos --release --all-targets --all-features -- --deny warnings` — clean. Note: the adapter is only created when Zed runs with `ZED_EXPERIMENTAL_A11Y=1`, so the leak only affects that path and the fix is a no-op otherwise. What isn't covered: - **No automated test.** The cycle needs a real `NSWindow`/`contentView` pair, and the change is a `Drop` impl; a unit test here would be testing `NSView` ownership rather than this crate's logic. `gpui_macos` has no window-lifecycle test harness today, and adding one is more than this fix should carry. - **No memory measurement by me.** I did not run Instruments/`Allocations` against this change, and the minimal-repro numbers quoted in #50737 were measured on a different fork revision, not this one. So the leak here is established from the ownership graph above rather than from a footprint curve I produced. The follow-up that would settle it is a before/after count of live `GPUIView` / `CAMetalLayer` / command-queue objects after closing a window, with accessibility enabled and disabled; I have not run that, and I am not claiming this explains every memory-growth report. - Only the macOS backend is touched, so there is nothing Windows/Linux-specific here. ## 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 adheres to Zed's UI standards (UI/UX and icon guidelines) — no UI change - [ ] Tests cover the new/changed behavior — not applicable, see "What isn't covered" - [x] Performance impact has been considered and is acceptable ## AI disclosure Built with substantial LLM assistance: I had help reading the `accesskit_macos` and `gpui_macos` ownership graph and drafting this description, and I reviewed every line of the diff myself. The change is one line plus a comment. English isn't my first language, so the prose here was machine-polished; happy to restate anything in plain terms. --- Release Notes: - [GPUI] Fixed a memory leak on macOS where closing a window with accessibility enabled left its native view, `CAMetalLayer` and the renderer's resources alive. - Fixed a memory leak on macOS where closing a window left its native view, `CAMetalLayer` and the renderer's resources alive. |
||
|
|
526c95d474 |
Improve internal links across documentation (#64481)
## Summary - Adds 63 internal links across 41 documentation pages. - Connects existing terms such as Agent Panel, semantic tokens, edit predictions, and language-specific debugging to their detailed reference pages. - Uses existing wording for 60 links and makes three small wording changes where a natural anchor did not already exist. ## Why this matters Readers can now move from overview and configuration pages to the relevant detailed guidance without searching the documentation manually. The changes add navigation only. They do not change product behavior or documented requirements. ## Jev experiment This PR came from a local experiment using Jev to audit internal links across the published documentation. The audit scripts are not included in this PR. - Code shortlisted 2,715 possible source and destination page pairs. - Jev made two separate decisions for each pair: whether the link would help the reader, and which exact existing phrase should become the anchor. - Five strong links without existing anchor text went to GPT-5.6 Luna for minimal rewrite options. Jev then selected among those fixed options. - A local review interface surfaced the results for Pass or Fail decisions before any files changed. Human review approved 66 changes. Two no longer matched the current `main` branch, and review removed one circular link, leaving the 63 links in this PR. ## Validation - `pnpm dlx prettier@3.5.0 <changed docs> --check` - `lychee --exclude '^http' './docs/src/**/*'` — 0 errors - `mdbook build docs` - Verified that the diff adds exactly 63 Markdown links Release Notes: - Improved links between related documentation pages. |
||
|
|
916fc2b8cb |
Add support for the "..." entry in hidden_files (#64484)
## Objective Let projects add hidden file patterns without repeating defaults or patterns inherited from user settings. Part of [#64399](https://github.com/zed-industries/zed/discussions/64399). ## Solution Extend the `"..."` behavior from #62769, #64222, and #64440 to `hidden_files`. `"..."` includes the resolved inherited list, omitting it replaces the list, and `[]` clears it. Duplicate entries retain their first occurrence. The default remains `["**/.*"]`, and `project_panel.hide_hidden` still controls visibility. ## Testing Tested on macOS with settings merge, worktree integration, and Settings Editor metadata tests. To check manually, configure different user and project hidden file patterns and enable `project_panel.hide_hidden`. Include `"..."` to retain inherited patterns, then repeat without it and with `[]` to verify replacement and clearing. ## 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 adheres to Zed’s UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Added support for `"..."` in `hidden_files` so project settings can extend inherited hidden-file patterns. |
||
|
|
b961b4950f |
gpui: Add MicaBackdrop and MicaAltBackdrop to be selectable on themes (#48340)
Following #41842, this is an extension to that contribution and it enables `MicaBackdrop` and `MicaAltBackdrop` for `"background.appearance"` Release Notes: - Add `MicaBackdrop` and `MicaAltBackdrop` to be selectable on themes Additional Notes: If PR is merged, theme schema should be updated to 0.2.1 or higher --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
01448f565e |
Fix Windows task path handling for worktree variables with spaces (#55727)
## Summary Fixes task variable resolution and Windows shell argument handling when `$ZED_WORKTREE_ROOT` contains spaces or when tasks are spawned while the global `tasks.json` buffer is focused. ## Problem `$ZED_WORKTREE_ROOT` could resolve from the active editor item even when that item was outside every visible project worktree, such as the global `tasks.json` file under the Zed config directory. On Windows, paths with spaces also need to remain one logical argument when terminal shell commands are constructed. ## Changes - Only let the active editor item provide the active task context when it belongs to a visible project worktree. - Fall back to the selected or first visible project worktree when the active editor item is external/global. - Preserve project-file-specific task variables for normal project buffers. - Add regression coverage for `$ZED_WORKTREE_ROOT` in `args` and `cwd` with synthetic Windows-style paths containing spaces. - Add regression coverage for PowerShell and cmd shell command construction so a spaced path remains quoted as one shell argument. ## Testing Ran on Windows with Rust 1.95.0, Visual Studio Build Tools 2022, and Windows SDK 10.0.26100.0: - `cargo fmt --all --check` - `cargo test -p util shell_builder::test::windows_powershell_preserves_spaced_arg_as_single_shell_argument -- --exact` - `cargo test -p util shell_builder::test::windows_cmd_preserves_spaced_arg_as_single_shell_argument -- --exact` - `cargo test -p task task_template::tests::test_worktree_root_with_spaces_stays_atomic_in_args_and_cwd -- --exact` - `cargo test -p tasks_ui tests::test_non_project_active_editor_uses_visible_worktree_context -- --exact` - `cargo test -p task` - `cargo test -p tasks_ui` - `cargo test -p workspace` Release Notes: - Fix Windows task path handling for worktree variables with spaces - [GPUI] N/A Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com> |
||
|
|
c982733897 |
Install Linux dependencies for Wezel runs (#64475)
The first dispatched binary-size run failed while compiling `x11` because the stock `ubuntu-latest` image did not include Zed's Linux build dependencies. The old Wezel runner incorrectly reported that as a successful empty run. Run Zed's existing `./script/linux` setup before the Wezel action, matching Zed's Linux CI jobs. Release Notes: - N/A Co-authored-by: Amp <amp@ampcode.com> |