Commit graph

28232 commits

Author SHA1 Message Date
tidely
8b59776320
gpui: Remove unnecessary String (#31314)
Replaces a `String` with `&'static str`

Release Notes:

- N/A
2025-05-26 11:17:03 +03:00
Mikal Sande
206be2b348
Make sure GoPlsAdapter produces output that can be rendered as Markdown (#30911)
Closes [#30695](https://github.com/zed-industries/zed/issues/30695)

Adds `diagnostic_message_to_markdown()` to GoLspAdapter to ensure that
Go diagnostic messages are considered Markdown formatted and leading
whitespace is removed to get the Markdown to display properly.

Before:
<img width="805" alt="image"
src="https://github.com/user-attachments/assets/8a09276a-1f45-42de-9744-d7e620d5ebb6"
/>


After:
<img width="805" alt="image"
src="https://github.com/user-attachments/assets/bbe4aeaf-a3c6-4e85-bb10-89b3f4e27965"
/>

Release Notes:

- Fixed display of Go diagnostics, it should be displayed as Markdown
not as escaped string.
2025-05-26 11:04:13 +03:00
Mani Rash Ahmadi
51b25b5c22
agent: Ensure context meter updates when context is cleared (#30320)
Addresses an issue where the agent context token meter in the panel
toolbar (showing usage like "X / Y tokens") failed to update its count
after the user cleared the current context via the context editor UI.
While the meter updated correctly when adding items, clearing them left
the display showing the old count.

The root cause was traced to the `ContextStore::clear` method in
`crates/agent/src/context_store.rs`. This method correctly cleared the
internal data structures holding the context items but neglected to call
`cx.notify()` to inform listeners of the state change. Consequently, the
UI components responsible for displaying the token count were not
triggered to re-render with the new (presumably lower) count.

This PR fixes the issue by adding the missing `cx.notify()` call to the
`ContextStore::clear` method. This ensures listeners are notified when
the context set is cleared, allowing the token meter UI to update
correctly.

Release Notes:

- Fixed an issue where the agent context token meter did not update when
the context was cleared.
2025-05-26 09:51:00 +02:00
5brian
2f274b2a89
vim: Document ctrl-s override (#30803)
Closes https://github.com/zed-industries/zed/issues/30559

Release Notes:

- N/A
2025-05-26 10:30:00 +03:00
Tymoteusz Makowski
88fb623efa
Display the correct git push flag when force-pushing (#30818)
When I force pushed via the Git panel and noticed that `git push
--force` command got logged at the bottom. I wanted to add an option to
use `--force-with-lease` instead. However, upon investigation, it seems
`--force-with-lease` is already being used for the executed command:


5112fcebeb/crates/git/src/repository.rs (L1100)

And there is a mismatch with the displayed message:


5112fcebeb/crates/project/src/git_store.rs (L3555)

Release Notes:

- Fixed the displayed flag name when force pushing
2025-05-26 10:26:45 +03:00
Michael Angerman
df98d94a24
gpui: Activate the window example along with the Quit action (#30790)
Make the gpui examples more consistent by activating the window upon
startup.
Most of the examples have 

```rust
activate(true) 
```

so this one should as well.

Make it easier to exit the example with the `cmd-q` KeyBinding

Release Notes:

- N/A
2025-05-26 10:10:35 +03:00
waffle
c7da6283cc
gpui: Fix typo in doc comment (#31397)
Release Notes:

- N/A
2025-05-26 07:59:51 +03:00
Richard Feldman
7ceb792a58
Revert having edit_file_tool format on save (#31403)
An unintended consequence of format on save is that we start (correctly)
informing the model that the file changed on disk every time the
formatter changes anything, which in turn can lead the model to things
like extra reads.

Until we have a solution in place to prevent this downside, we're going
back to not formatting on save by reverting
cb112a4012.

Release Notes:

- N/A
2025-05-26 02:01:55 +00:00
Joseph T. Lyons
83af7b30eb
Add agent: chat with follow action (experimental) (#31401)
This PR introduces a new `agent: chat with follow` action that
automatically enables "Follow Agent" when submitting a chat message with
`cmd-enter` or `ctrl-enter`. This is experimental. I'm not super
thrilled with the name, but the root action to submit a chat is called
`agent: chat`, so I'm following that wording. I'm also unsure if the
binding feels right or not.

Release Notes:

- Added an `agent: chat with follow` action via `cmd-enter` on macOS and
`ctrl-enter` on Linux
2025-05-25 20:15:06 -04:00
Joseph T. Lyons
3d0147aafc
Preserve selection direction when running an editor: open selections in multibuffer (#31399)
Release Notes:

- Preserve selection direction when running an `editor: open selections
in multibuffer`
2025-05-25 22:52:40 +00:00
Danilo Leal
1b3f20bdf4
docs: Refine a few AI pages (#31381)
Mostly sharpening the words, simplifying, and removing duplicate
content.

Release Notes:

- N/A
2025-05-25 11:03:14 -03:00
Finn Evers
4c28d2c2e2
language: Improve auto-indentation when using round brackets in Python (#31260)
Follow-up to #29625 and #30902

This PR reintroduces auto-intents for brackets in Python and fixes some
cases where an indentation would be triggered if it should not. For
example, upon typing

```python
a = []
```
and inserting a newline after, the next line would be indented although
it shoud not be.

Bracket auto-indentation was tested prior to #29625 but removed there
and the test updated accordingly. #30902 reintroduced this for all
brackets but `()`. I reintroduced this here, reverted the changes to the
test so that indents also happen after typing `()`. This is frequently
used for tuples and multiline statements in Python.

Release Notes:

- Improved auto-indentation when using round brackets in Python.
2025-05-25 02:25:15 +05:30
Finn Evers
a204510cfc
editor: Add toggle diagnostics to command palette (#31358)
Follow-up to #30316

This PR adds the `editor: toggle diagnostics` action to the comand
palette so that it can also be invoked that way.

I also ensures this, the `toggle inline diagnostics` and `toggle
minimap` actions are only registered if these are supported by the
current editor instance.

Release Notes:

- N/A
2025-05-24 20:41:02 +00:00
Finn Evers
34be7830a3
editor: Do not start scroll when hovering the scroll thumb during dragging events (#30782)
Closes #30756
Closes #30729
Follow-up to #28064

The issue arose because GPUI does still propagate mouse events to all
event handlers during dragging actions even if the dragging action does
not belong to the current handler. I forgot about this in the other PR.

This resulted in an incorrect hover being registered for the thumb,
which was sufficient to trigger scrolling in the next frame, since
`dragging_scrollbar_axis` did not consider the actual thumb state (this
was generally sufficient, but not with this incorrectly registered
hover).

Theoretically, either of the both commits would suffice for fixing the
issue. However, I think it is better to fix both issues at hand instead
of just one. Now, we will only start the scroll on actual scrollbar
clicks and not show a hover on the thumb if any other drag is currently
going on.


https://github.com/user-attachments/assets/6634ffa0-78fc-428f-99b2-7bc23a320676

Release Notes:

- Fixed an issue where editor scrollbars would start scrolling when
hovering over the thumb whilst already dragging something else.
2025-05-24 23:39:02 +03:00
Finn Evers
d312a13f8a
ui: Fix content shift when selecting last tab (#31266)
Follow-up to #29061

This PR ensures that the last tab does not flicker when either
selecting. It also fixes an issue where the layout would shift in the
new last tab when closing the last tab.


https://github.com/user-attachments/assets/529a2a92-f25c-4ced-a992-fb6b2d3b5f61

This happened because in #29061, the left padding was removed due to
issues with borders. However, the padding is relevant for the content to
not shift (we are basically doing border-box sizing manually here).
Instead, we need to remove the padding on the right side, as there is
already a border present on the right side and this padding would make
the last tab slightly larger than all other tabs.


https://github.com/user-attachments/assets/c3a10b3c-4a1d-4160-9b68-7538207bb46e


Release Notes:

- Removed a small flicker when selecting or closing the last tab in a
pane.
2025-05-24 23:36:51 +03:00
Kirill Bulatov
20a0956fb2
Do not underline unnecessary diagnostics (#31355)
Closes
https://github.com/zed-industries/zed/pull/31229#issuecomment-2906946881

Follow
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag

> Clients are allowed to render diagnostics with this tag faded out
instead of having an error squiggle.

and do not underline any unnecessary diagnostic at all.

Release Notes:

- Fixed clangd's inactive regions diagnostics excessive highlights
2025-05-24 20:08:46 +00:00
Anthony Eid
6f918ed99b
debugger beta: Fix regression where we sent launch args twice to any dap (#31325)
This regression happens because our tests weren't properly catching this
edge case anymore. I updated the tests to only send the raw config to
the Fake Adapter Client.

Release Notes:

- debugger beta: Fix bug where launch args were sent twice
2025-05-24 06:52:36 +00:00
Marshall Bowers
7fb9569c15
language_model: Remove CloudModel enum (#31322)
This PR removes the `CloudModel` enum, as it is no longer needed after
#31316.

Release Notes:

- N/A
2025-05-24 02:04:51 +00:00
Marshall Bowers
fc8702a8f8
agent: Don't show "Tools Unsupported" when no model is selected (#31321)
This PR makes it so we don't show "Tools Unsupported" when no model is
selected.

Release Notes:

- N/A
2025-05-24 01:45:10 +00:00
Michael Sloan
ab59982bf7
Add initial element inspector for Zed development (#31315)
Open inspector with `dev: toggle inspector` from command palette or
`cmd-alt-i` on mac or `ctrl-alt-i` on linux.

https://github.com/user-attachments/assets/54c43034-d40b-414e-ba9b-190bed2e6d2f

* Picking of elements via the mouse, with scroll wheel to inspect
occluded elements.

* Temporary manipulation of the selected element.

* Layout info and JSON-based style manipulation for `Div`.

* Navigation to code that constructed the element.

Big thanks to @as-cii and @maxdeviant for sorting out how to implement
the core of an inspector.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Federico Dionisi <code@fdionisi.me>
2025-05-23 23:08:59 +00:00
Marshall Bowers
685933b5c8
language_models: Fetch Zed models from the server (#31316)
This PR updates the Zed LLM provider to fetch the available models from
the server instead of hard-coding them in the binary.

Release Notes:

- Updated the Zed provider to fetch the list of available language
models from the server.
2025-05-23 23:00:35 +00:00
Joseph T. Lyons
172e0df2d8
Remove duplicate ThreadHistory key binding object (#31309)
Release Notes:

- N/A
2025-05-23 20:59:46 +00:00
Kirill Bulatov
7341ab3980
Keep file permissions when extracting zip archives on Unix (#31304)
Follow-up of https://github.com/zed-industries/zed/pull/31080

Stop doing

```rs
#[cfg(not(windows))]
{
    file.set_permissions(<fs::Permissions as fs::unix::PermissionsExt>::from_mode(
        0o755,
    ))
    .await?;
}
```

after extracting zip archives on Unix, and use an API that provides the
file permissions data for each archive entry.

Release Notes:

- N/A
2025-05-23 20:45:32 +00:00
Ben Brandt
ca72efe701
Add overdue invoices check (#31290)
- Rename current_user_account_too_young to account_too_young for
consistency
- Add has_overdue_invoices field to track billing status
- Block edit predictions when user has overdue invoices
- Add overdue invoice warning to inline completion menu

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-23 20:02:02 +00:00
Richard Feldman
cb112a4012
Have edit_file_tool respect format_on_save (#31047)
Release Notes:

- Agents now automatically format after edits if `format_on_save` is
enabled.
2025-05-23 19:59:19 +00:00
Michael Sloan
f3c2e71ca7
Update syn crate from 1.0.109 to 2.0.101 (#31301)
Nearly all generated by Zed Agent + Claude Opus 4. I just wrote the test
`Args` struct and pointed it at the [2.0 release
notes](https://github.com/dtolnay/syn/releases/tag/2.0.0).

Release Notes:

- N/A
2025-05-23 19:31:25 +00:00
Richard Feldman
208f525a11
Don't always scroll to bottom on every new message (#31295)
This is a partial reversion of
https://github.com/zed-industries/zed/pull/30878 - having it always
scroll to bottom whenever a new message is added makes it so that when
you're scrolled up, you don't have time to read what you're trying to
read before it autoscrolls to the end.

@danilo-leal when you're back, we can pair on addressing that in a
different way!

Release Notes:

- Fixed bug where scrolling up in the agent panel didn't prevent
automatic scroll-to-end whenever a new message arrived.
2025-05-23 15:11:29 -04:00
smit
697c838455
languages: Allow complete override for ESLint settings (#31302)
Closes #17088

This PR allows users to override ESLint settings as they want instead of
depending on a few set of hardcoded keys.

Release Notes:

- Added support for configuring all ESLint server settings instead of
only a limited set of predefined options.
2025-05-24 00:30:35 +05:30
Marshall Bowers
1683e2f144
collab: Prevent canceling the free plan (#31292)
This PR makes it so the Zed Free plan cannot be canceled.

We were already preventing this on the zed.dev side, but this will make
it more airtight.

Release Notes:

- N/A
2025-05-23 15:48:21 +00:00
Cole Miller
2f1d9284b7
debugger: Fix adapter names in initial-debug-tasks.json (#31283)
Closes #31134

Release Notes:

- N/A

---------

Co-authored-by: Piotr <piotr@zed.dev>
2025-05-23 15:22:04 +00:00
Oleksiy Syvokon
68a46c3627
evals: Configurable judge model (#31282)
This is needed for apples-to-apples comparison of different agent
models.

Another change is that now `cargo -p eval` accepts model names as
`provider_id/model_id` instead of separate `--provider` and `--model`
params.


Release Notes:

- N/A
2025-05-23 15:03:09 +00:00
Joseph T. Lyons
3a1053bf0c
Use shortened SHA when displaying version to install (#31281)
This PR uses a shortened SHA when displaying the nightly version to
install in the update status, for nicer tooltip formatting.

Release Notes:

- N/A
2025-05-23 14:53:53 +00:00
Anthony Eid
14d9a4189f
debugger beta: Auto download Delve (Go's DAP) & fix grammar errors in docs (#31273)
Release Notes:

- debugger beta: Go's debug adapter will now automatically download if
not found on user's PATH

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-05-23 14:19:24 +00:00
Anthony Eid
9c01119b3c
debugger beta: Add error handling when gdb doesn't send thread names (#31279)
If gdb doesn't send a thread name we display the thread's process id in
the thread drop down menu instead now.

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

Release Notes:

- debugger beta: Handle bug where DAPs don't send thread names
2025-05-23 10:07:47 -04:00
Antonio Scandurra
9dba8e5b0d
Ensure client reconnects after erroring during the handshake (#31278)
Release Notes:

- Fixed a bug that prevented Zed from reconnecting after erroring during
the initial handshake with the server.
2025-05-23 15:46:30 +02:00
smit
03ac3fb91a
editor: Fix issue where newline on * as prefix adds comment delimiter (#31271)
Release Notes:

- Fixed issue where pressing Enter on a line starting with * incorrectly
added comment delimiter.

---------

Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-05-23 18:46:55 +05:30
Ben Brandt
0201d1e0b4
agent: Unfollow agent on completion cancellation (#31258)
Handle unfollowing agent and clearing agent location when completion
is canceled.

Release Notes:

- N/A
2025-05-23 14:55:08 +02:00
Piotr Osiewicz
f48b6b583e
debugger: Change placeholder text for Custom/Run text input (#31264)
Before: 

![image](https://github.com/user-attachments/assets/6cdef5bb-c901-4954-a2ec-39c59f8314db)

After:

![image](https://github.com/user-attachments/assets/c4f60a23-249c-47ab-8a9e-a39e2277dd00)


Release Notes:

- N/A
2025-05-23 14:53:20 +02:00
Kirill Bulatov
d8fc23a5e9
toml: Bump to v0.1.4 (#31272)
Closes https://github.com/zed-industries/zed/issues/31261

Changes:

* https://github.com/zed-industries/zed/pull/31267


Release Notes:

- N/A
2025-05-23 12:18:24 +00:00
Joseph T. Lyons
6206150e27
Use read() over read_with() to improve readability in simple cases (#31263)
Release Notes:

- N/A
2025-05-23 12:08:49 +00:00
Antonio Scandurra
e88cad29e5
Reduce the amount of queries performed when updating plan (#31268)
Release Notes:

- N/A
2025-05-23 12:03:50 +00:00
Kirill Bulatov
9b7d849879
Fix taplo artifact naming (#31267)
Part of https://github.com/zed-industries/zed/issues/31261

https://github.com/tamasfe/taplo/pull/598#issuecomment-2292984164
renamed all artifacts almost a year ago, and now had released it
finally.
Have to abide to that YOLO move.

Release Notes:

- N/A
2025-05-23 11:59:20 +00:00
Cole Miller
c4677c21a9
debugger: More focus tweaks (#31232)
- Make remembering focus work with `ActivatePaneDown` as well
- Tone down the console's focus-in behavior so clicking doesn't
misbehave

Release Notes:

- N/A
2025-05-23 07:51:23 -04:00
Remco Smits
26318b5b6a
debugger: Detect debugpy from virtual env (#31211)
Release Notes:

- Debugger Beta: Detect debugpy from virtual env
2025-05-23 13:34:07 +02:00
tidely
4266f0da85
terminal: Consume event during processing (#30869)
By consuming the event during processing we save a few clones during
event processing.

Overall in this PR we save one Clone each during:

- Paste to the terminal
- Writing to the terminal
- Setting the title
- On every terminal transaction
- On every ViMotion when not using shift

Release Notes:

- N/A
2025-05-23 14:28:53 +03:00
tidely
c50093d68c
project: Use VecDeque in SearchHistory (#31224)
`SearchHistory` internally enforced the max length of the search history
by popping elements from the front using `.remove(0)`. For a `Vec` this
is a `O(n)` operation. Use a `VecDeque` to make this `O(1)`

I also made it so the excess element is popped before the new one is
added, which keeps the allocation at the desired size.

Release Notes:

- N/A
2025-05-23 14:25:40 +03:00
smit
1cad1cbbfc
Add Code Actions to the Toolbar (#31236)
Closes issue #31120.


https://github.com/user-attachments/assets/a4b3c86d-7358-49ac-b8d9-e9af50daf671

Release Notes:

- Added a code actions icon to the toolbar. This icon can be disabled by
setting `toolbar.code_actions` to `false`.
2025-05-23 16:55:29 +05:30
tidely
fbc922ad46
Reduce allocations (#31223)
Release Notes:

- N/A
2025-05-23 14:25:17 +03:00
Joseph T. Lyons
f435304209
Use read-only access methods for read-only entity operations (#31254)
This PR replaces some `update()` calls with either `read()` or
`read_with()` when the `update()` call performed read-only operations on
the entity.

Many more likely exist, will follow-up with more PRs.

Release Notes:

- N/A
2025-05-23 06:13:49 -04:00
Ben Brandt
508ccde363
Better messaging for accounts that are too young (#31212)
Right now you find this out the first time you try and submit a
completion.

These changes communicate much earlier to the user what the issue is
with their account and what they can do about it.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-05-23 09:32:03 +00:00