Commit log

d4bd7c0 Bump to 0.198.6 for @smitbarmase

Zed Bot created

7b4e191 editor: Fix Follow Agent unexpectedly stopping during edits (#35845)

Click to expand commit body
Closes #34881

For horizontal scroll, we weren't keeping track of the `local` bool, so
whenever the agent tries to autoscroll horizontally, it would be seen as
a user scroll event resulting in unfollow.

Release Notes:

- Fixed an issue where the Follow Agent could unexpectedly stop
following during edits.

smit created

3d75d79 language_models: Fix high memory consumption while using Agent Panel (#35764)

Click to expand commit body
Closes #31108

The `num_tokens_from_messages` method we use from `tiktoken-rs` creates
new BPE every time that method is called. This creation of BPE is
expensive as well as has some underlying issue that keeps memory from
releasing once the method is finished, specifically noticeable on Linux.
This leads to a gradual increase in memory every time that method is
called in my case around +50MB on each call. We call this method with
debounce every time user types in Agent Panel to calculate tokens. This
can add up really fast.

This PR lands quick fix, while I/maintainers figure out underlying
issue. See upstream discussion:
https://github.com/zurawiki/tiktoken-rs/issues/39.

Here on fork https://github.com/zed-industries/tiktoken-rs/pull/1,
instead of creating BPE instances every time that method is called, we
use singleton BPE instances instead. So, whatever memory it is holding
on to, at least that is only once per model.

Before: Increase of 700MB+ on extensive use

On init:
<img width="500" alt="prev-init"
src="https://github.com/user-attachments/assets/70da7c44-60cb-477b-84aa-7dd579baa3da"
/>
First message:
<img width="500" alt="prev-first-call"
src="https://github.com/user-attachments/assets/599ffc48-3ad3-4729-b94c-6d88493afdbf"
/>
Extensive use:
<img width="500" alt="prev-extensive-use"
src="https://github.com/user-attachments/assets/e0e6b688-6412-486d-8b2e-7216c6b62470"
/>

After: Increase of 50MB+ on extensive use
On init:
<img width="500" alt="now-init"
src="https://github.com/user-attachments/assets/11a2cd9c-20b0-47ae-be02-07ff876e68ad"
/>
First message:
<img width="500" alt="now-first-call"
src="https://github.com/user-attachments/assets/ef505f8d-cd31-49cd-b6bb-7da3f0838fa7"
/>
Extensive use: 
<img width="500" alt="now-extensive-use"
src="https://github.com/user-attachments/assets/513cb85a-a00b-4f11-8666-69103a9eb2b8"
/>

Release Notes:

- Fixed issue where Agent Panel would cause high memory consumption over
prolonged use.

smit created

ec0f222 ci: Use faster Linux ARM runners (#35880)

Click to expand commit body
Switch our Linux aarch_64 release builds from Linux on Graviton (32
vCPU, 64GB) to Linux running on Apple M4 Pro (8vCPU, 32GB). Builds are
faster (20mins vs 30mins) for the same cost (960 unit minutes;
~$0.96/ea).

<img width="763" height="285" alt="Screenshot 2025-08-08 at 13 14 41"
src="https://github.com/user-attachments/assets/12c45c8b-59f3-40d8-974c-1003b5080287"
/>

Release Notes:

- N/A

Peter Tripp created

9628f5a Bump to 0.198.5 for @maxdeviant

Zed Bot created

7a0634f Fix Clippy warning

Marshall Bowers created

bb40043 Ensure Edit Prediction provider is properly assigned on sign-in (#35885)

Click to expand commit body
This PR fixes an issue where Edit Predictions would not be available in
buffers that were opened when the workspace loaded.

The issue was that there was a race condition between fetching/setting
the authenticated user state and when we assigned the Edit Prediction
provider to buffers that were already opened.

We now wait for the event that we emit when we have successfully loaded
the user in order to assign the Edit Prediction provider, as we'll know
the user has been loaded into the `UserStore` by that point.

Closes https://github.com/zed-industries/zed/issues/35883

Release Notes:

- Fixed an issue where Edit Predictions were not working in buffers that
were open when the workspace initially loaded.

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

Marshall Bowers and Richard Feldman created

7595953 Bump to 0.198.4 for @maxdeviant

Zed Bot created

7e30d22 Fix Clippy warning

Marshall Bowers created

43e40fc language_model: Refresh the LLM token upon receiving a `UserUpdated` message from Cloud (#35839)

Click to expand commit body
This PR makes it so we refresh the LLM token upon receiving a
`UserUpdated` message from Cloud over the WebSocket connection.

Release Notes:

- N/A

Marshall Bowers created

885355c collab_ui: Show signed-out state when not connected to Collab (#35832)

Click to expand commit body
This PR updates signed-out state of the Collab panel to show when not
connected to Collab, as opposed to just when the user is signed-out.

Release Notes:

- N/A

Marshall Bowers created

cbf5dd1 client: Only connect to Collab automatically for Zed staff (#35827)

Click to expand commit body
This PR makes it so that only Zed staff connect to Collab automatically.

Anyone else can connect to Collab manually when they want to collaborate
(but this is not required for using Zed's LLM features).

Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>

Marshall Bowers and Richard created

4529fca client: Re-fetch the authenticated user when receiving a `UserUpdated` message from Cloud (#35807)

Click to expand commit body
This PR wires up handling for the new `UserUpdated` message coming from
Cloud over the WebSocket connection.

When we receive this message we will refresh the authenticated user.

Release Notes:

- N/A

Co-authored-by: Richard <richard@zed.dev>

Marshall Bowers and Richard created

c105699 Establish WebSocket connection to Cloud (#35734)

Click to expand commit body
This PR adds a new WebSocket connection to Cloud.

This connection will be used to push down notifications from the server
to the client.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Richard Feldman and Marshall Bowers created

6ac4a57 cloud_api_types: Add types for WebSocket protocol (#35753)

Click to expand commit body
This PR adds types for the Cloud WebSocket protocol to the
`cloud_api_types` crate.

Release Notes:

- N/A

Marshall Bowers created

53a3270 Fetch models right after signing in (#35711)

Click to expand commit body
This uses the `current_user` watch in the `UserStore` instead of looping
every 100ms in order to detect if the user had signed in.

We are changing this because we noticed it was causing the deterministic
executor in tests to never detect a "parking with nothing left to run"
situation.

This seems better in production as well, especially for users who never
sign in.

/cc @maxdeviant 

Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>

Antonio Scandurra and Ben Brandt created

0dad4b7 Ensure client reconnects if an error occurs during authentication (#35629)

Click to expand commit body
In #35471, we added a new `AuthenticationError` variant to the client
enum `Status`, but the reconnection logic was ignoring it when
determining whether to reconnect.

This pull request fixes that regression and introduces test coverage for
this case.

Release Notes:

- N/A

Antonio Scandurra created

ec8b5e2 Don't trigger authentication flow unless credentials expired (#35570)

Click to expand commit body
This fixes a regression introduced in
https://github.com/zed-industries/zed/pull/35471, where we treated
stored credentials as invalid when failing to retrieve the authenticated
user for any reason. This had the side effect of triggering the auth
flow even when e.g. the client/server had temporary networking issues.

This pull request changes the logic to only trigger authentication when
getting a 401 from the server.

Release Notes:

- N/A

Antonio Scandurra created

11b91c0 Format

Marshall Bowers created

3dc1c88 Start separating authentication from connection to collab (#35471)

Click to expand commit body
This pull request should be idempotent, but lays the groundwork for
avoiding to connect to collab in order to interact with AI features
provided by Zed.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>

Antonio Scandurra , Marshall Bowers , and Richard Feldman created

604fd98 inline_completion_button: Replace `UserStore` with `CloudUserStore` (#35456)

Click to expand commit body
This PR replaces usages of the `UserStore` in the inline completion
button with the `CloudUserStore`.

Release Notes:

- N/A

Marshall Bowers created

8484dca client: Remove unused `subscription_period` from `UserStore` (#35454)

Click to expand commit body
This PR removes the `subscription_period` field from the `UserStore`, as
its usage has been replaced by the `CloudUserStore`.

Release Notes:

- N/A

Marshall Bowers created

ef4484e cloud_api_client: Add `accept_terms_of_service` method (#35452)

Click to expand commit body
This PR adds an `accept_terms_of_service` method to the
`CloudApiClient`.

Release Notes:

- N/A

Marshall Bowers created

d512ef1 ai_onboarding: Read the plan from the `CloudUserStore` (#35451)

Click to expand commit body
This PR updates the AI onboarding to read the plan from the
`CloudUserStore` so that we don't need to connect to Collab.

Release Notes:

- N/A

Marshall Bowers created

5a70f21 Update Agent panel to work with `CloudUserStore` (#35436)

Click to expand commit body
This PR updates the Agent panel to work with the `CloudUserStore`
instead of the `UserStore`, reducing its reliance on being connected to
Collab to function.

Release Notes:

- N/A

---------

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

Marshall Bowers and Richard Feldman created

6e0999f Rework authentication for local Cloud/Collab development (#35450)

Click to expand commit body
This PR reworks authentication for developing Zed against a local
version of Cloud and/or Collab.

You will still connect the same way—using the `zed-local` script—but
will need to be running an instance of Cloud locally.

Release Notes:

- N/A

Marshall Bowers created

7fdbfc9 Acquire LLM token from Cloud instead of Collab for Edit Predictions (#35431)

Click to expand commit body
This PR updates the Zed Edit Prediction provider to acquire the LLM
token from Cloud instead of Collab to allow using Edit Predictions even
when disconnected from or unable to connect to the Collab server.

Release Notes:

- N/A

---------

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

Marshall Bowers and Richard Feldman created

cdeddaa cloud_api_client: Add `create_llm_token` method (#35428)

Click to expand commit body
This PR adds a `create_llm_token` method to the `CloudApiClient`.

Release Notes:

- N/A

Marshall Bowers created

2e3c30e cloud_api_types: Add types for `POST /client/llm_tokens` endpoint (#35420)

Click to expand commit body
This PR adds some types for the new `POST /client/llm_tokens` endpoint.

Release Notes:

- N/A

Co-authored-by: Richard <richard@zed.dev>

Marshall Bowers and Richard created

2b8e8f0 title_bar: Show the plan from the `CloudUserStore` (#35401)

Click to expand commit body
This PR updates the user menu in the title bar to show the plan from the
`CloudUserStore` instead of the `UserStore`.

We're still leveraging the RPC connection to listen for `UpdateUserPlan`
messages so that we can get live-updates from the server, but we are
merely using this as a signal to re-fetch the information from Cloud.

Release Notes:

- N/A

Marshall Bowers created

4d229f8 cloud_api_types: Add more data to the `GetAuthenticatedUserResponse` (#35384)

Click to expand commit body
This PR adds more data to the `GetAuthenticatedUserResponse`.

We now return more information about the authenticated user, as well as
their plan information.

Release Notes:

- N/A

Marshall Bowers created

3d8a3a4 client: Don't fetch the authenticated user once we have them (#35385)

Click to expand commit body
This PR makes it so we don't keep fetching the authenticated user once
we have them.

Release Notes:

- N/A

Marshall Bowers created

2aac7b2 Use the user from the `CloudUserStore` to drive the user menu (#35375)

Click to expand commit body
This PR updates the user menu in the title bar to base the "signed in"
state on the user in the `CloudUserStore` rather than the `UserStore`.

This makes it possible to be signed-in—at least, as far as the user menu
is concerned—even when disconnected from Collab.

Release Notes:

- N/A

Marshall Bowers created

0369349 client: Add `CloudUserStore` (#35370)

Click to expand commit body
This PR adds a new `CloudUserStore` for storing information about the
user retrieved from Cloud instead of Collab.

Release Notes:

- N/A

Marshall Bowers created

35ea2ac Add `cloud_api_client` and `cloud_api_types` crates (#35357)

Click to expand commit body
This PR adds two new crates for interacting with Cloud:

- `cloud_api_client` - The client that will be used to talk to Cloud.
- `cloud_api_types` - The types for the Cloud API that are shared
between Zed and Cloud.

Release Notes:

- N/A

Marshall Bowers created

f14a814 lsp: Correctly serialize errors for LSP requests + improve handling of unrecognized methods (#35738)

Click to expand commit body
We used to not respond at all to requests that we didn't have a handler
for, which is yuck. It may have left the language server waiting for the
response for no good reason. The other (worse) finding is that we did
not have a full definition of an Error type for LSP, which made it so
that a spec-compliant language server would fail to deserialize our
response (with an error). This then could lead to all sorts of
funkiness, including hangs and crashes on the language server's part.

Co-authored-by: Lukas <lukas@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>

Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Closes #ISSUE

Release Notes:

- Improved reporting of errors to language servers, which should improve
the stability of LSPs ran by Zed.

---------

Co-authored-by: Lukas <lukas@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Piotr Osiewicz , Lukas , Remco Smits , and Anthony Eid created

52a60e5 ci: Switch to Namespace (#35835)

Click to expand commit body
Follow-up to:
- https://github.com/zed-industries/zed/pull/35826

Release Notes:

- N/A

Peter Tripp created

8b25b81 ci: Switch from BuildJet to GitHub runners (#35826)

Click to expand commit body
In response to an ongoing BuildJet outage, consider migrating CI to
GitHub hosted runners.

Also includes revert of (causing flaky tests):
- https://github.com/zed-industries/zed/pull/35741

Downsides:
- Cost (2x)
- Force migration to Ubuntu 22.04 from 20.04 will bump our glibc minimum
from 2.31 to 2.35. Which would break RHEL 9.x (glibc 2.34), Ubuntu 20.04
(EOL) and derivatives.

Release Notes:

- N/A

Peter Tripp created

09845c0 zed 0.198.3

Joseph T. Lyons created

a6b9668 Use gpt-4o tokenizer for gpt-5 for now

Richard Feldman created

d5b6a4d Update GPT-5 input/output token counts

Richard Feldman created

bf6f715 Add GPT-5 support through OpenAI API

Richard Feldman created

1934e5c v0.198.x stable

Joseph T. Lyons created

295da07 Respect paths' content masks when copying them from MSAA texture to drawable (#35688)

Click to expand commit body
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/34992

Paths are rendered first to an intermediate MSAA texture, and then
copied to the final drawable. Because paths can have transparency, it's
important that pixels are not copied repeatedly if paths have
overlapping bounding boxes. When N paths have the same draw order, we
infer that they must have disjoint bounding boxes, so that we can copy
them each individually (as opposed to copying a single rect that
contains them all). Previously, the bounding box that we were using to
copy paths was not accounting for the path's content mask (but it is
accounted for in the bounds tree that determines their draw order).

This cause bugs like this, where certain path pixels spuriously had
their opacity doubled:

https://github.com/user-attachments/assets/d792e60c-790b-49ad-b435-6695daba430f

This PR fixes that bug.

* [x] mac
* [x] linux
* [x] windows

Release Notes:

- Fixed a bug where a selection's opacity was computed incorrectly when
it overlapped with another editor's selections in a certain way.

Max Brunsfeld created

85261bb assistant_tool: Fix rejecting edits deletes newly created and accepted files (#35622)

Click to expand commit body
Closes #34108
Closes #33234

This PR fixes a bug where a file remained in a Created state after
accept, causing following reject actions to incorrectly delete the file
instead of reverting back to previous state. Now it changes it to
Modified state upon "Accept All" and "Accept Hunk" (when all edits are
accepted).

- [x] Tests

Release Notes:

- Fixed issue where rejecting AI edits on newly created files would
delete the file instead of reverting to previous accepted state.

Smit Barmase created

8c159d0 zed 0.198.2

Joseph T. Lyons created

25f3f88 Add Claude Opus 4.1 (#35653)

Click to expand commit body
<img width="348" height="427" alt="Screenshot 2025-08-05 at 1 55 35 PM"
src="https://github.com/user-attachments/assets/52af17a5-0095-4ad9-9afe-ff27aab90e03"
/>

Release Notes:

- Added support for Claude Opus 4.1

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Richard Feldman and Marshall Bowers created

0c24950 ci: Double Buildjet ARM runner size (24GB to 48GB ram) (#35654)

Click to expand commit body
Release Notes:

- N/A

Peter Tripp created

900fe32 Fix escape in terminal with JetBrains keymap (#35585)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/35429
Closes https://github.com/zed-industries/zed/issues/35091
Follow-up to: https://github.com/zed-industries/zed/pull/35230

Release Notes:

- Fix `escape` in Terminal broken in JetBrains compatability keymaps

Peter Tripp created

863e39b Cherry-pick #35513 onto v0.198.x (#35591)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created