de4522e
title_bar: Fix share button being hidden when any modal is open (#51862)
Click to expand commit body
This check was initially added in
https://github.com/zed-industries/zed/pull/19885/changes but has
regressed since. Making it explicit here again to stop this from
happening.
Release Notes:
- N/A
We were always sending zero before
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Oleksiy Syvokon
and
Ben Kunkle
created
d265b32
project_panel: Add support for pasting external files on macOS (#49367)
Click to expand commit body
Part of #29026
## Summary
https://github.com/user-attachments/assets/35b4f969-1fcf-45f4-88cd-cbc27ad9696e
macOS Finder places file paths on the system pasteboard using
`NSFilenamesPboardType` when files are copied. Previously, the project
panel only supported its own internal clipboard for copy/cut/paste
operations and ignored system clipboard content entirely. This meant
that copying files in Finder and pasting them in Zed's project panel did
nothing.
This PR adds support for reading file paths from the macOS system
pasteboard, enabling a natural workflow where users can copy files in
Finder (or other file managers) and paste them directly into Zed's
project panel.
> **Note:** Pasting files from a system file manager currently only
works on macOS. The project panel changes are cross-platform, but the
clipboard reading of file paths (`ExternalPaths`) is only implemented in
the macOS pasteboard. Windows and Linux would need equivalent changes in
their respective platform clipboard implementations to support this.
Copying/cutting files from the project panel to the system clipboard as
plain text works on all platforms.
### Changes
**`crates/gpui/src/platform/mac/pasteboard.rs`**
- Read `NSFilenamesPboardType` from the system pasteboard and surface
file paths as `ClipboardEntry::ExternalPaths`
- Check for file paths before plain text, since Finder puts both types
on the pasteboard (without this priority, file paths would be returned
as plain text strings)
- Extract the string-reading logic into `read_string_from_pasteboard()`
to allow reuse
**`crates/project_panel/src/project_panel.rs`**
- On paste, check the system clipboard for external file paths and use
the existing `drop_external_files` mechanism to copy them into the
project
- On copy/cut, write the selected entries' absolute paths to the system
clipboard so other apps can consume them
- Update the "Paste" context menu item to also be enabled when the
system clipboard contains file paths, not just when the internal
clipboard has entries
## Test plan
- [ ] Copy one or more files in Finder, paste in the project panel —
files should be copied into the selected directory
- [ ] Copy files within the project panel, paste — existing internal
copy/paste behavior is preserved
- [ ] Cut files within the project panel, paste — existing internal
cut/paste behavior is preserved
- [ ] Copy files in the project panel, paste in Finder or another app —
paths are available as plain text
- [ ] Right-click context menu shows "Paste" enabled when system
clipboard has file paths
- [ ] Right-click context menu shows "Paste" disabled when both internal
and system clipboards are empty
Release Notes:
- Added support for pasting files from Finder (and other file managers)
into the project panel via the system clipboard (macOS only). Copying or
cutting files in the project panel now also writes their paths to the
system clipboard for use in other apps.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
David
and
Smit Barmase
created
67d7f99
Fix shared database test isolation (#51809)
Click to expand commit body
All of the important changes are in
[`db.rs`](https://github.com/zed-industries/zed/pull/51809/changes#diff-2f644eab943bfa58feec29256281a3d9e8d4d7784cd34783e845af8beb15b16d).
Consider reading the commit log in order to review this work.
The DB crate's macro and API was changed to fix flakiness observed in
the MultiWorkspace tests when run locally. This flakiness was caused by
a shared `static LazyLock`, that caused concurrent test runs to interact
with the same underlying in-memory database. This flakiness wasn't
possible on CI due to it's usage of `cargo nextest`, whose
process-per-test approach masked this problem.
Essentially, I've changed the `static_connection` macro to remove the
static database variable and redone the internal model. Now, all
database types are thin wrappers around a generic `AppDatabase`. The
`AppDatabase` collects all of the individual table's migrations via the
`inventory` crate, and so only runs the migrations once on startup,
rather than a dozen times on startup.
The new API requires a `cx` so that we can replace the database returned
at runtime, rather than relying exclusively on a process-global
thread-local. However, we are still using a `static LazyLock` so that we
only need to take an `&App`, instead of an `&mut App`. These databases
types are `Clone + Send + Sync`, so you can easily capture-and-move the
database into background tasks and other places that don't have a `cx`.
For tests that require database isolation, it is now possible to set
their own database in init. See
[`workspace::init_test`](https://github.com/zed-industries/zed/pull/51809/changes#diff-041673bbd1947a35d45945636c0055429dfc8b5985faf93f8a8a960c9ad31e28R13610),
for the flakiness fix.
Best part, this change should be entirely compiler driven, so the Zed
agent was able to make the app-wide refactor easily.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Mikayla Maki
,
Anthony Eid
, and
Max Brunsfeld
created
007aba8
gpui: Call `ack_configure` on throttled Wayland resize events (#49906)
Click to expand commit body
when a resizing configure event is throttled (skipped to limit redraws
to once per vblank) the xdg_surface serial was never acknowledged. the
early return bypassed the ack_configure call that follows the throttle
check, violating the xdg-shell protocol requirement that every configure
serial be acknowledged before the next surface commit.
fix by calling ack_configure before the early return so the compositor
always receives the acknowledgment, dosent matter whether the resize
itself is applied.
Release Notes:
- N/A
This fixes "Error compiling regex: Look-behind assertion without
constant size" when using variable-length lookbehinds in search, such as
`(?<=^(?:\s{4})*)\s{4}`.
fancy-regex 0.17.0 adds support for variable-length lookbehinds using
regex-automata's DFA reverse search commit:
https://github.com/fancy-regex/fancy-regex/commit/b58fb31
Closes #50219
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Fixed the error message on compilation of regular expressions
containing variable length lookbehind assertions
Previously:
<img width="1582" height="1377" alt="image"
src="https://github.com/user-attachments/assets/3e275891-aef5-482e-87f0-c47b9eac3c2a"
/>
Now:
<img width="1323" height="1015" alt="image"
src="https://github.com/user-attachments/assets/8638cd08-fcd0-40f9-8749-32e6352e89b7"
/>
Thanks to @vorahardik7 for helping out with a test example and
@AmaanBilwar for suggesting a fix!
Signed-off-by: Pratik Karki <pratik@prertik.com>
Pratik Karki
created
c842fb5
sidebar: Keyboard nav improvements (and vim mode) (#51856)
We now give some room for special tokens.
Release Notes:
- N/A
Oleksiy Syvokon
created
84d70ce
languages: Support more JSON configuration files (#50800)
Click to expand commit body
Several widely used configuration files are JSON but have no `.json`
extension,
such as `.babelrc` or `.eslintrc`.
Editors like VS Code detect these as JSON automatically, but Zed
currently
treats them as plain text.
This change adds common JSON config suffixes so they get proper JSON
syntax
highlighting.
Added:
- [`.babelrc`](https://babeljs.io/docs/config-files)
-
[`.eslintrc`](https://archive.eslint.org/docs/user-guide/configuring/configuration-files)
- [`.stylelintrc`](https://stylelint.io/user-guide/configure/)
- [`.swcrc`](https://github.com/swc-project/swc/pull/4236)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Support more JSON configuration files
Release Notes:
- Added call diagnostics when collaborating with other Zed users in
collab.
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Danilo Leal <danilo@zed.dev>
Jakub Konka
,
Piotr Osiewicz
,
Piotr Osiewicz
, and
Danilo Leal
created
00bee45
git_ui: Add starts_open setting to git panel (#51601)
Click to expand commit body
Fixes #51542
Adds a `git_panel.starts_open` setting for parity with `project_panel`.
When set to `true`, the git panel opens automatically in new workspaces
that don't have saved panel state.
The default is `false`, matching current behavior (non-breaking).
### Usage
```json
{
"git_panel": {
"starts_open": true
}
}
```
### Implementation
Follows the same pattern as `project_panel.starts_open`:
1. `GitPanelSettingsContent` - added `starts_open: Option<bool>` to the
settings schema
2. `GitPanelSettings` - added `starts_open: bool` field
3. `GitPanel` Panel impl - overrides `starts_open()` to read from
settings
Release Notes:
- Added `git_panel.starts_open` setting to control whether the git panel
opens automatically in new workspaces (default: false)
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matt Van Horn
,
Matt Van Horn
, and
Claude Opus 4.6 (1M context)
created
96a9397
sidebar: Refine how we display status in the thread item (#51840)
Click to expand commit body
Refine the decorated icon as well as adding tooltips for extra clarity.
Release Notes:
- N/A
The recent projects had two plus buttons inside of it which weren't
immediately clear what they did. Those buttons would add a project to
the current workspace, which turned out to be _not_ what people expected
it would do. Because of this, I removed one of them and swapped the icon
of the other, to hopefully make the distinction more clear.
<img width="500" height="484" alt="Screenshot 2026-03-18 at 11 59@2x"
src="https://github.com/user-attachments/assets/341769fb-771e-450b-8814-a641bd8b63d5"
/>
Release Notes:
- N/A
Danilo Leal
created
a245660
gpui_linux: Fix "No Apps Available" dialog when opening URIs on Linux/Wayland (#49752)
Click to expand commit body
Closes #48169
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Fixed "No Apps Available" dialog when opening URIs on Linux/Wayland
Swaps the order of `open_uri_internal` function: try xdg-open first, and
only fall back to the portal if every candidate command fails.
Build Tests:
I tested the build on Arch Linux & MacOS Tahoe and there were no issues.
No error logs when opening repo links.
V0316 differences from V0306:
- Use `<|marker_N|><|marker_N|>` instead of `NO_EDITS`
- All intermediate markers are now emitted (should be more friendly to
speculative decoding)
- No newline padding around marker tags
- No git conflict markers; we now use SeedCoder's EOS tag instead
V0317 is like V0316, but marker numbers are relative to the cursor block
(`<|marker-2|> ... -1 ... -0 ... +1 ... <|marker+2|>`)
Release Notes:
- N/A
Oleksiy Syvokon
created
7b9df57
agent_ui: Clear original agent prompt when creating a new worktree (#51839)
Click to expand commit body
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
This PR removes the `language-extension-version` script and cleans up
some of the related documentation around updating extensions, as this is
no longer needed and at this point fully automated.
Release Notes:
- N/A
f6fd673
language_models: Apply JSON schema subset transform to xAI (#51835)
Click to expand commit body
The conversations on Grok 4 were failing right away on the first message
in a conversation when using Zed provided model directly, but not the
xAI API directly.
The reason we were seeing this is that when sending the JSON schemas for
built-in tools to the cloud API, we didn't use the transform we use for
xAI in a BYOK context. The xAI API doesn't support the full JSON schema
spec, and specifically for the spawn_agent tool, we were generating a
`oneOf` type for a field. Applying that transformation in the cloud case
too fixes the issue.
Release Notes:
- Fixed broken (failing on first message) xAI models over the Zed
provider on profiles using the spawn_agent tool, including the default
Ask and Write profiles.
Co-authored-by: Neel <neel@zed.dev>
Tom Houlé
and
Neel
created
c44f13c
git_ui: Improve delete branch tests to verify underlying repository state (#51825)
Click to expand commit body
While fixing the tests in the previous PR (#48338), I noticed that the
`delete_branch` tests only verified the UI state changes rather than the
actual state of the underlying repository.
Currently, if `delete_branch` were a no-op that returned Ok(), the tests
would still pass incorrectly. This PR addresses that gap by ensuring the
branch is actually removed from the repository.
|Before|After|
|--|--|
|<img width="3476" height="2564" alt="图片"
src="https://github.com/user-attachments/assets/f5c4c5c4-64fe-4074-9fff-fb166d160d77"
/>|<img width="3476" height="2564" alt="CleanShot 2026-03-18 at 17 51
36@2x"
src="https://github.com/user-attachments/assets/47419d37-5051-4139-969e-65a1347bf555"
/>|
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes #17090
Hello! This is a feature that I really wanted, so I've created an
implementation of it. Hope u guys like it.
It was alto mentioned at [this
discussion](https://github.com/zed-industries/zed/discussions/30473)
The use cases were based on the [vscode
extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align)
(only spaces case was implemented)
- The algorithm is O(n + m × 2k), where:
- n = total cursors (for initial analysis, to understand how many
alignments will be performed)
- m = number of alignment columns
- k = number of alignment rows (first time to get the most-right
occurrence, the next one to create the `Vec` of edits)
Release Notes:
- Added `editor: align selections` command

<br>
Thank you for creating zed!
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Tiago Lobão
and
Kirill Bulatov
created
be3a5e2
open_ai: Support structured OpenAI tool output content (#51832)
Click to expand commit body
Allow function call outputs to carry either plain text or a list
of input content items, so image tool results are serialized as
image content instead of a raw base64 string.
Release Notes:
- N/A
Ben Brandt
created
eba7cea
sidebar: Load archived threads in the correct window (#51831)
Click to expand commit body
Make sure we don't create a duplicate workspace if it is already open in
another window.
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Ben Brandt
and
cameron
created
3af7b64
vim: Fix visual block Shift-I jumping to original cursor after Ctrl-D scroll (#50822)
Click to expand commit body
Ensure that the `vim::visual::Vim::visual_block_motion` method is called
when `scroll_editor` is called while in Visual Block mode. This fixes an
issue where, after getting into `Visual Block` mode, if the user used
`ctrl-d` or `ctrl-u` to scroll half of the page, the wrong selection
would be made and, if `shift-i` was used to start inserting at the start
of the line, a single cursor would be placed at the cursor position
where the selection was started, instead of one cursor per each of the
selected lines.
These changes ensure that we now match Neovim's behavior for the same
flow.
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Xiaobo Liu
and
dino
created
30d3467
extension_ci: Switch back to upstream action (#51829)
Click to expand commit body
This switches the action back to the upstream one where the changes were
merged (thanks @\huacnlee for the quick action)
Aside from that, it does some minor fixes: It adds the bumper as an
assignee on the extensions PR and also ensures we do not try to bump
here in the repo for the test extensions.
Release Notes:
- N/A
77425aa
agent: Fix `@mention` menu placement (#51817)
Cameron Mcloughlin
created
d3f0510
auto_update: Strip pre-release and build metadata from release notes URL (#48570)
Click to expand commit body
Without this fix, the zed.dev server doesn't recognize the version with
metadata and redirects to /releases, which
defaults to the Stable channel, so Preview users end up seeing Stable
release notes.
Closes #47539
Changes:
- Strip pre and build metadata from the semver version in
release_notes_url before constructing the path, so the URL
becomes /releases/preview/0.218.0 instead of
/releases/preview/0.218.0-beta.1+preview.131.68e98a53.
- Standardized the ordering of pre/build clearing to pre-first across
all 4 call sites (2 were build-first).
Open question: With this fix, the URL now points to the specific version
you're running (e.g.
/releases/preview/0.218.0). An alternative would be to link to
/releases/preview (no version) so users can see all
Preview releases, including ones newer than what they have installed. I
went with per-version linking since it matches
the existing intent of the code, but happy to change it if the team
prefers the other approach.
Release Notes:
- Fixed "View Release Notes" in Preview/Stable opening the wrong release
channel page due to build metadata in the URL.
Closes #48256
It appears that the current git remotes support was implemented in
#42819, following the design described in
https://github.com/zed-industries/zed/pull/42486#issuecomment-3524092306.
That design does not include an interaction for deleting remotes, but
the delete remote branch action was mistakenly implemented as deleting
the remote itself.
After this PR, there should be no code paths that use `remove_remote`
anymore. I've kept it for now though, as it may be useful when we
introduce the corresponding interaction in the future.
Release Notes:
- Fixed a bug where deleting a remote branch from the branch picker
would incorrectly remove the entire remote configuration
solution for #43004
Release Notes:
- Added workspace::FocusCenterPane
The `editor::ToggleFocus` action not working really drives me bonkers,
and it also doesn't really make sense, because it doesn't toggle
anything. it moves focus, but doesn't move focus back anywhere if you
run it again so 'ToggleFocus' seems misleading.
Here we have added an action that just moves focus to the most recent
center pane: `workspace::FocusCenterPane`
this action correctly moves the focus to the center pane from any dock,
even if the center pane is the project diff, branch diff, terminal, or
keymap editor, etc.
i'm not sure if this would be considered a 'replacement' for
`editor::ToggleFocus` but i do think this is probably more in line with
what most users would consider the expected behavior.
Josh P.
created
46596a2
python: Upgrade `pet` to improve toolchain discovery in WSL (#51749)
Click to expand commit body
This PR updates the pet dependency to incorporate performance
improvements from upstream.
Related Upstream Changes:
- Issue: microsoft/python-environment-tools#369
- PR: microsoft/python-environment-tools#370
Updating pet reduces toolchain discovery time in WSL environments,
specifically when Conda is installed on the host Windows system. In my
testing, the time from clicking the toolchain button to the list
appearing was reduced by approximately 2 seconds.
While this is a notable improvement, discovery in WSL remains slightly
slower than in native development or remote Linux environments, where
toolchains are typically loaded near-instantaneously.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing (no need)
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Improved python toolchain discovery under WSL environment
Xin Zhao
created
0c9b8fd
git_ui: Avoid blocking main thread during stage/unstage (#47806)
Click to expand commit body
With a large number of files in the git status, pressing stage/unstage
could cause a noticeable freeze. The async performance profiler showed
that the task spawned inside `change_all_files_stage` blocked the main
thread for 300ms+, resulting in a clear and visible UI stall. The main
cause was the need to traverse all entries to determine what to stage or
unstage, which becomes expensive for large change sets.
Same repro as: #47800
Release Notes:
- Improved latency of stage/unstage operations
Marco Mihai Condrache
created
e6939ad
languages: Recognize module interface file as C++ file (#45968)
Click to expand commit body
https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirements,
`.cppm`, '.ccm', ".cxxm" files are C++20 module interface files.
Release Notes:
- Recognize module interface file as C++ file.
Remove old multiworkspace commands and fix a bug where multiworkspaces
wouldn't be deserialized from the DB
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: eric <eric@zed.dev>
Mikayla Maki
and
eric
created
8c9fc9f
agent: Fix scrolling selection out of view causes panel to close while zoomed (#51806)
Click to expand commit body
Release Notes:
- Fixed an issue in the agent panel where scrolling a selection out of
view would cause the panel to close while zoomed
Ben Kunkle
created
d04a60e
sidebar: Add some more improvements (#51799)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/51763
Release Notes:
- N/A
- In the project header, arrow keys left and right expand/collapse the
group
- Enter and space in any thread list item selects the item
- Arrow key down from the search editor moves focus to the the list
- Arrow key up from the first list item puts focus back to the editor
- At any moment while focus on the list, cmd-f moves focus back to the
search editor
- Made the `FocusWorkspaceSidebar` action always reset focus back to the
search editor
Release Notes:
- N/A
Danilo Leal
created
9f3e3be
agent: Improve sidebar design and behavior (#51763)
Click to expand commit body
- Selection/focus improvements (reduces flickers, move selection more
correctly throughout the list)
- Adds open folder button in the sidebar header
- Fixes sidebar header design, including the thread view one, too
- Fixes behavior of cmd-n when focused in the sidebar
- Changes the design for the "new thread" button in the sidebar and adds
a preview of the prompt on it
- Rename items in the "start thread in" dropdown
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Switch python_env_kernel_specifications to a buffered stream (using
buffer_unordered(4) and filter_map) to run discovery concurrently with a
bounded parallelism and skip None results.
Closes #50988
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
MostlyK
created
38b7c76
open_ai: Fix tool output for /responses endpoint (#51789)
Click to expand commit body
We were sending the raw tool debug output as JSON to the model rather
than whatever the tool intended as content for the model.
Which meant we were sending unneeded information to the model, which
matters in the edit tool case.
Release Notes:
- N/A
Release Notes:
- Fixed segfault at runtime on aarch64-linux when running static
constructors.
Jakub Konka
created
29403ee
client: Respect the default organization ID from the server (#51777)
Click to expand commit body
This PR updates the `UserStore` to use the `default_organization_id`
returned from the server to set the default organization rather than
always picking the first one.
Closes CLO-530.
Release Notes:
- N/A
83adaa5
task: Expose current buffer language as $ZED_LANGUAGE variable (#51614)
Click to expand commit body
Closes #12628
Adds a `$ZED_LANGUAGE` task variable that resolves to the language name
of the active buffer (e.g., "Rust", "Python", "Shell Script"). This lets
tasks adapt behavior based on language without parsing file extensions.
Use cases from the issue:
- Pass syntax highlighting language to external tools (e.g., `rg --type
$ZED_LANGUAGE`)
- Adjust comment wrapping width per language
- Handle extensionless files and untitled buffers that have a language
assigned
VS Code provides equivalent functionality via
`${command:activeEditorLanguageId}`. Neovim exposes it as `&filetype`.
## Changes
- Added `Language` variant to `VariableName` in
`crates/task/src/task.rs`
- Populated from `buffer.language().name()` in
`BasicContextProvider::build_context`
(`crates/project/src/task_inventory.rs`), following the same pattern as
`File` and `Stem`
- Updated test fixtures in `crates/tasks_ui/src/tasks_ui.rs` to include
the new variable
- Added `ZED_LANGUAGE` to the variable list in `docs/src/tasks.md`
## Testing
Updated the existing `test_task_variables` test in `tasks_ui` to verify
`ZED_LANGUAGE` resolves to "Rust" and "TypeScript" for the respective
test buffers.
This contribution was developed with AI assistance (Claude Code).
Release Notes:
- Added `$ZED_LANGUAGE` task variable that exposes the current buffer's
language name
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Matt Van Horn
,
Matt Van Horn
, and
Kirill Bulatov
created
546c70a
agent: Allow all settings in the thread to apply immediately (#51762)
Click to expand commit body
Before we kind of had it mixed: you could change thinking but not model
etc. We brute forced a solution by disabling, but it seems better to
just allow all of them to be updated whenever we would build the
request.
Release Notes:
- N/A
Ben Brandt
created
ef40f21
agent_ui: Only create ThreadHistory if agent supports it (#51759)
Click to expand commit body
Rather than always having a ThreadHistory with an internal option,
changed it to be an Option<ThreadHistory> so we can better distingiuish
between an empty list and unsupported
Release Notes:
- N/A