Commit graph

38645 commits

Author SHA1 Message Date
zed-zippy[bot]
0a64bc9d6d
v1.9.x preview for @JosephTLyons 2026-06-24 15:31:54 +00:00
Ben Brandt
2df74932bc
acp: Support embedded resources in tool call content (#59821)
We weren't handling these really before, just rendering the URI. This
should provide best-effort support for what we can render.

<img width="800" height="359" alt="image"
src="https://github.com/user-attachments/assets/51f101c7-c3be-4801-9000-62000a71faa6"
/>

(I will remove the extra labels that was just for testing)

Release Notes:

- acp: Support embedded resources in tool calls.
2026-06-24 15:25:44 +00:00
Richard Feldman
697cff57bc
Remove SSH agent access from sandbox docs (#59797)
This removes sandbox prompt and documentation wording that claimed Git
metadata access exposes the inherited SSH agent socket. Git access
remains limited to protected metadata paths, and the Seatbelt wrapper no
longer carries SSH-agent-specific handling or examples.

Release Notes:

- Fixed AI sandboxing documentation to avoid implying Git metadata
access grants SSH agent access.
2026-06-24 15:19:59 +00:00
Finn Eitreim
e990f31ad7
editor: Fix showing completion list with selection does not include the selection (#57405)
Fix the completion list not showing the current selection when you
execute `editor: show completions`, the stated reason by comment before
is that if you are in a tabstop snippet already it wont give you the
correct options. So my change is to just check if you are in such a
snippet and if not give the new desired behavior.

before:


https://github.com/user-attachments/assets/1b2f3594-7361-4636-9ef3-f8c9419faa26

after:


https://github.com/user-attachments/assets/1be35582-464a-40f3-b6be-ee74f9961796


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #57386

Release Notes:

- editor: include text from selection in completion list.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-24 14:49:03 +00:00
Sam Trouy
8036a3c74b
Add non breaking glue characters as non-wrapping characters (#59775)
# Objective

Fixes #57850 

NBSP, NNBSP, and NBH characters were causing breaks when text is wrapped
in editor when they should instead be non-breaking.

## Solution

I looked for an official spec and found [Unicode Line Breaking
Algorithm](https://www.unicode.org/reports/tr14/) which has these
characters listed under the non-breaking ("glue") section. I opted to
add these characters in manually within the logic that checks if a
character is a 'word' character or not, following the pattern for how
other groups of unicode characters are checked.

## Testing

- Tests were added under `test_is_word_char` and `test_wrap_line`
sections, and the expected behavior was verified by building zed and
using these characters in the editor.
- I don't think anything else needs testing now. In the future, it could
make sense to make sure the entire unicode spec is followed for line
breaking, as I imagine there are other obscure characters that could
have this same issue. (a `unicode-linebreak` crate is imported elsewhere
in the codebase but not used here)
- Changes can be tested by building this commit and following the
original instructions outlined in the related issue.
- Tested on linux

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (**no unsafe
blocks**)
- [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/After</summary>

### Before
<img width="449" height="443" alt="before"
src="https://github.com/user-attachments/assets/4d438966-1bab-46e4-a018-cd648395a1ca"
/>

### After
<img width="448" height="445" alt="after"
src="https://github.com/user-attachments/assets/c7ce7166-9c22-4083-850f-8d8acfc42b56"
/>


</details>

---

Release Notes:

- N/A
2026-06-24 14:18:04 +00:00
Vitaly Kravchenko
f18e91efc6
Reapply traffic light position after appearance changes (#59712)
## Bug

Before switching macOS appearance:
<img width="154" height="39" alt="before switching OS theme"
src="https://github.com/user-attachments/assets/2444fafe-21a7-47f6-84ac-ec33a61a6523"
/>

After switching macOS appearance:
<img width="167" height="36" alt="after switching OS theme"
src="https://github.com/user-attachments/assets/d4a34555-2964-4e92-8d6a-24da7620fc49"
/>

After focusing the window following the macOS appearance switch:
<img width="151" height="37" alt="after focusing the window after
switching the OS theme"
src="https://github.com/user-attachments/assets/6bc2e996-256d-448d-a11b-fdc2f0e01f58"
/>

## Fix

Reapply GPUI's custom macOS traffic-light button position after AppKit
reports an effective appearance change and after GPUI's appearance
observers have been notified.

## Cause

GPUI stores a custom `traffic_light_position` for windows that use
transparent/custom titlebars. When macOS switches Light/Dark appearance,
AppKit can relayout the standard window buttons, which resets the
traffic lights to AppKit's default vertical position. The next normal
window focus/layout pass moves them back, causing a visible jump.

This change keeps the existing appearance observer callback behavior,
then re-runs `move_traffic_light()` after the callback has completed.

## Validation

- `cargo check -p gpui_macos --release --features runtime_shaders`
- Manually verified with a GPUI window using a transparent titlebar,
custom `traffic_light_position`, and an appearance observer that
refreshes the window.
- Toggled macOS Light/Dark appearance while the window was visible;
traffic lights no longer shifted upward.

Release Notes:

- N/A
2026-06-24 14:00:13 +00:00
ozacod
6c923cc117
text_finder: Seed text finder query from active project and buffer search (#59779)
## Summary

When opening the text finder (`text_finder::Toggle`), pre-populate its
query the same way project search already seeds itself. Previously
`seed_query` only asked the active editor for the word under the cursor,
so opening the text finder from a project search tab or a focused buffer
search bar started empty.

`seed_query` now tries these sources in priority order:

1. **Active project search** — its current query
(`ProjectSearchView::search_query_text`).
2. **Focused buffer search bar** — its query, reusing project search's
existing `buffer_search_query` helper (promoted from private to
`pub(crate)` so there's one source of truth rather than a copy).
3. **Word under the cursor** — the existing `query_suggestion` fallback,
still honoring the `seed_search_query_from_cursor` setting.

This mirrors how project search is fed from the buffer search bar
(`existing_or_new_search`), keeping the seeding behavior consistent
across the three search surfaces.

## Testing

- Manual: open project search with a query → toggle text finder → query
carries over; cmd+f with a query focused → toggle text finder → query
carries over; otherwise the word under the cursor seeds it as before.

Release Notes:

- Improved text finder to pre-fill its query from the active project
search or buffer search

---------

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-24 13:15:12 +00:00
Oleksandr Kholiavko
c8f68c38e2
csv_preview: Make horizontal scrollbar width respect pinned columns config (#57245)
## Data table: Add left inset for scrollbar alignment with pinned
columns

When pinned columns are enabled in the data table, the horizontal
scrollbar previously extended across the full table width, including
behind the pinned columns. This change adds a left inset to the
scrollbar so it only spans the scrollable area, properly aligning with
the content layout.

## Demo (look at bottom scrollbar)
| Before | After|
| --- | --- |
| <img width="1614" height="482" alt="image_2026-05-20_12-29-22"
src="https://github.com/user-attachments/assets/87050173-0f3a-46dd-a7e1-10f769c7b5b8"
/> | <img width="1526" height="420" alt="image_2026-05-20_12-32-48"
src="https://github.com/user-attachments/assets/5041069f-2289-449b-8d30-8bcb3d0890eb"
/> |
### Changes

- Add `pinned_width()` and `scrollable_width()` helper methods to
`ResizableColumnsState` to compute column widths
- Refactor scrollbar rendering to use absolute positioning with inset
when pinned columns are present
- Scrollbar now correctly positions itself to span only the scrollable
(non-pinned) column area

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Improved horizontal scrollbar alignment when pinned columns are active

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-24 12:29:42 +00:00
Finn Evers
01c316ae31
docs: Add note about upcoming MCP extension deprecation (#59812)
Release Notes:

- N/A
2026-06-24 10:51:12 +00:00
David Alecrim
5a5242ffeb
markdown: Render inline <br> tags as line breaks (#54165)
## Summary
Inline `<br>` tags in markdown (e.g. `<br>`, `<br/>`, `<br />`) were
rendered as literal text instead of line breaks when images are around.
VS Code and GitHub both treat them as hard line breaks.

The fix has two layers:

**Parser (`parser.rs`):** The text-merge loop was consuming `InlineHtml`
events as empty text. `<br>` variants are now excluded from that loop
and converted to `HardBreak` events instead, matching the semantics of a
trailing two-space or backslash line break in CommonMark.

**Renderer (`markdown.rs`):** Image paragraphs use a flex row layout, so
text `\n` has no effect. `HardBreak` inside an image paragraph now
inserts a `div().w_full().h_0()` child, which forces a flex-wrap row
break. Images also get `mr_2()`/`mb_2()` margins for spacing, replacing
the previous `SoftBreak`-as-space hack. `SoftBreak` is suppressed inside
image paragraphs to avoid phantom whitespace elements disrupting the
flex layout.

## Screenshots

### Before

How Zed WAS rendering this:
<img width="629" height="601" alt="Screenshot 2026-04-17 at 07 53 26"
src="https://github.com/user-attachments/assets/cbfa6c81-83ea-467a-b73f-a2efef953bb4"
/>

### Comparison

This is how Github renders this:
<img width="1006" height="911" alt="Screenshot 2026-04-17 at 07 06 49"
src="https://github.com/user-attachments/assets/6ee286c6-026b-4a85-a931-c61cf24370ba"
/>

This is how VS Code renders this:
<img width="1511" height="947" alt="Screenshot 2026-04-17 at 07 03 36"
src="https://github.com/user-attachments/assets/1bc41c85-bb3d-48c6-9e21-cd96327c43c6"
/>

### After

This is the end result after the changes:
<img width="821" height="807" alt="Screenshot 2026-04-17 at 07 45 32"
src="https://github.com/user-attachments/assets/8882abaa-dc07-45fb-9aaa-a908712dce65"
/>

[Created this Github repo for testing
](https://github.com/davidalecrim1/zed-md-test)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed inline `<br>` tags in markdown previews rendering as literal
text instead of line breaks

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-24 10:22:36 +00:00
Finn Evers
d655580d9b
ui: Fix end_slot_on_hover API (#59805)
The issue here was that `end_slot_on_hover` would currently only work if
`end_slot` was also set. With this, it will now work even if there is no
`end_slot`.

Release Notes:

- N/A
2026-06-24 09:11:41 +00:00
Finn Evers
aa7dc30ec3
agent_ui: Fix favorite model button not showing for unselected models (#59803)
Release Notes:

- Fixed an issue where adding a model as a favorite was not possible for
all models but the currently selected one (preview only).
2026-06-24 08:52:42 +00:00
Xin Zhao
f5c19126fb
languages: Fix completion item highlighting for Python (#59758)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
# Objective

Consider a simple Python file with the following content, where both a
method and a function are defined:
```python
class TestCase:
    def a_test_method(self):    # a method
        print("This is a method test")

def a_test_function():    # a function
    print("This is a function test")
```

Below this, if we type `a_test_func` and trigger language server
completion, we would expect to see `a_test_function` in the completion
list. Similarly, if we have:
```python
test = TestCase()
test.a_testˇ
```
and trigger language server completion, we should see `a_test_method` in
the completion list.

In both cases, we expect the items in the completion list to have the
same color highlighting as they do in the editor buffer, but currently,
they do not. This is because Zed uses the wrong queries to retrieve the
highlight. Taking the `ty` LSP adapter as an example:

d753a31db5/crates/languages/src/python.rs (L323-L332)
the key `"function.method"` and `"function"` are used to look up the
method and function highlight IDs, but these keys do not exist in
`crates/grammars/src/python/highlights.scm`, which defines the syntax
highlighting. The correct keys here should be `"function.method.call"`
and `"function.call"`.

## Solution

- As stated above, change the keys from `"function.method"` and
`"function"` to `"function.method.call"` and `"function.call"`,
respectively.
- Additionally, since we have several built-in language servers for
Python, a minor refactoring has been done to reduce duplicate code and
simplify future changes.

## Testing

- I have tested this change locally; the before and after comparison is
provided below.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase


<details>
  <summary>Click to view showcase</summary>

| Before | After |
| :---: | :---: |
| <img width="767" height="308" alt="function_before"
src="https://github.com/user-attachments/assets/943852d6-f54e-411d-916f-add7aac57956"
/> | <img width="767" height="308" alt="function_after"
src="https://github.com/user-attachments/assets/3a817229-ce32-4d13-88b8-9e9151869338"
/> |
| <img width="767" height="308" alt="method_before"
src="https://github.com/user-attachments/assets/cbc0f4f4-be6e-44d3-9798-df29df5731a3"
/> | <img width="767" height="308" alt="method_after"
src="https://github.com/user-attachments/assets/6e8f7e84-c5c6-4b37-a2c5-10820f12a09d"
/> |


</details>

---

Release Notes:

- Improved Python completion item highlighting for methods and
functions.
2026-06-24 08:04:40 +00:00
Kunall Banerjee
daf4656c87
settings_ui: Route Skill tool permissions to its own config page (#59728)
The Skill page now renders the correct “Skill Tool” title, the
skill-specific explanation, and reads/writes the `skill` tool’s own
rules.

## Self-Review Checklist:

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

| Before | After |
|--------|--------|
| <img width="956" height="816" alt="image"
src="https://github.com/user-attachments/assets/e88ef051-aa5c-46de-9843-e3400fd63a7f"
/> | <img width="956" height="816" alt="image"
src="https://github.com/user-attachments/assets/77b8223d-bd97-4ac2-901d-15cf368341ec"
/> |

Closes #59720.

---

Release Notes:

- Fixed the Skill tool’s “Configure” button in the Agent’s Tool
Permissions settings opening the Terminal tool’s configuration instead
of the Skill tool’s own permission rules
2026-06-24 05:43:59 +00:00
Richard Feldman
5d06fffd98
Harden Git sandbox metadata grants (#59785)
Agent terminal commands that request Git metadata access now verify
linked-worktree and submodule metadata before moving Git paths from
protected to writable sandbox paths. This prevents a mutated `.git`
gitfile from redirecting a grant to unrelated repository metadata while
preserving standard submodule layouts.

Release Notes:

- Improved agent terminal sandboxing for Git metadata access.

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-24 04:16:25 +00:00
Cameron Mcloughlin
c49a29f461
sandbox: Linux domain filtering and some more cleanup (#59790)
---

Release Notes:

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: MartinYe1234 <martin@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-06-24 01:42:52 +00:00
Richard Feldman
df6c440fe8
Add agent sandboxing docs (#59774)
Some checks are pending
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
WIP - do not merge yet!

Release Notes:

- N/A

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-23 23:54:28 +00:00
James St-Pierre
f844c93c94
open_router: Add prompt caching for Anthropic models (#57498)
Closes https://github.com/zed-industries/zed/issues/52576

## Overview

Adds prompt caching support for Anthropic Claude models when accessed
via OpenRouter.

This mirrors Zed's native Anthropic provider by using explicit per-block
`cache_control` breakpoints:

- A long-lived 1-hour breakpoint on the system message's last text
block, covering the tools and system prefix.
- A default 5-minute breakpoint on the last `cache: true` conversation
message.

The implementation intentionally avoids OpenRouter's top-level automatic
`cache_control` field so routing remains available across
Anthropic-compatible providers including Anthropic, Bedrock, and Vertex
AI. It also adds `session_id` sticky routing from the request thread ID
and maps OpenRouter cache usage fields into Zed's token usage
accounting.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed Anthropic prompt caching when using OpenRouter.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
2026-06-23 23:01:58 +00:00
Sergei Razmetov
7187d65774
language_models: Set support_thinking in Responses API for OpenAI-compatible provider (#59213)
# Objective

Fix OpenAI-compatible reasoning/thinking support. Previously,
`OpenAiCompatibleLanguageModel` never reported thinking support, so
configured `reasoning_effort` values did not reliably reach the wire and
Responses API reasoning state could miss `include:
["reasoning.encrypted_content"]`.

Fixes #58289
Addresses #59207 for OpenAI-compatible Responses models configured with
`reasoning_effort`.

## Solution

- Treat a non-`none` configured `reasoning_effort` as OpenAI-compatible
thinking support.
- Expose common OpenAI-style effort levels in the agent UI, using the
configured effort as the default.
- Honor selected reasoning effort for OpenAI-compatible chat-completions
requests.
- Send `reasoning_effort: "none"` when thinking is disabled for a
configured reasoning model.
- Preserve native OpenAI behavior by continuing to use native
model-specific supported efforts and `max_completion_tokens`.
- Add an OpenAI-compatible `max_tokens_parameter` capability for
endpoints that expect output limits as `max_tokens`.
- Parse common streamed thinking fields (`reasoning` and
`reasoning_content`).
- Add provider setup UI and docs for configuring OpenAI-compatible
reasoning models.

## Testing

- `cargo fmt -p language_model_core -p agent_ui -p language_models`
- `cargo test -p language_models provider::open_ai_compatible::tests
--lib`
- `cargo test -p language_models provider::open_ai::tests --lib`
- `cargo test -p open_ai completion::tests --lib`
- `cargo test -p agent_ui
agent_configuration::add_llm_provider_modal::tests --lib`
- `git --no-pager diff --check`

## 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 OpenAI-compatible provider setup for reasoning models.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
2026-06-23 21:47:54 +00:00
MartinYe1234
a2fee92e30
agent: Fix terminal_init commands race condition with PTY startup (#59613)
Summary:
- Add a shell-level startup handshake owned by the terminal.
- Send a split startup marker through the shell and run the configured
init command after the marker is observed, preventing local echo from
satisfying the handshake.
- Keep display-only/restored terminal behavior unchanged while
preserving startup output when shells fail or users type first.

Tests:
- `cargo test -p terminal test_init_command_startup_marker --
--nocapture`
- `cargo test -p terminal write_init_command_after_startup --
--nocapture`
- `cargo test -p agent_ui init_command -- --nocapture`
- `./script/clippy -p terminal -p agent_ui`

Closes AI-426

Release Notes:

- Fixed terminal init commands sometimes appearing or running
incorrectly when using custom shells

---------

Co-authored-by: Anant Goel <anant@zed.dev>
2026-06-23 18:44:42 +00:00
ozacod
42a2eff274
text_finder: Send selected word to text finder query (#59766)
## Objective

Make text finder match project search and buffer search by
pre-populating its query from the active editor according to
`seed_search_query_from_cursor`.

## Solution

- Seed text finder from the active editor's query suggestion when
opening it.
- Pass the seeded query into the picker and select the query text so
typing replaces it immediately.

## Testing

- Manually tested visually by opening text finder from an editor with a
selection and with the cursor on text, confirming the query is
pre-populated and selected.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:
- Improved text finder to seed its query from the active editor.

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-23 15:31:18 +00:00
Richard Feldman
eea5f57dc5
Allow sandboxed Git writes from worktrees (#57981)
Agent terminal sandboxing now protects `.git` metadata by default and
exposes an explicit `allow_git_access` approval. Without it, file
contents of the `.git` directories for opened worktrees and discovered
repositories (including a linked worktree's common `.git`) cannot be
read or written, though their metadata stays visible; when approved,
those Git directories become writable so commands like fetch/commit
work. SSH commit signing keeps working because the inherited
`SSH_AUTH_SOCK` is allowed as local Unix-socket IPC, which does not let
sandboxed commands send network packets to other machines. The Seatbelt
profile also allows PTY terminal-control ioctls so signing/passphrase
prompts can manage terminal state.

This intentionally restricts only `.git` itself (whose location we know
exactly, including the worktree case) rather than
`.gitignore`/`.gitattributes`/`.gitmodules`, since those can be nested
arbitrarily and the goal is to keep the policy expressible as a plain
deny-by-default allowlist that will port to Linux and Windows sandboxes
later.

Closes AI-334

Release Notes:

- Improved agent terminal sandboxing for Git metadata, Git worktrees,
and SSH commit signing.
2026-06-23 15:20:21 +00:00
Danilo Leal
0d3badc857
agent_ui: Fix opening the profile configuration modal from picker (#59768)
Release Notes:

- Agent: Fixed a bug where trying to open the profile configuration
modal through the picker in the agent panel's message editor wouldn't
work through the keybinding.
2026-06-23 15:18:56 +00:00
Xiaobo Liu
56816c0333
project_panel: Reduce cloning when rendering entries (#56993)
Share marked selections across rendered project panel entries and defer
drag-related path cloning until drag and drop rendering is enabled. Also
defer symlink path string conversion until tooltip creation.

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-23 15:11:27 +00:00
Finn Evers
1e7f1a11f9
ci: Fix bwrap jobs on run_bundling (#59765)
This fixes an issue where the bwrap bundle jobs were not guarded
properly and thus showed up as `cancelled` in the job list for PRs from
external contributors, causing the CI to show as failed on a PR (e.g.
https://github.com/zed-industries/zed/actions/runs/28028544741/job/82963972185?pr=59758)

Release Notes:

- N/A
2026-06-23 14:44:02 +00:00
Danilo Leal
41f9a2e434
icons: Add some periodic clean up (#59757)
Remove some unused icons and refine design (stroke width, sizing,
curves, etc.) for existing ones.

Release Notes:

- N/A
2026-06-23 14:40:13 +00:00
Jorge Gomez
bab93f3191
helix: Add debugger keybindings (#57756)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added initial coverage set of Helix debugger keybindings.
2026-06-23 13:50:36 +00:00
Sathwik Chirivelli
d753a31db5
git_ui: Keep view options menu state fresh (#59744)
# Objective

- Keep the Git panel view options menu open when changing view, sort, or
group options.
- Make the open menu reflect the selected option immediately, including
showing the Sort By section as soon as List view is selected.

## Solution

- Use a persistent context menu for the Git panel view options menu so
selecting an item rebuilds the menu instead of dismissing it.
- Track the open menu's view options state locally with
`GitPanelViewOptionsMenuState` so checkmarks and conditional sections
update before the settings file change is observed.
- Continue dispatching the existing Git panel actions so persisted
settings and panel updates keep using the current code path.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

- N/A

---

Release Notes:

- Fixed Git Panel view options menu selections updating only after
reopening the menu.
2026-06-23 12:15:46 +00:00
Dynamicer
d3756f3025
vim: Remove duplicate ShellCommand action registration (#56937)
While exploring the `vim` crate, I found that `ShellCommand` is
registered twice with identical closure bodies in
`crates/vim/src/command.rs`
[L331-L357](https://github.com/zed-industries/zed/blob/main/crates/vim/src/command.rs#L331-L357)
. This PR removes the redundant code block to clean up.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-23 11:39:52 +00:00
Kunall Banerjee
438070b1cf
languages: Fix Debug Test for Go subtests (#53680)
The `go-subtest` task template wrapped the `-run` arg in single quotes
for shell safety. This works for Run Test (terminal strips quotes), but
Debug Test sends the arg through Delve’s DAP protocol with no shell
involved, so the literal quote characters ended up in the regex and
prevented any match.

All other Go task templates (`go-test`, `go-testify-suite`,
`go-table-test-case`) use the backslash-escaped format which `GoLocator`
already knows how to handle. Align the `go-subtest` template to the same
format.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #53230.

Release Notes:

- Fixed Debug Test for Go subtests

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-23 11:10:05 +00:00
Lukas Wirth
ad6ce93202
webrtc: Bump webrtc to fix a panic (#59750)
Pulls in https://github.com/zed-industries/livekit-rust-sdks/pull/13 to
fix a cause of panics with webrtc

Fixes ZED-5J7

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-23 11:10:04 +00:00
Danilo Leal
f88bc7e18a
picker: Simplify presentation and sizing APIs, add preview-aware defaults (#59719)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
The recent "pickers with previews" overhaul left the picker
sizing/presentation API spread across several overlapping knobs that
every call site had to set correctly — and many didn't, causing pickers
across the app to render at the wrong width, lose their container, or
stop dismissing. This PR consolidates that surface into a small,
hard-to-misuse API and makes correct sizing the default.

Net effect: a plain `Picker::uniform_list(delegate, …)` now renders
correctly out of the box (standard width, standard max-height, shrinks
to fit, dismisses properly), and the ~35 call sites only specify what
genuinely differs.

## API changes

**Presentation** — three overlapping booleans (`is_modal`, `is_popover`,
`is_resizable`) collapsed into one enum, with resizability living inside
the only variant where it's meaningful:

```rust
enum Presentation {
    Modal { resizable: bool }, // own chrome, dismisses on blur, optionally resizable
    Popover,                   // own chrome, dismisses on blur, never resizable
    Embedded,                  // host container owns chrome + dismissal
}
```

- `modal(bool)` is **removed** in favor of explicit, self-documenting
builders:
  - *(default)* → `Modal` (resizable iff it has a preview)
  - `.popover()` → `Popover` (menu-attached surfaces)
  - `.embedded()` → `Embedded` (pickers nested in a larger modal/view)
- Dynamic callers use `.when(cond, Picker::embedded)` (added `impl
FluentBuilder for Picker`).

**Sizing** — preview-vs-not now drives everything; the manual padding
knob is gone:

| Before | After |
|---|---|
| `vertical_padding` field + `no_vertical_padding()` | removed — derived
from whether a preview is visible |
| `height(...)` (ambiguous: fixed vs max) | `max_height(...)` (plain
pickers shrink-to-fit, capped here) |
| `minimum_results_width(...)` | removed — a plain picker's min width
tracks its opening width; preview pickers use standard internal pane
mins |
| default size = 60% viewport | default = `DEFAULT_MODAL_WIDTH` (34rem)
× `DEFAULT_MODAL_MAX_HEIGHT` (24rem, max) |
| resize handles gated on `is_modal` | gated on `is_resizable` (new
`resizable(bool)` builder; auto-`true` for preview pickers) |

Call sites now only override the exceptions: narrow popover selectors
(`initial_width`), the taller outline view (`max_height`), and preview
pickers (constructed via `*_with_preview`).

## Behavior fixes

- **Wrong widths everywhere**: pickers were falling back to
60%-of-viewport because the original migration set
`minimum_results_width` but never `initial_width`. Fixed at the source
via the new defaults.
- **Popovers had no container and wouldn't dismiss**: `is_modal=false`
was suppressing both the elevated background *and* blur-dismiss. Split
out so popovers keep their chrome and dismiss on click-away/escape. This
fixed the agent-panel model/profile selectors, sidebar recent projects,
and the settings theme/font/icon/ollama pickers (which were incorrectly
using `modal(false)`).
- **Sidebar recent projects stretched to full height**: was missing the
shrink-to-fit behavior; now capped and content-sized like other
popovers.
- **Preview crash**: removed an over-strict `debug_assert!` that
panicked when previewing an empty file (`message == None && editor
empty` is valid).
- **Preview-aware default size**: pickers open at standard width with
the preview hidden, and expand to the larger "telescope" size when a
preview is shown. Fixes the text finder rendering super-wide by default,
and makes the file finder expand (rather than cram its results) when you
toggle the preview.

---

Release Notes:

- N/A
2026-06-23 09:33:47 +00:00
Manoj Mishra
4eb039b451
ollama: Don't abort entire model fetch if one model's details fail to load (#59606)
## Summary

Fixes #37815.

`State::fetch_models()` calls `/api/tags` to list models, then calls
`/api/show` for **every** model in that list to get its capabilities,
collecting the results with `collect::<Result<Vec<_>>>()?`. If
`/api/show` errors for even one model, the whole batch fails and
`fetched_models` is never populated. Since `is_authenticated()` is
defined as `!self.fetched_models.is_empty()`, this means a single bad
model permanently breaks both authentication state and the model picker
for the entire Ollama provider - with no error surfaced anywhere (not
the UI, not the logs), which matches the reports in #37815 of "Connect
does nothing" / "no logs, no nothing".

I hit this myself: I had a stale local reference to an Ollama Cloud
model that had been retired server-side. `/api/show` for that one model
returned `410 Gone`, which silently broke Connect and the model picker
for every other model too. Removing the retired model with `ollama rm`
fixed it immediately, which confirmed the root cause.

## Fix

Instead of aborting the whole fetch on the first error, skip individual
models that fail `/api/show` and log a warning, keeping the rest.
Extracted this into a small `skip_failed_models` helper so it's
unit-testable without mocking HTTP.

## Disclosure

I used Claude (Anthropic's Claude Code) to help track down this root
cause (tracing through `fetch_models`/`is_authenticated` in this file)
and draft the fix + tests below. I reviewed and understand the change -
it's a small, targeted fix to a single function plus two unit tests for
the new helper.

## Test plan

- [x] `cargo check -p language_models` passes
- [x] `cargo test -p language_models --lib ollama::` - all 3 tests pass
(the 2 new ones plus the existing
`test_merge_settings_preserves_display_names_for_similar_models`,
unaffected by this change)
- [x] `cargo fmt -p language_models -- --check` - no diff

## Release Notes

Release Notes:

- Fixed Ollama models silently failing to show up in the model picker
(and "Connect" appearing to do nothing) when a single model's details
couldn't be fetched, e.g. a retired Ollama Cloud model

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-06-23 09:21:31 +00:00
Piotr Osiewicz
cf76418cf4
collab: Revert livekit changes (#59733)
- **Revert "livekit: Preserve tokens on channel rejoin (#59388)"**
- **Revert "call: Log LiveKit connection info refresh outcomes in retry
loop (#59205)"**
- **Revert "audio: Fix phantom presence in channels (#59195)"**
- **proto: Reserve RejoinRoomResponse field 4 after revert**

We've observed a spike of phantom collaborator issues after this fixes.
This sucks and I'm quite unhappy about it.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

## 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

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

<details>
  <summary>Click to view showcase</summary>

My super cool demos here

</details>

---

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 09:13:28 +00:00
Finn Evers
153f709a18
docs: Improve documentation around MCP servers (#59380)
Release Notes:

- N/A
2026-06-23 08:03:24 +00:00
Finn Evers
61ce210ec2
Make adding a remote MCP server more discoverable (#59359)
# Objective

The reasoning for this is that it is currently rather hard to find the
option to add a remote MCP in the app - there is no hint that this is
supported and (without using the command palette) requires up to 5
clicks before the proper modal is shown.

The idea for this here is to make adding a remote server the default and
also make it more visibile throughout the app - the `AddContextServer`
action will now default to remote and this also adds two context menu
entries to directly open the modal with the remote option preselected.

Open for feedback - I admit this might not be the most optiomal
solution, but at least it surfaces the availablilty better and
(hopefully) makes adding these easier.

Release Notes:

- Added an entry to the agent panel options menu to quickly add a remote
MCP server
2026-06-23 08:01:19 +00:00
Lukas Wirth
479bce0995
Implement telemetry for the remote server (#59692)
# Objective

Telemetry events generated **on a remote server** were silently dropped,
and all remote telemetry that *was* reported got attributed to the local
client's OS.

## Solution

This PR makes server-originated events flow to the telemetry pipeline
and attributes them to the actual remote host (connection type, OS,
version, architecture), plus adds a transport-agnostic connection event.

## Additional Notes

This removes the "SSH Project Opened" event and replaces it with a
"Remote Connection Established" one that has more structured info and is
also more useful in where it gets invoked.

The server unconditionally sends back telemetry to the client, the
client is then responsible for filtering on whether telemetry is enabled
by the user or not as the server does not have knowledge of those
settings itself.

Release Notes:

- N/A
2026-06-23 05:53:33 +00:00
Sam Trouy
14f9b9d077
agent_ui: Fix padding for editor (#59735)
Some checks are pending
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
# Objective

Fixes #59498 

Original issue mentioned problem with the alignment of text entered into
the agent editor compared with the thread title when in full expanded
mode. I was able to reproduce issue both in expanded mode and also when
resizing while not in expanded mode by dragging panel wide enough. After
more investigation, it seemed that all of the contents within the editor
(text entered, bottom row of elements) were not properly aligned on both
the left and right sides with other content in the agent panel.

## Solution

Moved horizontal padding to inner div that uses `max_content_width` in
`render_message_editor` so that it is calculated as expected as part of
the max width of the content.

- Dropped horizontal padding, keep vertical padding on outer `h_flex`
div. Changed `.p_2()` to `.py_2()` here .
- Added horizontal padding back to first child `v_flex` div that uses
`max_content_width`. Added `.px_2()` here.

After changes, elements within the editor are aligned on both the left
and right sides with the messages within the message history and the
contents of the title bar.

## Testing

I tested the fix on Linux visually, no tests were added due to the small
amount of changes and the strictly visual nature of the issue.

<details>
   <summary>Self-Review Checklist</summary>

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (**no unsafe
blocks added**)
- [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 (**no tests added**)
- [x] Performance impact has been considered and is acceptable

</details>

## Showcase

<details>
  <summary>Before/After empty convo</summary>

### Before

<img width="946" height="551" alt="before-maximized"
src="https://github.com/user-attachments/assets/27805f8c-9a04-40b3-a808-5dc3a548a0b8"
/>

### After

<img width="948" height="554" alt="after-maximized"
src="https://github.com/user-attachments/assets/4f557aa8-d8ce-44c4-8278-35df203ca434"
/>

</details>

<details>
  <summary>Before/After existing convo</summary>

### Before

<img width="950" height="555" alt="before-with-convo"
src="https://github.com/user-attachments/assets/82ea6b04-bca7-48fd-ab11-3414855afec8"
/>

### After

<img width="950" height="555" alt="after-with-convo"
src="https://github.com/user-attachments/assets/2f2f394a-6d78-4650-9ddf-e760841a2635"
/>

</details>


## Note

- A similar issue also seems to apply to the activity bar within
`render_activity_bar`, but it's less jarring, and this is also my first
PR, so I'm leaving it alone.

---

Release Notes:

- N/A
2026-06-22 23:59:22 +00:00
Ben Kunkle
131ff63ce5
edit_prediction: Remove diagnostic-triggered jumps (#59724)
# Objective

- Simplify edit prediction jumps enough to re-enable the staff flag.
- Defer diagnostic-triggered jump refreshes until we know we need them.

## Solution

- Remove the diagnostic refresh trigger path and its supporting state.
- Keep jumps driven by ordinary prediction requests only.

## Testing

- Not run.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A
2026-06-22 21:22:15 +00:00
MartinYe1234
037f32aef0
Refine agent terminal sandbox off-switch and expand WSL env blocklist (#59520)
Follow-ups to the recently-landed agent terminal sandboxing work.

- Make the persistent "Allow Unsandboxed Terminal Commands" setting
(`allow_unsandboxed`) the single off-switch for the agent terminal
sandbox: when enabled, the sandboxed terminal tool isn't exposed and the
system prompt omits the sandbox section, so the model uses the plain
`terminal` tool (and on Windows, WSL sandbox setup is skipped). This
removes the dead, unwired `disabled` setting that was meant to do the
same thing but had no UI, writer, or docs. Per-command and per-thread
`unsandboxed: true` grants are unchanged.
- Expand the blocklist of Windows-specific environment variables that
aren't forwarded into the WSL sandbox (system locations, `HOME`/profile
paths, host/session identity, CPU descriptors, etc.) so they can't
shadow or break Linux commands. It stays a blocklist, so portable
variables like `LANG` still reach the command.

Release Notes:

- N/A
2026-06-22 21:14:30 +00:00
Danilo Leal
d8228b4280
Restore keyboard navigation for Remote Projects modal (#59336)
Recently realized that the Remote Projects default view isn't keyboard
navigable anymore: arrow keys up and down to navigate through the list
don't work. So, this PR makes that state of the view use a picker, which
gives us a bunch of these search + nav stuff for free. Ended up also
doing some light changes to the UI so it's more consistent with any
other picker in the app thus far. All other views of the multi-flow
modal are untouched.

Release Notes:

- Fixed a bug where the Remote Projects modal wasn't keyboard navigable
anymore.
2026-06-22 21:11:40 +00:00
guopenghui
f6bfa0915f
Add named bookmark support (#57491)
Adds support for named bookmarks while preserving the existing unnamed
bookmark workflow.

Main changes:
- Keeps `ToggleBookmark` as the quick unnamed bookmark action.
- Adds `ToggleNamedBookmark`, which prompts for a bookmark name when
adding a new bookmark and removes an existing bookmark on the same line,
including unnamed ones.
- Adds `EditBookmark` support for renaming existing bookmarks.
- Persists bookmark names in workspace storage.
- Adds a project bookmarks picker that supports filtering by bookmark
name and relative path, with highlighted matches.
- Updates bookmark storage and tests to carry bookmark names through
serialization, restoration, navigation, and project-level listing.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Video
toggle:


https://github.com/user-attachments/assets/a725b9cf-ac37-4ebc-85cc-ee820452c043

rename:


https://github.com/user-attachments/assets/a6d0d0c1-511b-4fb7-ae5d-22c55d1a075f


Release Notes:

- Add named bookmark support

---------

Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-22 20:47:44 +00:00
Jiby Jose
471fb15d7a
Fix compaction happening too early for chatgpt_subscribed (#59686)
# Objective
 
Fixes auto-compaction for ChatGPT Subscription / Codex-backed GPT models
by treating the Codex `context_window` as the usable context budget
instead of reserving an inferred `128k` output budget.
 
- Fixes #59555 

## Solution

Zed previously reported `max_output_tokens = 128_000` for
`openai_subscribed` models. Generic agent code subtracts
`max_output_tokens` from `max_token_count` when computing the effective
input budget, so `openai_subscribed` models ended up with:

- `max_token_count = 272_000`
- `max_output_tokens = 128_000`
- effective compaction budget = `144_000`
- default `90%` threshold = `129_600`

## Testing

Tested with a heavy prompt to confirm that the auto compaction is indeed
now triggered at 90% (default)

<img width="385" height="183" alt="image"
src="https://github.com/user-attachments/assets/da569152-f687-4366-868a-a6559b948ce5"
/>

This made Zed compact around the halfway point of the actual Codex
context window.

Codex model metadata exposes `context_window = 272000` and does not
expose a `max_output_tokens` cap. Codex also compacts against the
context window directly, rather than subtracting an output reservation.
The subscribed backend also rejects the `max_output_tokens` request
parameter, so Zed already omits it when serializing requests.

This change makes `openai_subscribed` report no known max output token
cap, which matches also that split token display is disabled for these
models.


## 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:

- agent: Fix compaction happening too early when using the ChatGPT
subscription provider.
2026-06-22 19:34:16 +00:00
Conrad Irwin
39bba3c7ec
install_cli: Show notification instead of failing CLI install (#59575)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Closes #10065
Closes #42293

Release Notes:

- Improved error handling and documentation when Zed cannot install the
CLI on macOS
2026-06-22 18:20:57 +00:00
Kunall Banerjee
8f438e6612
opencode: Model updates (#59236)
Fresh new updates from OpenCode dropped recently.

Closes #59225.

## Self-Review Checklist:

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

Release Notes:

- Added GLM 5.2 + Kimi K2.7 Code (OpenCode Go) and DeepSeek V4 Pro
(OpenCode Zen); removed/restricted models deprecated upstream (MiniMax
M3 Free removed; GLM 5, Kimi K2.5, MiniMax M2.5 now Zen-only)
2026-06-22 18:12:49 +00:00
Darshan Sithan
91ff38aee2
editor: Fix Python docstring formatting in hover popovers (#59480)
# Objective

Fixes #59426

Python (and possible others like JS/TS ) docstrings in hover popovers
currently have broken indentation and alignment. This happens because
markdown soft breaks (single newlines) are parsed and replaced with
spaces by default. This collapses multi-line Python docstrings into
single wraps, ruining code example layouts and line-wrapped formatting.

## Solution

Configure the `MarkdownStyle` returned by `hover_markdown_style` in
`crates/editor/src/hover_popover.rs` to treat soft breaks as hard breaks
(`soft_break_as_hard_break: true`). This ensures single newlines in
docstrings are preserved and rendered correctly in the hover popover.

## Testing

- Verified hover popovers locally on Python methods/classes to confirm
that multi-line docstring indentation and alignment are preserved.

## 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 Python and Markdown docstring formatting/alignment in hover
popovers.

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-22 17:35:10 +00:00
Aleksei Gusev
7e4caf003c
Add paragraph-based navigation to terminal's vi mode (#56038)
Alacritty has default keyboard shortcuts to navigate between paragraphs
in vi mode:

- shift-{: `ParagraphUp`
- shift-}: `ParagraphDown`

This change unlocks them to use in Zed's terminal. The keybindings can
be easily overridden via keymap.yml like that:

```yaml
{
    "context": "Terminal && vi_mode",
    "bindings": {
        "ctrl-up": ["terminal::SendKeystroke", "shift-{"],
        "ctrl-down": ["terminal::SendKeystroke", "shift-}"],
    }
}
```

Release Notes:

- Added support for navigating up or down paragraphs in the terminal,
when vim vi mode is enabled, with `shift-{` and `shift-}`, respectively.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-22 16:47:34 +00:00
Ben Kunkle
1b7318bf8b
ep: Combine settled and example capture (#58759)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-22 16:45:50 +00:00
Cameron Mcloughlin
f791aa57d7
gpui: Bump resvg/usvg and regression test for panic (#59704)
Bumps resvg and usvg to fix a panic when rendering some complex mermaid
diagrams.

Closes FR-90

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-22 15:42:12 +00:00
Emilio
50b4a1c17e
vim: Fix out of scope insert line above (#55459)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #52588 

Release Notes:

- Fixed insert line above out of an scope

Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-22 14:57:35 +00:00