mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-20 07:30:22 +01:00
a84689073d296dfd39987bc7dd478e43ef76d83a
1890 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5eed2397a8 |
git_ui: Add command to create tags at HEAD (#61973)
Add a Command Palette action that creates a lightweight local tag at the active repository's HEAD. Refresh tag consumers after creation and show success or failure notifications. # Objective This adds a `git: create tag at head` Command Palette action for creating a lightweight local tag at the active repository's current `HEAD`. ## Solution The action uses the existing single-line Git modal style and notification patterns. Tag creation uses `git update-ref` with a required nonexistent previous value, preventing an existing tag from being overwritten. It also: - Supports local and remote project repositories. - Refreshes Git graph and history views after tag creation. - Shows a bottom-centered success toast. - Uses the existing critical error prompt for failures. - Documents that created tags are local and are not pushed automatically. ## Testing - `cargo test -p git test_create_ref_requires_ref_to_not_exist` - `cargo test -p git_ui test_create_tag_at_head` ## Showcase https://github.com/user-attachments/assets/81ceffdb-d5f7-4e97-b513-4ee04b55b619 --- Release Notes: - Add command to create tags at HEAD --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
01376d4926 |
git_hosting_providers: Add Gitiles provider (#63996)
Add Gitiles support to git hosting providers, to enable permalink / git
blame diff link features working for repositories browsed with Gitiles
(used by Gerrit).
Permalinks use the Gitiles URL format:
{base_url}/{repo}/+/{sha}/{path}#{line}
Configured via git_hosting_providers setting:
{ "provider": "gitiles", "name": "...", "base_url": "https://..." }
# Objective
- Add basic permalink + git blame linking support for another common Git
provider (Gerrit + Gitiles).
Gerrit/Gitiles is a self hosted setup used at several large
corporations, so it would be nice to have native support for it
alongside the other git hosting providers. It is relevant to many
people.
URL can vary substantially between different self hosted setups. URL can
be like https://gerrit.example.com or something more elaborate like
https://vcs.internal.example.com/plugins/gitiles.
This does not implement avatars or PR links (as the similar Chromium
provider does) since exact Gerrit setup (e.g. trailers used, avatars
used) can differ significantly between different self hosted instances.
It implements the fundamental Gitiles link part instead which is still
very useful, and is reliable; `base_url` can be set to the gitiles "Git
repositories on [instance]" [base
page](https://gerrit.googlesource.com/), and this integration will then
work.
## Solution
- Implements a new GitHostingProvider which constructs Gitiles format
permalinks based on the user config.
Implementation follows inspiration from other providers: Tangled /
Chromium (also Gitiles/Gerrit based but tied specifically to Chromium).
## Testing
- Unit tests cover the logic in this change.
- Built for Windows, performed exploratory testing (adding multiple
providers, different base_urls, trying a self hosted Gerrit instance vs
googlesource, git blame link through UI works, copy permalink via
right-click context menu in code works).
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments -> N/A
- [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) -> N/A
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
#### "Copy permalink to line"
<img width="1958" height="677" alt="image"
src="https://github.com/user-attachments/assets/802a02af-db4e-4b9c-a7d5-ac26dc52cd7e"
/>
Above results in clipboard being set to:
https://gerrit.googlesource.com/gitiles/+/77d36f6ff5f50316daa82c6753af2c3217859df4/java/com/google/gitiles/GitilesUrls.java#34
#### Git blame diff view links to remote Gitiles view for the commit:
<img width="2242" height="808" alt="image"
src="https://github.com/user-attachments/assets/2792397a-83ae-4294-ae61-5a631975950d"
/>
Above example opens this link in browser:
https://gerrit.googlesource.com/gitiles/+/67c7844b7f7f228229c037cf297296874f50692c
---
`settings.json` for showcase example:
```json
"git_hosting_providers": [
{
"provider": "gitiles",
"name": "Gerrit Googlesource",
"base_url": "https://gerrit.googlesource.com"
}
],
```
---
Release Notes:
- Added `gitiles` as a Git hosting provider for Gitiles/Gerrit
deployments, enabling permalinks and navigation from git blame diff
view.
Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
|
||
|
|
badfb8d31f |
docs: Fix tab-switcher keybindings (#65105)
## Summary Fixes missing keybinding pills in the Tab Switcher documentation on Linux. The keybinding processing in `docs/theme/plugins.js` assumed every `<kbd>` element contained both macOS and Linux variants separated by `|`. Hand-written keybindings such as `ctrl`, `tab`, and `shift` only contain a single value, making them render empty on Linux. This change falls back to the first keybinding when a Linux-specific value is not provided. Also removes the `tab_switcher::ToggleAll` keybinding reference from the documentation, since the action does not have a default keybinding. Closes #65087. ### Before <img width="1890" height="942" alt="image" src="https://github.com/user-attachments/assets/e3d1298e-2e4f-404f-9f64-74e04d53a27f" /> ### After <img width="1600" height="797" alt="image" src="https://github.com/user-attachments/assets/7a3ef09b-0125-4184-8352-bdd174839720" /> ## Testing - Ran the Zed documentation locally with `mdbook serve docs`. - Verified the Tab Switcher documentation on Linux. - Confirmed that single-sided keybindings (`ctrl`, `tab`, `shift`, etc.) now render correctly. - Confirmed that keybindings containing both macOS/Linux variants continue to render correctly. - Confirmed the `ToggleAll` entry no longer displays the 'no default binding' message. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [ ] Tests cover the new or changed behavior. Release Notes: - N/A --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
7ea5428f0c |
agent: Improve custom bedrock model support (#64953)
## Summary Improve custom model support for Amazon Bedrock (**not** Mantle). Add the ability to specify existing model configuration settings in custom models. Specifying custom Amazon Bedrock Converse models is useful for a few key reasons: - Adding new models before Zed adds support - ex. Grok 4.6 was added 8/19, but is not yet added to the Zed agent picker. - Using application inference profiles to track individual usage - Using fully custom models uploaded and hosted in Bedrock Custom models should be as configurable as the provided models can be. Currently, they are not. Thinking, tools, and image support cannot be configured for custom models. This PR adds support for these settings. Configuration Changes for objects under `language_models` -> `bedrock` -> `available_models`: - Added `supports_tools` bool value to indicate that the model supports tool use - Added `supports_images` bool value to indicate that the model supports image recognition - Added `thinking` key that can either be a bool to enable basic thinking, or an object to describe additional thinking details: - `adaptive` bool to indicate whether model thinking can have adaptive levels (low, high, medium, etc.) - `has_xhigh` bool to indicate whether the model supports the xhigh adaptive thinking level. Unused if `adaptive` is false - `budget_tokens` to specify how many tokens the model can use for a thinking operation The new configuration format is mostly backwards compatible with the old format. i.e. **most** existing configurations will not break if this fix is merged. The only exception is now custom model `name`s are completely unmodified instead of potentially having a region prefix added to them. The user is responsible for making sure the `us.` (or whatever region) prefix is added to the model identifier. `allow_global` will have no impact on these models and they will be used if specified even if they are global models. I can change this behavior if it is desired. I think custom should be fully custom, though. We can optionally bounce a model specifier if it does not have a region prefix or has the `global` prefix if `allow_global` is false. I am open to feedback on the configuration keys and values. Misc changes: - The default `default_temperature` value for custom models is now `None` instead of 1.0. Some models do not support temperature and a default of 1.0 is still a value that the Bedrock endpoint will reject. ## Testing - Existing automated unit tests pass - Newly added automated unit tests pass - Tested manually with models currently unsupported in Zed (Grok 4.6/4.7, Kimi K3) - Models show up, function properly, show thinking level settings (incl. xhigh, if `has_xhigh` specified), can use tools, can add images - Manually tested model with custom ARN (application inference profile) ## Self-review - [X] I've reviewed my diff for quality, security, reliability, and performance. - [N/A] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [X] Tests cover the new or changed behavior. Release Notes: - Improved custom model support for Amazon Bedrock --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
c83abe7d0e |
git_ui: Allow collapsing the commit editor and commit details (#63236)
## Summary - The commit message editor in the Git panel is pinned to six lines and its only two controls both make it *larger* — one fills the panel, the other opens the modal. Anyone who commits from a terminal pays for an input they never use, and the Changes list is what gets squeezed. - In the Git Graph detail panel, the author metadata and the commit message render at a fixed size above the changed-files list, so shortening the panel (e.g. dragging the terminal up) hides the file list entirely. ## Changes **Git panel — collapsible commit editor** - New `git::ToggleCommitEditor` action. - A chevron beside the commit button hides the editor down to a thin bar; the commit button row stays available. - State persists per workspace via `SerializedGitPanel`, seeded from a new `git_panel.commit_editor` setting (`expanded` | `collapsed`, default `expanded`). - Collapsing clears the fill state — a hidden editor cannot also fill the panel. - `activation_focus_handle` no longer focuses an editor that isn't rendered. **Git Graph — collapsible commit details** - A disclosure folds the author metadata (avatar, refs, email, SHA, provider link) down to a single author + short-sha line. - A second disclosure folds the commit message body. - The changed-files container is already `flex_1().min_h_0()`, so it reclaims the freed space with no other layout change. **Settings plumbing** - `GitPanelCommitEditor` in `settings_content`, wired through `GitPanelSettings`, `assets/settings/default.json`, the settings UI, and `docs/src/reference/all-settings.md`. ## Test plan - [x] `test_toggle_commit_editor_collapsed` added, covering the toggle, persistence of the flag, and the fill/collapse exclusion. - [x] Manually verified in a dev build: chevron hides and restores the editor, Changes list expands into the freed space, action appears in the command palette, state survives a restart, and the `collapsed` setting seeds a new workspace. - [x] Manually verified both disclosures in the Git Graph detail panel with the panel shortened, including that the collapse state survives selecting a different commit. Release Notes: - Improved the Git panel by allowing the commit message editor to be collapsed, and the Git Graph commit details by making the metadata and commit message sections collapsible. ### Evidance Test | Expand | Collapse | Settings Git Panel | | ------- | --------- | ------------------ | | <img width="675" height="965" alt="Screenshot 2026-08-26 at 15 00 46" src="https://github.com/user-attachments/assets/70c56d02-35fc-45ac-988c-24ccd6d1a19e" /> | <img width="661" height="962" alt="Screenshot 2026-08-26 at 15 00 57" src="https://github.com/user-attachments/assets/2c32fa5d-30fc-4f35-8323-afbc2a031210" /> | <img width="1041" height="956" alt="Screenshot 2026-08-26 at 16 50 40" src="https://github.com/user-attachments/assets/67f166b6-5cd9-4430-bba3-fa765715c557" /> | --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
309f91f564 |
copilot: Move enterprise URI to top-level setting (#65082)
This PR is moving the `enterprise` URI to a top level `copilot` settings because it is used for both Edit Predictions and Copilot Chat. Previously it was listed under `languages > copilot > enterprise_uri` Release Notes: - N/A |
||
|
|
6708a25004 |
docs: Document default open behavior setting (#64610)
# Objective Update https://zed.dev/docs to include documentation for the `default_open_behavior` setting, introduced by #58805, just like we do for `cli_default_open_behavior`. This was discovered while I was revisiting https://github.com/zed-industries/zed/discussions/44355 . ## Solution Update the documentation for the `Windows & Projects > Opening in a New Window > Via Settings` section. ## Testing Used `mdbook serve docs` to build the documentation and review the edits. ## 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 <details> <summary>Before</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 41@2x" src="https://github.com/user-attachments/assets/6722aa35-dc9a-4414-9338-bd08182af71b" /> </details> <details> <summary>After</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 03@2x" src="https://github.com/user-attachments/assets/ec8ceb77-a2a9-495f-b145-85f5b8efddde" /> </details> --- Release Notes: - N/A |
||
|
|
28d5832adb |
markdown_preview: Add heading_font_weight setting (#64421)
Headings in the Markdown preview are hardcoded to semibold (600). Users
who set a lighter UI font, or who simply prefer lighter headings, have
no way to change this.
This adds `markdown_preview.heading_font_weight`, applied to H1 through
H6 in the preview. It defaults to `600`, so existing rendering is
unchanged unless the setting is set.
```jsonc
{
"markdown_preview": {
"heading_font_weight": 500
}
}
```
The value flows through `ThemeSettings` alongside the existing preview
typography settings, so the generic `markdown` crate gains no dependency
on `markdown_preview`. Because notebook Markdown cells share the preview
typography, they follow the setting too. Bold text inside headings and
table header cells keep their own weights. The setting is also exposed
in the settings editor under Markdown Preview Font, and documented in
the visual customization docs.
## Before / after
| Default (`600`) | `"heading_font_weight": 500` |
| --- | --- |
| <img width="2000" height="1299" alt="heading-weight-600-default"
src="https://github.com/user-attachments/assets/403d29bb-34ed-4cb1-b333-920ec5ee65f0"
/> | <img width="2000" height="1299" alt="heading-weight-500"
src="https://github.com/user-attachments/assets/9fbdd7f9-2d56-4815-a39e-fd1325ba7cd2"
/> |
## Testing
- New tests in `crates/markdown` assert every preview heading level
resolves to `600` by default and to the configured weight when set, and
that the weight does not leak into editor or agent Markdown.
- Verified manually in a dev build with `SF Pro` at weights 500 and 600;
the open preview re-renders on settings save.
Release Notes:
- Added `markdown_preview.heading_font_weight` to configure the font
weight of headings in the Markdown preview.
|
||
|
|
07310d0f9d |
docs: Fix missing keybindings in tab switcher documentation (#65060)
## Summary What problem does this solve, how, and why does this change matter? Closes #64909. used the same #kb way as others for these two instead of <kdb>, this is limited to docs only. <img width="1184" height="90" alt="image" src="https://github.com/user-attachments/assets/11826738-5e54-478a-bc73-e17cba7192b4" /> ## Testing to test: run ```mdbook serve docs``` and go to: ``http://localhost:3000/tab-switcher.html`` ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [ ] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). <!-- N/A: Documentation only --> - [ ] Tests cover the new or changed behavior. <!-- N/A: Documentation only --> Release Notes: - N/A |
||
|
|
35bba8eef7 |
Allow builtin language servers to be disabled by default (#65049)
## Summary This addresses the concern mentioned in https://github.com/zed-industries/zed/pull/65030#pullrequestreview-5380076060 Release Notes: - N/A |
||
|
|
1399a804bd |
Make it possible to disable language servers in the extension manifest (#65030)
## Summary This PR enables extension authors to disable language servers from the `extension.toml` as opposed to requiring a change to Zed's default settings. With this in, we no longer need to ship default enabled servers for a given language and can instead resort to extension authors disabling those in their extension. This gives extension authors more control and also finally removes the need to link Zed version releases to extension releases in cases where the extension wants to add a new language server. ## Testing Aside from the added tests, also ran a local build and tested this against the kotlin extension. Worked as I would expect it to. ## Self-review - [X] I've reviewed my diff for quality, security, reliability, and performance. - [-] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [X] Tests cover the new or changed behavior. Release Notes: - Added the possibility for language server extensions to configure which language servers are enabled/disabled by default. Visit https://zed.dev/docs/extensions/languages.md#opt-in-language-servers for more information. --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> |
||
|
|
588e7c5241 |
docs: Document extension marketplace categories (#60946)
close #60420 Documents how extension marketplace categories are inferred from `extension.toml`, and lists the fields used for each category. Tested with Prettier and a local mdBook build. Release Notes: - N/A --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> Co-authored-by: MrSubidubi <finn@zed.dev> |
||
|
|
adfcaa122a |
docs: Document Claude Sonnet 5.5 hosted pricing (#64931)
Release Notes: - N/A |
||
|
|
00def035de |
which_key: Add keyboard shortcut to show pending bindings (#64803)
Follow-up #63343 Depends on #64859 The pending keystrokes indicator lists the bindings that can complete a chord, but only on hover. This PR adds `which_key::ShowPendingBindings`, bound to `alt-/`, which opens that list from the keyboard while a chord is pending. For example, press `cmd-k` (`ctrl-k` on Linux/Windows), then `alt-/`. The list opens without moving focus and stays open until the chord completes or is cleared, even if the pointer moves away. It follows the chord as you type, and timed chords stay paused while it's open. With no chord pending, `alt-/` does nothing. **Why `alt-/`?** `/` shares a key with `?`, which is a common "help" key, and `alt-/` isn't bound in any default or base keymap. When no chord is pending, `alt-/` behaves as before. It only opens this popup while a chord is pending. On macOS, `alt-/` normally types `÷`, and it still does when no chord is pending. The shortcut only kicks in mid-chord. The one thing we lose is that `cmd-k` then `alt-/` used to cancel the chord and type `÷`, and now it opens the popover instead. I think that's rare enough to be okay, and the key can be rebound or unbound. It can be unbound or rebound to another key. One limitation is that it must be bound to a single keystroke. A multi-keystroke binding would need its own pending tracking on top of the chord that's already pending, and we don't want to add a special pending state just for this. https://github.com/user-attachments/assets/0a26b0ad-cd7b-49d9-b466-cce54e02bf80 Release Notes: - Added `alt-/` to show the bindings that can complete a pending multi-keystroke shortcut. |
||
|
|
8a4fd5704c |
title_bar: Add an option to open menus on hover (#48496)
Closes #45603 I wanted to open this and start a conversation/get some feedback after encouragement from people in the above discussion. Currently, the enabled `show_menus` setting causes them to open when hovered over, which generally breaks with a longstanding user expectation for desktop applications. It could be argued that this behavior shouldn't exist at all, but it's of course possible that some people prefer it. To that point, I explored adding an additional option, `show_menus_on_hover`, which is disabled by default. This also checks as to whether any menu is in use so that clicking a menu and then navigating through them opens them accordingly. As mentioned in the discussion, this doesn't address an existing bug where some of the pane icons will blink while moving through the menus. I'm unsure of how this specifically can or should be tested since I'm learning as I go, so for now there's just screenshots from the aforementioned discussion. I'm open to suggestions. As I'm sure some might guess, these changes don't really apply to macOS as the menus are always visible. I also do not have access to a Windows installation at this point. (Tested in Arch Linux / KDE Plasma 6.5.5; ran the release build to take clips)   <img width="1380" height="752" alt="setting" src="https://github.com/user-attachments/assets/7a3614ae-d5fd-4767-9ca4-330c91e40bcc" /> Release Notes: - Changed title-bar menus to require a click before opening. Enable `title_bar.open_menus_on_hover` to open them on hover instead. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
4f70d91bda |
editor: Add support for customizable soft wrap indentation (#63468)
# Objective - Soft wrapped lines currently inherit the indentation of their first line. This can be challenging for those coming from different editors, or with different expectations. - Allow users to customize the soft wrap behavior to wrap with extra indent, or no indent at all. - Fixes #18687 ## Solution - Introduce 3 soft-wrap indent configuration values (in addition to the default of `same`): `none`, `extra_one`, and `extra_two` (where they are multiples of the indent column width). - Plumb indent configuration through to the various gpui and editor components that are concerned with wrapping. - Update code action icon placement to accommodate `none`-level wrap indentation (preceded by a refactor of the function used to calculate its display row). - Fixed an existing bug in `WrapSnapshot::soft_wrap_indent` where querying a 0-indent wrap returned `None` instead of `Some(0)` ## Testing - Added tests to `wrap_map.rs` for all indentation levels. - Updated the random wrap tests to include indent setting combinations. - Added tests for code action icon placement. - Validated locally by toggling between the various settings and observing how the wrap behaved. ## 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 Changes are grouped by commit to ease review. Screenshots below! <details> <summary>Click to view showcase</summary> **`same` indent** (current Zed behavior) <img width="764" height="844" alt="Screenshot from 2026-08-02 22-45-54" src="https://github.com/user-attachments/assets/83e1465c-0e8e-445d-a172-9e1b446406b7" /> **`none` indent** <img width="764" height="844" alt="Screenshot from 2026-08-02 22-45-39" src="https://github.com/user-attachments/assets/99b282b6-d308-453d-b08b-e10af824f307" /> **`extra_one` indent** <img width="764" height="844" alt="Screenshot from 2026-08-02 22-46-06" src="https://github.com/user-attachments/assets/c7480c84-f1a2-485d-b831-b97fe55c0b03" /> **`extra_two` indent** <img width="764" height="844" alt="Screenshot from 2026-08-02 22-46-19" src="https://github.com/user-attachments/assets/badc4996-e1bf-4237-9add-babf08f13897" /> **the setting** <img width="826" height="336" alt="Screenshot from 2026-08-02 22-42-19" src="https://github.com/user-attachments/assets/906b4e8e-1366-4a4e-a2cf-4f8bd67fd604" /> </details> --- Release Notes: - Added a `soft_wrap_indent` setting (`"none"`, `"same"`, `"extra_one"`, `"extra_two"`) to configure indentation for soft-wrapped continuation lines. - Fixed soft-wrap continuation line indentation calculation for unindented lines starting at column 0. - [GPUI] Added `IndentAdjustment` enum to `LineWrapper` to control indentation of soft-wrapped continuation lines. --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> |
||
|
|
e52ab15eac |
Improve contribution guidelines and experience (#64296)
# Objective Both our PR template and contribution guidelines are too convoluted. This results in: - contributors missing important information because the information is buried in the contributing file - worse commit descriptions post-merge due to the most important information being buried and or a lot of boilerplate present - the PR template often being neglected by staff themselves entirely - more work for reviewers/engineer on triage here since they have to repeatedly point people at the contribution gudelines ## Solution In order to take a stab at improving this, this PR goes for the following: 1. Shrink the PR template - this aims at reducing the cognitive load looking at this and filling it out whilst preserving all the important information needed for reviewers - a lot of text has been removed to make commit messages in the repo more readable - keep text still visible as opposed to having HTML comments so that reviewers spot this and can raise ## Testing Tested this by giving it a read myself and iterating with Kirill on the final wording/sorting/organization of contents and files. ## Self-Review Checklist: - [-] I've reviewed my own diff for quality, security, and reliability - [-] Unsafe blocks (if any) have justifying comments - [-] 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 - [-] Performance impact has been considered and is acceptable ## Showcase <details> <summary>The new contribution guidelines</summary> <img width="1209" height="1293" alt="grafik" src="https://github.com/user-attachments/assets/6a3f5012-7f46-48b7-add2-9f2400f01c57" /> </details> <details> <summary>The PR template in action</summary> <img width="879" height="688" alt="grafik" src="https://github.com/user-attachments/assets/87e5ad65-7ade-45b8-b8a8-8818c9a49ba8" /> </details> --- Release Notes: - N/A --------- Co-authored-by: zelenenka <241371603+zelenenka@users.noreply.github.com> |
||
|
|
5ddc17645c |
Fix entries folding on clicks in the outline panel (#64736)
Closes https://github.com/zed-industries/zed/discussions/51877 Now, with the new, outline-less, mode in that panel, this issue is even more prominent, ergo the fix. https://github.com/user-attachments/assets/3b0af227-1c3f-4182-bd44-707641b886b8 Release Notes: - Fixed entries folding on clicks in the outline panel |
||
|
|
d528c665e1 |
Add JSONL and NDJSON support to tabular preview (#64471)
## Objective Extend the existing tabular preview to support `.jsonl` and `.ndjson` files, making it easier to compare fields across records. Discussed in https://github.com/zed-industries/zed/discussions/62917. ## Solution Parse each nonblank line as a JSON object and reuse the existing table preview. Top-level keys become columns in first-seen order, with new keys from later records appended to the right. - Preserve JSON values, including large numbers, without numeric conversion. - Display nested objects and arrays as compact JSON. - Keep missing fields, `null`, `"null"`, and empty strings distinct. - Show invalid-record errors with source line numbers and recover after edits. - Preserve sorting and filters unless column names or order change. - Add JSONL/NDJSON to the existing preview shortcuts and document the behavior. Also fix a crash found during CSV regression testing: deleting rows could leave the renderer using an old row mapping against shorter data. Clear the mapping and virtual list together before recomputing them. The preview remains read-only, accepts object records only, and uses the existing text-based sorting and full-file parsing behavior. ## Testing - All 20 tests in `tabular_data_preview` passed. - The multiline CSV deletion regression passed across 20 scheduler seeds. - `cargo fmt -p tabular_data_preview -- --check` passed. - `./script/clippy -p tabular_data_preview` passed. - `cargo build -p zed --bin zed` passed. - `git diff --check` passed. - Manual QA on macOS, including retesting the reported CSV crash. Windows and Linux were not tested locally. Large-file performance has not been benchmarked. To try it, open a `.jsonl` or `.ndjson` file and run `tabular data: open preview` or `tabular data: open preview to the side`. ## 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 ## Showcase <img width="2358" height="1576" alt="image" src="https://github.com/user-attachments/assets/8f7e7725-5a5c-465d-aa0a-d61cbb22d04f" /> The example shows source-order columns, fields introduced by later records, nested values, and the distinction between missing values, nulls, and strings. Release Notes: - Added JSONL and NDJSON support to the tabular data preview. --------- Co-authored-by: Anthony Eid <anthony@zed.dev> |
||
|
|
bd692a8021 |
docs: Update hosted model pricing and availability (#64647)
Release Notes: - N/A --------- Co-authored-by: morgankrey <morgan@zed.dev> |
||
|
|
6971ae21e9 |
opencode: Fetch models dynamically (#64585)
Release Notes: - opencode: Fetch model list dynamically so that new models are always available immediately |
||
|
|
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. |
||
|
|
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. |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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. |
||
|
|
968be64a02 |
Align "..." documentation for file pattern settings (#64452)
## Objective Make the `"..."` convention easier to understand across the settings that support it. This is a meta follow-up to [#64399](https://github.com/zed-industries/zed/discussions/64399), establishing a documentation pattern that subsequent PRs can follow. ## Solution Give each setting a succinct, self-contained explanation of `"..."`, with matching wording and examples in its Rust doc comment and settings reference: - `file_scan_exclusions` • #62769 - `file_scan_inclusions` • #64440 - `read_only_files` • #64222 This keeps the explanation consistent across both surfaces and aligns the content for future documentation generated from Rust comments. ## Testing Built the docs locally on macOS and verified the examples, links, and anchors. The existing settings merge tests 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: - N/A |
||
|
|
74a6468b54 |
Add support for the "..." entry in file_scan_inclusions (#64440)
## Objective Let projects add inclusion patterns without repeating defaults or patterns inherited from user settings. Part of #64399. ## Solution Extend the `"..."` behavior from #62769 and #64222 to `file_scan_inclusions` using the shared merge implementation. `"..."` includes the resolved inherited list, omitting it replaces the list, and `[]` clears it. Duplicate entries retain their first occurrence. Stop importing VS Code’s `files.watcherInclude` as inclusion patterns because it configures additional watch roots rather than overriding Git ignores. ## Testing Tested on macOS with settings merge, VS Code import, and worktree integration tests. Coverage includes preservation of the `.env*` default, layered inheritance, replacement, clearing, and deduplication. The worktree test verifies that inherited and project-specific patterns include Git-ignored files while exclusions still take precedence. To check manually, configure different user and project inclusion patterns and add ignored files matching each. Include `"..."` to retain inherited patterns, then repeat without it and with `[]` to verify replacement and clearing. Confirm that excluded files remain absent. ## 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 `file_scan_inclusions` so project settings can extend inherited inclusion patterns. |
||
|
|
19096d4c87 |
Document hidden_files setting (#64403)
## Objective While suggesting #64399, I realized `hidden_files` didn’t have an entry in the settings reference. This PR fills that gap. ## Testing Checked the descriptions against the implementation and existing tests. ## 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: - N/A |
||
|
|
534319bd05 |
which_key: Improve pending keystrokes indicator to include untimed chords (#64362)
Closes #64338 The pending keystrokes indicator now shows chords without a timeout, with no countdown circle. For example, pressing `cmd-k` shows that Zed is waiting for another key. Few cases which needed special handling for untimed chords case: - Hovering already pauses a timed chord, and GPUI preserves that pause when the chord advances. An untimed chord has no paused timeout to carry forward. We pause its newly created timeout if the pointer is still over the indicator or popover. - For timed chords, the timeout already stays paused during the popover's 300 ms dismissal delay. If an untimed chord gains a timeout during that delay, it now follows the same rule. The popover still closes at the original deadline, then the timeout resumes with a full second remaining. <img width="308" height="182" alt="CleanShot 2026-09-17 at 11 45 33 AM@2x" src="https://github.com/user-attachments/assets/9baa5fde-de9b-447d-9b02-b712a3065685" /> Release Notes: - Improved the pending keystrokes indicator to show chords without a timeout, such as shortcuts starting with `cmd-k`. |
||
|
|
52e0b848da |
Add a setting for Threads Sidebar auto-open (#64259)
Closes https://github.com/zed-industries/zed/discussions/64266 Opening a folder in an existing window force-opens the Threads Sidebar, and there is no way to prevent it. `open_paths` called `MultiWorkspace::open_sidebar` unconditionally on the reused window, so the sidebar reopened on every such open regardless of whether the user had closed it. This adds `agent.threads_sidebar_auto_open`, defaulting to `true` so current behavior is unchanged. With `false`, the folder still opens in the existing window, but the sidebar stays closed. This path is reached when `default_open_behavior` or `cli_default_open_behavior` is set to `existing_window`. `open_sidebar` was doing double duty: besides showing the sidebar, it pinned the workspace being navigated away from so it survives the switch. When the setting is disabled, `retain_active_workspace` is called instead, so only sidebar visibility changes. https://github.com/user-attachments/assets/fc299df0-27e2-4ac6-98cb-d817d5f71d0e ## Tests Two tests in `multi_workspace_tests.rs` cover both branches: the sidebar opens by default, and stays closed when the setting is disabled while the folder still opens in the same window. Release Notes: - Added `agent.threads_sidebar_auto_open` to control whether opening a folder in an existing window also opens the Threads Sidebar |
||
|
|
9930d2c2a3 |
Share generics better and strip rodio audio features (#64260)
* Preserve bundle compiler flags commit commit is a follow-up to https://github.com/zed-industries/zed/pull/63432 Linux bundling script had custom `RUSTFLAGS` set which eradicated prior config. Moved all flags into `.cargo/bundle-config.toml` instead. * Trim audio features and compress resources commit removes unused `rodio` features and enables resource compression The win from the latter seems not that large, so can revert if needed, but seemed very easy to enable. With compiler wrappers disabled, `cargo clean --target-dir target/binary-size-split-build` and `cargo build --locked -p zed`: Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes After: 130.5s wall (-3.8%), 1488.7s CPU (-5.2%), zed binary 1171527064 bytes (-0.3%, -4.0MB) With `ZED_BUNDLE=true CXXFLAGS=-stdlib=libc++` and `cargo --config .cargo/bundle-config.toml build --locked --release -p zed -p cli --target aarch64-apple-darwin`: Before: 369.4s wall, 3861.6s CPU, zed binary 381662328 bytes After: 369.4s wall (+0.01%), 3866.1s CPU (+0.1%), zed binary 377836968 bytes (-1.0%, -3.8MB) Release Notes: - N/A |
||
|
|
53fcf4be37 |
deepseek: Update DeepSeek Flash to V4.1 (#64014)
# Objective deepseek API: https://api-docs.deepseek.com/updates/ ## Solution deepseek rename deepseek v4 flash to deepseek flash https://github.com/user-attachments/assets/72c473c9-a4bf-49e0-a7d6-0217a6dcc65b --- Release Notes: - agent: Added support for DeepSeek Flash 4.1 --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev> |
||
|
|
95c0d74be9 |
Fix accidental /// comments and a docs typo (#64287)
## Objective Fix small comment/docs typos left out of #64282. ## Solution - Replace accidental Rust-style `///` comments with `//` in `assets/settings/default.json` (`git_panel.tree_view` and `git.gutter_debounce`) - Fix typo in `docs/src/visual-customization.md`: `"enable_language_server" if false` ? `is false` ## Testing Comment/docs-only changes; no runtime behavior change. --- Release Notes: - N/A Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
55a43c22fd |
Document new git_panel settings in all-settings reference (#64282)
## Objective Document newly added `git_panel` settings in the all-settings reference, and fix related docs mismatches. ## Solution - Document `tree_view`, `show_count_badge`, `diff_stats`, `commit_title_max_length`, and `entry_primary_click_action` - Document missing `file_icons` / `folder_indicator` for `git_panel` - Correct `dock` defaults for git/collaboration/outline panels to match `assets/settings/default.json` (`right`) ## Testing Docs-only changes; no runtime behavior change. --- Release Notes: - N/A --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
aef893e276 |
Add a setting for the Threads Sidebar width (#62883)
## Objective
The Threads Sidebar opens at a hard-coded 300px and can be resized only
by dragging. `agent.default_width` controls the Agent Panel rather than
the sidebar, leaving no way to configure the sidebar’s preferred width.
## Solution
Add `agent.threads_sidebar_default_width` for the width used when no
user-chosen sidebar width is stored. The value is clamped to the
existing 200–800px drag range. Existing, unresized sidebars follow
settings changes immediately. Double-clicking the divider resets the
sidebar to the configured width and resumes following subsequent
settings changes.
The sidebar previously saved its width whenever any sidebar state
changed, not only when the divider was dragged. `SerializedSidebar` now
records `width_set_by_user`, so settings-driven widths are no longer
persisted. Manually resized widths take precedence until the divider is
reset.
## Testing
- `test_threads_sidebar_default_width` in
`crates/agent_settings/src/agent_settings.rs` covers the default, a user
override, fallback for `null` and an unset field, and preservation of
the Agent Panel width and sidebar position.
- Five width-focused tests in `crates/sidebar/src/sidebar_tests.rs`
cover reset behavior, live settings updates, clamping, legacy-width
restoration, and persistence. They also check that manually resized
widths resist settings changes and that resetting resumes following the
setting.
- To check by hand: set `"agent": { "threads_sidebar_default_width": 360
}`, reset the divider, and confirm the sidebar is 360px wide. Change the
setting and confirm the width updates immediately. Drag it wider,
restart, and confirm the dragged width is kept. Double-click the divider
and confirm it returns to the configured width. Set the value to `5000`
and confirm the untouched sidebar clamps to 800px.
## 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 `agent.threads_sidebar_default_width` for setting the width of
the Threads Sidebar.
|
||
|
|
5151c7953d |
Clarify how agent.flexible affects agent.default_width (#63020)
## Objective `agent.default_width` is described as the Agent Panel’s default width, but panels docked to the left or right use proportional sizing while `agent.flexible` is enabled. Because flexible sizing is enabled by default, double-clicking the outer resize handle restores the default proportion rather than the configured pixel width. This can make `agent.default_width` appear to be ignored. ## Solution Clarify that `agent.default_width` controls the fixed width used when `agent.flexible` is disabled, while resetting a flexibly sized Agent Panel restores its default proportion. Update the default settings comments, settings documentation, Settings UI description, and visual customization guide. Add `agent.flexible` to the Agent Panel configuration example and explain how it affects reset behavior. No sizing behavior changes. ## Testing - `cargo fmt --all -- --check` - No runtime testing—the change only updates settings descriptions and documentation. ## 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: - N/A |
||
|
|
169a2b11ab |
Add support for the "..." entry in read_only_files (#64222)
## Objective Let projects add read-only file patterns without repeating the patterns inherited from user settings. ## Solution Extend the `"..."` behavior introduced in #62769 to `read_only_files`. A `"..."` entry includes the inherited patterns. Omitting it replaces the list, and `[]` clears it. ## Testing Tested on macOS with settings merge, VS Code import, and project integration tests. The project test verifies that user and project patterns both apply while unrelated files remain editable. To check manually, configure different user and project patterns, include `"..."` in the project list, and open matching files. Repeat without `"..."` after restarting Zed to verify replacement. Linux, Windows, and manual app testing were not performed. ## 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 `read_only_files` so project settings can extend inherited read-only patterns. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
45ff33717b |
Refine recent commands' UX (#64181)
Follow-up to https://github.com/zed-industries/zed/pull/63388 https://github.com/user-attachments/assets/2a855451-141b-4030-8475-92f23c661d51 Release Notes: - Improved recent commands' UX |
||
|
|
ba7da93e5c |
Drop settings that no longer exist from the reference (#64210)
# Objective Follow-up to #64196, which corrected documented default *values*. This one covers documented *settings* — four entries in the reference name settings that have been renamed, moved, or removed outright, so a reader who copies them gets a key Zed either ignores or silently rewrites on load. Each claim below links to the code that makes it true: | Documented as | Reality | Evidence | | --- | --- | --- | | `features` | Gone | [`m_2026_02_02/settings.rs#L19-L27`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/migrator/src/migrations/m_2026_02_02/settings.rs#L19-L27) moves the provider out and deletes `features` once empty; no `pub features` exists in [`crates/settings_content/`](https://github.com/zed-industries/zed/tree/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src) | | `edit_prediction_provider` | `edit_predictions.provider` | same migration, plus [`default.json`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/assets/settings/default.json) ships `"edit_predictions": { "provider": "zed" }` | | `agent_font_size` | `agent_ui_font_size` | [`m_2025_10_03/settings.rs#L10-L11`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/migrator/src/migrations/m_2025_10_03/settings.rs#L10-L11) — "Renames the setting `agent_font_size` to `agent_ui_font_size`" | | `projects_online_by_default` | Gone | no match in `crates/` or `assets/` | ## Solution `## Features` is deleted. Its only child, [Edit Prediction Provider](https://zed.dev/docs/reference/all-settings#edit-prediction-provider), moves under [Edit Predictions](https://zed.dev/docs/reference/all-settings#edit-predictions) to sit with the other `edit_predictions` settings, and its `Setting:` line becomes `provider`. Nothing else had to change in that subsection — its JSON examples already used the `edit_predictions.provider` shape, which is what made the stale wrapper easy to miss. `agent_font_size` is renamed in place, heading included. `projects_online_by_default` is removed. The Edit Predictions example also listed seven `disabled_globs` where `default.json` ships ten. #64196 corrected that number on the [Disabled Globs](https://zed.dev/docs/reference/all-settings#disabled-globs) entry immediately below it, so the two were contradicting each other on the same page; the example is now synced. ## Testing `cd docs && npx prettier --check src/` passes, per [`docs/AGENTS.md`](https://github.com/zed-industries/zed/blob/main/docs/AGENTS.md). Code fences stay balanced, the moved heading is unique on the page, and no page links to `#features`, `#agent-font-size`, `#projects-online-by-default`, or `#edit-prediction-provider`, so the restructure breaks no anchors. No `{#action}` or `{#kb}` references are added, so this does not depend on the action metadata `check_docs` generates. Found by extracting every ``Setting:`` name on the page and checking it against the keys `assets/settings/default.json` actually contains, then confirming each miss against `crates/settings_content/` and `crates/migrator/`. ## Notes for review - The same sweep says 24 scalar settings that `default.json` ships have no entry on this page at all, including `hide_mouse`, `word_diff_enabled`, `minimum_contrast_for_highlights`, `modeline_lines`, `lsp_results_location` and `zoomed_padding`. That is #53323 territory and a much larger piece of writing, so it is not here — happy to take it on if you want it. - `auto_update_extensions` and `terminal.font_features` are documented but absent from `default.json`. Both are real settings ([`extension.rs`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src/extension.rs), [`terminal.rs`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src/terminal.rs)) that simply have no shipped default, so I left them alone. - Still outstanding from #64196's review notes: `crates/settings_content/src/language.rs` and `editor.rs` carry `/// Default:` comments that feed the settings.json schema tooltips and still disagree with the site, and `docs/src/diagnostics.md` and `docs/src/visual-customization.md` still show the old `diagnostics_max_severity` and `cursor_shape` defaults. ## 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: - N/A |
||
|
|
7f00507e01 |
Correct wrong default values in the settings reference (#64196)
# Objective Fixes #56544 The settings reference documents `format_on_save` as defaulting to `on`, but `assets/settings/default.json` ships `"format_on_save": "off"`. The reporter in #56544 hit exactly that: a fresh config, a C file, save, and nothing happens. The reason the documented default looks right to many people is that Zed enables it per language for twelve languages (Astro, Dart, EEx, Elixir, Elm, Go, GraphQL, HEEx, Kotlin, Rust, Starlark, Zig). Save formats a Rust buffer and not a C one, and neither the reference nor the reporter's mental model had anywhere to hang that difference. Checking that one entry made me wonder how many others were stale, so I compared every `Setting:`/`Default:` pair on the page against the corresponding path in `default.json`. Six more were wrong. ## Solution | Setting | Documented | Ships as | | --- | --- | --- | | `format_on_save` | `on` | `off` | | `auto_indent` | `true`, "`boolean` values" | `syntax_aware`, a three-way enum | | `diagnostics_max_severity` | `null` | `all` | | `terminal.cursor_shape` | `null` (defaults to block) | `block` | | `terminal.alternate_scroll` | `off` | `on` | | `edit_predictions.disabled_globs` | 7 globs | 10 globs | | `git.gutter_debounce` | `null` | `0` | Two of these needed more than a value swap: `auto_indent` stopped being a boolean when it became `AutoIndentMode` (`crates/settings_content/src/language.rs:411`), so the options list now covers `syntax_aware`, `preserve_indent` and `none`, and the description no longer reads as a yes/no toggle. `format_on_save` gets a sentence naming the twelve languages, so the difference between saving a Rust buffer and a C one has somewhere to hang. `diagnostics_max_severity` and `terminal.cursor_shape` were self-contradicting rather than merely stale: each section's own prose already described the real default while the `Default:` line said `null`. ## Testing `cd docs && npx prettier --check src/` passes, as required by `docs/AGENTS.md`. The change is prose and adds no `{#action}` or `{#kb}` references, so it does not depend on the action metadata that `check_docs` generates. The `[\`languages\`](#languages)` link resolves to the single `## Languages` heading on the same page. Every value in the table above was read out of `assets/settings/default.json` on `main`, and I confirmed `default.json` is authoritative for each by following the resolved-settings path (the `user_content.<x>.unwrap()` style accessors) rather than trusting the file alone. ## Notes for review Found while auditing, deliberately left out of this PR — happy to take any of them in a follow-up, or here if you would rather: - Two Rust doc comments carry the same wrong defaults and feed the settings.json schema tooltips, so the in-editor hover still disagrees with the site: `crates/settings_content/src/language.rs` says `/// Default: on` for `format_on_save`, and `crates/settings_content/src/editor.rs` says `/// Default: warning` for `diagnostics_max_severity` while also saying "Shows all diagnostics if not specified". Fixing those is a source change rather than a docs one. - `docs/src/diagnostics.md` and `docs/src/visual-customization.md` still present `diagnostics_max_severity: null`, and the latter also shows `cursor_shape: null` for the editor where `default.json` ships `bar`. Same defect class, different pages and a different presentation (defaults listings rather than a reference), so I kept this PR to the reference page. - The reference's `diagnostics_max_severity` options omit `off`, which is a live variant (`DiagnosticSeverityContent` in `crates/settings_content/src/project.rs`). That is a missing option rather than a wrong default, so it is not in scope here. - Neither the Format On Save nor the Autosave section mentions that `"autosave": {"after_delay": {...}}` disables format on save outright (`crates/workspace/src/pane.rs`), even though `default.json` carries that warning as a comment. - The twelve-language list is a maintenance cost: it has to be edited whenever a language gains or loses a default. `default.json` sets per-language defaults for `tab_size`, `soft_wrap`, `allow_rewrap`, `hard_tabs` and others too, and none of them are called out anywhere. A single general statement about per-language defaults overriding top-level ones would cover all of them and never go stale. I kept the explicit list because it is what actually answers #56544, but I will happily swap it for the general version if you prefer. ## 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: - N/A |
||
|
|
d27fa556ce |
outline_panel: Show deleted files inside the file tree (#63570)
# Objective In a branch diff — or any multi-buffer containing deleted files — deleted files render as flat "external file" rows above the outline panel's tree, instead of at the path they used to occupy. They lose all directory context and appear as a bare list of filenames detached from the tree, which is confusing precisely when you are trying to review what a branch changed. The cause is that `File::project_entry_id` returns `None` for `DiskState::Deleted`, while the outline panel's tree is keyed end-to-end by `ProjectEntryId` — depth map, collapse state, children counts. A deleted buffer therefore falls through to the external-file path in `update_fs_entries`, even though its `File` still carries a perfectly good worktree and path. ## Solution Synthesize the missing entries at the point of classification and let the existing pipeline run unchanged. - Entries are synthesized for the deleted file **and** for any ancestor directories that no longer exist, so a wholly-deleted folder still appears nested at its old location. An ancestor is only taken from the worktree if it is a directory; a path that is a file now but was a directory when the deleted file existed is synthesized too, and sorted after the file so the nesting pass keeps the directory on its stack. - Ids come from a per-panel registry that hands them out sequentially downward from just below `ProjectEntryId::MAX`, keyed by path and kind. Real ids count up from zero, so the ranges cannot meet; sequential allocation means two entries can never share an id (the entry maps are keyed by id alone, so a collision would drop a row); and the registry is kept across updates, so collapse state on synthesized rows survives. - Whether a buffer with no worktree entry is a deletion is decided by its `DiskState`: `Deleted` always, `Present` never, `Historic` by its own flag, and `New` only when git status reports a deletion or the excerpt's diff has a base text. The last case is a file deleted in a commit on the branch: it is absent from disk, the working-tree status says nothing about it, and `GitStore::display_status` only reflects branch-diff statuses when `git.diff_base` is `default_branch`. A deletion has a base version; a path that never existed has none. A scan-excluded file, which also has no entry, is `Present` and stays an external row. - Auto-fold stops where deletion state changes, so a surviving `parent/` is never struck through together with its deleted child, and `select_parent` treats a folded row as a valid parent of the folded row beneath it. - Auto-reveal resolves a deleted row's ancestors from the panel's own `fs_entries` rather than re-querying the worktree, and only real directories are ever passed to `Project::expand_entry` (a synthesized id would go out as an `ExpandProjectEntry` a remote host rejects). Opening a deleted row resolves its excerpt from the buffer id, since `path_for_entry` cannot resolve a synthesized entry. Deleted rows are struck through by a `line_through` on the row's label wrapper. `HighlightedLabel` builds its text runs from `window.text_style()`, so an ancestor's style reaches them even though `LabelLike`'s own `strikethrough()` does not; nothing outside `crates/outline_panel` changes. Colour is deliberately left to git status, matching deleted editor tabs — a committed deletion leaves the working tree clean, so strikethrough is the only signal in a branch diff. ## Testing Thirteen new tests, each asserting the rendered tree through `display_entries`, which now prints external files and marks deleted rows: - deleted file nests under its surviving parent; deleted file inside a wholly-deleted directory gets synthesized ancestors at the right depth - a file absent from disk and from git status nests when its excerpt carries a base text, while a buffer on a path that never existed stays an external file, unmarked - a modified, scan-excluded tracked file stays an external file, unmarked - same-path file + synthesized directory: nesting and auto-reveal both pick the directory - auto-fold stops at the deletion boundary; `select_parent` climbs from a folded deleted chain to the folded parent above it - opening a deleted row scrolls the editor to its excerpt - auto-reveal expands the ancestors of a deleted file and ignores an external file on a nonexistent path - buffers with no `File` still become `ExternalFile` - synthetic ids are distinct per path and kind, and stable `./script/clippy`, `cargo fmt --all -- --check`, `cargo test -p outline_panel` (33) are green. Tested manually on macOS against a fixture branch with a committed file deletion, a wholly-deleted directory under a surviving empty one, a directory replaced by a same-path file, an uncommitted deletion, a scan-excluded modified file, and a modified and an added file. ## Suggested .rules additions - `GitStore::display_status` only reflects branch-diff statuses when `git.diff_base` is `default_branch`; the branch diff view can be open while the setting is `head`. Do not use it to detect committed deletions — a commit-deleted file's buffer is `DiskState::New`; check the excerpt's diff for a base text instead. - Outline panel: a directory with mixed children is marked unfolded while `fs_entries` is built, so an auto-fold chain only forms through single-subdirectory links. Tests for folding must use that shape. - `HighlightedLabel` builds its runs from `window.text_style()` at render time, so `LabelLike` modifiers such as `strikethrough()` and `italic()` are no-ops on it; put the style on an ancestor element instead. ## 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 The same branch diff, which deletes `src/utils/format.rs` (its directory survives) and the whole of `src/legacy/` (including a nested `internal/`), alongside a modified and an added file. | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/bf503759-77a7-4f31-80bb-a85936de0b8a" width="300"> | <img src="https://github.com/user-attachments/assets/c558b94b-4ca5-447f-a049-a3ab280c679a" width="300"> | | Deleted files sit above the project root as bare filenames, detached from the tree | Each is nested at its original path, with `legacy/` and `internal/` synthesized since they no longer exist on disk | Note that `utils/` renders normally while `legacy/` and `internal/` are struck through: the marking is per-entry, not applied to every ancestor on a deleted file's path. --- Release Notes: - Fixed deleted files appearing outside the file tree in the outline panel when viewing a diff --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
251854020a |
agent_ui: Enable terminal thread renaming from the Agent Panel (#63660)
## Summary - Follow up on #63578 by extending the existing `agent::RenameSelectedThread` action to the active Terminal Thread in the Agent Panel. - Preserve the existing Threads Sidebar behavior and default keybindings. - Document custom keymap assignment and add focused Agent Panel regression coverage. ## Testing - `cargo test -p agent_ui agent_panel::tests::test_rename_selected_thread_action --lib` - `cargo test -p sidebar rename_selected_thread --lib` - `cargo fmt --package agent_ui -- --check` - `npx prettier --check src/ai/terminal-threads.md` - Manually tested locally with a custom `AgentPanel > Terminal` keymap binding. Release Notes: - Added support for custom keybindings to rename Terminal Thread titles from the Agent Panel. ### screenshots <img width="921" height="205" alt="Screenshot 2026-09-02 at 18 40 31" src="https://github.com/user-attachments/assets/b1edabfc-35f9-42ef-b368-486003202349" /> |
||
|
|
77226930a0 |
Update Zed trial copy for the $5 GPT Luna offer (#63969)
## Summary Updates Zed trial copy for [CLO-1373](https://linear.app/zed-industries/issue/CLO-1373/update-zed-to-show-the-dollar5-gpt-luna-trial). - Show $5 of GPT Luna and unlimited edit predictions across pre-sign-in, Free-plan, and active-trial onboarding. - Clarify that the 14 days begin when the trial starts, rather than when the welcome panel is viewed, and retain no-credit-card messaging. - Update hosted-model trial descriptions and use "Start Free Trial" for onboarding and AI configuration trial CTAs. - Document GPT Luna-only trial hosted-model access and the shared Zed/Delta $5 trial balance. This is a copy-only change. Trial eligibility, subscription creation, trial timing, billing, model-access enforcement, button actions, URLs, and telemetry are unchanged. Paid, Student, Business, and VIP plan descriptions are unchanged. This does not implement the offer on the backend. ## Verification - Rust formatting and `git diff --check` passed. - Prettier check passed for the pricing documentation. - Source checks confirmed the offer wording and unchanged callbacks, URLs, telemetry, and other plan definitions. - Katie built and launched Zed with `cargo run -p zed --bin zed`, then reviewed Component Preview and requested the final CTA wording. Formatting and diff checks were rerun after that wording adjustment; the final adjustment has not been rebuilt. - Confirmed the branch merges cleanly with the latest `main`. Release Notes: - Improved trial descriptions to show $5 of GPT Luna and unlimited edit predictions for 14 days from trial start. |
||
|
|
450775244f |
gpui: Prevent idle sleep during AI response streaming (#53130)
Release Notes: - Added button tu prevent idle sleep during AI response streaming **Context / Motivation:** When an AI agent takes a long time to generate a response, the operating system might enter an idle sleep (or display sleep) state if there is no user interaction (mouse or keyboard). This can interrupt the workflow. This PR aims to prevent the system from sleeping during an active AI turn by invoking native OS APIs, and provides a UI toggle for users to control this behavior. **Key Changes:** 1. **Cross-Platform Idle Sleep Prevention in GPUI (`gpui`, `gpui_*`)** - Added a new `prevent_idle_sleep` method to the `Platform` trait. It returns a RAII-based `PreventIdleSleepToken`, which automatically restores the original sleep policy when dropped. - **macOS**: Utilizes `NSProcessInfo`'s `beginActivityWithOptions` with `NSActivityIdleDisplaySleepDisabled`. - **Windows**: Uses `SetThreadExecutionState` to prevent display and system sleep, incorporating a reference counter to handle concurrent requests safely. - **Linux**: Uses `ashpd` to request `org.freedesktop.portal.Inhibit` (inhibiting `Idle` and `Suspend` states) via D-Bus. 2. **AI Agent State Integration (`crates/acp_thread`)** - Introduced idle sleep prevention logic in `AcpThread`: Acquires the token at the beginning of `run_turn`, and automatically releases it when the turn completes normally, errors out, or is explicitly canceled by the user. - Added comprehensive unit tests to ensure the token is correctly acquired and released under various cancellation and concurrency scenarios. 3. **Settings and UI (`crates/agent_settings`, `crates/agent_ui`)** - Added `AgentOutputIdleSleepControl` to global state. - Added a new toggle button (screen icon) to the toolbar at the bottom of the `ThreadView` (AI conversation panel). Users can hover to view the tooltip and click to toggle the feature on or off. <img width="419" height="132" alt="截屏2026-04-04 16 09 08" src="https://github.com/user-attachments/assets/619da9ff-10f7-46e0-b959-d7c74b16b918" /> --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
e2534d2357 |
docs: Describe how preview tabs actually behave (#63875)
# Objective - Fixes #33819 - The `preview_tabs` documentation says preview tabs "close automatically when you switch to another file unless you explicitly pin them". They do not close. Moving to another file leaves the preview tab open — either still as the preview tab, or converted into a regular one. Four people ran into this on the issue over the past year. - The same section then lists the ways to turn a preview tab into a regular tab, and two of them are missing, including the pinning that the sentence above uses as its counter-example. ## Solution Two corrections to the `Preview tabs` section of `docs/src/reference/all-settings.md`. No behaviour was touched. **The description.** A pane holds a single `preview_item_id`, so there is at most one preview tab at a time. What happens to it when you move to another file depends on the path: - Opening a not-yet-open file in preview mode from the project panel or file finder goes through `Pane::open_item`, which calls `close_current_preview_item` — that really does close the old tab (`remove_item`) and hands back its index, and the new file is inserted there. - Code navigation with the default `enable_keep_preview_on_code_navigation: false` instead calls `unpreview_item_if_preview` on the old item *before* `replace_preview_item_id`, so the previous file stays open as a regular tab. A third path, the file finder with the default `enable_preview_from_file_finder: false`, opens the new file as a regular tab and leaves the existing preview tab alone entirely. Rather than spell out every path in a settings description — the `enable_preview_*` settings immediately below already cover them — the new wording sticks to what holds in all of them: a pane keeps at most one preview tab and opening another file in preview mode takes over that slot, and switching to a file that is already open does not close the preview tab. That second half is the case the issue actually reports. **The list.** Two more ways to convert a preview tab into a regular tab: - Pinning it — `change_tab_pin_state` calls `unpreview_item_if_preview` on the `Pin` branch. - `pane::TogglePreviewTab` — the action dedicated to exactly this, registered whenever preview tabs are enabled. ## Testing - Built a debug Zed and walked through the steps from the issue on a scratch project of `a.txt` / `b.txt` / `c.txt`: with `a.txt` open as a regular tab and `b.txt` opened as a preview tab, clicking back to `a.txt` leaves the `b.txt` preview tab open, which is what the current wording says should not happen. Single-clicking `c.txt` takes over the same slot rather than adding a second preview tab, and pinning the preview tab drops the italics. - Ran the docs steps from `run_tests.yml` locally: `zed --dump-all-actions > crates/docs_preprocessor/actions.json`, then `mdbook build ./docs` on mdbook 0.4.37 to match CI. Exit 0 with no preprocessor errors, and both new `{#action ...}` references resolve — the rendered page reads "pane: toggle pin tab" and "pane: toggle preview tab" in the same style as the existing "project panel: open permanent". - `cargo test -p workspace --lib` — 272 passed, 0 failed, including `test_close_other_items_unpreviews_active_item`, `test_reopening_closed_item_after_unpreview`, and the proptest that opens random paths with random `allow_preview` and asserts a pane never holds more than one preview item. ## Notes for review - Several people on the issue would rather the *behaviour* changed, so that preview tabs close on any tab switch the way the docs currently describe. I left that alone deliberately: the issue is typed `Docs`, so this PR only makes the prose match the implementation. Happy to open a discussion separately if it is worth pursuing. - Saving a file also unpreviews it (`Pane::save_item`), but I left it off the list as redundant — you have to edit a file before you can save it, and editing is already there. Say the word if you would rather it were explicit. - The comment on `preview_tabs.enabled` in `assets/settings/default.json` words this as "close automatically when you open another preview tab". That is right for the project-panel path and carries the same code-navigation caveat as above; I left it alone to keep this diff to one file, and am happy to align it in a follow-up. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments — N/A - [x] The content adheres to Zed's UI standards — N/A, docs only - [x] Tests cover the new/changed behavior — N/A, no behaviour change; the docs build is verified locally - [x] Performance impact has been considered and is acceptable — N/A --- Release Notes: - N/A |
||
|
|
6f72bdb7b2 |
Unify copy actions for agent panel and markdown (#63884)
Before, it was not possible at all to copy the text from the agent panel, only its markdown. The PR breaks the existing ctrl/cmd-c binding there by using the same approach markdown preview does: copy as text by default, allow to copy as markdown via the context menu. Before: https://github.com/user-attachments/assets/2014f363-5167-4700-be86-9c0774d7e4fd After: https://github.com/user-attachments/assets/1dad253c-7a3b-4ca7-99c8-e8df8b3c3fd6 Release Notes: - Changed agent panel to copy text with cmd/ctrl-c, as markdown preview does. `markdown::CopyAsMarkdown` action is available still and can be bound if needed. |