Commit graph

30059 commits

Author SHA1 Message Date
Zed Bot
5067174d9b Bump to 0.199.5 for @osyvokon 2025-08-12 19:18:59 +00:00
Rishabh Bothra
2c312cef7f language_models: Add vision support for OpenAI gpt-5, gpt-5-mini, and gpt-5-nano models (#36047)
## Summary
Enable image processing capabilities for GPT-5 series models by updating
the `supports_images()` method.

## Changes
- Add vision support for `gpt-5`, `gpt-5-mini`, and `gpt-5-nano` models
- Update `supports_images()` method in
`crates/language_models/src/provider/open_ai.rs`

## Models with Vision Support (after this PR)
- gpt-4o
- gpt-4o-mini
- gpt-4.1
- gpt-4.1-mini
- gpt-4.1-nano
- gpt-5 (new)
- gpt-5-mini (new)
- gpt-5-nano (new)
- o1
- o3
- o4-mini

This brings GPT-5 vision capabilities in line with other OpenAI models
that support image processing.

Release Notes:

- Added vision support for OpenAI models
2025-08-12 21:54:28 +03:00
Oleksiy Syvokon
6c90e882cc open_ai: Send prompt_cache_key to improve caching (#36065)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-08-12 21:53:59 +03:00
Oleksiy Syvokon
de4cf6e423 open_ai: Log inputs that caused parsing errors (#36063)
Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-08-12 21:53:55 +03:00
Michael Sloan
a72432d968 zeta: Add latency telemetry for 1% of edit predictions (#36020)
Release Notes:

- N/A

Co-authored-by: Oleksiy <oleksiy@zed.dev>
2025-08-12 14:38:47 +03:00
Zed Bot
0220c5c92e Bump to 0.199.4 for @smitbarmase 2025-08-12 05:59:18 +00:00
smit
b13d048737 editor: Fix Follow Agent unexpectedly stopping during edits (#35845)
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.
2025-08-12 10:53:58 +05:30
smit
4659eaf392 language_models: Fix high memory consumption while using Agent Panel (#35764)
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.
2025-08-12 10:53:41 +05:30
Piotr Osiewicz
008e905b44 python: Create DAP download directory sooner (#35986)
Closes #35980

Release Notes:

- Fixed Python Debug sessions not starting up when a session is started
up for the first time.
2025-08-11 18:59:54 +02:00
Kirill Bulatov
e24aa382a4 Fill capabilities on project (re)join (#35892)
Follow-up of https://github.com/zed-industries/zed/pull/35682

Release Notes:

- N/A

Co-authored-by: Smit Barmase <smit@zed.dev>
2025-08-08 23:13:42 +03:00
Peter Tripp
a1ad6af1b1
ci: Use faster Linux ARM runners (#35880)
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
2025-08-08 15:20:31 -04:00
Zed Bot
d6223feb34 Bump to 0.199.3 for @maxdeviant 2025-08-08 18:34:50 +00:00
Marshall Bowers
ff196875d9 Ensure Edit Prediction provider is properly assigned on sign-in (#35885)
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>
2025-08-08 14:28:29 -04:00
Zed Bot
9c1d47bc59 Bump to 0.199.2 for @maxdeviant 2025-08-08 12:52:09 +00:00
Marshall Bowers
12d9fdc4e3 language_model: Refresh the LLM token upon receiving a UserUpdated message from Cloud (#35839)
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
2025-08-08 08:43:49 -04:00
Marshall Bowers
33804db0ef collab_ui: Show signed-out state when not connected to Collab (#35832)
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
2025-08-08 08:43:41 -04:00
Marshall Bowers
d50af2f39c client: Only connect to Collab automatically for Zed staff (#35827)
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>
2025-08-08 08:43:35 -04:00
Marshall Bowers
8c460ba15c client: Re-fetch the authenticated user when receiving a UserUpdated message from Cloud (#35807)
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>
2025-08-08 08:43:26 -04:00
Richard Feldman
00352aa185 Establish WebSocket connection to Cloud (#35734)
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>
2025-08-08 08:43:17 -04:00
Marshall Bowers
4d465099eb cloud_api_types: Add types for WebSocket protocol (#35753)
This PR adds types for the Cloud WebSocket protocol to the
`cloud_api_types` crate.

Release Notes:

- N/A
2025-08-08 08:43:09 -04:00
Piotr Osiewicz
f31762f19b lsp: Correctly serialize errors for LSP requests + improve handling of unrecognized methods (#35738)
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>
2025-08-08 07:55:58 -04:00
Peter Tripp
6dbd498cea
ci: Switch to Namespace (#35835)
Follow-up to:
- https://github.com/zed-industries/zed/pull/35826

Release Notes:

- N/A
2025-08-07 19:17:17 -04:00
Peter Tripp
da8da08bc3
ci: Switch from BuildJet to GitHub runners (#35826)
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
2025-08-07 19:15:53 -04:00
Joseph T. Lyons
526bdf6a03 zed 0.199.1 2025-08-07 15:15:12 -04:00
Richard Feldman
e2be6611db Use gpt-4o tokenizer for gpt-5 for now 2025-08-07 15:11:31 -04:00
Richard Feldman
52fad99449 Update GPT-5 input/output token counts 2025-08-07 15:11:31 -04:00
Richard Feldman
40642aa3ac Add GPT-5 support through OpenAI API 2025-08-07 15:11:31 -04:00
Kirill Bulatov
20efc2333e Actually update remote collab capabilities (#35809)
Follow-up of https://github.com/zed-industries/zed/pull/35682

Release Notes:

- N/A
2025-08-07 21:05:45 +03:00
Joseph T. Lyons
73421006d5 v0.199.x preview 2025-08-06 08:40:17 -04:00
Agus Zubiaga
3bbd32b70e
Support CC migrate-installer path (#35717)
If we can't find CC in the PATH, we'll now fall back to a known local
install path.

Release Notes:

- N/A
2025-08-06 12:23:47 +00:00
Antonio Scandurra
ecd182c52f
Drop native agent session when AcpThread gets released (#35713)
Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-06 10:20:40 +00:00
Antonio Scandurra
6f5867fc88
Fetch models right after signing in (#35711)
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>
2025-08-06 10:04:07 +00:00
Lukas Wirth
0302f6356e
Ignore metadata file in RustLspAdapter::get_cached_server_binary (#35708)
Follows https://github.com/zed-industries/zed/pull/35642

Release Notes:

- Fixed accidentally picking a non executable as a rust-analyzer server
when downloading fails
2025-08-06 09:08:32 +00:00
Ben Brandt
eb4b73b88e
ACP champagne (#35609)
cherry pick changes from #35510 onto latest main

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-06 09:01:06 +00:00
Lukas Wirth
69794db331
Prevent out of bounds access in recursive_score_match (#35630)
Closes https://github.com/zed-industries/zed/issues/33668

The recursive case increments both indices by 1, but only one of the two
had a base case check in the function prologue so the other could spill
over into a different matrix row or out of bounds entirely.

Lacking a test as I haven't figured out a test case yet.

Release Notes:

- Fixed out of bounds panic in fuzzy matching
2025-08-06 10:53:20 +02:00
Lukas Wirth
c59c436a11
Verify downloaded rust-analyzer and clang binaries by checking the artifact digest (#35642)
Release Notes:

- Added GitHub artifact digest verification for rust-analyzer and clangd
binary downloads, skipping downloads if cached binary digest is up to
date
- Added verification that cached rust-analyzer and clangd binaries are
executable, if not they are redownloaded

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-08-06 08:32:25 +00:00
Max Brunsfeld
40129147c6
Respect paths' content masks when copying them from MSAA texture to drawable (#35688)
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/34992

### Background

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.
2025-08-05 20:40:33 -07:00
Julia Ryan
a884e861e9
Tag crash reports with panic message and release (#35692)
This _should_ allow sentry to associate related panic events with the
same issue, but it doesn't change the issue title. I'm still working on
figuring out how to set those fields, but in the meantime this should at
least associate zed versions with crashes

Release Notes:

- N/A
2025-08-06 01:20:42 +00:00
Mikayla Maki
e8052d4a4e
Remove payload_type (#35690)
Release Notes:

- N/A
2025-08-06 01:18:21 +00:00
Julia Ryan
74e17c2f64
Fix panic-json writing (#35691)
We broke it in #35263 when we changed the open options to use
`create_new`

Release Notes:

- N/A
2025-08-06 01:11:16 +00:00
Mikayla Maki
53175263a1
Simplify ListState API (#35685)
Follow up to: https://github.com/zed-industries/zed/pull/35670,
simplifies the List state APIs so you no longer have to worry about
strong vs. weak pointers when rendering list items.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-06 00:02:26 +00:00
Max Brunsfeld
d0de81b0b4
windows: Handle scale factor change while window is maximized (#35686)
Fixes https://github.com/zed-industries/zed/issues/33257

Previously, the scale-factor-change-handling logic relied on
`SetWindowPos` enqueuing a `WM_SIZE` window event. But that does not
happen when the window is maximized. So when the scale factor changed,
maximized windows neglected to call their `resize` callback, and would
misinterpret the positions of mouse events.

This PR adds special logic for maximized windows, to ensure that the
size is updated appropriately.

Release Notes:

- N/A
2025-08-05 16:42:17 -07:00
Kirill Bulatov
9caa9d042a
Use new language server info on remote servers (#35682)
* Straightens out the `*_ext.rs` workflow for clangd and rust-analyzer:
no need to asynchronously query for the language server, as we sync that
information already.
* Fixes inlay hints editor menu toggle not being shown in the remote
sessions

Release Notes:

- Fixed inlay hints editor menu toggle not being shown in the remote
sessions
2025-08-05 23:24:40 +00:00
Danilo Leal
cc93175256
Recategorize a few items in the component preview (#35681)
Release Notes:

- N/A
2025-08-05 23:11:43 +00:00
Cole Miller
bc2108cbba
Render error state when agent binary exits unexpectedly (#35651)
This PR adds handling for the case where an agent binary exits
unexpectedly after successfully establishing a connection.

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
2025-08-05 22:52:08 +00:00
Marshall Bowers
142efbac0d
collab: Remove unused billing queries (#35679)
This PR removes some billing-related queries that are no longer used.

Release Notes:

- N/A
2025-08-05 22:42:45 +00:00
Danilo Leal
f10ffc2a72
ui: Fix switch component style when focused (#35678)
Just making sure the switch's dimensions aren't affected by the need to
having an outer border to represent focus.

Release Notes:

- N/A
2025-08-05 22:37:25 +00:00
Danilo Leal
30414d154e
onboarding: Adjust the AI upsell card depending on user's state (#35658)
Use includes centralizing what each plan delivers in one single file
(`plan_definitions.rs`).

Release Notes:

- N/A
2025-08-05 19:22:48 -03:00
Jason Lee
0025019db4
gpui: Press enter, space to trigger click to focused element (#35075)
Release Notes:

- N/A

> Any user interaction that is equivalent to a click, such as pressing
the Space key or Enter key while the element is focused. Note that this
only applies to elements with a default key event handler, and
therefore, excludes other elements that have been made focusable by
setting the
[tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex)
attribute.

https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Umesh Yadav <23421535+imumesh18@users.noreply.github.com>
2025-08-05 18:15:30 -04:00
Agus Zubiaga
b7469f5bc3
Fix ACP connection and thread leak (#35670)
When you switched away from an ACP thread, the `AcpThreadView` entity
(and thus thread, and subprocess) was leaked. This happened because we
were using `cx.processor` for the `list` state callback, which uses a
strong reference.

This PR changes the callback so that it holds a weak reference, and adds
some tests and assertions at various levels to make sure we don't
reintroduce the leak in the future.

Release Notes:

- N/A
2025-08-05 19:10:51 -03:00