Commit graph

27719 commits

Author SHA1 Message Date
Marshall Bowers
5002156e32
ci: Add check for formatting default.json (#30034)
This PR adds a check in CI to ensure that `assets/settings/default.json`
is formatted consistently.

Release Notes:

- N/A
2025-05-06 18:55:26 +00:00
anteater
bd11bb5409
Add setting to hide onboarding banners (#29709)
Closes #28637 aka #29219.

Release Notes:

- Added `workspace.title_bar.show_onboarding_banner` preference to hide
onboarding banners.
- Relocated `workspace.show_user_picture` preference to
`workspace.title_bar.show_user_picture`.
2025-05-06 18:54:09 +00:00
Antonio Scandurra
c92b2e31e1
Avoid panicking when edit agent emits an empty old_text tag (#30030)
Release Notes:

- Fixed a panic that could sometimes occur when the agent applies edits.

Co-authored-by: Nathan <nathan@zed.dev>
2025-05-06 18:20:10 +00:00
Piotr Osiewicz
09d3ff9dbe
debugger: Rework language association with the debuggers (#29945)
- Languages now define their preferred debuggers in `config.toml`.
- `LanguageRegistry` now exposes language config even for languages that
are not yet loaded. This necessitated extension registry changes (we now
deserialize config.toml of all language entries when loading new
extension index), but it should be backwards compatible with the old
format. /cc @maxdeviant

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
2025-05-06 20:16:41 +02:00
Marshall Bowers
544e8fc46c
agent: Don't render trial upsell when not using the Zed provider (#30029)
This PR makes it so we don't render the trial upsell when not using the
Zed provider.

Release Notes:

- Agent Beta: Changed Zed Pro trial upsell to only be displayed when
using a model through the Zed provider.
2025-05-06 18:07:25 +00:00
Cole Miller
b83d00d69b
agent: Fix "tool cancelled" status being overapplied to failed tool calls (#30021)
Release Notes:

- Agent Beta: Fixed a bug that caused past failed tool calls to
incorrectly display as cancelled by the user.
2025-05-06 17:53:00 +00:00
Marshall Bowers
7a9165d5ce
agent: Don't render usage callouts when not using the Zed provider (#30025)
This PR makes it so we don't render the usage callouts when not using
the Zed provider.

Release Notes:

- Agent Beta: Changed usage callouts to only be displayed when using a
model through the Zed provider.
2025-05-06 17:50:26 +00:00
Bennet Bo Fenner
80236d0bb9
agent: Handle context servers that do not provide a configuration in MCP setup dialog (#30023)
<img width="674" alt="image"
src="https://github.com/user-attachments/assets/0ccb89e2-1dc1-4caf-88a7-49159f43979f"
/>
<img width="675" alt="image"
src="https://github.com/user-attachments/assets/790e5d45-905e-45da-affa-04ddd1d33c65"
/>

Release Notes:

- N/A
2025-05-06 17:18:49 +00:00
Umesh Yadav
a743035286
lmstudio: Fix streaming not working in v0.3.15 (#30013)
Closes #29781

Tested this with llama3, gemma3 and qwen3.

This is a breaking change, which means after adding this code changes in
future version zed we will require atleast lmstudio >= 0.3.15. For
context why it's breaking changes check out the issue: #29781.

What this doesn't try to solve is:

* Tool calling, thinking text rendering. Will raise a seperate PR for
these as those are not required in this PR to make it work.


https://github.com/user-attachments/assets/945f9c73-6323-4a88-92e2-2219b760a249

Release Notes:

- lmstudio: Fixed Zed support for LMStudio >= v0.3.15 (breaking change -- older versions are no longer supported).

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-06 12:59:36 -04:00
Piotr Osiewicz
bbfcd885ab
debugger: Allow locators to generate full debug scenarios (#30014)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-05-06 18:39:49 +02:00
Marshall Bowers
a378b3f300
collab: Treat staff as having usage-based pricing enabled (#30020)
This PR makes it so staff are treated as having opted-in to usage-based
pricing.

Release Notes:

- N/A
2025-05-06 16:06:03 +00:00
Cole Miller
6d2c39c265
Fix checkpoints not being rendered (#30019)
Closes #ISSUE

Release Notes:

- Agent Beta: Fixed a bug causing "Restore Checkpoint" buttons in the
agent panel not to be rendered.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-05-06 15:59:06 +00:00
Cole Miller
1a80103eaf
Silence error log when deserializing agent panel navigation history (#30011)
Closes #ISSUE

Release Notes:

- N/A
2025-05-06 11:46:23 -04:00
Marshall Bowers
6cb436565f
collab: Disable usage-based billing thresholds (#30016)
This PR disables the usage-based billing thresholds.

Release Notes:

- N/A
2025-05-06 15:21:22 +00:00
Kirill Bulatov
007fd0586a
Adds a way to dismiss workspace notifications (#30015)
Closes https://github.com/zed-industries/zed/issues/10140

* On `menu::Cancel` action (`ESC`), close notifications, one by one, if
`Workspace` gets to handle this action.
More specific, focused items contexts (e.g. `Editor`) take priority.

* Allows to temporarily suppress notifications of this kind either by
clicking a corresponding button in the UI, or using
`workspace::SuppressNotification` action.

This might not work well out of the box for all notifications and might
require further improvement.


https://github.com/user-attachments/assets/0ea49ee6-cd21-464f-ba74-fc40f7a8dedf


Release Notes:

- Added a way to dismiss workspace notifications
2025-05-06 18:15:26 +03:00
Cole Miller
7d361ec97e
Fall back to old key when loading agent settings (#30001)
This PR updates #29943 to fall back to loading agent panel settings from
the old `assistant` key if the `agent` key is not present. Edits to
these settings will also target `assistant` in this situation instead of
`agent` as before.

Release Notes:

- Agent Beta: Fixed a regression that caused the agent panel not to
load, or buttons in the agent panel not to work.
2025-05-06 14:31:38 +00:00
drathier
a9d5b2064e
docs: Add link to formatter settings from configuring-languages (#29981)
Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-06 10:29:58 -04:00
Antonio Scandurra
0f50e6b1d1
Fix error when requesting completion to Copilot Chat without tools (#30007)
The API will return a Bad Request (with no error message) when tools
were used previously in the conversation but no tools are provided as
part of a new request.

Inserting a dummy tool seems to circumvent this error.

Release Notes:

- Fixed an error that could sometimes occur when editing using Copilot
Chat.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-05-06 14:19:59 +00:00
Marshall Bowers
fed5f89f8d
agent: Add enabled indicator in Max Mode tooltip (#30008)
This PR adds an enabled indicator in the Max Mode tooltip to show when
it is enabled:

<img width="409" alt="Screenshot 2025-05-06 at 9 49 48 AM"
src="https://github.com/user-attachments/assets/43d3f6dd-5658-467a-9df9-606ce326426a"
/>

Release Notes:

- Agent Beta: Added an indicator in the Max Mode tooltip to show when it
is enabled.

Co-authored-by: Danilo <danilo@zed.dev>
2025-05-06 14:07:31 +00:00
Marshall Bowers
096355915a
agent: Add label to Max Mode toggle (#30003)
This PR adds a label to the Max Mode toggle, for increased clarity:

<img width="647" alt="Screenshot 2025-05-06 at 9 16 35 AM"
src="https://github.com/user-attachments/assets/38cd55fb-43ad-430b-8b4c-5adf707317cf"
/>

Release Notes:

- Agent Beta: Added a label to the Max Mode toggle.
2025-05-06 09:40:20 -04:00
Bennet Bo Fenner
e44367c6d0
agent: Disable claude-3-7-sonnet-thinking tool support for Copilot Chat (#29999)
We started getting Bad Requests from the Copilot Chat API.
Seems like Microsoft stopped supporting this:
<img width="331" alt="image"
src="https://github.com/user-attachments/assets/46050063-f031-4836-82ff-219bdd45639a"
/>


Release Notes:

- agent: Disable `claude-3-7-sonnet-thinking` for Copilot Chat Provider
because it is not supported by Copilot Chat

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-06 12:47:26 +00:00
Antonio Scandurra
07e6e49583
Add new editing eval scenario and improve it substantially (#29997)
This improves the new eval scenario by ~80% (`0.29` vs `0.525`) without
decreasing performance in the other evals.

Release Notes:

- Improved the performance of the `edit_file` tool.
2025-05-06 12:22:42 +00:00
Fernando Tagawa
6e9f8f997e
markdown: Ignore html comments (#28318)
Closes #28300

| Before | After |
| ------ | ----- |
|
![Screenshot_20250408_073355](https://github.com/user-attachments/assets/50dcb56d-bc70-4329-94cb-5b848f265c97)
|
![Screenshot_20250408_073322](https://github.com/user-attachments/assets/ba5c519a-bb34-4724-9c14-3278c6c09afd)
|

Release Notes:

- N/A
2025-05-06 14:55:07 +03:00
Ben Brandt
daba603e27
agent: Fix Open Thread as Markdown not working when another panel is focused (#29993)
Release Notes:

- agent: Fix Open Thread as Markdown not working when another panel is
focused

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-05-06 12:56:01 +02:00
Oleksiy Syvokon
ac007139ab
evals: Enable Python LSP (#29987)
We now have one eval that uses a Python repo


Release Notes:

- N/A
2025-05-06 10:28:59 +00:00
Conrad Irwin
68793c0ac2
Debug adapters log to console (#29957)
Closes #ISSUE

Release Notes:

- N/A
2025-05-06 11:21:34 +01:00
Agus Zubiaga
de554589a8
agent: Add date separators to Thread History (#29961)
Adds time-bucket separators to the thread history list:


https://github.com/user-attachments/assets/c9ac3ec4-b632-4ea5-8234-382b48de2bd6

Note: I'm simulating that Today is next Thursday so that I can show the
"This Week" bucket.

Release Notes:

- agent: Add date separators to Thread History
2025-05-06 10:18:48 +00:00
Conrad Irwin
4fdd14c3d8
Remove another unwrap on regex compilation (#29984)
Follow up to #29979

Release Notes:

- Fixed a (hypothetical) panic in terminal search
2025-05-06 11:18:03 +01:00
Murt
848c4f77a6
fix(vim): Store up to the 9th numbered register instead of 7th (#29986)
Release Notes:

- Fixed an issue where we only automatically stored 7 numbered registers
instead of 9
2025-05-06 11:17:45 +01:00
Finn Evers
06794f35bc
assistant: Do not create new context on load (#29480)
Closes https://github.com/zed-industries/zed/issues/27673
Closes https://github.com/zed-industries/zed/issues/29344
Closes #29863 

This PR fixes an issue where Zed was showing no language and `4:1` as a
line/column value on startup, as described in the linked issues. You can
actually see in the first issue that the user also experiences the same
issue as described in the second one, as his line/column value is
noticably also `4:1`.


https://github.com/user-attachments/assets/bb60e387-f4b8-4e05-80b3-4dadf1a01262

This issue arises because on assistant panel load, a new context is
created and its editor focused. However, the editor is not visible
despite having focus. The content for the editor for a new context is
`\n\n\n` and the cursor is inserted directly after that - this is where
the line:column position `4:1` comes from. For the assistant panel
editor, the language is intentionally hidden, this is why the language
is not shown on workspace load.
The issue is only present for as long as the user does not focus and
edit another editor, then that instance is focused and everything starts
to work properly again.

As this issue only arises with the old assistant panel, some staff
members were unable to reproduce in the linked issues. Once you set
`export ZED_DISABLE_STAFF=1` in your environment, you should also be
able to reproduce this issue consistently.

--- 

This PR fixes the issue by not creating a new context on assistant panel
load. This should not cause any regressions; every other code path I
checked creates a new context if no context is yet present.
Additionally, this also seems somewhat more reasonable, as users which
have the assistant panel disabled will never need a new context anyway,
so no context should be created.

In the following video, you can see this fixes the issue when the
assistant panel was not open the last time Zed was opened. If the panel
was open before Zed was closed, we will still properly focus the panel
and then the `4:1` will show again, which in that case is correct. The
assistant panel editor is focused and the missing language as well as
the line number then match what the user sees, experiences and expects.


https://github.com/user-attachments/assets/224a786b-52c7-4212-bccb-dff6d9db62c3


Release Notes:

- Fixed an issue where Zed would show no language and an incorrect
line/column value on startup.

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-06 11:38:08 +02:00
Conrad Irwin
ef31252ef8
Fix panic in update_selection_occurrence_highlights (#29979)
Closes #ISSUE

Release Notes:

- Fixed a (rare) panic when highlighting text in the editor
2025-05-06 10:23:51 +01:00
Smit Barmase
5640265160
language: Fix larger syntax node when cursor is at end of word or line (#29978)
Closes #28699

Fixes two cases in the `editor::SelectLargerSyntaxNode` action:
1. When cursor is at the end of a word, it now selects that word first
instead of selecting the whole line.
2. When cursor is at the end of a line, it now selects that line first
instead of selecting the whole code block.

Before and After:


https://github.com/user-attachments/assets/233b891e-15f1-4f10-a51f-75693323c2bd

Release Notes:

- Fixed `editor::SelectLargerSyntaxNode` to properly select nodes when
the cursor is positioned at the end of words or lines.
2025-05-06 14:43:28 +05:30
Shashank Verma
9d97e08e4f
title_bar: Add icon for project branch trigger button (#29494)
Added icon for branch switcher in title bar

| `main`    | This PR |
| -------- | ------- |
| <img width="196" alt="Screenshot 2025-04-27 at 1 02 47 PM"
src="https://github.com/user-attachments/assets/5625f6c5-7b11-4f3d-bed8-6ea3b74d9416"
/> | <img width="217" alt="Screenshot 2025-04-27 at 1 07 11 PM"
src="https://github.com/user-attachments/assets/6c83daa6-fa71-44a8-8f6b-e33b2217b29e"
/> |

Release Notes:

- Added icon for branch switcher in title bar

---------

Signed-off-by: Shashank Verma <shashank.verma2002@gmail.com>
2025-05-06 08:38:24 +00:00
tidely
6b37646179
client: Implement Socks identification and authorization (#29591)
Closes #28792 

supersedes #28854 

- Adds support for Socks V4 Identification using a userid, and
Authorization using a username and password on Socks V5.
- Added tests for parsing various Socks proxy urls.
- Added a test for making sure a misconfigured socks proxy url doesn't
expose the user by connecting directly as a fallback.

Release Notes:

- Added support for identification and authorization when using a sock
proxy
2025-05-06 08:03:56 +00:00
Aaron Feickert
da3a696a60
editor: Remove extra quotes from outline search term (#29829)
The outline panel includes quotes around search terms. The rendering
makes it somewhat ambiguous whether these quotes are part of the search
term and are unnecessary, especially given other rendering
differentiation. This PR removes them.

Release Notes:

- N/A
2025-05-06 10:50:33 +03:00
Finn Evers
6bacea28bc
editor: Do not insert scrollbar hitboxes when scrollbars are never to be shown (#29316)
This PR fixes an issue where scrollbar hitboxes were still inserted for
editors despite scrollbars being programmatically disabled via the
`show_scrollbars`field. This is basically the same fix as in #27467.

The thought process here is that the motivation for `show_scrollbars` is
not to just hide the scrollbars in the editor, but to fully disable
scrollbars for the associated editor. However, this is currently not the
case, as a functioning hitbox for each scrollbar is stil inserted. For
example, the behavior with the old assistant panel can be seen below:


https://github.com/user-attachments/assets/18af6338-dd28-4794-a6a6-5b9691b243f2

Whilst the scrollbar is not visible, there is still a scrollbar hitbox
inserted which triggers hover events and is fully functioning.


This PR fixes this by fully skipping the scrollbar layouting whenever
`show_scrollbars` is set to false, preventing the hitboxes from being
inserted.


https://github.com/user-attachments/assets/b6bb6dc7-902f-4383-bf03-506d0a57ec77


Release Notes:

- N/A
2025-05-06 10:25:01 +03:00
Finn Evers
3b90d62bb2
editor: Implement hover color for scrollbars (#28064)
This PR adds hover colors to the editor scrollbars:


https://github.com/user-attachments/assets/6600810e-7e8e-4dee-9bef-b7be303b5fe0

The color used here is the existing `scrollbar_thumb_hover_background`
color provided by themes.

Looking forward to feedback 😄 

Release Notes:

- Added hover state to editor scrollbars.
2025-05-06 10:17:43 +03:00
Ivan Banov
55a0bb2a91
Add default tab_size for Elm (#29547)
This PR updates the default tab size to 4 spaces, aligning with the
standard adopted by the Elm community and the official language
formatter (elm-format).

Reference: [elm-format tab size
default](https://github.com/avh4/elm-format/blob/main/elm-format-lib/src/Box.hs#L249)
2025-05-06 10:14:02 +03:00
Antonio Scandurra
210c338df4
Restore original file content when rejecting an overwritten file (#29974)
Release Notes:

- Fixed a bug that would cause rejecting a hunk from the agent to delete
the file if the agent had decided to rewrite that file from scratch.
2025-05-06 07:05:55 +00:00
neunato
86cc5c2b55
Apply autoscroll_on_clicks when extending selection (#28235)
Closes https://github.com/zed-industries/zed/issues/22240

Release Notes:

- Fixed `autoscroll_on_clicks` not being applied when expanding
selection

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-05-06 07:05:08 +00:00
Anthony Eid
a0bfe4d293
debugger: Fix debug scenario's defined in debug.json not using passed in build task (#29973)
There were two bugs that caused user-defined debug scenarios from being
able to run a build task.

1. DebugRequest would be deserialized to `Attach` even when `process_id`
wasn't defined in a user's configuration file. This has been fixed by
adding our own deserializer that defaults to None if there are no fields
present instead of `Attach`, and I added tests to prevent regressions.
2. Debug scenario resolve phase never got the active buffer when
spawning a debug session from the new session modal. This has been
worked around by passing in the worktree_id of a debug scenario in the
scenario picker and the active worktree_id otherwise.

Release Notes:

- N/A
2025-05-06 08:54:57 +02:00
neunato
52ea501f4f
Fix multicursors not being added when clicking on line numbers (#28263)
Closes https://github.com/zed-industries/zed/issues/21372

Release Notes:

- Fixed multicursors not being added when clicking on line numbers

-----

I tracked this down to
b6ee367ee0/crates/editor/src/element.rs (L591)

being forwarded to `editor.select()` a few lines below
b6ee367ee0/crates/editor/src/element.rs (L667-L675)

resulting in `add == true` and `click_count == 3`, triggering this
b6ee367ee0/crates/editor/src/editor.rs (L2750-L2752)

... and we end up removing the previous selection. 

This was added [in
2021](bfecdb7bc0)
under this reasoning:

> This prevents selections added in earlier clicks from being rendered
under the pending selection.

which no longer seems to be an issue, so removing should be safe?

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-06 09:45:43 +03:00
Francisco Fernandes
a07ba3c718
editor: Fix inconsistent SelectPrevious behavior (#27695)
When starting a selection from only carets, the action
`editor::SelectPrevious` behaved in a manner inconsistent with
`editor::SelectNext` as well as equivalent keybinds in editors such as
VSCode, by selecting substrings of whole words matching the initially
selected string on subsequent triggers.

This fix brings the `select_previous` function in line with
`select_next_internal`by calling `select_match_ranges` (previously an
internal function of `select_next_internal`) in the same way it was
previously used in the function that exhibited expected behavior.

Furthermore, the relevant test was adapted to bring it in line with the
equivalent test for the `editor::SelectNext` action

Closes #24346

Release Notes:

- Fixed inconsistent SelectPrevious behavior
2025-05-06 09:37:58 +03:00
Max Brunsfeld
2eb10ab9fb
openai: Don't append tool calls to prior assistant messages (#29969)
Closes https://github.com/zed-industries/zed/issues/29821

Release Notes:

- Fixed an issue in the agent panel where OpenAI requests would fail if
the assistant begins its response with a tool call.
2025-05-05 22:04:56 -07:00
Eva Pace
55fd8352e4
assistant_slash_commands: Be more precise in content type matching (#29124)
While investigating https://github.com/zed-industries/zed/issues/28076,
I found out often times the content type header of a website comes with
more data, such as the `charset`. So instead of doing an equal
comparison, I changed to a `starts_with`.

You can see an example here:

```shell
$ curl -sS -D - https://github.com/zed-industries/zed/blob/main/Cargo.toml -o /dev/null | head -n 10
HTTP/2 200
date: Sun, 20 Apr 2025 10:19:52 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame,Accept-Encoding, Accept, X-Requested-With
etag: W/"92dabf048b34d04a1b1d94e29cae4aca"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
```

Release Notes:

- Improved Content Type matching of `/fetch` commands in Assistant

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-06 04:38:03 +00:00
Michael Sloan
0b10eb7577
Remove Tree-sitter AST logging from SelectLargerSyntaxNode (#29949)
Release Notes:

- N/A
2025-05-06 04:30:06 +00:00
Jason Lee
3d737fd268
gpui: Update argument name of the from_corners method (#29968)
Release Notes:

- N/A
2025-05-06 07:17:39 +03:00
Nate Butler
c5d8407df4
component: Component crate cleanup (#29967)
This PR further organizes and documents the component crate. It:

- Simplifies the component registry
- Gives access to `ComponentMetadata` sooner
- Enables lookup by id in preview extension implementations
(`ComponentId` -> `ComponentMetadata`)
- Should slightly improve the performance of ComponentPreview

It also brings component statuses to the Component trait:

![CleanShot 2025-05-05 at 23 27
11@2x](https://github.com/user-attachments/assets/dd95ede6-bc90-4de4-90c6-3e5e064fd676)

![CleanShot 2025-05-05 at 23 27
40@2x](https://github.com/user-attachments/assets/9520aece-04c2-418b-95e1-c11aa60a66ca)

![CleanShot 2025-05-05 at 23 27
57@2x](https://github.com/user-attachments/assets/db1713d5-9831-4d00-9b29-1fd51c25fcba)

Release Notes:

- N/A
2025-05-06 03:41:52 +00:00
Danilo Leal
377909a646
Fix toolbar spacing regressions (#29964)
Cleaning up as I introduced a few regressions in this PR:
https://github.com/zed-industries/zed/pull/29866.

Release Notes:

- N/A
2025-05-05 22:28:35 -03:00
Cole Miller
bdd911f89e
Update assistant to agent in settings and keymaps (#29943)
Closes #ISSUE

Release Notes:

- Agent Beta: Renamed the top-level `assistant` settings key to `agent`.
A migration for existing settings files is included.
- Agent Beta: Moved the `assistant::ToggleFocus`,
`assistant::ToggleModelSelector`, and `assistant::OpenRulesLibrary`
actions to the `agent` namespace. Existing keymaps that mention these
actions by their old names will continue to work.

---------

Co-authored-by: Max <max@zed.dev>
2025-05-06 01:02:56 +00:00