Commit graph

21752 commits

Author SHA1 Message Date
Kirill Bulatov
a4aa446a20
Better match path-like strings in terminal (#30087)
Start to capture `foo/bar:20:in`-like strings as valid pointers to line
20 in a file

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

Release Notes:

- Fixed terminal cmd-click not registering `foo/bar:20:in`-like paths
2025-05-07 14:47:23 +00:00
Anthony Eid
a4e26e0710
debugger: Reduce indent level and step size in variable list (#30122)
This improves the look of the variable list when it's the debug panel is
docked on a side

### Before

![image](https://github.com/user-attachments/assets/6e886fc4-1579-4f4c-bda5-6850d080f34b)
### After

![image](https://github.com/user-attachments/assets/5c4528e5-aa01-4035-9f67-fdf22ce82e34)

Release Notes:

- N/A
2025-05-07 14:06:14 +00:00
Andrey Sitnik
2618191785
Add TypeScript support to ESLint flat config (#30044)
Sync ESLint flat config names with [the latest
docs](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file).
New ESLint has native support for `eslint.config.ts`

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-05-07 12:49:00 +00:00
Anthony Eid
1a520990cc
debugger: Add inline value tests (#29815)
## Context

This PR improves the accuracy of our inline values for Rust/Python. It
does this by only adding inline value hints to the last valid use of a
variable and checking whether variables are valid within a given scope
or not.

We also added tests for Rust/Python inline values and inline values
refreshing when stepping in a debug session.

### Future tasks
1. Handle functions that have inner functions defined within them.
2. Add inline values to variables that were used in inner scopes but not
defined in them.
3. Move the inline value provider trait and impls to the language trait
(or somewhere else).
4. Use Semantic tokens as the first inline value provider and fall back
to tree sitter
5. add let some variable statement, for loops, and function inline value
hints to Rust.
6. Make writing tests more streamlined. 
6.1 We should be able to write a test by only passing in variables,
language, source file, expected result, and stop position to a function.
7. Write a test that has coverage for selecting different stack frames. 

co-authored-by: Remco Smits \<djsmits12@gmail.com\>

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-05-07 12:39:35 +00:00
Anthony Eid
7bc3f74cab
Fix panel button context menu overlap with tooltip hint (#30108)
This fix works by disabling the tooltip whenever the menu is being
rendered.

### Before

![image](https://github.com/user-attachments/assets/0b275931-fd1f-4748-88dd-cb76a52f8810)
### After

![image](https://github.com/user-attachments/assets/7260eb48-3a24-43ee-8df7-b6c48e8a4024)


Release Notes:

- Fix panel button tooltip overlapping with the panel button's right
click menu
2025-05-07 12:33:13 +00:00
Conrad Irwin
02765947e0
Use the console for errors too (#29992)
Release Notes:

- N/A
2025-05-07 13:26:08 +01:00
Kirill Bulatov
f7e77123cc
Do not flicker when switching cmd-hovered words in terminal (#30098)
Closes https://github.com/zed-industries/zed/issues/25110


https://github.com/user-attachments/assets/4624c256-8dfb-48eb-a726-6cf130d946da

Terminal may update its hovered word way before reporting it to the
terminal view, and that processing the file check later.
Hence, store the terminal hover data in the terminal view and avoid
highlights when it's different from what the terminal has (as the source
of truth here).

In addition, now only does hover refreshes when the terminal hover
actually changes, not on every event report.

Release Notes:

- Fixed underline flicker when switching cmd-hovered words in terminal
2025-05-07 11:04:11 +00:00
Ben Brandt
c19a5c2fd6
Revert "Stop generating in the Agent panel when the user edits a previous message (#29915)" (#30092)
This reverts commit ce053c9bff.

Closes #ISSUE

Release Notes:

- N/A
2025-05-07 09:57:20 +00:00
Antonio Scandurra
9711fb49dc
Fix zero-sized message editors when context strip is empty (#30079)
Release Notes:

- Fixed a bug that would cause the message composer in the agent panel
to not render when the context strip was empty.

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2025-05-07 09:02:20 +00:00
Ron Harel
1fcd2647ed
workspace: Fix inactive pane dimming (#29473)
Closes #27173

Problem:

Active panes nested within axes were incorrectly receiving opacity
overlays, while inactive panes in nested structures would get multiple
overlays applied, making them appear darker than intended.

Solution:

I fixed this by distinguishing between leaf panes and axes in the
rendering pipeline, applying overlays only to elements that are both
leaf panes and not active, ensuring consistent visual treatment
regardless of their position in the hierarchy.

Release Notes:

- Fixed an issue where `inactive_opacity` settings would be applied to
panes multiple times and even to the active pane when nested within
another pane.
2025-05-07 09:02:34 +03:00
Cole Miller
03b635bb27
Avoid panic when opening thread as markdown in non-local project (#30061)
Right now `agent: open active thread as markdown` will always panic when
you try to use it over collab or when SSH remoting. This PR makes it log
an error instead (we should follow up by restoring full remote support).

Release Notes:

- Prevented `agent: open active thread as markdown` from panicking when
used in a non-local project.
2025-05-07 01:15:45 -04:00
Agus Zubiaga
264097e253
agent: Use correct timezone for thread history separators (#30059)
Turns out `naive_local` doesn't actually offset a `DateTime<Utc>` to the
local timezone before creating a `NaiveDate`.

Release Notes:

- agent: Use correct timezone for thread history separators
2025-05-07 04:41:04 +00:00
Marshall Bowers
38975586d4
agent: Tweak onboarding modal copy (#30057)
This PR tweaks the copy for the Agent's onboarding modal.

Release Notes:

- N/A
2025-05-07 02:02:13 +00:00
Marshall Bowers
5539d82ea6
agent: Remove feature flag checks (#30055)
This PR removes all of the feature flag checks related to the Agent.

Tried to do this in the least invasive way possible; we can follow up
with a full removal.

Release Notes:

- N/A
2025-05-06 21:38:05 -04:00
Mikayla Maki
0cdd8bdded
Restore tool cards on thread deserialization (#30053)
Release Notes:

- N/A

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-05-06 18:16:34 -07:00
Joseph T. Lyons
ab3e5cdc6c
Bump Zed to v0.187 (#30052)
Release Notes:

-N/A
2025-05-07 00:03:16 +00:00
Marshall Bowers
28e664c433
agent: Launch it (#30005)
This PR enables the Agent-related feature flags on the client.

Release Notes:

- N/A
2025-05-06 19:41:32 -04:00
Marshall Bowers
300da3b718
Add an onboarding banner for the Agent panel (#30050)
This PR adds an onboarding banner for the Agent panel:

<img width="262" alt="Screenshot 2025-05-06 at 6 54 58 PM"
src="https://github.com/user-attachments/assets/52849e64-7d5d-488c-8456-4d7bd97f8ebd"
/>

Release Notes:

- N/A
2025-05-06 23:41:04 +00:00
Marshall Bowers
0db8668404
git_ui: Fix resetting of onboarding banner (#30051)
This PR fixes an issue where the Git onboarding banner wasn't able to be
reset.

Release Notes:

- N/A
2025-05-06 23:20:37 +00:00
Michael Sloan
ffc07a2651
Use agent panel font size for all content in thread / history views and fix text thread font size adjust (#30041)
Release Notes:

- N/A
2025-05-06 23:15:58 +00:00
Piotr Osiewicz
bbffe1ec2c
debugger: Unify landing state for new session modal (#30046)
Closes #ISSUE

Release Notes:

- N/A
2025-05-07 00:27:50 +02:00
Marshall Bowers
cec1d2584b
collab: Don't transfer existing usage when upgrading to Zed Pro (#30045)
This PR makes it so we don't transfer existing usage over when upgrading
from a trial to Zed Pro.

Release Notes:

- N/A
2025-05-06 17:29:06 -04:00
Agus Zubiaga
3cdf5ce947
agent: Allow customizing temperature by provider/model (#30033)
Adds a new `agent.model_parameters` setting that allows the user to
specify a custom temperature for a provider AND/OR model:

```json5
    "model_parameters": [
      // To set parameters for all requests to OpenAI models:
      {
        "provider": "openai",
        "temperature": 0.5
      },
      // To set parameters for all requests in general:
      {
        "temperature": 0
      },
      // To set parameters for a specific provider and model:
      {
        "provider": "zed.dev",
        "model": "claude-3-7-sonnet-latest",
        "temperature": 1.0
      }
    ],
```

Release Notes:

- agent: Allow customizing temperature by provider/model

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-06 20:36:25 +00:00
Mikayla Maki
0055a20512
Remember max mode setting per-thread and add a user setting (#30042)
Supersedes: https://github.com/zed-industries/zed/pull/29936

Thanks for your contribution @imumesh18, but we had a slightly different
take on it :)

Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-06 20:11:21 +00:00
Marshall Bowers
6bb6e48171
agent: Only show the trial upsell in the thread view (#30040)
This PR makes it so we only show the trial upsell in the thread view.

Fixes https://github.com/zed-industries/zed/issues/30037.

Release Notes:

- Agent Beta: Changed the trial upsell to only be visible in the thread
view.
2025-05-06 19:47:51 +00:00
Nathan Sobo
91cfce09bc
Clean up some styling issues in the editing tool card and render the animated lines a bit smaller (#30038)
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-05-06 19:31:50 +00:00
Mikayla Maki
0fdc04532a
Fix token count not appearing for the first message (#30035)
Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-06 18:57:22 +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
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