Skip to content

Conversation

@AhegaoBurger
Copy link
Contributor

@AhegaoBurger AhegaoBurger commented Sep 27, 2025

What this solves

This PR adds support for HTTP and SSE (Server-Sent Events) transports to Zed's context server implementation, enabling communication with remote MCP servers. Currently, Zed only supports local MCP servers via stdio transport. This limitation prevents users from:

  • Connecting to cloud-hosted MCP servers
  • Using MCP servers running in containers or on remote machines
  • Leveraging MCP servers that are designed to work over HTTP/SSE

Why it's important

The MCP (Model Context Protocol) specification includes HTTP/SSE as standard transport options, and many MCP server implementations are being built with these transports in mind. Without this support, Zed users are limited to a subset of the MCP ecosystem. This is particularly important for:

  • Enterprise users who need to connect to centralized MCP services
  • Developers working with MCP servers that require network isolation
  • Users wanting to leverage cloud-based context providers (e.g., knowledge bases, API integrations)

Implementation approach

The implementation follows Zed's existing architectural patterns:

  • Transports: Added HttpTransport and SseTransport to the context_server crate, built on top of the existing http_client crate
  • Async handling: Uses gpui::spawn for network operations instead of introducing a new Tokio runtime
  • Settings: Extended ContextServerSettings enum with a Remote variant to support URL-based configuration
  • UI: Updated the agent configuration UI with an "Add Remote Server" option and dedicated modal for remote server management

Changes included

  • HTTP transport implementation with request/response handling
  • SSE transport for server-sent events streaming
  • build_transport function to construct appropriate transport based on URL scheme
  • Settings system updates to support remote server configuration
  • UI updates for adding/editing remote servers
  • Unit tests using FakeHttpClient for both transports
  • Integration tests (WIP)
  • Documentation updates (WIP)

Testing

  • Unit tests for both HttpTransport and SseTransport using mocked HTTP client
  • Manual testing with example MCP servers over HTTP/SSE
  • Settings validation and UI interaction testing

Screenshots/Recordings

[TODO: Add screenshots of the new "Add Remote Server" UI and configuration modal]

Example configuration

Users can now configure remote MCP servers in their settings.json:

{
  "context_servers": {
    "my-remote-server": {
      "enabled": true,
      "url": "http://localhost:3000/mcp"
    }
  }
}

AI assistance disclosure

I used AI to help with:

  • Understanding the MCP protocol specification and how HTTP/SSE transports should work
  • Reviewing Zed's existing patterns for async operations and suggesting consistent approaches
  • Generating boilerplate for test cases
  • Debugging SSE streaming issues

All code has been manually reviewed, tested, and adapted to fit Zed's architecture. The core logic, architectural decisions, and integration with Zed's systems were done with human understanding of the codebase. AI was primarily used as a reference tool and for getting unstuck on specific technical issues.

Release notes:

  • You can now configure MCP Servers that connect over HTTP in your settings file. These are not yet available in the extensions API.
    {
      "context_servers": {
        "my-remote-server": {
          "enabled": true,
          "url": "http://localhost:3000/mcp"
        }
      }
    }
    
This commit adds HTTP and SSE transport implementations to the `context_server` crate, allowing it to communicate with remote context providers over these protocols.

The new transports are:
- `HttpTransport`: A simple request/response transport over HTTP.
- `SseTransport`: A transport for receiving Server-Sent Events (SSE).

Both transports are built on top of the existing `http_client` crate and use `gpui::spawn` to perform network operations on a background thread, as is the pattern in the rest of the Zed application. This avoids introducing a new Tokio runtime and adheres to the project's architecture.

A `build_transport` function has been added to construct the appropriate transport based on the URL scheme.

Unit tests using `FakeHttpClient` have been added for both transports to ensure their correctness.
This commit introduces HTTP and SSE transport implementations for the
`context_server` crate, allowing Zed to communicate with remote context
providers.

The new transports are built on the existing `http_client` and `gpui`
executor, adhering to the project's architectural patterns.

To support configuration of these new transports, the settings system
has been updated:

- A `Remote` variant has been added to the `ContextServerSettings`
  enum, allowing users to configure remote servers in `settings.json`
  with a URL.
- The project logic has been updated to initialize remote context
  servers using the new `ContextServer::from_url` constructor.
- The agent configuration UI now includes an "Add Remote Server"
  option and a dedicated modal for adding and editing remote server
  configurations.

Unit tests have been added for the new transports and for the logic
that handles remote server configurations.
…tual button is off a bit, ill fix tat later.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 27, 2025
@AhegaoBurger AhegaoBurger changed the title Add HTTP and SSE transport support for MCP servers Sep 27, 2025
@AhegaoBurger
Copy link
Contributor Author

Yo @ConradIrwin, I took your advice and took a more targeted pass at adding HTTP-based servers to the existing code. Current version isn't very good, I actually booked a par-coding slot with you through your Calendly to ask for advice and clarification on certain things.

@maxdeviant maxdeviant changed the title AI: Add HTTP and SSE transport support for MCP servers Sep 27, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Sep 27, 2025
@oWretch
Copy link

oWretch commented Sep 29, 2025

A quick comment on the proposed configuration. Can we match the common MCP configuration (such as used by VS Code) rather than something slightly different? That way we would get:

{
  "context_servers": {
    "my-remote-server": {
      "source": "http",
      "enabled": true,
      "url": "http://localhost:3000/mcp"
    },
    "sse-server": {
      "source": "sse", 
      "enabled": true,
      "url": "https://api.example.com/context"
    }
  }
}

Also, since SSE is a deprecated technology for MCP, is there much value in spending the time to include it at this stage?

@AhegaoBurger
Copy link
Contributor Author

Hey @oWretch, totally agree about the SSE thing, my current implementation doesn't really support sse (cause I didn't bother to finish it) and since MCP is deprecating it that makes even more sense.

Regarding the format, I'm also all for standardisation, the Cursor mcp.json is very well done and I think the other IDE's follow more or less the similar structure, the only thing from that I need to add would be headers (for putting stuff like API key and OAUTH tokens and such) and it should be done

@ConradIrwin
Copy link
Member

@AhegaoBurger and I paired a bit on this!

  • It's working, which is cool.
  • We're going to:
  • Simplify the settings UI to use JSON like for the custom ones
  • Add support for headers
  • Remove SSE placeholder
@AhegaoBurger
Copy link
Contributor Author

So the stuff from the Todo from @ConradIrwin is done. However, I did learn one thing and that is the fact that I didn't think about adding OAuth support.
Like for example the Notion mcp server, the way you add it is:

  1. Go to Notion webpage
  2. Go to connections settings and choose which editor to connect to (right now they have ChatGPT, Cursor and Claude)
  3. Then a webpage opens that asks your permission to open the editor you selected
  4. You add the url to the editor (it basically copy pastes it for you)
  5. Last thing is that the editor then sees that the server needs to complete OAuth and that would require adding the whole auth flow

OAuth Authorization Flow:

  • Open browser for user to authorize
  • Handle redirect with authorization code
  • Exchange code for access/refresh tokens
  • Store and refresh tokens automatically

So we could merge as is and then I or someone else can add the OAuth flow or I could start working on it now, just curious to hear opinions of Zedders and people who are interested

@ConradIrwin
Copy link
Member

Let's merge without OAuth, and add that in as a second step; likely we'll need some changes to https://zed.dev which isn't yet open source

@AhegaoBurger
Copy link
Contributor Author

Cool, so in that case is there anything needed from my side? I see there is a conflict with the context_server_store file, should I fix or what is the protocol for merge conflicts?

@ConradIrwin
Copy link
Member

That would be fabulous if you can

@ConradIrwin
Copy link
Member

@AhegaoBurger I've merged this with the latest main and done some cleanup throughout.

Let me know if there's anything else you wanted to do here, otherwise I'll merge.

@AhegaoBurger
Copy link
Contributor Author

Hey @ConradIrwin, on my side I'm good. Once it's merged I'll start a new PR for OAuth support for remote servers

@ConradIrwin ConradIrwin enabled auto-merge (squash) November 18, 2025 16:25
@ConradIrwin
Copy link
Member

Amazing, thanks! Sorry again for the slow turnaround on this.

@AhegaoBurger
Copy link
Contributor Author

No worries, I know you guys are busy and this isn't high on your priority list

@ConradIrwin ConradIrwin merged commit 0313292 into zed-industries:main Nov 18, 2025
22 checks passed
@zcharloppowers-lila
Copy link

Awesome!

@clicktodev
Copy link
Contributor

Does this first try the HTTP Stream transport and falls back to SSE if HTTP is not supported?

@AhegaoBurger
Copy link
Contributor Author

Does this first try the HTTP Stream transport and falls back to SSE if HTTP is not supported?

SSE transport is deprecated in the MCP spec so I removed it from this PR as well along the way to just work through http

@clicktodev
Copy link
Contributor

I understand it's deprecated but atlassian for example (I imagine other companies as well) still uses SSE with no plans to move to http streaming anytime soon.
I'd appreciate it if SSE support was added as a fallback similar the vscode's behavior.
Maybe i'll have a go at it myself if it's not a priority for you right now.

@AhegaoBurger
Copy link
Contributor Author

I understand it's deprecated but atlassian for example (I imagine other companies as well) still uses SSE with no plans to move to http streaming anytime soon.

I'd appreciate it if SSE support was added as a fallback similar the vscode's behavior.

Maybe i'll have a go at it myself if it's not a priority for you right now.

Yeah, right now I'm working on adding OAuth2 to the mcp functionality so feel free to add SSE if you feel you need it. The MCP servers I use all work through http so I added http first but I also know a bunch of them were built using sse like you said. Originally when I started working on this PR I had placeholders for SSE in the earlier commits so feel free to look over those (not actual implementation but just how it was supposed to be organized) if that helps

bennetbo added a commit that referenced this pull request Nov 25, 2025
Follow up to #39021.

<img width="576" height="141" alt="image"
src="https://github.com/user-attachments/assets/c89885a4-e664-4614-9bb0-86442dff34ee"
/>

- Add migration to remove `source` tag because `ContextServerSettings`
is now untagged
- Fix typos in context server modal
- PR seems to have removed the `test_action_namespaces` test, which I
brought back in this PR

Release Notes:

- Fixed an issue where the `source` property of MCP settings would show
up as unrecognised
bennetbo added a commit that referenced this pull request Nov 25, 2025
Follow up to #39021.

<img width="576" height="141" alt="image"
src="https://github.com/user-attachments/assets/c89885a4-e664-4614-9bb0-86442dff34ee"
/>

- Add migration to remove `source` tag because `ContextServerSettings`
is now untagged
- Fix typos in context server modal
- PR seems to have removed the `test_action_namespaces` test, which I
brought back in this PR

Release Notes:

- Fixed an issue where the `source` property of MCP settings would show
up as unrecognised
wzulfikar added a commit to wzulfikar/zed that referenced this pull request Nov 27, 2025
* http_client: Support `GITHUB_TOKEN` env to auth GitHub requests (zed-industries#42623)

Closes zed-industries#33903

Release Notes:

- Ensured Zed reuses `GITHUB_TOKEN` env variable when querying GitHub

---

Before fixing:

-  The `crates-lsp` extension request captured:
```
curl 'https://api.github.com/repos/MathiasPius/crates-lsp/releases' \
-H 'accept: */*' \
-H 'user-agent: Zed/0.212.3 (macos; aarch64)' \
-H 'host: api.github.com' \
```

-  `crates-lsp` extension error: 
```
Language server crates-lsp:

from extension "Crates LSP" version 0.2.0: status error 403, response: "{\"message\":\"API rate limit exceeded for x.x.x.x. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n"
```

After fixing:

```
export GITHUB_TOKEN=$(gh auth token)
cargo run
```

-  The `crates-lsp` extension request captured:
```
curl 'https://api.github.com/repos/MathiasPius/crates-lsp/releases' \
-H 'authorization: Bearer gho_Nt*****************2KXLw2' \
-H 'accept: */*' \
-H 'user-agent: Zed/0.214.0 (macos; aarch64)' \
-H 'host: api.github.com' \
```

The API rate limitation is resolved.

---

This isn't a perfect solution, but it enables users to avoid the noise.

* util: Fix invalid powershell redirection syntax used in uni shell env capture (zed-industries#43390)

Closes  zed-industries#42869

Release Notes:

- Fixed shell env sourcing not working with powershell on unix systems

* docs: Better wording for `terminal.working_directory` setting (zed-industries#43388)

Initially this was just going to be a minor docs fix, but then I
wondered if we could improve the copy in the editor as well.

Release Notes:

- N/A

* proto: Fix cloned errors losing all context (zed-industries#43393)

Release Notes:

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

* releases: Add build number to Nightly builds (zed-industries#42990)

- **Remove semantic_version crate and use semver instead**
- **Update upload-nightly**


Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

* gpui: Do not panic when `GetMonitorInfoW` fails (zed-industries#43397)

Fixes ZED-29R

Release Notes:

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

* sum_tree: Make SumTree::append run in logarithmic time (zed-industries#43349)

The `SumTree::append` method is slow when appending large trees to small
trees. The reason is this code here:

https://github.com/zed-industries/zed/blob/f57f4cd3607e8298ef5f1b29929df2db0185d826/crates/sum_tree/src/sum_tree.rs#L628-L630

`append` is called recursively until `self` and `other` have the same
height, effectively making this code `O(log^2 n)` in the number of
leaves of `other` tree in the worst case.

There are no algorithmic reasons why appending large trees must be this
much slower.

This PR proves it by providing implementation of `append` that works in
logarithmic time regardless if `self` is smaller or larger than `other`.

The helper method `append_large` has the symmetric logic to
`push_tree_recursive` but moves the (unlikely) case of merging
underflowing node in a separate helper function to reduce stack usage. I
am a bit unsure about some implementation choices made in
`push_tree_recursive` and would like to discuss some of these later, but
at the moment I didn't change anything there and tried to follow the
same logic in `append_large`.

We might also consider adding `push_front`/`prepend` methods to
`SumTree`.

I did not find a good benchmark that covers this case so I added a new
one to rope benchmarks.

<details>
<summary>cargo bench (compared to current main)</summary>

```
     Running benches\rope_benchmark.rs (D:\zed\target\release\deps\rope_benchmark-59c669d2895cd2c4.exe)
Gnuplot not found, using plotters backend
push/4096               time:   [195.67 µs 195.75 µs 195.86 µs]
                        thrpt:  [19.944 MiB/s 19.955 MiB/s 19.964 MiB/s]
                 change:
                        time:   [+0.2162% +0.3040% +0.4057%] (p = 0.00 < 0.05)
                        thrpt:  [-0.4040% -0.3030% -0.2157%]
                        Change within noise threshold.
Found 14 outliers among 100 measurements (14.00%)
  2 (2.00%) low mild
  6 (6.00%) high mild
  6 (6.00%) high severe
Benchmarking push/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.8s, enable flat sampling, or reduce sample count to 50.
push/65536              time:   [1.4431 ms 1.4485 ms 1.4546 ms]
                        thrpt:  [42.966 MiB/s 43.147 MiB/s 43.310 MiB/s]
                 change:
                        time:   [-3.2257% -1.2013% +0.6431%] (p = 0.27 > 0.05)
                        thrpt:  [-0.6390% +1.2159% +3.3332%]
                        No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) low mild
  5 (5.00%) high mild
  5 (5.00%) high severe

append/4096             time:   [15.107 µs 15.128 µs 15.149 µs]
                        thrpt:  [257.86 MiB/s 258.22 MiB/s 258.58 MiB/s]
                 change:
                        time:   [+0.9650% +1.5256% +1.9057%] (p = 0.00 < 0.05)
                        thrpt:  [-1.8701% -1.5026% -0.9557%]
                        Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) low mild
  1 (1.00%) high severe
append/65536            time:   [1.2870 µs 1.4496 µs 1.6484 µs]
                        thrpt:  [37.028 GiB/s 42.106 GiB/s 47.425 GiB/s]
                 change:
                        time:   [-28.699% -16.073% -0.3133%] (p = 0.04 < 0.05)
                        thrpt:  [+0.3142% +19.151% +40.250%]
                        Change within noise threshold.
Found 17 outliers among 100 measurements (17.00%)
  1 (1.00%) high mild
  16 (16.00%) high severe

slice/4096              time:   [30.580 µs 30.611 µs 30.639 µs]
                        thrpt:  [127.49 MiB/s 127.61 MiB/s 127.74 MiB/s]
                 change:
                        time:   [-2.2958% -0.9674% -0.1835%] (p = 0.08 > 0.05)
                        thrpt:  [+0.1838% +0.9769% +2.3498%]
                        No change in performance detected.
slice/65536             time:   [614.86 µs 795.04 µs 1.0293 ms]
                        thrpt:  [60.723 MiB/s 78.613 MiB/s 101.65 MiB/s]
                 change:
                        time:   [-12.714% +7.2092% +30.676%] (p = 0.52 > 0.05)
                        thrpt:  [-23.475% -6.7244% +14.566%]
                        No change in performance detected.
Found 14 outliers among 100 measurements (14.00%)
  14 (14.00%) high severe

bytes_in_range/4096     time:   [3.3298 µs 3.3416 µs 3.3563 µs]
                        thrpt:  [1.1366 GiB/s 1.1416 GiB/s 1.1456 GiB/s]
                 change:
                        time:   [+2.0652% +3.0667% +4.3765%] (p = 0.00 < 0.05)
                        thrpt:  [-4.1930% -2.9754% -2.0234%]
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high severe
bytes_in_range/65536    time:   [80.640 µs 80.825 µs 81.024 µs]
                        thrpt:  [771.38 MiB/s 773.28 MiB/s 775.05 MiB/s]
                 change:
                        time:   [-0.6566% +1.0994% +2.9691%] (p = 0.27 > 0.05)
                        thrpt:  [-2.8835% -1.0875% +0.6609%]
                        No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
  2 (2.00%) high mild
  8 (8.00%) high severe

chars/4096              time:   [763.17 ns 763.68 ns 764.36 ns]
                        thrpt:  [4.9907 GiB/s 4.9952 GiB/s 4.9985 GiB/s]
                 change:
                        time:   [-2.1138% -0.7973% +0.1096%] (p = 0.18 > 0.05)
                        thrpt:  [-0.1095% +0.8037% +2.1595%]
                        No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
  1 (1.00%) low severe
  6 (6.00%) low mild
  3 (3.00%) high severe
chars/65536             time:   [12.479 µs 12.503 µs 12.529 µs]
                        thrpt:  [4.8714 GiB/s 4.8817 GiB/s 4.8910 GiB/s]
                 change:
                        time:   [-2.4451% -1.0638% +0.6633%] (p = 0.16 > 0.05)
                        thrpt:  [-0.6589% +1.0753% +2.5063%]
                        No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
  4 (4.00%) high mild
  7 (7.00%) high severe

clip_point/4096         time:   [63.148 µs 63.182 µs 63.229 µs]
                        thrpt:  [61.779 MiB/s 61.825 MiB/s 61.859 MiB/s]
                 change:
                        time:   [+1.0107% +2.1329% +4.2849%] (p = 0.02 < 0.05)
                        thrpt:  [-4.1088% -2.0883% -1.0006%]
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) high mild
  1 (1.00%) high severe
Benchmarking clip_point/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.8s, enable flat sampling, or reduce sample count to 50.
clip_point/65536        time:   [1.2578 ms 1.2593 ms 1.2608 ms]
                        thrpt:  [49.573 MiB/s 49.631 MiB/s 49.690 MiB/s]
                 change:
                        time:   [+0.4881% +0.8942% +1.3488%] (p = 0.00 < 0.05)
                        thrpt:  [-1.3308% -0.8863% -0.4857%]
                        Change within noise threshold.
Found 15 outliers among 100 measurements (15.00%)
  1 (1.00%) high mild
  14 (14.00%) high severe

point_to_offset/4096    time:   [16.211 µs 16.235 µs 16.257 µs]
                        thrpt:  [240.28 MiB/s 240.61 MiB/s 240.97 MiB/s]
                 change:
                        time:   [-1.4913% +0.1685% +2.2662%] (p = 0.89 > 0.05)
                        thrpt:  [-2.2159% -0.1682% +1.5139%]
                        No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
point_to_offset/65536   time:   [360.06 µs 360.58 µs 361.16 µs]
                        thrpt:  [173.05 MiB/s 173.33 MiB/s 173.58 MiB/s]
                 change:
                        time:   [+0.0939% +0.8792% +1.8751%] (p = 0.06 > 0.05)
                        thrpt:  [-1.8406% -0.8715% -0.0938%]
                        No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
  3 (3.00%) high mild
  7 (7.00%) high severe

cursor/4096             time:   [19.266 µs 19.282 µs 19.302 µs]
                        thrpt:  [202.38 MiB/s 202.58 MiB/s 202.75 MiB/s]
                 change:
                        time:   [+1.2457% +2.2477% +2.8702%] (p = 0.00 < 0.05)
                        thrpt:  [-2.7901% -2.1983% -1.2304%]
                        Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe
cursor/65536            time:   [467.63 µs 468.36 µs 469.14 µs]
                        thrpt:  [133.22 MiB/s 133.44 MiB/s 133.65 MiB/s]
                 change:
                        time:   [-0.2019% +1.3419% +2.8915%] (p = 0.10 > 0.05)
                        thrpt:  [-2.8103% -1.3241% +0.2023%]
                        No change in performance detected.
Found 12 outliers among 100 measurements (12.00%)
  3 (3.00%) high mild
  9 (9.00%) high severe

append many/small to large
                        time:   [37.419 ms 37.656 ms 37.929 ms]
                        thrpt:  [321.84 MiB/s 324.17 MiB/s 326.22 MiB/s]
                 change:
                        time:   [+0.8113% +1.7361% +2.6538%] (p = 0.00 < 0.05)
                        thrpt:  [-2.5852% -1.7065% -0.8047%]
                        Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
  9 (9.00%) high severe
append many/large to small
                        time:   [51.289 ms 51.437 ms 51.614 ms]
                        thrpt:  [236.50 MiB/s 237.32 MiB/s 238.00 MiB/s]
                 change:
                        time:   [-87.518% -87.479% -87.438%] (p = 0.00 < 0.05)
                        thrpt:  [+696.08% +698.66% +701.13%]
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  4 (4.00%) high mild
  9 (9.00%) high severe
```
</details>

Release Notes:

- sum_tree: Make SumTree::append run in logarithmic time

* agent_ui: Refine "reject"/"keep" behavior when regenerating previous prompts (zed-industries#43347)

Closes zed-industries#42753

Consider the following flow: you submit prompt A. Prompt A generates
some edits. You don't click on either "reject" or "keep"; they stay in a
pending state. You then submit prompt B, but before the agent outputs
any response, you click to edit prompt B, thus submitting a
regeneration.

Before this PR, the above flow would make the edits originated from
prompt A to be auto-rejected. This feels very incorrect and can surprise
users when they see that the edits that were pending got rejected. It
feels more correct to only auto-reject changes if you're regenerating
the prompt that directly generated those edits in the first place. Then,
it also feels more correct to assume that if there was a follow-up
prompt after some edits were made, those edits were passively
"accepted".

So, this is what this PR is doing. Consider the following flow to get a
picture of the behavior change:
- You submit prompt A. 
- Prompt A generates some edits. 
- You don't click on either "reject" or "keep"; they're pending. 
- You then submit prompt B, but before the agents outputs anything, you
click to edit prompt B, submitting a regeneration.
- Now, edits from prompt A will be auto-kept.

Release Notes:

- agent: Improved the "reject"/"keep" behavior when regenerating older
prompts by auto-keeping pending edits that don't originate from the
prompt to-be-regenerated.

* debugger_ui: Add button to close the panel when docked to bottom (zed-industries#43409)

This PR adds a button to close the panel when it is docked to the
bottom. Effectively, the button triggers the same `ToggleBottomDock`
action that clicking on the button that opened the panel triggers, but I
think having it there just makes it extra obvious how to close it, which
is beneficial.

As a bonus, also fixed the panel controls container height when it is
docked to the sides, so it perfectly aligns with the panel tabbar
height.

| Perfectly Aligned Header | Close Button |
|--------|--------|
| <img width="2620" height="2010" alt="Screenshot 2025-11-24 at 12  01
2@2x"
src="https://github.com/user-attachments/assets/08a50858-1b50-4ebd-af7a-c5dae32cf4f6"
/> | <img width="2620" height="2010" alt="Screenshot 2025-11-24 at 12 
01@2x"
src="https://github.com/user-attachments/assets/17a6eee0-9934-4949-8741-fffd5b106e95"
/> |

Release Notes:

- N/A

* auto_updater: Fix `upload-nightly.ps1` and auto-update check (zed-industries#43404)

Release Notes:

- N/A

* Use a proper name for highlights.scm (zed-industries#43412)

Release Notes:

- N/A

* zeta2: Support experimental 1120-seedcoder model (zed-industries#43411)

1. Introduce a common `PromptFormatter` trait
2. Let models define their generation params.
3. Add support for the experimental 1120-seedcoder prompt format


Release Notes:

- N/A

* Attempt to fix `go to the end of the line` when using helix mode (zed-industries#41575)

Closes zed-industries#41550

Release Notes:

- Fixed `<g-l>` behavior in helix mode which will now correctly go to the last charactor of the line.
- Fixed not switching to helix normal mode when in default vim context and pressing escape.

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>

* vim: Fix bug where `d . .` freezes the editor (zed-industries#42145)

This bug seems to be caused by pushing an operator (i.e. `d`) followed
by a repeat (i.e. `.`) so the recording includes the push operator and
the repeat. When this is repeated (i.e. `.`) it causes an infinite loop.

This change fixes this bug by pushing a ClearOperator action if there is
an ongoing recording when repeat is called.

Release Notes:

- Fixed bug where pressing `d . .` in Vim mode would freeze the editor.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

* Add each panel to the workspace as soon as it's ready (zed-industries#43414)

We'll now add panels to the workspace as soon as they're ready rather
than waiting for all the rest to complete. We should strive to make all
panels fast, but given that their load tasks are fallible and do IO,
this approach seems more resilient.

Additionally, we'll now start loading the agent panel at the same time
as the rest.

Release Notes:

- workspace: Add panels as soon as they are ready

* Fix Gemini 3 on OpenRouter (zed-industries#43416)

Release Notes:

- Gemini 3 now works on OpenRouter in the Agent Panel

* ui: Update `ThreadItem` component design (zed-industries#43421)

Release Notes:

- N/A

* Passthrough env to npm subcommands when using the system node runtime (zed-industries#43102)

Closes zed-industries#39448
Closes zed-industries#37866

This PR expands the env-clearing fix from zed-industries#42587 to include the
SystemNodeRuntime, which covers Node.js installations managed by Mise.
When running under the system runtime, npm subcommands were still
launched with a cleared environment, preventing variables such as
MISE_DATA_DIR from reaching the shim or the mise binary itself. As a
result, Mise finds the npm binary in the default MISE_DATA_DIR,
consistent with the behavior described in
zed-industries#39448 (comment).

This change ensures that environment variables are passed through for
npm subcommands when using the system Node runtime, restoring expected
behavior for Mise-managed Node installations. This also fixes cases
where envs are used by npm itself.

Release Notes:

- Enable environment passthrough for npm subcommands

* Rework and consolidate issue templates (zed-industries#43403)

We’re reworking our triage process and in doing so, reworking our issue
templates is worth looking into. We have multiple issue templates, for
arbitrary categories, and not enough enforcement. The plan is to
consolidate the issue templates (maybe all into one) and drop the
others.

Release Notes:

- N/A

* Opus 4.5 and Gemini 3 to docs (zed-industries#43424)

Add Opus 4.5 and Gemini 3 to docs

Release Notes:

- N/A

* Improve Windows path canonicalization (zed-industries#43423)

Path canonicalization on windows will now favor keeping the drive letter
intact when canonicalizing paths. This helps some lsps with mapped
network drive compatibility.

Closes zed-industries#41336 

Release Notes:

- N/A

* Add support for Opus 4.5 (zed-industries#43425)

Adds support for Opus 4.5
- [x] BYOK
- [x] Amazon Bedrock

Release Notes:

- Added support for Opus 4.5

Co-authored-by: Richard Feldman <oss@rtfeldman.com>

* project: Send LSP metadata to remote ServerInfo (zed-industries#42831)

Closes zed-industries#39582

Release Notes:

- Added LSP metadata to remote ServerInfo

Here's the before/after:


https://github.com/user-attachments/assets/1057faa5-82af-4975-abad-5e10e139fac1

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

* vim: Fix cursor shape after deactivation (zed-industries#42834)

Update the `Vim.deactivate` method to ensure that the cursor shape is
reset to the one available in the user's settings, in the `cursor_shape`
setting, instead of simply defaulting to `CursorShape::Bar`.

In order to test this behavior, the `Editor.cursor_shape` method was
also introduced.

Release Notes:

- Fixed the cursor shape reset in vim mode deactivation, ensuring that
the user's `cursor_shape` setting is used

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

* editor: Fix copy file actions not working in remote environments (zed-industries#43362)

Closes zed-industries#42500

Release Notes:

- Fixed all three editor actions not working in remote environments
  - `editor: copy file name`
  - `editor: copy file location`
  - `editor: copy file name without extension`

Here's the before/after:




https://github.com/user-attachments/assets/bfb03e99-2e1a-47a2-bd26-280180154fe3

* Fix zed cli in NixOS WSL instances (zed-industries#43433)

This fixes running `zed <path>` inside nixos wsl instances. We're
copying the approach used elsewhere which is to try using `--exec`
first, and if that fails use an actual shell which should cover the
nixos case because it only puts binaries on your PATH inside the
`/etc/profile` script which is sourced on shell startup.

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>

* Keep single default PHP language server (zed-industries#43432)

https://github.com/zed-extensions/php/blob/9a119b18eeb247072964a19ce46fab54bbd1bb30/extension.toml
provides 3 language servers for `php`, so `...` will always include all
3 if those are not excluded or included explicitly.

Change the configs and docs so, that only one php language server is
used.

Release Notes:

- N/A

* Fix remote project snippet duplication (zed-industries#43429)

Closes zed-industries#43311

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>

* Redact environment variables in server info view (zed-industries#43436)

Follow-up of zed-industries#42831

Release Notes:

- N/A

* Combine zeta and zeta2 edit prediction providers (zed-industries#43284)

We've realized that a lot of the logic within an
`EditPredictionProvider` is not specific to a particular edit prediction
model / service. Rather, it is just the generic state management
required to perform edit predictions at all in Zed. We want to move to a
setup where there's one "built-in" edit prediction provider in Zed,
which can be pointed at different edit prediction models. The only logic
that is different for different models is how we construct the prompt,
send the request, and parse the output.

This PR also changes the behavior of the staff-only `zeta2` feature flag
so that in only gates your *ability* to use Zeta2, but you can still use
your local settings file to choose between different edit prediction
models/services: zeta1, zeta2, and sweep.

This PR also makes zeta1's outcome reporting and prediction-rating
features work with all prediction models, not just zeta1.

To do:
* [x] remove duplicated logic around sending cloud requests between
zeta1 and zeta2
* [x] port the outcome reporting logic from zeta to zeta2.
* [x] get the "rate completions" modal working with all EP models
   * [x] display edit prediction diff
   * [x] show edit history events
* [x] remove the original `zeta` crate.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>

* multi_buffer: Fix `editor::ExpandExcerpts` failing when cursor is at excerpt start (zed-industries#42324)

The bug is easily verified by:

1. open any multi-buffer
2. place the cursor at the beginning of an excerpt
3. run the editor::ExpandExcerpts / editor: expand excerpts action
4. The excerpt is not expanded

Since the `buffer_ids_for_range` function basically did the same and had
even been changed the same way earlier I DRYed these functions as well.

Note: I'm a rust novice, so keep an extra eye on rust technicalities
when reviewing :)

---

Release Notes:

- Fix editor: expand excerpts failing when cursor is at excerpt start

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>

* Fix first window open not focusing the modals (zed-industries#43180)

Closes zed-industries#4357
Closes zed-industries#41278

Release Notes:

- Fixed modals not getting focus on window reopen

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

* Only show ssh logs when toggled (zed-industries#43445)

Same as in collab projects.

Release Notes:

- N/A

* lsp: Fix potential double didClose notification when renaming a file (zed-industries#43448)

Closes zed-industries#42709

Release Notes:

- N/A

* helix: Fix `Vim::NextWordEnd` off-by-one in `HelixSelect` (zed-industries#43234)

Closes zed-industries#43209
Closes zed-industries#38121

Starting on the first character.
Running `v e` before changes: 
<img width="410" height="162" alt="image"
src="https://github.com/user-attachments/assets/ee13fa29-826c-45c0-9ea0-a598cc8e781a"
/>

Running `v e` after changes:
<img width="483" height="166" alt="image"
src="https://github.com/user-attachments/assets/24791a07-97df-47cd-9ef2-171522adb796"
/>

Change Notes:

- Added helix selection sanitation code that directly mirrors the code
in the Vim
[`visual_motion`](https://github.com/AidanV/zed/blob/b6728c080c5d14ded7002d0276deb5c19d42ed8a/crates/vim/src/visual.rs#L237)
method. I kept the comments from the Vim section that explains its
purpose.
- The above change converted the problem from fixing `v e` to fixing `v
w`. Since `w` is treated differently in Helix than in Vim (i.e. `w` in
Vim goes to the first character of a word and `w` in Helix goes to the
character before a word. Commented
[here](https://github.com/AidanV/zed/blob/b6728c080c5d14ded7002d0276deb5c19d42ed8a/crates/vim/src/helix.rs#L132)),
the code treats `w` in `HelixSelect` as a motion that differs from the
Vim motion in the same way that the function
[`helix_move_cursor`](https://github.com/AidanV/zed/blob/b6728c080c5d14ded7002d0276deb5c19d42ed8a/crates/vim/src/helix.rs#L353)
separates these behaviors.
- Added a regression test

Release Notes:

- Fixes bug where `Vim::NextWordEnd` in `HelixSelect` would not select
whole word.

* ci: Do not show output of failed tests at the end too (zed-industries#43449)

This reverts zed-industries#39643, effectively

For the record, @SomeoneToIgnore found it quite cumbersome to scroll
through logs just to see which tests have failed. I kinda see the
argument. At the same time, I wish nextest could do both: it could
aggregate logs of failed tests and then print out the summary.

Release Notes:

- N/A

* Add performance doc (zed-industries#43265)

Release Notes:

- N/A

* multi_buffer: Fix up some anchor checks (zed-industries#43454)

Release Notes:

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

* document how to do flamecharts in an easy way (zed-industries#43461)

Release Notes:

- N/A

* miniprofiler_ui: Improve MiniProfiler to use uniform list (zed-industries#43457)

Release Notes:

- N/A

---

- Apply uniform_list for timing list for performance.
- Add paddings for window.
- Add space to `ms`, before: `100ms` after `100 ms`.

## Before 

<img width="1392" height="860" alt="image"
src="https://github.com/user-attachments/assets/9706a96f-7093-4d4f-832f-306948a9b17b"
/>

## After 

<img width="1392" height="864" alt="image"
src="https://github.com/user-attachments/assets/38df1b71-15e7-4101-b0c9-ecdcdb7752d7"
/>

* Restructure collaboration docs (zed-industries#43464)

Overview
    - Channels
    - Private calls

---

Up next would be to 

- [ ] Update any zed.dev links to point to items in this structure
- [ ] Update content in these docs (would prefer to do that in a
separate PR from this one)

Release Notes:

- N/A

* mcp: Fix `source` property showing up as undefined in settings (zed-industries#43417)

Follow up to zed-industries#39021.

<img width="576" height="141" alt="image"
src="https://github.com/user-attachments/assets/c89885a4-e664-4614-9bb0-86442dff34ee"
/>

- Add migration to remove `source` tag because `ContextServerSettings`
is now untagged
- Fix typos in context server modal
- PR seems to have removed the `test_action_namespaces` test, which I
brought back in this PR

Release Notes:

- Fixed an issue where the `source` property of MCP settings would show
up as unrecognised

* multi_buffer: Remove redundant buffer id field (zed-industries#43459)

It is easy for us to get the two fields out of sync causing weird
problems, there is no reason to have both here so.

Release Notes:

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

Co-authored by: Antonio Scandurra <antonio@zed.dev>

* git: Bring back auto-commit suggestions (zed-industries#43470)

This got accidentally regressed in
zed-industries#42149.

Release Notes:

- Fixed displaying auto-commit suggestions for single staged entries.

* Add collaboration redirects (zed-industries#43471)

Redirect:

https://zed.dev/docs/collaboration ->
https://zed.dev/docs/collaboration/overview
https://zed.dev/docs/channels ->
https://zed.dev/docs/collaboration/channels

Release Notes:

- N/A

* Add Gemini 3 support to Copilot (zed-industries#43096)

Closes zed-industries#43024

Release Notes:

- Add support for Gemini 3 to Copilot

* git: Make the version_control.{deleted/added} colors more accessible (zed-industries#43475)

The new colors are easier to tell apart for people that are colorblind

cc: @mattermill 

## One Dark
### Before
<img width="723" height="212" alt="Screenshot 2025-11-25 at 12 13 14 PM"
src="https://github.com/user-attachments/assets/cea67b08-5662-4afa-8119-dbfcef53ada7"
/>

### After
<img width="711" height="109" alt="Screenshot 2025-11-25 at 12 14 16 PM"
src="https://github.com/user-attachments/assets/a42d88ea-1a85-4f48-8f5e-b9bedf321c62"
/>

## One Light
### Before
<img width="724" height="219" alt="Screenshot 2025-11-25 at 12 15 13 PM"
src="https://github.com/user-attachments/assets/c0176b8c-12bf-451c-8a2c-a2efd15463d1"
/>
### After
<img width="723" height="209" alt="Screenshot 2025-11-25 at 12 15 45 PM"
src="https://github.com/user-attachments/assets/b8858a11-29e2-4309-b1a6-c734f89f6d5e"
/>

Release Notes:

- N/A

* acp: Only pass enabled MCP servers to agent (zed-industries#43467)

Release Notes:

- Fix an issue where ACP agents would start MCP servers that were
disabled in Zed

* editor: Fix package version completion partial accept and improve sorting (zed-industries#43473)

Closes zed-industries#41723

This PR fixes an issue with accepting partial semver completions by
including `.` in the completion query. This makes the editor treat the
entire version string as the query, instead of breaking segment at last
`.` .

This PR also adds a test for sorting semver completions. The actual
sorting fix is handled in the `package-version-server` by having it
provide `sort_text`. More:
zed-industries/package-version-server#10

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/7657912f-c6da-4e05-956b-1c044918304f"
/>

Release Notes:

- Fixed an issue where accepting a completion for a semver version in
package.json would append the suggestion to the existing text instead of
replacing it.
- Improved the sorting of semver completions in package.json so the
latest versions appear at the top.

* Separate experimental edit prediction jumps feature from the Sweep AI prediction provider (zed-industries#43481)

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>

* Add missing update of last_prediction_refresh (zed-industries#43483)

Fixes a regression introduced in
zed-industries#43284 where edit predictions
stopped being throttled at all 😬

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben@zed.dev>

* zeta2: Remove expected context from evals (zed-industries#43430)

Closes #ISSUE

Release Notes:

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

* Redact sensitive environment variables in LSP Logs: Server Info (zed-industries#43480)

Follow-up to: 
- zed-industries#43436
- zed-industries#42831

The changes in zed-industries#42831 resulted in a regression where environment
variables in the Server Info view were no longer redact. The changes in
zed-industries#43436 were insufficient as I was still seeing sensitive values in
Nightly e6fe95b (which includes
zed-industries#43436).

CC: @SomeoneToIgnore (Hi! 👋 Thanks for keeping this redaction
functionality alive)

Release Notes:

- N/A

* Always display terminal cursor when blinking is disabled (zed-industries#43487)

Fixes an issue where the terminal cursor wouldn't always be displayed in
the default `blink: "terminal_controlled"` mode unless the terminal
requested cursor blinking.

Release Notes:

- N/A

* Refresh collaboration docs (zed-industries#43489)

Most of the features for collab were previously listed in the section
that was written for private calls. Most of this PR is moving that
content over to the channel documentation and adapting it slightly.
Private calls have similar collaboration, so we can just point back to
the channels doc in that section and keep it pretty thin / DRY.

Release Notes:

- N/A

* More tweaks to collaboration docs (zed-industries#43494)

Release Notes:

- N/A

* Add GPT 5.1 to Zed BYOK (zed-industries#43492)

Release Notes:

- Added support for OpenAI's GPT 5.1 model to BYOK

* Upgrade `python-environment-tools` (zed-industries#43496)

Fixes zed-industries#42554
Fixes zed-industries#43383

Release Notes:

- python: Added support for detecting uv workspaces as toolchains.
- windows: Fixed console windows sometimes appearing when opening Python
files.

* languages: Recognize .clang-format as YAML (zed-industries#43469)

Clang-Format uses uses a YAML config file format.

Use YAML language by default for `.clang-format` and `_clang-format`
filenames.
([source](https://clang.llvm.org/docs/ClangFormatStyleOptions.html))
Add `#yaml-language-server: $schema` to `.clang-format` example in C
language docs.

Release Notes:

- Added support for identifying. `.clang-format` files as YAML by
default

* Avoid continuing zeta requests that are cancelled before their throttle (zed-industries#43505)

Release Notes:

- N/A

* terminal: Update search match highlights on resize (zed-industries#43507)

The fix for this is emitting a wake-up event to tell the terminal to
recalculate its search highlights on resize.

Release Notes:

- terminal: Fix bug where search match highlights wouldn't update their
position when resizing the terminal.

* Revert "git: Make the version_control.{deleted/added} colors more accessible" (zed-industries#43512)

Reverts zed-industries#43475

The colors ended up being too dark. Zed adds an opacity to the
highlights.


https://github.com/zed-industries/zed/blob/e13e93063ce24a2ede88747c316d7279174878c8/crates/editor/src/element.rs#L9195-L9200


Reverting to avoid having the colors go out in preview will fix shortly
after.

* Improve bash detection on Windows (zed-industries#43455)

I have git installed via [scoop](https://scoop.sh). The current
implementation finds `git.exe` in scoop's shims folder and then tries to
find `bash.exe` relative to it.

For example, `git.exe` (shim) is located at:
```
C:\Users\<username>\scoop\shims\git.exe
```

And the code tries to find `bash.exe` at:
```
C:\Users\<username>\scoop\shims\..\bin\bash.exe
```
which doesn't exist.

This PR changes the logic to first check if `bash.exe` is available in
PATH (using `which::which`), and only falls back to the git-relative
path if that fails.

* zeta: Avoid logging an error for not having SWEEP_AI_TOKEN (zed-industries#43504)

Closes zed-industries#43503 

Release Notes:

- Fixes ERROR No SWEEP_AI_TOKEN environment variable set

Co-authored-by: oscarvarto <oscarvarto@users.noreply.github.com>

* shell: Correctly identifiy `powershell` shells on windows (zed-industries#43526)

Release Notes:

- Fixed zed only finding pwsh but not powershell on windows

* git: Use correct file mode when staging (zed-industries#41900)

Closes zed-industries#28667

Release Notes:

- Fixed git not preserving file mode when committing. Now if an input file is executable it will be preserved when committed with Zed.

---------

Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <bhuminjaysoni@gmail.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>

* outline_panel: Fix the panel frequent flickering during search (zed-industries#43530)

The outline panel flickers when searching or when the file content
changes. This happens because an empty UI appears during the search
process, but it only lasts for a few milliseconds, so we can safely
ignore it.

## Before

https://github.com/user-attachments/assets/9b409827-75ee-4a45-864a-58f0ca43191f

## After

https://github.com/user-attachments/assets/b6d48143-1f1a-4811-8754-0a679428eec2

Release Notes:

- N/A

* Implement vertical scrolling for extended keymap load error information (zed-industries#42542)

This PR fix an issue where, if an error occurs while loading the keymap
file during application startup, an excessively long error message would
be truncated and not fully displayed.

Before:

<img width="1567" height="1056" alt="before"
src="https://github.com/user-attachments/assets/ab80c204-b642-4e8f-aaf5-eae070ab01a2"
/>


After:

<img width="1567" height="1056" alt="image"
src="https://github.com/user-attachments/assets/1b2ff2ce-3796-41d5-b145-dc7d69f04f11"
/>


Release Notes:

- N/A

* rope: Turn `ChunkSlice::slice` panics into error logs (zed-industries#43538)

While logically not really correct, its better than tearing down the
application until we figure out the root cause here

Release Notes:

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

* gpui: Return `None` for non-existing credentials in `read_credentials` on windows (zed-industries#43540)

Release Notes:

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

* askpass: Quote askpass script in askpass helper command (zed-industries#43542)

Closes zed-industries#40276

Release Notes:

- Fixed askpass execution failing on windows sometimes

* editor: Do not show scroll thumb if page fits (zed-industries#43548)

Follow-up to zed-industries#39367

Release Notes:

- Fixed a small issue where a scrollbar would sometimes show in the
editor although the content fix exactly on screen.

* settings_ui: Pick a more reasonable minimum window size (zed-industries#43556)

Closes zed-industries#41903

Release Notes:

- Fixed settings ui being forced larger than small screens

* languages: Recognize .clangd as YAML (zed-industries#43557)

Follow-up to: zed-industries#43469

Thanks @WeetHet for [the idea]([WeetHet](https://github.com/WeetHet)).

Release Notes:

- Added support for identifying. .clangd files as YAML by default

* Detail how to add  symbols to samply's output (zed-industries#43472)

Release Notes:

- N/A

* agent_ui: Add support for deleting thread history (zed-industries#43370)

This PR adds support for deleting your entire thread history. This is
inspired by a Zed user from the meetup in Amsterdam, he was missing this
feature.

**Demo**


https://github.com/user-attachments/assets/5a195007-1094-4ec6-902a-1b83db5ec508

Release Notes:

- AI: Add support for deleting your entire thread history

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

* Bump Zed to v0.216 (zed-industries#43564)

Release Notes:

- N/A

* editor: Fix vertical scroll margin not accounting for file header height (zed-industries#43521)

Closes zed-industries#43178

Release Notes:

- Fixed vertical scroll margin not accounting for file header height

Here's the before/after:

With `{ "vertical_scroll_margin": 0 }` in `~/.config/zed/settings.json`


https://github.com/user-attachments/assets/418c6d7f-de0f-4da6-a038-69927b1b8b88

* Add callable workflow to bump the version of an extension (zed-industries#43566)

This adds an intial workflow file that can be pulled in to create a bump
commit for an extension version in an extension repository.

Release Notes:

- N/A

* collab: Add `zed-zippy[bot]` to the `GET /contributor` endpoint (zed-industries#43568)

This PR adds the `zed-zippy[bot]` user to the `GET /contributor`
endpoint so that it passes the CLA check.

Release Notes:

- N/A

* Fix git features not working when a Windows host collaborates with a unix guest (zed-industries#43515)

We were using `std::path::Path::strip_prefix` to determine which
repository an absolute path belongs to, which doesn't work when the
paths are Windows-style but the code is running on unix. Replace it with
a platform-agnostic implementation of `strip_prefix`.

Release Notes:

- Fixed git features not working when a Windows host collaborates with a
unix guest

* gpui: Unify `track_scroll` method to receive a reference type (zed-industries#43518)

Release Notes:

- N/A

This PR to change the `track_scroll` method to receive a reference type
like the
[Div#track_scroll](https://docs.rs/gpui/latest/gpui/trait.StatefulInteractiveElement.html#method.track_scroll),
[Div#track_focus](https://docs.rs/gpui/latest/gpui/trait.InteractiveElement.html#method.track_focus).


```diff
- .track_scroll(self.scroll_handle.clone())
+ .track_scroll(&self.scroll_handle)

- .vertical_scrollbar_for(self.scroll_handle.clone(), window, cx)
+ .vertical_scrollbar_for(&self.scroll_handle, window, cx)
```


https://github.com/zed-industries/zed/blob/56a2f9cfcf0c6a3c38f596b58002953763cd890f/crates/gpui/src/elements/div.rs#L1088-L1093


https://github.com/zed-industries/zed/blob/56a2f9cfcf0c6a3c38f596b58002953763cd890f/crates/gpui/src/elements/div.rs#L613-L620

* workspace: Fix broken main build after zed-industries#43518 (zed-industries#43570)

*cough* merge queue *cough*

Release Notes:

- N/A

* Add WSL Linux choice and settings.json prompt for GitHub issue template (zed-industries#43479)

Release Notes:

- N/A

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>

* Fix language server renaming when parent directory does not exist (zed-industries#43499)

Update the `fs::RenameOptions` used by
`project::lsp_store::LocalLspStore.deserialize_workspace_edit` in order
to always set `create_parents` to `true`. Doing this ensures that we'll
always create the folders for the new file path provided by the language
server instead of failing to handle the request in case the parent

- Introduce `create_parents` field to `fs::RenameOptions`
- Update `fs::RealFs.rename` to ensure that the `create_parents` option
is respected

Closes zed-industries#41820 

Release Notes:

- Fixed a bug where using language server's file renaming actions could
fail if the parent directory of the new file did not exist

* edit prediction: Report early-rejected predictions and fix cancel bug (zed-industries#43585)

Many prediction requests end up being rejected early without ever being
set as the current prediction. Before this change, those cases weren’t
reported as rejections because the `request_prediction_with_*` functions
simply returned `Ok(None)`.

With this update, whenever we get a successful response from the
provider, we will return at least the `id`, allowing it to be properly
reported. The request now also includes a “reject reason,” since the
different variants carry distinct implications for prediction quality.

All of these scenarios are now covered by tests. While adding them, I
also found and fixed a bug where some cancelled predictions were
incorrectly being set as the current one.

Release Notes:

- N/A

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>

* edit prediction: Request trigger (zed-industries#43588)

Adds a `trigger` field to the zeta1/zeta2 prediction requests so that we
can distinguish between editor, diagnostic, and zeta-cli requests.

Release Notes:

- N/A

* Make key repeat rate on Wayland more precise (2) (zed-industries#43589)

CLOSES  zed-industries#39042

This is a reopening of zed-industries#34985+. 

_Original descrioption_:

In Wayland, the client implement key repeat themself. In Zed this is
ultimately handled by the gpui crate by inserting a timer source into
the event loop which repeat itself if the key is still held down [1].

But it seems the processing of the repeated key event happen
synchronously inside the timer source handler, meaning the effective
rate become slightly lower (since the repeated timer is scheduled using
the 1/rate as delay).

I measured the event processing time on my laptop and it's typically
around 3ms, but sometimes spiking at 10ms. At low key repeat rates this
is probably not _very_ noticeable. I see the default in Zed is set to a
(measly) 16/s, but I assume most systems will use something closer to
25, which is a 40ms delay. So ~3ms is around 7.5% of the delay. At
higher rate the discrepancy become worse of course.

I can visible notice the spikes, and doing some crude stopwatch
measurements using gedit as a reference I can reproduce around 5-10%
slower rates in Zed.

IMO this is significant enough to warrant improving, especially since
some people can get quite used the repeat rate and might feel something
being "off" in Zed.

~~The suggested fix simply subtract the processing time from the next
delay timer.~~


[1] https://github.com/olejorgenb/zed/blob/32df726f3b7fa83e7399f6629c59e0a3f3fff125/crates/gpui/src/platform/linux/wayland/client.rs#L1355

Release Notes:

- Improved Wayland (Linux) key repeat rate precision

* auto-update: Fix auto-update loop with non-nightly channels (zed-industries#43595)

There are 3 factors:
1. The Preview channel endpoint does not propagate versions with build
identifier (which we oh-so-conveniently store in pre-release field of
semver).
2. Preview build, once fetched, sees it's version *with* build
identifier (as that's baked into the binary).
3. Auto update logic treats versions with pre-release version as less
than versions without pre-release version.

This in turn makes any Preview client see itself as versioned like
0.214.4-123-asdf1234455311, whereas the latest version on the endpoint
is 0.214.4. Thus, the endpoint version is always more recent than the
client version, causing an update loop.

The fix is to ignore build identifier when comparing versions of
non-nightly channels. This should still let us introduce changes to
auto-update behavior in minor releases in the future.

Closes zed-industries#43584

Release Notes:

- (Preview only): Fixed an update loop with latest Preview update.

* editor: Consider experimental theme overrides for colorized bracket invalidation (zed-industries#43602)

Release Notes:

- Fixed a small issue where bracket colors would not be immediately
updated if `experimental_theme_overrides.accents` was changed.

* Account for greedy tree-sitter bracket matches (zed-industries#43607)

Current approach is to colorize brackets based on their depth, which was
broken for markdown:

<img width="388" height="50" alt="image"
src="https://github.com/user-attachments/assets/bd8b6c2f-5a26-4d6b-a301-88675bf05920"
/>

Markdown grammar, for bracket queries
https://github.com/zed-industries/zed/blob/00e93bfa113a3daed6e4a97a7244ad04d58453ee/crates/languages/src/markdown/brackets.scm#L1-L8

and markdown document `[LLM-powered features](./ai/overview.md), [bring
and configure your own API
keys](./ai/llm-providers.md#use-your-own-keys)`, matches first bracket
(offset 0) with two different ones:

* `[LLM-powered features]`

* `[LLM-powered features](./ai/overview.md), [bring and configure your
own API keys]`

which mix and add different color markers.

Now, in case multiple pairs exist for the same first bracket, Zed will
only colorize the shortest one:
<img width="373" height="33" alt="image"
src="https://github.com/user-attachments/assets/04b3f7af-8927-4a8b-8f52-de8b5bb063ac"
/>


Release Notes:

- Fixed bracket colorization mixing colors in markdown files

* Improve `extension_bump` workflow (zed-industries#43612)

This extends the extension CI workflow to create a tag once the version
is bumped on main.

Release Notes:

- N/A

* remote: Do not include prerelease and build meta in asset queries (zed-industries#43611)

Closes zed-industries#43580

Release Notes:

- (Preview only) Fixed failures to fetch remoting server (needed to run
remoting).

---------

Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <bhuminjaysoni@gmail.com>
Co-authored-by: Binlogo <binboy@live.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Kunall Banerjee <14703164+yeskunall@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Vasyl Protsiv <vasyl.protsiv.c@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: HuaGu-Dragon <1801943622@qq.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: AidanV <84053180+AidanV@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Yeoh Joer <yeoh.joer@outlook.com>
Co-authored-by: morgankrey <morgan@zed.dev>
Co-authored-by: localcc <kate@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Mayank Verma <errmayank@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lennart <lennart.kloock@protonmail.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Ole Jørgen Brønner <olejorgenb@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: qystishere <qystishere@gmail.com>
Co-authored-by: Oscar Vargas Torres <1676245+oscarvarto@users.noreply.github.com>
Co-authored-by: oscarvarto <oscarvarto@users.noreply.github.com>
Co-authored-by: Bhuminjay Soni <bhuminjaysoni@gmail.com>
Co-authored-by: Floyd Wang <gassnake999@gmail.com>
Co-authored-by: ihavecoke <mixboip@gmail.com>
Co-authored-by: Finn Evers <finn@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Miguel Raz Guzmán Macedo <miguel@zed.dev>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: wzulfikar <>
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
### What this solves

This PR adds support for HTTP and SSE (Server-Sent Events) transports to
Zed's context server implementation, enabling communication with remote
MCP servers. Currently, Zed only supports local MCP servers via stdio
transport. This limitation prevents users from:

- Connecting to cloud-hosted MCP servers
- Using MCP servers running in containers or on remote machines
- Leveraging MCP servers that are designed to work over HTTP/SSE

### Why it's important

The MCP (Model Context Protocol) specification includes HTTP/SSE as
standard transport options, and many MCP server implementations are
being built with these transports in mind. Without this support, Zed
users are limited to a subset of the MCP ecosystem. This is particularly
important for:

- Enterprise users who need to connect to centralized MCP services
- Developers working with MCP servers that require network isolation
- Users wanting to leverage cloud-based context providers (e.g.,
knowledge bases, API integrations)

### Implementation approach

The implementation follows Zed's existing architectural patterns:

- **Transports**: Added `HttpTransport` and `SseTransport` to the
`context_server` crate, built on top of the existing `http_client` crate
- **Async handling**: Uses `gpui::spawn` for network operations instead
of introducing a new Tokio runtime
- **Settings**: Extended `ContextServerSettings` enum with a `Remote`
variant to support URL-based configuration
- **UI**: Updated the agent configuration UI with an "Add Remote Server"
option and dedicated modal for remote server management

### Changes included

- [x] HTTP transport implementation with request/response handling
- [x] SSE transport for server-sent events streaming
- [x] `build_transport` function to construct appropriate transport
based on URL scheme
- [x] Settings system updates to support remote server configuration
- [x] UI updates for adding/editing remote servers
- [x] Unit tests using `FakeHttpClient` for both transports
- [x] Integration tests (WIP)
- [x] Documentation updates (WIP)

### Testing

- Unit tests for both `HttpTransport` and `SseTransport` using mocked
HTTP client
- Manual testing with example MCP servers over HTTP/SSE
- Settings validation and UI interaction testing

### Screenshots/Recordings

[TODO: Add screenshots of the new "Add Remote Server" UI and
configuration modal]

### Example configuration

Users can now configure remote MCP servers in their `settings.json`:

```json
{
  "context_servers": {
    "my-remote-server": {
      "enabled": true,
      "url": "http://localhost:3000/mcp"
    }
  }
}
```

### AI assistance disclosure

I used AI to help with:

- Understanding the MCP protocol specification and how HTTP/SSE
transports should work
- Reviewing Zed's existing patterns for async operations and suggesting
consistent approaches
- Generating boilerplate for test cases
- Debugging SSE streaming issues

All code has been manually reviewed, tested, and adapted to fit Zed's
architecture. The core logic, architectural decisions, and integration
with Zed's systems were done with human understanding of the codebase.
AI was primarily used as a reference tool and for getting unstuck on
specific technical issues.

Release notes:
* You can now configure MCP Servers that connect over HTTP in your
settings file. These are not yet available in the extensions API.
  ```
  {
    "context_servers": {
      "my-remote-server": {
        "enabled": true,
        "url": "http://localhost:3000/mcp"
      }
    }
  }
  ```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
…ndustries#43417)

Follow up to zed-industries#39021.

<img width="576" height="141" alt="image"
src="https://github.com/user-attachments/assets/c89885a4-e664-4614-9bb0-86442dff34ee"
/>

- Add migration to remove `source` tag because `ContextServerSettings`
is now untagged
- Fix typos in context server modal
- PR seems to have removed the `test_action_namespaces` test, which I
brought back in this PR

Release Notes:

- Fixed an issue where the `source` property of MCP settings would show
up as unrecognised
@erenatas
Copy link

@AhegaoBurger hey, would you mind if I open a PR for OAuth? I have it working with Zed agent

@AhegaoBurger
Copy link
Contributor Author

@AhegaoBurger hey, would you mind if I open a PR for OAuth? I have it working with Zed agent

Hey, yeah it's cool, I've been working on other projects recently so didn't have time to make this work, I'll definitely check out your PR so just tell me when you open it

@erenatas
Copy link

@tzutoo
Copy link

tzutoo commented Dec 12, 2025

It seems the tool call timeout setting not working with http transport support.

probably-neb added a commit that referenced this pull request Jan 5, 2026
### Closes 
- Maybe #38252 (there might
be something going on with NPX too)
- Also addresses
#39021 (comment)



### Why
Some more involved MCP servers timeout often, especially on first setup.
I got tired of having to set timeouts manually per server. I also
noticed a timeout could not be set for http context servers, which
causes Context7 or GitHub's remote servers to timeout at 60s sometimes.

### Overview

MCP Timeout Configuration Feature

This PR adds additional configurable timeout settings for Model Context
Protocol servers including a global timeout and the addition of timeouts
for http servers, addressing issues where servers were timing out after
a fixed 60 seconds regardless of user needs.

**Key Features:**
- **Global timeout setting** (`context_server_timeout`) - default
timeout for all MCP servers (default: 60s, max: 10min)
- **Per-server timeout overrides** - individual servers can specify
custom timeouts via `timeout` field
- **Precedence hierarchy** - per-server timeout > global timeout >
default (60s)
- **Automatic bounds checking** - enforces 10-minute maximum to prevent
resource exhaustion
- **Support for both transports** - works with stdio and HTTP-based
context servers
- **Comprehensive test coverage** - 3 new tests validating global,
override, and stdio timeout behavior
- **Full backward compatibility** - existing configurations work
unchanged with sensible defaults


### Release Notes:

- Added the ability to configure timeouts for context server tool calls.
The new global `context_server_timeout` setting controls the default
timeout (default is 60s, max: 10min). Additionally, per-server timeouts
can be configured using the `timeout` field within servers defined in
the `"context_servers" setting

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
### Closes 
- Maybe #38252 (there might
be something going on with NPX too)
- Also addresses
#39021 (comment)



### Why
Some more involved MCP servers timeout often, especially on first setup.
I got tired of having to set timeouts manually per server. I also
noticed a timeout could not be set for http context servers, which
causes Context7 or GitHub's remote servers to timeout at 60s sometimes.

### Overview

MCP Timeout Configuration Feature

This PR adds additional configurable timeout settings for Model Context
Protocol servers including a global timeout and the addition of timeouts
for http servers, addressing issues where servers were timing out after
a fixed 60 seconds regardless of user needs.

**Key Features:**
- **Global timeout setting** (`context_server_timeout`) - default
timeout for all MCP servers (default: 60s, max: 10min)
- **Per-server timeout overrides** - individual servers can specify
custom timeouts via `timeout` field
- **Precedence hierarchy** - per-server timeout > global timeout >
default (60s)
- **Automatic bounds checking** - enforces 10-minute maximum to prevent
resource exhaustion
- **Support for both transports** - works with stdio and HTTP-based
context servers
- **Comprehensive test coverage** - 3 new tests validating global,
override, and stdio timeout behavior
- **Full backward compatibility** - existing configurations work
unchanged with sensible defaults


### Release Notes:

- Added the ability to configure timeouts for context server tool calls.
The new global `context_server_timeout` setting controls the default
timeout (default is 60s, max: 10min). Additionally, per-server timeouts
can be configured using the `timeout` field within servers defined in
the `"context_servers" setting

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…5378)

### Closes 
- Maybe zed-industries#38252 (there might
be something going on with NPX too)
- Also addresses
zed-industries#39021 (comment)



### Why
Some more involved MCP servers timeout often, especially on first setup.
I got tired of having to set timeouts manually per server. I also
noticed a timeout could not be set for http context servers, which
causes Context7 or GitHub's remote servers to timeout at 60s sometimes.

### Overview

MCP Timeout Configuration Feature

This PR adds additional configurable timeout settings for Model Context
Protocol servers including a global timeout and the addition of timeouts
for http servers, addressing issues where servers were timing out after
a fixed 60 seconds regardless of user needs.

**Key Features:**
- **Global timeout setting** (`context_server_timeout`) - default
timeout for all MCP servers (default: 60s, max: 10min)
- **Per-server timeout overrides** - individual servers can specify
custom timeouts via `timeout` field
- **Precedence hierarchy** - per-server timeout > global timeout >
default (60s)
- **Automatic bounds checking** - enforces 10-minute maximum to prevent
resource exhaustion
- **Support for both transports** - works with stdio and HTTP-based
context servers
- **Comprehensive test coverage** - 3 new tests validating global,
override, and stdio timeout behavior
- **Full backward compatibility** - existing configurations work
unchanged with sensible defaults


### Release Notes:

- Added the ability to configure timeouts for context server tool calls.
The new global `context_server_timeout` setting controls the default
timeout (default is 60s, max: 10min). Additionally, per-server timeouts
can be configured using the `timeout` field within servers defined in
the `"context_servers" setting

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…5378)

### Closes 
- Maybe zed-industries#38252 (there might
be something going on with NPX too)
- Also addresses
zed-industries#39021 (comment)



### Why
Some more involved MCP servers timeout often, especially on first setup.
I got tired of having to set timeouts manually per server. I also
noticed a timeout could not be set for http context servers, which
causes Context7 or GitHub's remote servers to timeout at 60s sometimes.

### Overview

MCP Timeout Configuration Feature

This PR adds additional configurable timeout settings for Model Context
Protocol servers including a global timeout and the addition of timeouts
for http servers, addressing issues where servers were timing out after
a fixed 60 seconds regardless of user needs.

**Key Features:**
- **Global timeout setting** (`context_server_timeout`) - default
timeout for all MCP servers (default: 60s, max: 10min)
- **Per-server timeout overrides** - individual servers can specify
custom timeouts via `timeout` field
- **Precedence hierarchy** - per-server timeout > global timeout >
default (60s)
- **Automatic bounds checking** - enforces 10-minute maximum to prevent
resource exhaustion
- **Support for both transports** - works with stdio and HTTP-based
context servers
- **Comprehensive test coverage** - 3 new tests validating global,
override, and stdio timeout behavior
- **Full backward compatibility** - existing configurations work
unchanged with sensible defaults


### Release Notes:

- Added the ability to configure timeouts for context server tool calls.
The new global `context_server_timeout` setting controls the default
timeout (default is 60s, max: 10min). Additionally, per-server timeouts
can be configured using the `timeout` field within servers defined in
the `"context_servers" setting

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

10 participants