Commit graph

35720 commits

Author SHA1 Message Date
Richard Feldman
7c9a9d40c0
Add "Start Thread in New Worktree" (#49141)
Add the thread target selector in the agent panel behind the
`agent-git-worktrees` flag:

<img width="590" height="121" alt="Screenshot 2026-03-02 at 11 50 47 PM"
src="https://github.com/user-attachments/assets/17ee3303-7e01-4e40-bb84-1e7e748a3196"
/>

- Add a "Start Thread In..." dropdown to the agent panel toolbar, gated
behind `AgentV2FeatureFlag`
- Options: "Local Project" (default) and "New Worktree"
- The "New Worktree" option is disabled when there's no git repository
or in collab mode

Closes AI-34

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: morgankrey <morgan@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Finn Evers <finn@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: MostlyK <135974627+MostlyKIGuess@users.noreply.github.com>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Wuji Chen <chenwuji2000@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Kasper Nyhus <kanyhus@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Josh Robson Chase <josh@robsonchase.com>
Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com>
Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Lena <241371603+zelenenka@users.noreply.github.com>
Co-authored-by: 0x2CA <2478557459@qq.com>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Albab Hasan <155961300+Albab-Hasan@users.noreply.github.com>
Co-authored-by: KyleBarton <kjb@initialcapacity.io>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Tom Houlé <13155277+tomhoule@users.noreply.github.com>
Co-authored-by: Nikhil Pandey <nikhil@nikhil.com.np>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: dancer <144584931+dancer@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-03 15:25:36 +00:00
Daniel Llamas
62b9a98ddb
agent_ui: Make file mention chips clickable to open files (#46751)
### Summary

Makes file mention chips in the AI chat input clickable to open the
referenced files. Previously, chips like `@README.md` were purely visual
indicators with no interaction.

### Changes
- **Clickable mention chips**: Users can now click on file mentions in
the chat input to open those files in the editor
- **Support for all mention types**:
  - Files → Opens in editor
  - Files with line numbers → Opens and scrolls to line
  - Directories → Reveals in project panel
  - Threads → Navigates to thread
  - Rules → Opens rules library
  - URLs → Opens in browser
- **Handles files outside workspace**: Falls back to `open_abs_path()`
for files not in the current workspace

### Implementation

Threads `MentionUri` and `WeakEntity<Workspace>` through the crease
rendering pipeline:

1. Updated `insert_crease_for_mention()` to accept mention URI and
workspace references
2. Added click handler to `MentionCrease` component using `.when()` for
conditional attachment
3. Implemented file opening helpers that mirror the existing
`thread_view.rs::open_link()` logic

### Demo


https://github.com/user-attachments/assets/21b2afb7-7a86-4a0a-aba1-e24bb1b650c2

### Testing

Manually tested:

- [x] Clicking `@README.md` opens file
- [x] Clicking file with line numbers navigates correctly
- [x] Clicking directory reveals in project panel
- [x] Files outside workspace open via absolute path

### Files Changed

- `crates/agent_ui/src/mention_set.rs` - Thread URI/workspace through
pipeline
- `crates/agent_ui/src/ui/mention_crease.rs` - Add click handler and
file opening logic
- `crates/agent_ui/src/acp/message_editor.rs` - Update call sites

### Review feedback addressed

- Replaced `.when()` + `unwrap()` with `.when_some()` + `Option::zip()`
(`0e36efb4eb`)
- De-duplicated `open_file` and `open_file_at_line` into a single
function with `Option<RangeInclusive<u32>>` (`dbcbb69a4b`)
  - Rebased onto latest `main` and resolved conflicts

  Also update item 2 under Implementation from:
_Added click handler to MentionCrease component using `.when()` for
conditional attachment_

  to:
_Added click handler to MentionCrease component using `.when_some()`
with `Option::zip()` for conditional attachment_

### Release Notes:

- agent: File mention chips in the chat input are now clickable and will
open the referenced files in the editor.

Closes  #46746

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 16:06:22 +01:00
Oleksandr Kholiavko
e652d967b8
Add CSV preview with live table view and interactive features (#48207)
## **Description:**

**Context:**
This PR introduces an initial CSV preview feature for Zed, building upon
two previously merged infrastructure PRs:
- [#46341](https://github.com/zed-industries/zed/pull/46341) - Data
table dynamic column support (removed const generics)
- [#46190](https://github.com/zed-industries/zed/pull/46190) - Variable
row height mode for data tables

This implementation is based on the [original draft PR
#44344](https://github.com/zed-industries/zed/pull/44344), which has
been carefully decomposed into smaller, reviewable pieces.

---

#### **Features Included:**

**Core Infrastructure:**
- Live CSV parsing with smart debouncing (200ms cooldown)
- Performance monitoring with built-in timing metrics (not displayed in
UI yet)
- Automatic file change detection and re-parsing
- Support for quoted fields, multiline cells, and escaped characters

**Table Display:**
- Variable row height rendering with fallback to uniform mode
(switchable via settings)
- Draggable column resizing (reusing existing data table infrastructure)
- Row identifiers supporting both source line numbers and sequential row
numbers
- Configurable font rendering (UI font vs monospace)
- Tooltips showing full cell content on hover

**Interactive Features:**
- Column sorting (ascending/descending) with visual indicators

**Settings Panel:**
- Toggle between variable/uniform row rendering
- Font type selection (UI/monospace)
- Row identifier type configuration
- Debug information display
- Multiline cell rendering options

---

#### **Features Intentionally Removed for This PR:**

To reduce complexity and review scope, the following features were
temporarily reverted and will be reintroduced in subsequent PRs:

-  Settings pannel with performance metrics overlay
-  Cell selection (single, multiple, and range selections)
-  Keyboard navigation with arrow keys and selection extension
-  Copy functionality supporting CSV, TSV, and Markdown table formats
-  Inline cell editing with file persistence
-  Viewport following for large datasets
-  Column filtering and search capabilities

These removals were done via "time-machine" commits that cleanly nuked
vertical slices of functionality from the complete implementation.

---

**Technical Implementation:**

The feature is organized into a dedicated `csv_preview` crate with the
following structure:

```
crates/csv_preview/
├── src/
│   ├── csv_preview.rs          # Main view and coordination logic
│   ├── parser.rs               # CSV parsing and editor integration
│   ├── settings.rs             # Configuration types and defaults
│   ├── table_data_engine.rs    # Data transformation logic
│   ├── renderer/               # UI rendering modules
│   │   ├── preview_view.rs     # Main render implementation
│   │   ├── render_table.rs     # Table component assembly
│   │   ├── table_cell.rs       # Individual cell rendering
│   │   ├── table_header.rs     # Header with sorting controls
│   │   └── row_identifiers.rs  # Line number column
│   └── types/                  # Core data structures
│       ├── table_like_content.rs
│       ├── coordinates.rs      # Display vs data coordinate systems
│       └── table_cell.rs
```

**Key architectural decisions:**
- **Dual coordinate system**: Separates data indices from display
indices to support sorting/filtering
- **Component reuse**: Leverages existing `data_table` infrastructure
from the keymap editor

---

**Integration:**
- Registers `csv::OpenPreview` action (currently without default
keybindings)
- Follows the same workspace integration pattern as `markdown_preview`
and `svg_preview`
- Automatically detects `.csv` file extensions
- Tab integration with appropriate icons and naming

---

**Code Structure Note:**
Some code structures, types, and documentation may appear redundant or
over-engineered in this initial implementation. This is intentional -
the feature was developed as a complete system and then decomposed by
functionality rather than being built incrementally. The "extra"
infrastructure supports features that were removed for this PR but will
be reintroduced in subsequent ones.

This approach was chosen over extensive refactoring because:
1. The complete feature took 200+ commits to develop with significant
rewrites
2. Clean extraction of vertical slices was more feasible than rebuilding
incrementally
3. The end state will utilize all these components, making current
"redundancy" temporary

I apologize for any inconvenience this may cause during review, but the
alternative would have required significant refactoring effort just to
make intermediate states "prettier," which seemed counterproductive.

---

**Future Work:**
This lays the groundwork for upcoming PRs that will reintroduce the
removed features:
- Cell selection and keyboard navigation
- Copy functionality with multiple output formats
- Inline editing capabilities with undo/redo
- Column filtering and search
- TSV and other delimiter support
- Improved horizontal scrolling behavior
- Settings persistence

**Testing:**
Includes test fixtures demonstrating multiline cell handling, various
column counts, and edge cases.

---

**Release Notes:**

- N/A This is feature flagged

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-03-03 15:49:40 +01:00
Umesh Yadav
83fd8fa4df
language_models: Handle usage-only events with empty choices in OpenRouter (#50603)
Closes #50569

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)

Previously, OpenRouter responses containing only usage data (without any
choices) would cause an error. Now the mapper properly emits usage
updates
for these events without failing.

Release Notes:

- Fixed an error when OpenRouter returns a usage-only event with empty
choices.
2026-03-03 13:58:47 +00:00
Tom Zaspel
58ad0ff691
Add file icons for YAML, Helm and GitLab (#50529)
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
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

I used the icons from here:
- GitLab: https://about.gitlab.com/press/press-kit/
- Helm: https://www.svgrepo.com/svg/330624/helm
- Yaml: https://icons.getbootstrap.com/icons/filetype-yml/

FYI: I'm not familiar with Rust please review the rust code.

Release Notes:

- Added file icons for YAML, Helm and GitLab files, and used the Docker
icon for `Containerfile`.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-03 12:58:13 +00:00
Rabi Mishra
197cf60d05
agent_ui: Refresh ACP history after thread create/load (#49796)
Moves loading of the history connection to once we have a new
connection, not on every thread view.

Release Notes:

- N/A

---------

Signed-off-by: rabi <ramishra@redhat.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-03 11:21:40 +01:00
Tom Houlé
906f5a64e9
agent: Cancel retries when the turn is cancelled (#50580)
When a completion request fails with a retryable error (e.g. a 500 from
the upstream provider), the retry loop waits on a timer before trying
again. This timer did not race with the cancellation signal, so if the
user switched models and submitted a new message during the retry delay,
the old turn would continue retrying with the stale model for up to 15
seconds — making requests to the wrong provider and corrupting the
thread's message list with spurious Resume entries.

Now the retry delay races with the cancellation receiver, so the old
turn exits immediately when cancelled.

Release Notes:

- Fixed cancelled turns in a conversation that failed (e.g. 500 from the
LLM provider) bein retried even after cancellation
2026-03-03 11:16:49 +01:00
Jakub Konka
9ba65944df
livekit: Correctly handle runtime deps: libva and libva-drm (#50527)
Release Notes:

- N/A
2026-03-03 10:25:01 +01:00
Bennet Bo Fenner
3bb5aec700
agent: Remove unused edit_agent_output from edit file tool (#50576)
Removes unused `edit_agent_output` from `EditFileTool`. This makes it
easier to maintain compatibility between the `EditFileTool` and
`StreamingEditFileTool`.

Release Notes:

- N/A
2026-03-03 09:24:07 +00:00
Lukas Wirth
502460a005
zlog: Fix log file rotation never truncating original file (#50571)
Release Notes:

- Fixed an issue where the log file and log file backup would keep grow
indefinitely
2026-03-03 08:37:58 +00:00
Conrad Irwin
6808acce93
Fix a few cases where we weren't escaping shell vars correctly (#50562)
Release Notes:

- N/A
2026-03-02 23:31:11 -07:00
Max Brunsfeld
880b2e512b
Remove Zeta1 logic, allow choosing zeta2 experiment (#50560)
Release Notes:

- N/A
2026-03-02 22:24:55 -08:00
dybucc
815c6f5141
Add small alloc and lookup optimizations (#49041)
A vector was being instantiated when the callsite only required an
iterable.

Another part of the code was performing multiple `contains()` lookups on
a vector, and now it does it on a hashed set. This change has required
some extra modifications across the codebase, but the affected sites are
minimal and have been adjusted without major issues.

The changes include some `Hash` derived implementations, which were
proposed in the original `lsp-types` in [[1]], and maybe could be merged
into Zed's fork. I went ahead and used a newtype with a custom `Hash`
implementation that simply called on the structure's public members'
implementations of `Hash`.

The next change includes the removal of a check of the request
capabilities after having already checked the same thing in the call to
`to_lsp_params_or_response()` right before. The result of the `match`
expression should already have returned a `Task::ready()` if the above
mentioned function failed in performing the check that was later
repeated and now removed.

Finally, in the `edits_from_lsp()` method, stable sorting was being
performed when only unstable sorting would suffice. The method can only
sort with respect to the key data, and not the satellite data, as the
latter are the literal strings of the edit. It matters not which one of
a sequence of overlapping edits (with same ranges that thus resolve the
edits for equivalence) should come before the other.

[1]:
https://github.com/gluon-lang/lsp-types/pull/295/changes#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R540

- [ ] Tests or screenshots needed?
- [ ] Code Reviewed
- [ ] Manual QA

Release Notes:

- Removed a vector allocation where the callsite only required an
iterable.
- Improved multiple lookup operations when deserializing LSP edit
operations.
- Removed a double-check of capabilities after requesting and thus
determining LSP capabilities.
- Replaced stable sorting with unstable sorting of edits returned by the
LSP.
2026-03-02 21:28:12 -07:00
Conrad Irwin
3f6a6cfabf
Truncate tabs in filenames (#50550)
Closes #19208

Authored-By: @ngauder 

Release Notes:

- Editor: truncate long file names in tab titles

---------

Co-authored-by: Nikolas Gauder <nikolas.gauder@tum.de>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-02 19:50:52 -07:00
Eric Holk
42ba961075
Persist unsent draft prompt across Zed restarts (#49541)
Store the user's unsent message editor text in DbThread so it survives
quitting and reloading Zed. The draft flows through Thread → AcpThread →
AcpThreadView on load, and back via a debounced observer on the message
editor for saves.

Currently works for native Zed agents only; external ACP agents will
pick this up once general ACP history persistence lands.

## Changes

- **`DbThread`** / **`Thread`**: New `draft_prompt: Option<String>`
field, included in `to_db()`/`from_db()`
- **`AcpThread`**: Bridge field with getter/setter, populated during
`register_session()`
- **`NativeAgent::save_thread()`**: Copies draft from `AcpThread` →
`Thread` before persisting
- **`AcpThreadView`**: Restores draft into `MessageEditor` on load;
syncs editor text → `AcpThread` via observer; debounced (500ms) Thread
notify triggers DB save

Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2026-03-03 00:57:15 +00:00
Sergei Zharinov
4392e3a9fc
workspace: Fix scrolling to active tab when pinned tabs are present (#50538)
When pinned tabs are present, activating an unpinned tab passed the
absolute tab index to the scroll handle, which only contains unpinned
tabs. This caused the scroll-into-view to silently fail.

Subtract `pinned_tab_count` from the index so it maps to the correct
child in the unpinned tabs scroll container.

Release Notes:

- Fixed tab bar not reliably scrolling to the active tab when pinned
tabs are present.
2026-03-03 01:18:56 +01:00
Conrad Irwin
67b375cc1e
Restore accidental change (#50543)
I'm not sure why, but my dev builds on linux don't output to stdout

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 16:16:17 -07:00
Conrad Irwin
1d443f69f6
Add error handling to keep Zed running in the face of transient wgpu errors (#50539)
Release Notes:

- linux: Reduce crashes in the face of transient GPU errors
2026-03-02 16:04:40 -07:00
it-education-md
465e2b5ffd
editor: Avoid autoscroll in SplitSelectionIntoLines (#49399)
Closes #48812

## Summary
`editor::SplitSelectionIntoLines` currently triggers autoscroll and can
jump to the end of a long file.
This PR makes the action explicitly no-scroll.

## What changed
- Disabled autoscroll in the `unfold_ranges` call inside
`split_selection_into_lines`.
- Switched selection update to `SelectionEffects::no_scroll()`.

## Testing
- Added `test_split_selection_into_lines_does_not_scroll`.

### Screenshots:
- Before:   see issue video
- After:
<img width="2486" height="1299" alt="image"
src="https://github.com/user-attachments/assets/8408a2f1-7dd7-4984-aa89-927d5a588322"
/>


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:

- Stop scrolling on `editor::SplitSelectionIntoLines` called in the long
files
2026-03-02 22:45:19 +00:00
Ben Kunkle
ed3553491b
ep: Include more context (#50533)
Closes #ISSUE

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
- [ ] 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 ...

---------

Co-authored-by: Max <max@zed.dev>
2026-03-02 17:23:30 -05:00
Kirill Bulatov
7ad524661d
Remove Supermaven-related code from Zed (#50537)
Follow-up of https://github.com/zed-industries/zed/pull/49317

See also https://supermaven.com/blog/sunsetting-supermaven

- N/A
2026-03-02 22:18:49 +00:00
Dino
1f11592d93
editor: Remove folded buffer ID on all excerpts removed (#50525)
Fix a bug in the editor's handling of the
`multi_buffer::Event::ExcerptsRemoved` event, where the display map's
`folded_buffers` set was not updated according to the list of removed
buffer ids.

Since the `ProjectSearchView` now relies on the
`Editor.has_any_buffer_folded` method in order to decide the state of
the expand/collapse all excerpts button this could lead to a
bug where, after an initial project search, all excerpts would be
collapsed, and performing a new search would leave the button in a wrong
state, as all excerpts from the new search result would be expanded, but
the button would still consider that there were folded excerpts for the
buffers.

Closes #50521

Release Notes:

- Fixed bug in project search where collapsing a single buffer then
performing a new search in the same view, would break the
expand/collapse all button behavior
2026-03-02 22:13:09 +00:00
Marco Mihai Condrache
f0620c6f8f
editor: Preserve compound emojis (#50082)
Closes #45466

Emojis like 🧑‍✈️ are grapheme clusters formed using zero-width joiners
and variation selectors. Iterating over the string by individual chars
in `highlight_invisibles` breaks these clusters, even though they
represent a single visible character.

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:

- Zed now supports compound emojis
2026-03-02 22:33:05 +01:00
Lucas White
0d79f44ec9
Update legal docs to reflect new terms of service (#50530)
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:

- Update legal docs to reflect new Terms, Privacy Policy, Subprocessors,
and Acceptable Use Policies (fka Third Party Terms)
2026-03-02 12:36:31 -08:00
Conrad Irwin
4be8544777
wGPU: Select more specifically (#50528)
This uses the compositor hints if available to pick the best GPU. If
none is
available, it tries each GPU in turn, and the first that actually works
is chosen

Release Notes:

- Linux: Select a more appropriate GPU

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-02 13:30:40 -07:00
Lucas White
b47b353e37
Docs/privacy documentation refresh (#50522)
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:

- Updated Privacy and Telemetry docs for improved clarity

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-02 11:21:07 -08:00
Bennet Bo Fenner
2879349b1e
agent: Fix review experience for StreamingEditFileTool (#50518)
Release Notes:

- N/A
2026-03-02 18:46:25 +00:00
Ben Brandt
56ae09502a
agent: Use correct subagent thread entity to get the entries list (#50515)
Was grabbing off the Thread not the AcpThead 🤦

Release Notes:

- N/A
2026-03-02 18:27:32 +00:00
Ben Brandt
41a0c63c23
agent: Add linked action log support for subagent threads (#50500)
Subagents now forward buffer reads/writes/edits to a parent action log,
allowing the parent's review experience to track all file changes made
by subagents alongside its own.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 18:00:12 +00:00
Cole Miller
db8f64935a
remote_server: Don't panic when forwarding stderr (#50505)
Closes ZED-5B7

Release Notes:

- N/A
2026-03-02 12:59:14 -05:00
Ben Brandt
a6106d2bfb
agent: Add back in discouragement of useless subagents (#50512)
Release Notes:

- N/A
2026-03-02 17:29:22 +00:00
Ben Brandt
c6319d3e02
agent: Propagate model settings to running subagents (#50510)
When the model, summarization model, thinking settings, speed, or
profile are updated on a thread, apply the same settings to any
currently running subagents.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 17:10:36 +00:00
Oliver Azevedo Barnes
f9895c5468
devcontainer: Fix git output (#49230)
Closes #48434

In Dev Containers, failed git operations were surfaced with a generic
failure message, while the useful git output (stderr/stdout) was not
reliably available to users.

This happened because in devcontainers the git operation errors go
through an RPC layer and then got wrapped with `anyhow::Context` (e.g.
“sending pull request”); the toast displayed only that outer context via
`to_string()`, masking the underlying git stderr message.

This change ensures the full git operation output is preserved and
surfaced via Zed’s “See logs” flow in Dev Containers, matching the
information you get when running the same git command in a terminal.

### What you should expect in the UI
- You will see a generic toast like “git pull failed” / “git push
failed”.
- When clicking on the toast’s “See logs”, the log tab now contains the
full git error output (e.g. non-fast-forward hints, merge conflict
details, “local changes would be overwritten”, etc.), which previously
could be missing/too generic.
---

## Manual testing

Run inside a Dev Container and ensure git auth works (SSH keys/agent or
HTTPS credentials).

1. **Dirty-tree pull failure**
   - Make remote ahead by 1 commit (push from another clone).
   - Locally modify the same file without committing.
   - In Zed: **Pull**  
- **Expect:** toast “git pull failed” + **See logs** shows “local
changes would be overwritten…” (or equivalent).

2. **Non-fast-forward push failure**
   - Ensure remote ahead.
   - Locally create 1 commit.
   - In Zed: **Push**  
- **Expect:** toast “git push failed” + **See logs** shows “rejected
(non-fast-forward)” + hint to pull first.

3. **Merge-conflict pull failure**
- Create conflicting commits on the same lines (one local commit, one
remote commit).
   - In Zed: **Pull**  
- **Expect:** toast “git pull failed” + **See logs** shows conflict
output (“CONFLICT…”, “Automatic merge failed…”).

Release Notes:

- Fixed devcontainer git failure toasts so they show the actual git
error

---------

Co-authored-by: KyleBarton <kjb@initialcapacity.io>
2026-03-02 09:10:12 -08:00
Lukas Wirth
2b774e5cd2
extension_host: Allow extensions to define semantic highlighting rules (#49282)
for their given language via a `semantic_token_rules.json` file

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 17:54:53 +01:00
Conrad Irwin
04fc31fc19
Fix another case where we could apply highlights with wrong indices (#50367)
Closes #ISSUE

Release Notes:

- N/A
2026-03-02 09:53:43 -07:00
Kunall Banerjee
2d3c05ee41
Add libva-devel as required deps for dnf section (#50476)
If I follow the steps outlined in https://zed.dev/docs/development/linux
then `cargo run` on my Fedora workstation fails because the install
script is missing `libva-devel` as a required dependency under `dnf` /
`yum` sections.

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
- [ ] 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
2026-03-02 09:37:06 -07:00
Bennet Bo Fenner
9ca695d9f6
Remove dbg! from tests (#50506)
Removes a bunch of `dbg!`'s from strings in test code. It's annoying
cause these show up in project search, when you are removing
`dbg!(...)`'s after debugging something

Release Notes:

- N/A
2026-03-02 16:31:20 +00:00
Ben Kunkle
bb6c52bd5e
agent: Log thread title generation errors (#50504) 2026-03-02 17:27:00 +01:00
Om Chillure
3630ac9238
Fix renaming with . in JSX tags (#50373)
Fixes #50245

### Summary :
This PR fixes linked tag renaming when typing . in tag names like
<Table.Headers>...</Table.Headers>.

Previously, linked editing treated . as punctuation (unless a language
explicitly configured it as a linked-edit character), so renaming could
stop syncing at the dot and produce mismatched closing tags.

### What changed
Updated linked-edit input handling to preserve linked edits when the
typed input is exactly ".", even if the active language does not
explicitly include dot in linked_edit_characters.
Added a regression test covering dot typing in linked edits without
language override.

Kept existing punctuation behavior (e.g. >) unchanged.

### Files changed
[editor.rs]
[editor_tests.rs]

### Why this approach
Minimal, targeted fix in shared linked-edit path.
Works for .svelte and similar markup contexts where dot-separated
component names are valid in practice.
Avoids requiring every language/extension to add dot config
individually.

### Validation
Manual repro confirmed: opening tag rename with dot now keeps closing
tag synced.
Added test: test_linked_edits_on_typing_dot_without_language_override.
Existing related test remains relevant:
test_linked_edits_on_typing_punctuation.
2026-03-02 11:24:39 -05:00
KyleBarton
0214d6e78b
Adjust scroll top by number of sticky headers (#50359)
In cases where sticky headers are enabled, count the number of sticky
headers that would be present when performing `editor:scroll cursor
top`. Take the maximum of that number and `verical_scroll_margin` so
that we don't inadvertently bury the cursor behind the sticky headers.



https://github.com/user-attachments/assets/6d49fe3a-2017-4c76-bd92-c4ec9794f898



Closes #48864

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 scroll top behavior when there are more sticky headers than
vertical_scroll_margin
2026-03-02 08:09:13 -08:00
Danilo Leal
0cf551fd6f
agent_ui: Use main message editor for editing queued messages (#50490)
This PR changes the behavior of editing queued messages. Previously, you
could type directly in the editor that was used to displayed a queued
message. However, that felt a bit anxiety-inducing because there was a
chance the message would get sent before you could've wrapped up your
edits. And even if we blocked the message to get sent while focused on
the editor, it could still be a bit unpredictable. So, with this PR, if
you type on a queued message, the content of that message goes
immediately back to the main message editor. Effectively, you're taking
that message off the queue so you can edit it, and then if you hit enter
(while there's a generation ongoing), that content goes back into the
queue.

I believe this allows for a calmer editing experience when wanting to
touch up or increment a queued message.

Here's a video of the flow:


https://github.com/user-attachments/assets/ec60ccad-2b04-4b7c-a8f5-95baa443d9f2

In the video, I'm showcasing a few things:
- in case the main message editor already had content, the content from
the edited queued message is appended to it. That avoids the user
surprisingly losing information.
- the fact that mention creases still work well and are not converted
back into plain text

Release Notes:

- Agent: Made editing queued messages better by moving the contnet back
to the main message editor, avoiding the chance of it getting sent
mid-editing.
2026-03-02 13:02:30 -03:00
Danilo Leal
805e32c363
agent_ui: Improve loading state when there's only a terminal call (#50501)
In the thread view, when the last block is an ongoing terminal tool
call, we're not waiting for the LLM to generate content, but rather,
we're waiting for the command to run so its output can be sent to the
model. With that in mind, it doesn't make sense for the generating
loading spinner to be visible. So, this PR, removes it. But I also took
the opportunity to refine the terminal card header a bit, as well as
make the "command running" spinner, as well as the stop button, visible
for external agents, too.


https://github.com/user-attachments/assets/c7e2865a-af9b-416b-a06a-908dffb916da

In the video, you can see that given we only have a running-terminal
tool call, there's no generation loading spinner.

Release Notes:

- Agent: Improved loading state for the thread view when there's only a
running terminal command.
2026-03-02 13:02:06 -03:00
Cole Miller
7e10264219
git: Silence verbose log when loading index/committed text (#50496)
Updates #50487 

Release Notes:

- N/A
2026-03-02 15:57:44 +00:00
Ben Brandt
12b786dffc
agent: Remove subagents feature flag (#50493)
Release Notes:

- agent: Add new `spawn_agent` tool which allows the Zed Agent to
utilize subagents for doing tasks in parallel and better context
management.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 15:30:03 +00:00
Lukas Wirth
e30720a781
gpui_web: Implement fetch based HTTP client (#50463)
Can only be used in single threaded environments for now due to js
futures being non-send.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 16:18:01 +01:00
Ben Brandt
af5e26175a
agent: Add subagent info to telemetry events (#50492)
- **Add parent_session_id to agent thread feedback submission**
- **Add more parent session ids to events**

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 15:17:05 +00:00
Lukas Wirth
065d85d850
editor: Do treesitter bracket colorization work on the background (#50068)
This is pure computation work that is disconnected from main thread
entity state yet it can still block for a couple milliseconds depending
on the file

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 15:15:08 +00:00
Ben Brandt
5e9ee9ea4a
agent: More subagent fixes (#50489)
- Skip agent location updates for subagent threads
- Hide edits summary for subagent thread
- Fix tool permission granularity selection from parent thread

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 14:42:01 +00:00
Lukas Wirth
8f329d1ee3
workspace: Properly flush effects in send_keystrokes_impl (#50486)
Should fix the test issue observed in
https://github.com/zed-industries/zed/pull/50068

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 15:37:59 +01:00
Cole Miller
a09b6fba88
settings_ui: Defer fetch_files to avoid reentrant lease of Project (#50488)
Closes ZED-5CA

Release Notes:

- Fixed a crash when opening the settings UI.
2026-03-02 09:33:48 -05:00