73381f0
Merge branch 'fix-terminal-viewport-culling-rebased' into nathan
Nathan Sobo created
73381f0
Merge branch 'fix-terminal-viewport-culling-rebased' into nathan
Nathan Sobo created
90a292c
Optimize terminal rendering when clipped by parent containers
This brings the terminal element's viewport culling in line with the editor optimization in PR #44995 and the fix in PR #45077. ## Problem When a terminal is inside a scrollable container (e.g., the Agent Panel thread view), it would render ALL cells during prepaint, even when the terminal was entirely outside the viewport. This caused unnecessary CPU usage when multiple terminal tool outputs existed in the Agent Panel. ## Solution Calculate the intersection of the terminal's bounds with the current content_mask (the visible viewport after all parent clipping). If the intersection has zero area, skip all cell processing entirely. ### Important distinction between content modes: - **ContentMode::Scrollable**: Cells use the terminal's internal coordinate system with negative line numbers for scrollback history. We cannot filter cells by screen-space row numbers, so we render all cells when visible. The early-exit for zero intersection handles the offscreen case. - **ContentMode::Inline**: Cells use 0-based line numbers (no scrollback). We can filter cells to only those in the visible row range, using the same logic that existed before but now extracted into a helper function with proper bounds clamping to prevent the hang bug from PR #45077. ## Testing Added comprehensive unit tests for: - compute_visible_row_range edge cases - Cell filtering logic for Inline mode - Line/i32 comparison behavior Manually verified: - Terminal fully visible (no clipping) - Terminal clipped from top/bottom - Terminal completely outside viewport (renders nothing) - Scrollable terminals with scrollback history work correctly Release Notes: - Improved Agent Panel performance when terminals are scrolled offscreen.
Nathan Sobo created
d43cc46
agent_ui: Add more items in the right-click context menu (#45575)
Follow up to https://github.com/zed-industries/zed/pull/45440 adding an item for "Open Thread as Markdown" and another for scroll to top and scroll to bottom. <img width="500" height="646" alt="Screenshot 2025-12-23 at 1 12@2x" src="https://github.com/user-attachments/assets/c82e26bb-c255-4d73-b733-ef6ea269fabe" /> Release Notes: - N/A
Danilo Leal created
fdb8e71
docs: Remove reference to outdated curated issues board (#45568)
The documentation referenced a “Curated board of issues” GitHub Project that no longer exists. The linked project returns a 404, and only three public projects are currently available under zed-industries. This PR removes the outdated reference. Documentation-only change. Release Notes: - N/A
Daniel Byiringiro created
6bc433e
agent_ui: Add right-click context menu to the thread view (#45440)
Closes #23158 Release Notes: - Added a right-click context menu for the thread view in the agent panel. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
zchira and Danilo Leal created
1281f46
markdown: Add support for right-click menu copy item (#45572)
In https://github.com/zed-industries/zed/pull/45440, we're implementing the ability to right-click in the agent panel and copy the rendered markdown. However, that presented itself as not as straightforward as just making the menu item fire the `CopyAsMarkdown` action because any selection in markdown is cleared after a new mouse click, and for the right-click copy menu item to work, we need to persist that selection even after the menu itself is opened and the "Copy" menu item is clicked. This all demanded a bit of work in the markdown file itself, and given we may want to use this functionality for other non-agent thread view markdown use cases in the future, I felt like it'd be better breaking it down into a separate PR that we can more easily track in the future. The context menu still needs to be built in the place where the markdown is created and rendered, though. This PR only adds the infrastructure needed so that this menu can simply fire the `CopyAsMarkdown` and make the copying work. Release Notes: - N/A
Danilo Leal created
ed705c0
Conditionally display debugger panel icon based on a setting (#45544)
Closes [#ISSUE](https://github.com/zed-industries/zed/issues/45506) Release Notes: - Conditionally display the debugger panel icon based on a setting to avoid too many error logs
Rocky Shi created
8980333
Add support for automatic Markdown task list continuation when using uppercase X (#45561)
Release Notes: - Added support for automatic Markdown task list continuation when using uppercase X
Joseph T. Lyons created
acee48b
git: Fix "Commit Tracked" being shown when files are partially staged (#45551)
Release Notes: - N/A
Cole Miller created
71298e6
extension_ci: Use larger runners for extension bundling (#45540)
`2x4` is not nearly enough for some of the grammars in use, hence change this to a larger runner. Also, reduce the size for the Rust runners a bit, as they don't need to be quite as large for the amount of Rust code we have in extensions. Release Notes: - N/A
Finn Evers created
07ada58
Improve edit prediction example capture (#45536)
This PR improves the `edit prediction: Capture Example` in several ways: * fixed bugs in how the uncommitted diff was calculated * added a `edit_predictions.examples_dir` setting that can be set in order to have the action automatically save examples into the given folder * moved the action into the `edit_predictions` crate, in preparation for collecting this data passively from end users, when they have opted in to data sharing, similar to what we did for Zeta 1 Release Notes: - N/A
Max Brunsfeld created
dd521a9
Bump proto extension to 0.3.1 (#45531)
Includes https://github.com/zed-industries/zed/pull/45413 Release Notes: - N/A
Kirill Bulatov created
f9d9721
agent_ui: Expand model favoriting feature to external agents (#45528)
This PR adds the ability to favorite models for external agents—writing to the settings in the `agent_servers` key—as well as a handful of other improvements: - Make the cycling keybinding `alt-enter` work for the inline assistant as well as previous user messages - Better organized the keybinding files removing some outdated agent-related keybinding definitions - Renamed the inline assistant key context to "InlineAssistant" as "PromptEditor" is old and confusing - Made the keybindings to rate an inline assistant response visible in the thumbs up/down button's tooltip - Created a unified component for the model selector tooltip given we had 3 different places creating the same element - Make the "Cycle Favorited Models" row in the tooltip visible only if there is more than one favorite models Release Notes: - agent: External agents also now support the favoriting model feature, which comes with a handy keybinding to cycle through the favorite list.
Danilo Leal created
cff3ac6
docs: Fix `download_file` documentation (#45517)
Fix a small error in the docs for the extension capabilities Release Notes: - N/A
Alejandro Fernández Gómez created
746b764
util: Keep default permissions when extracting Zip with unset permissions (#45515)
This ensures that we do not extract files with no permissions (`0o000`), because these would become unusable on the host Release Notes: - N/A
Finn Evers created
397fcf6
docs: Fix Edit Prediction docs for Codestral (#45509)
This PR fixes the Edit Prediction docs for Codestral after they got mangled in https://github.com/zed-industries/zed/pull/45503. Release Notes: - N/A
Marshall Bowers created
9adb3e1
docs: Testing automatic documentation updates locally (2025-12-21) (#45503)
## Documentation Update Summary
### Changes Made
| File | Change | Related Code |
| --- | --- | --- |
| `docs/src/ai/edit-prediction.md` | Updated Codestral setup
instructions to use Settings Editor path instead of outdated
`agent::OpenSettings` action reference | Settings Editor provider
configuration flow |
### Rationale
The primary documentation update addresses outdated instructions in the
Codestral setup section. The original text referenced an
`agent::OpenSettings` action that directed users to an "Agent Panel
settings view" which no longer reflects the current UI flow. The updated
instructions now guide users through the Settings Editor with
platform-specific keyboard shortcuts and provide an alternative status
bar path.
### Review Notes
- **Codestral instructions**: Reviewers should verify the Settings
Editor navigation path (`Cmd+,` → search "Edit Predictions" →
**Configure Providers**) matches the current Zed UI
- **Status bar alternative**: The alternative path via "edit prediction
icon in the status bar" should be confirmed as accurate
---
## Update from 2025-12-21 20:25
---
**Source**: [#44914](https://github.com/zed-industries/zed/pull/44914) -
settings_ui: Add Edit keybindings button
**Author**: @probably-neb
Now I have all the context needed to create a comprehensive
documentation update summary.
## Documentation Update Summary
### Changes Made
| File | Change | Related Code |
| --- | --- | --- |
| docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw`
action, explaining automatic @mention formatting for pasted code and how
to bypass it | PR #45254 |
### Rationale
PR #45254 ("agent_ui: Improve UX when pasting code into message editor")
introduced the `agent::PasteRaw` action, which allows users to paste
clipboard content without automatic formatting. When users copy
multi-line code from an editor buffer and paste it into the Agent panel,
Zed now automatically formats it as an @mention with file context. The
`PasteRaw` action provides a way to bypass this behavior when raw text
is preferred.
This documentation update ensures users can discover both:
1. The new automatic @mention formatting behavior
2. The keybinding to bypass it when needed
### Review Notes
- The new paragraph was placed in the "Adding Context" section,
immediately after the existing note about image pasting support—this
maintains logical flow since both relate to pasting behavior
- Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding
references, consistent with other keybinding documentation in the file
- The documentation passed Prettier formatting validation without
modifications
---
### Condensed Version (for commit message)
```
docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting
Added explanation that multi-line code pasted from editor buffers is
automatically formatted as @mentions, with keybinding to paste raw text.
Related: PR #45254
```
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
morgankrey , factory-droid[bot] , and Zed Zippy created
1469d94
Fix dock panel button tooltip not dismissed when state changes via keyboard shortcut (#44746)
Closes #44720 Release Notes: - Fixed dock panel button tooltips not being dismissed when toggling panels via keyboard shortcut **Problem:** When hovering over a dock panel button and using a keyboard shortcut to toggle the panel, the tooltip remains visible with stale content. This is inconsistent with mouse click behavior, where the tooltip is dismissed on mouse down. **Solution:** Include the panel's active state in the button's element ID. When the state changes, the element ID changes (e.g., `"DebugPanel"` → `"DebugPanel-active"`), which causes GPUI to discard the old element state including the cached tooltip. **Testing:** Manually verified: 1. Hover over a dock panel button, wait for tooltip 2. Press keyboard shortcut to toggle the panel 3. Tooltip is now dismissed (consistent with mouse click behavior) https://github.com/user-attachments/assets/ed92fb6c-6c22-44e2-87e3-5461d35f7106 --------- Co-authored-by: MrSubidubi <finn@zed.dev>
Daeksell and MrSubidubi created
3b626c8
Allow empty splits on panes (#40245)
Draft as a base for continuing the discussion in #8008 : adds a
`SplitOperation` enum to support bindings like `["pane::SplitLeft",
{"operation": "Clear"}]`
To be discussed @MrSubidubi and others:
- Naming: Generally not happy with names yet and specifically `Empty` is
unclear, e.g., what does this mean for terminal panes? Added placeholder
code to split without cloning, but unsure what users would expect in
this case.
- ~~I removed `SplitAndMoveXyz` actions but I guess we should keep them
for backwards compatibility?~~
- May have missed details in the move implementation. Will check the
code again for opportunities to refactor more code after we agree on the
approach.
- ~~Tests should go to `crates/collab/src/tests/integration_tests.rs`?~~
Closes #8008
Release Notes:
- Add `pane::Split` mode (`{ClonePane,EmptyPane,MovePane}`) to allow
creating an empty buffer.
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
Co-authored-by: MrSubidubi <finn@zed.dev>
Yves Ineichen , Finn Evers , and MrSubidubi created
3dc0614
Small worktree trust fixes (#45500)
* Abs path trust should transitively trust all single file worktrees on the same host * Init worktree trust on the client side even when devcontainers are run: remote host unconditionally checks trust, hence the client has to keep track of it and respond with approves/declines. Do trust all devcontainers' remote worktrees, as containers are isolated and "safe". Release Notes: - N/A
Kirill Bulatov created
045e154
gpui: Fix hover state getting stuck when rapidly hovering over elements (#45437)
Closes #45436 Release Notes: - N/A --------- Co-authored-by: MrSubidubi <finn@zed.dev>
Mayank Verma and MrSubidubi created
dc72e1c
collab: Fix capitalization of copilot name alias (#45497)
This fixes copilot currently not passing the CLA check. Release Notes: - N/A
Finn Evers created
0884305
gpui(windows): Don't log incorrect errors on `SetActiveWindow` calls (#45493)
The function returns the previous focus handle, which may be null if there is no previous focus. Unfortunately that also overlaps with the error return value, so winapi will hand us a error 0 back in those cases which we log ... Release Notes: - N/A *or* Added/Fixed/Improved ...
Lukas Wirth created
8344929
Add autocomplete for initialization_options (#43104)
Closes #18287 Release Notes: - Added autocomplete for lsp initialization_options ## Description This MR adds the following code-changes: - `initialization_options_schema` to the `LspAdapter` to get JSON Schema's from the language server - Adds a post-processing step to inject schema request paths into the settings schema in `SettingsStore::json_schema` - Adds an implementation for fetching the schema for rust-analyzer which fetches it from the binary it is provided with - Similarly for ruff <img width="857" height="836" alt="image" src="https://github.com/user-attachments/assets/3cc10883-364f-4f04-b3b9-3c3881f64252" /> ## Open Questions(Would be nice to get some advice here) - Binary Fetching: - I'm pretty sure the binary fetching is suboptimal. The main problem here was getting access to the delegate but i figured that out eventually in a way that i _hope_ should be fine. - The toolchain and binary options can differ from what the user has configured potentially leading to mismatches in the autocomplete values returned(these are probably rarely changed though). I could not really find a way to fetch these in this context so the provided ones are for now just `default` values. - For the trait API it is just provided a binary, since i wanted to use the potentially cached binary from the CachedLspAdapter. Is that fine our should the arguments be passed to the LspAdapter such that it can potentially download the LSP? - As for those LSPs with JSON schema files in their repositories i can add the files to zed manually e.g. in languages/language/initialization_options_schema.json, which could cause mismatches with the actual binary. Is there a preferred approach for Zed here also with regards to updating them?
Nereuxofficial created
213cb30
gpui: Enable direct-to-display optimization for metal (#45434)
Continuing of #44334 I removed disabling of vsync which was causing jitter on some external displays cc: @maxbrunsfeld @Anthony-Eid Release Notes: - Mark metal layers opaque for non-transparent windows to allow direct-to-display when supported Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Marco Mihai Condrache created
4b56fec
acp_thread: Fix broken main build (#45461)
Release Notes: - N/A
Finn Evers created
32621dc
Fix race condition in `update_last_checkpoint` (#44801)
Release Notes: - Fixed spurious "no checkpoint" error in agent panel --- ## Summary `update_last_checkpoint` would call `last_user_message()` twice - once at the start to capture the checkpoint, and again in an async closure after the checkpoint comparison completed. If a new user message without a checkpoint was added between these two calls, the second call would find the new message and fail with "no checkpoint". ## Fix Capture the user message ID at the start and use `user_message_mut(&id)` in the async closure to find the specific message. cc @mikayla-maki
Nathan Sobo created
215ac50
agent_ui: Fix markdown block for tool call input and output content (#45454)
This PR fixes two issues with regards to markdown codeblocks rendered in tool call input and output content display: - the JSON code snippets weren't properly indented - codeblocks weren't being rendered in unique containers; e.g., if you hovered one scrollbar, all of them would also be hovered, even though horizontal scrolling itself worked properly Here's the end result: https://github.com/user-attachments/assets/3d6daf64-0f88-4a16-a5a0-94998c1ba7e2 Release Notes: - agent: Fix scrollbar and JSON indentation for tool call input/output content's markdown codeblocks.
Danilo Leal created
a5540a0
ui: Make the NumberField in edit mode work (#45447)
- Make the buttons capable of changing the editor's content (incrementing or decrementing the value) - Make arrow key up and down increment and decrement the editor value - Tried to apply a bit of DRY here by creating some functions that can be reused across the buttons and editor given they all essentially do the same thing (change the value) - Fixed an issue where the editor would not allow focus to move elsewhere, making it impossible to open a dropdown, for example, if your focus was on the number field's editor Release Notes: - N/A
Danilo Leal created
3e8c25f
Remove extra shortcut separator in default mode & model selection tooltips (#45439)
Closes #44118 Release Notes: - N/A
ᴀᴍᴛᴏᴀᴇʀ created
7f0842e
proto: Add `extend` keyword (#45413)
Closes #45385 Release Notes: - Add extend keyword to proto
Zachiah Sawyer created
6dad419
Update version example in remote-development.md (#45427)
Updated the version example for maintaining the remote server binary. Release Notes: - N/A
Hidehiro Anto created
0facdfa
editor: Make `TextAlign::Center` and `TextAlign::Right` work (#45417)
Closes https://github.com/zed-industries/zed/issues/43208 This PR essentially unblocks the editable number field. The function that shapes editor lines was hard-coding text alignment to the left, meaning that whatever different alignment we'd pass through `EditorStyles`would be ignored. To solve this, I just added a text align and align width fields to the line paint function and updated all call sites keeping the default configuration. Had to also add an `alignment_offset()` helper to make sure the cursor positioning, the selection background element, and the click-to-focus functionality were kept in-sync with the non-left aligned editor. Then... the big star of the show here is being able to add the `mode` method to the number field, which uses `TextAlign::Center`, thus making it work as we designed it to work. https://github.com/user-attachments/assets/3539c976-d7bf-4d94-8188-a14328f94fbf Next up, is turning the number filed to edit mode where applicable. Release Notes: - Fixed a bug where different text alignment configurations (i.e., center and right-aligned) wouldn't take effect in editors.
Danilo Leal created
5846137
ci: Disable automated docs on pushes to `main` (#45416)
This PR disables the automated docs on pushes to `main`, as it is currently making CI red. Release Notes: - N/A
Marshall Bowers created
42d5f7e
Set override_redirect for PopUps (#42224)
Currently on x11, gpui PopUp windows only rely on the "notification" type in order to indicate that they should spawn as floating window. Several window managers (leftwm in my case, but it also seems to be the case for dwm and ratpoison) do not this property into account thus not spawning them as float. On the other hand, using Floating instead of PopUp do make those windows spawn as floating, as these window manager do take into account the (older) "dialog" type. The [freedekstop documentation](https://specifications.freedesktop.org/wm/1.5/ar01s05.html#id-1.6.7) does seem to suggest that these windows should also have the override redirect property : > This property is typically used on override-redirect windows. Note that this also disables pretty much all interactions with the window manager (such as moving the window, resizing etc...) Release Notes: - Fix popup windows not spawning floating sometime on x11
Lieunoir created
5395197
Separate out component_preview crate and add easy-to-use example binaries (#45382)
Release Notes: - N/A
Mikayla Maki created
1d76539
gpui: Fix hover styles not being applied during layout (#43324)
Closes #43214 Release Notes: - Fixed GPUI hover styles not being applied during layout Here's the before/after: https://github.com/user-attachments/assets/5b1828bb-234a-493b-a33d-368ca01a773b
Mayank Verma created
e5eb26e
gpui: Reset mouse scroll state on FocusOut to prevent large jumps (#43841)
This fixes an X11 scrolling issue where Zed may jump by a large amount due to the scroll valuator state not being reset when the window loses focus. If you Alt-Tab away from Zed, scroll in another application, then return, the first scroll event in Zed applies the entire accumulated delta instead of a single step. The missing FocusOut reset was originally identified in issue #34901. Resetting scroll positions on FocusOut matches the behavior already implemented in the XinputLeave handler and prevents this jump. Closes #34901 Closes #40538 Release Notes: - Fixed an X11 issue where Alt-Tabbing to another application, scrolling, and returning to Zed could cause the next scroll event to jump by a large amount.
jkugs created
a86b0ab
gpui: Improve the tab stop example by demonstrating tab_group (#44647)
I've just enriched the existing tab_stop.rs example for GPUI with a demonstration of tab_group. I don't think tab groups existed when the original example was written. (I didn't understand the behaviour for tab_group from the doccomments and the example was missing, so I think this is a productive PR) Release Notes: - N/A
Serophots created
5fb220a
gpui: Add a Popover example for test deferred (#44473)
Release Notes: - N/A <img width="1036" height="659" alt="image" src="https://github.com/user-attachments/assets/8ca06306-719f-4495-92b3-2a609aa09249" />
Jason Lee created
12dbbdd
git: Fix bug where opening a git blob from historic commit view could fail (#44226)
The failure would happen if the current version of the file was open as an editor. This happened because the git blob and current version of the buffer would have the same `ProjectPath`. The fix was adding a new `DiskState::Historic` variant to represent buffers that are past versions of a file (usually a snapshot from version control). Historic buffers don't return a `ProjectPath` because the file isn't real, thus there isn't and shouldn't be a `ProjectPath` to it. (At least with the current way we represent a project path) I also change the display name to use the local OS's path style instead of being hardcoded to Posix, and cleaned up some code too. Release Notes: - N/A --------- Co-authored-by: Cole Miller <cole@zed.dev> Co-authored-by: cameron <cameron.studdstreet@gmail.com> Co-authored-by: xipengjin <jinxp18@gmail.com>
Anthony Eid , Cole Miller , cameron , and xipengjin created
6dfabdd
Revert "gpui: Enable direct-to-display optimization for metal" (#45405)
Reverts zed-industries/zed#44334 From my testing, this PR introduced screen tearing, or some kind of strange visual artifact, when scrolling at medium speed on a large display. Release notes: - N/A
Max Brunsfeld created
895213a
Support union declarations in C/C++ textobjects.scm (#45308)
Release Notes: - C/C++: Add `union` declarations to the list of text objects
Haojian Wu created
1c576cc
Fix OpenRouter giving errors for some Anthropic models (#45399)
Fixes #44032 Release Notes: - Fix OpenRouter giving errors for some Anthropic models
Richard Feldman created
3f4da03
settings ui: Change window kind from floating to normal (#45401)
#40291 made floating windows always stay on top, which made the settings ui window always on top of Zed. To maintain the old behavior, this PR changes the setting window to be a normal window. Release Notes: - N/A
Anthony Eid created
ff71f4d
Run cargo fix as well as cargo clippy --fix (#45394)
Release Notes: - N/A
Conrad Irwin created
71f4dc2
docs: Stash local changes before branch checkout in droid auto docs CLI (#45395)
Stashes local changes before branch checkout in droid auto docs CLI Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey and factory-droid[bot] created
b091cc4
Enforce 5MB per-image limit when converting images for language models (#45313)
## Problem When users paste or drag large images into the agent panel, the encoded payload can exceed upstream provider limits (e.g., Anthropic's 5MB per-image limit), causing API errors. ## Solution Enforce a default 5MB limit on encoded PNG bytes in `LanguageModelImage::from_image`: 1. Apply existing Anthropic dimension limits first (1568px max in either dimension) 2. Iteratively downscale by ~15% per pass until the encoded PNG is under 5MB 3. Return `None` if the image can't be shrunk within 8 passes (fail-safe) The limit is enforced at the `LanguageModelImage` conversion layer, which is the choke point for all image ingestion paths (agent panel paste/drag, file mentions, text threads, etc.). ## Future Work The 5MB limit is a conservative default. Provider-specific limits can be introduced later by adding a `from_image_with_constraints` API. ## Testing Added a regression test that: 1. Generates a noisy 4096x4096 PNG (guaranteed >5MB) 2. Converts it via `LanguageModelImage::from_image` 3. Asserts the result is ≤5MB and was actually downscaled --- **Note:** This PR builds on #45312 (prompt store fail-open fix). Please merge that first. cc @rtfeldman --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Nathan Sobo and Zed Zippy created
8e5d33e
Make prompt store fail-open when DB contains undecodable records (#45312)
Release Notes - N/A --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Nathan Sobo and Zed Zippy created
99224cc
docs: Droid needs a real model (#45393)
Droid needs a specific model with a date Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey and factory-droid[bot] created