Commit graph

21834 commits

Author SHA1 Message Date
Smit Barmase
18d39e3f81
editor: Improve JSDoc extend comment on newline to follow convention (#30800)
Follow up for https://github.com/zed-industries/zed/pull/30768

This PR makes JSDoc auto comment on new line lot better by:

- Inserting delimiters regardless of whether previous delimiters have
trailing spaces or not
- When on start tag, auto-indenting both prefix and end tag upon new
line

This makes it correct as per convention out of the box. No need to
manually adjust spaces on every new line.


https://github.com/user-attachments/assets/81b8e05a-fe8a-4459-9e90-c8a3d70a51a2

Release Notes:

- Improved JSDoc auto-commenting on newline which now correctly indents
as per convention.
2025-05-16 12:42:11 +05:30
Oleksiy Syvokon
cc3a28a8e8
agent: Fix unnecessary "tool result too long" (#30798)
Release Notes:

- N/A
2025-05-16 06:39:02 +00:00
Piotr Osiewicz
0f17e82154
chore: Bump Rust to 1.87 (#30739)
Closes #ISSUE

Release Notes:

- N/A
2025-05-15 22:28:52 +00:00
Ben Brandt
355266988d
extension: Update wasi preview adapter (#30759)
Replace dynamic downloading of WASI adapter with the provided crate.

More importantly, this makes sure we are using the same adapter version
as our version of wasmtime, which includes several fixes.

Arguably we could also at this point update to wasm32-wasip2 target and
remove this dependency as well if we want, but that might need further
testing.

Release Notes:

- N/A
2025-05-15 19:10:13 +02:00
Smit Barmase
c2feffac9d
editor: Add prefix on newline in documentation block (e.g. JSDoc) (#30768)
Closes #8973

- [x] Tests


https://github.com/user-attachments/assets/7fc6608f-1c11-4c70-a69b-34bfa8f789a2

Release Notes:

- Added auto-insertion of asterisk (*) prefix when creating new lines
within JSDoc comment blocks.
2025-05-15 20:30:06 +05:30
张小白
4b7b5db58c
windows: Remove unnecessay helper function (#30764)
Release Notes:

- N/A
2025-05-15 14:22:04 +00:00
张小白
58ba833792
windows: Fix keystroke (#30753)
Closes #22656

Part of #29144, this PR completely rewrites the key handling logic on
Windows, making it much more consistent with how things work on macOS.
However, one remaining issue is that on Windows, we should be using
`Ctrl+Shift+4` instead of `Ctrl+$`. That part is expected to be
addressed in #29144.


Release Notes:

- N/A
2025-05-15 20:49:06 +08:00
Antonio Scandurra
47f6d4e5a7
Fix rejecting overwritten files if the agent previously edited them (#30744)
Release Notes:

- Fixed rejecting overwritten files if the agent had previously edited them.
2025-05-15 09:47:54 +00:00
Danilo Leal
e60f029525
agent: Add adjustments to settings view (#30743)
- Make provider blocks collapsed by default
- Fix sections growing unnecessarily when there's available space

Release Notes:

- N/A
2025-05-15 06:30:45 -03:00
Marshall Bowers
d7b5c61ec8
ui_macros: Remove unused module (#30741)
This PR removes an unused module from the `ui_macros` crate.

Release Notes:

- N/A
2025-05-15 08:53:38 +00:00
Marshall Bowers
23d42e3eaf
agent: Use inventory for AgentPreview (#30740)
This PR updates the `AgentPreview` to use `inventory` instead of
`linkme`.

Release Notes:

- N/A
2025-05-15 08:36:13 +00:00
CharlesChen0823
b2fc4064c0
gpui: Avoid dereferencing null pointer (#30579)
as
[comments](https://github.com/zed-industries/zed/pull/24545#issuecomment-2872833658),
I really don't known why, But IMO, add this code is not harm.

If you think this is not necessary, can close.

Release Notes:

- N/A
2025-05-15 09:50:58 +02:00
tidely
5078f0b5ef
client: Remove extra clone, pass big struct by reference (#30716)
Commit titles explain all of the changes

Release Notes:

- N/A
2025-05-15 00:16:25 +02:00
Marshall Bowers
607bfd3b1c
component: Replace linkme with inventory (#30705)
This PR replaces the use of `linkme` with `inventory` for the component
preview registration.

Release Notes:

- N/A
2025-05-14 23:29:11 +02:00
Cole Miller
87cb498a41
debugger: Make the stack frame list and module list keyboard-navigable (#30682)
- Switch stack frame list and module list to `UniformList` to access
scrolling behavior
- Implement `menu::` navigation actions

Release Notes:

- Debugger Beta: Added support for menu navigation actions (`ctrl-n`,
`ctrl-p`, etc.) in the stack frame list and module list.
2025-05-14 22:23:59 +02:00
Oleksiy Syvokon
6420df3975
eval: Count execution errors as failures (#30712)
- Evals returning an error (e.g., LLM API format mismatch) were silently
skipped in the aggregated results. Now we count them as a failure (0%
success score).

- Setting the `VERBOSE` environment variable to something non-empty
disables string truncation

Release Notes:

- N/A
2025-05-14 20:44:19 +03:00
Ben Kunkle
83498ebf2b
Improve error message around failing to install dev extensions (#30711)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-05-14 17:22:17 +00:00
Ben Kunkle
1fb1fecb0a
rust: Add injection for leptos view macro (#30710)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-05-14 16:48:22 +00:00
tidely
bc99a86bb7
Reduce allocations (#30693)
Removes a unnecessary string conversion and some clones

Release Notes:

- N/A
2025-05-14 18:29:28 +02:00
Kirill Bulatov
fcfe4e2c14
Reuse existing language servers for invisible worktrees (#30707)
Closes https://github.com/zed-industries/zed/issues/20767

Before:


https://github.com/user-attachments/assets/6438eb26-796a-4586-9b20-f49d9a133624


After:



https://github.com/user-attachments/assets/b3fc2f8b-2873-443f-8d80-ab4a35cf0c09



Release Notes:

- Fixed external files spawning extra language servers
2025-05-14 16:24:17 +00:00
Rob McBroom
ef511976be
Add a separator before Quit in the application menu (#30697)
macOS applications should have a separator between “Show All” and “Quit”
in the application menu.
2025-05-14 16:19:09 +00:00
Marshall Bowers
c80aaca0c5
zed_extension_api: Format dap.wit (#30701)
This PR formats the `dap.wit` file.

Release Notes:

- N/A
2025-05-14 15:05:29 +00:00
Danilo Leal
234d6ce5f5
agent: Fix Markdown codeblock header buttons (#30645)
Closes https://github.com/zed-industries/zed/issues/30592

Release Notes:

- agent: Fixed Markdown codeblock header buttons being pushed by long
paths/file names.
2025-05-14 10:49:02 -03:00
Tristan Hume
96a0568fb7
Add setting to disable the sign in button (#30450)
Designed to pair with #30444 to enable enterprises to make it harder to
sign into the collab server and perhaps accidentally end up sending code
to Zed.

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-05-14 13:39:04 +00:00
Oleksiy Syvokon
b6828e5ce8
agent: Don't duplicate recommended models in all models list (#30692)
Release Notes:

- N/A
2025-05-14 13:21:41 +00:00
Smit Barmase
78d3ce4090
editor: Handle more completion sort cases (#30690)
Adds 3 more test cases where local variable should be preferred over
method, and local method over library methods.

Before / After:

<img height="280" alt="before-rust"
src="https://github.com/user-attachments/assets/72b34ce8-89ff-4c2b-87dc-9e63f855d31e"
/>
<img height="280" alt="after-rust"
src="https://github.com/user-attachments/assets/8e23c9ca-576c-4dc5-8946-fa37554a19e0"
/>

Before / After:

<img height="280" alt="before-react"
src="https://github.com/user-attachments/assets/f7070413-e397-441a-a0c1-16d8ce25aa12"
/>
<img height="280" alt="after-react"
src="https://github.com/user-attachments/assets/7a095954-7844-4a3e-bf59-5420b7ffdb03"
/>

Release Notes:

- N/A
2025-05-14 18:49:39 +05:30
Tristan Hume
d01559f9bc
Add setting for enabling/disabling feedback (#30448)
This is useful for enterprises, especially in combination with #30444,
to ensure code never gets sent to Zed.

Release Notes:

- N/A
2025-05-14 15:10:31 +02:00
Oleksiy Syvokon
d42cb111f4
agent: Fix tool use in Gemini (#30689)
Thread doesn't run pending tools when `stop_reason` is not `ToolUse`.
Perhaps we should change that so that it always runs pending tools if
there are some, but for now this change just fixes setting `stop_reason`
for Google models.

Release Notes:

- N/A
2025-05-14 15:43:17 +03:00
Nate Butler
dce6e96c16
debugger: Tidy up dropdown menus (#30679)
Before
![CleanShot 2025-05-14 at 13 22
44@2x](https://github.com/user-attachments/assets/c6c06c5c-571d-4913-a691-161f44bba27c)

After
![CleanShot 2025-05-14 at 13 22
17@2x](https://github.com/user-attachments/assets/0a25a053-81a3-4b96-8963-4b770b1e5b45)

Release Notes:

- N/A
2025-05-14 11:32:51 +00:00
Finn Evers
4280bff10a
Reapply "ui: Account for padding of parent container during scrollbar layout" (#30577)
This PR reapplies #27402 which was reverted in
https://github.com/zed-industries/zed/pull/30544 due to the issue
@ConradIrwin reported in
https://github.com/zed-industries/zed/pull/27402#issuecomment-2871745132.
The reported issue is already present on main but not visible, see
https://github.com/zed-industries/zed/pull/27402#issuecomment-2872546903
for more context and reproduction steps.

The fix here was to move the padding for the hover popover up to the
parent container. This does not fix the underlying problem but serves as
workaround without any disadvantages until a better solution is found. I
would currently guess that the underlying issue might be related to some
rem-size calculations for small font sizes or something similar (e.g.
https://github.com/zed-industries/zed/pull/22732 could possibly be
somewhat related).

Notably, the fix here does not cause any difference in layouting (the
following screenshots are actually distinct images), yet fixes the
problem at hand.

### Default font size (`15px`) 

| `main` | This PR |
| --- | --- |
|
![main_large](https://github.com/user-attachments/assets/66d38827-9023-4f78-9ceb-54fb13c21e41)
|![PR](https://github.com/user-attachments/assets/7af82bd2-2732-4cba-8d4b-54605d6ff101)
|

### Smaller font size (`12px`)

| `main` | This PR |
| --- | --- |
|
![pr_large](https://github.com/user-attachments/assets/d43be6e6-6840-422c-baf0-368aab733dac)
|
![PR](https://github.com/user-attachments/assets/43f60b2b-2578-45d2-bcab-44edf2612ce2)
|

Furthermore, for the second scenario, the popover would be scrollable on
main. As there is no scrollbar in the second image for this PR, this no
longer happens with this branch.


Release Notes:

- N/A
2025-05-14 13:26:14 +02:00
Finn Evers
09503333af
project_settings: Fix default settings values for DiagnosticsSettings (#30686)
Follow-up to #30565

This PR fixes the default settings values for the `DiagnosticsSettings`.
The issue here was that due to the `#[derive(Default)]`, `button` would
be false by default, which unintentionally hid the diagnostics button by
default. The `#[serde(default = `default_true`)]` would only apply iff
the diagnostics key was already present in the user's settings. Thus, if
you have

```json
{
    "diagnostics": {...}
}
```

in your settings, the button would show (given it was not disabled).
However, if the key was not present, the button was not shown: Due to
the derived default for the entire struct, the value would be false.

This PR fixes this by implementing the default instead and moving the
`#[serde(default)]` up to the level of the struct.
I also did the same for the inline diagnostics settings, which already
had a default impl and thus only needed the serde default on the struct
instead of on all the struct fields.

Lastly, I simplified the title bar settings, since the serde attributes
previously had no effect anyway (deserialization happened in the
`TitlebarSettingsContent`, so these attributes had no effect) and we can
remove the `TitlebarSettingsContent` as well as the attributes if we
implement a proper default implementation instead.

Release Notes:

- Fixed the diagnostics status bar button being hidden by default.
2025-05-14 07:13:51 -04:00
Joseph T. Lyons
775370fd7d
Bump Zed to v0.188 (#30685)
Release Notes:

-N/A
2025-05-14 10:41:09 +00:00
Anthony Eid
1077f2771e
debugger: Fix launch picker program arg not using relative paths (#30680)
Release Notes:

- N/A
2025-05-14 09:51:13 +00:00
Anthony Eid
f4eea0db2e
debugger: Fix panics when debugging with inline values or confirming in console (#30677)
The first panic was caused by an unwrap that assumed a file would always
have a root syntax node.

The second was caused by a double lease panic when clicking enter in the
debug console while there was a completion menu open

Release Notes:

- N/A
2025-05-14 09:50:42 +00:00
Conrad Irwin
ed361ff6a2
Rename debug: commands to dev: (#30675)
Closes #ISSUE

Release Notes:

- Breaking change: The actions used while developing Zed have been
renamed from `debug:` to `dev:` to avoid confusion with the new debugger
feature:
- - `dev::OpenDebugAdapterLogs`
- - `dev::OpenSyntaxTreeView`
- - `dev::OpenThemePreview`
- - `dev::OpenLanguageServerLogs`
- - `dev::OpenKeyContextView`
2025-05-14 11:15:27 +02:00
Oleksiy Syvokon
255d8f7cf8
agent: Overwrite files more cautiously (#30649)
1. The `edit_file` tool tended to use `create_or_overwrite` a bit too
often, leading to corruption of long files. This change replaces the
boolean flag with an `EditFileMode` enum, which helps Agent make a more
deliberate choice when overwriting files.

With this change, the pass rate of the new eval increased from 10% to
100%.

2. eval: Added ability to run eval on top of an existing thread. Threads
can now be loaded from JSON files in the `SerializedThread` format,
which makes it easy to use real threads as starting points for
tests/evals.

3. Don't try to restore tool cards when running in headless or eval mode
-- we don't have a window to properly do this.

Release Notes:

- N/A
2025-05-14 10:40:44 +03:00
张小白
22f76ac1a7
windows: Remove unneeded ranges for replace_and_mark_text_in_range (#30668)
Release Notes:

- N/A
2025-05-14 07:26:10 +00:00
Michael Sloan
25cc05b45c
Use Vec instead of SmallVec for glyphs field of ShapedRun (#30664)
This glyphs field is usually larger than 8 elements, and SmallVec is not
efficient when it cannot store the value inline.

This change also adds precise glyphs run preallocation in some places
`ShapedRun` is constructed.

Release Notes:

- N/A
2025-05-14 07:02:38 +00:00
Agus Zubiaga
a4766e296f
Add tool result image support to Gemini models (#30647)
Release Notes:

- Add tool result image support to Gemini models
2025-05-14 00:51:31 +00:00
Cole Miller
2f26a860a9
debugger: Fix focus nits (#30547)
- Focus the console's query bar (if it exists) when focusing the console
- Fix incorrect focus handles used for the console and terminal at the
`Subview` level

Release Notes:

- N/A

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Anthony <anthony@zed.dev>
2025-05-13 22:52:03 +00:00
Anthony Eid
f1fe505649
debugger: Show language icons in debug scenario picker (#30662)
We attempt to resolve the language name in this order

1. Based on debug adapter if they're for a singular language e.g. Delve
2. File extension if it exists
3. If a language name exists within a debug scenario's label

In the future I want to use locators to also determine the language as
well and refresh scenario list when a new scenario has been saved

Release Notes:

- N/A
2025-05-14 00:50:58 +02:00
Piotr Osiewicz
9826b7b5c1
debugger: Add extensions support (#30625)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-05-13 22:42:51 +00:00
Michael Sloan
6fc9036063
Multi-glyph text runs on Linux (#30660)
Release Notes:

- N/A
2025-05-13 22:10:35 +00:00
Bennet Bo Fenner
2b74163a48
context_editor: Allow copying entire line when selection is empty (#30612)
Closes #27879

Release Notes:

- Allow copying entire line when selection is empty in text threads
2025-05-13 21:23:19 +00:00
Michael Sloan
71ea7aee3b
Misc optimization/cleanup of use of Cosmic Text on Linux (#30658)
* Use cosmic_text `metadata` attr to write down the `FontId` from the
input run to avoid searching the list of fonts when laying out every
glyph.

* Instead of checking on every glyph if `postscript_name` is an emoji
font, just store `is_known_emoji_font`.

* Clarify why `font_id_for_cosmic_id` is used, and when its use is
valid.

Release Notes:

- N/A
2025-05-13 21:20:41 +00:00
Remco Smits
48b376fdc9
debugger: Fix nits (#30632)
Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-05-13 23:13:02 +02:00
Smit Barmase
f98c6fb2cf
Update panels serialization from global to per-workspace (#30652)
Closes #27834

This PR changes project panel, outline panel and collab panel
serialization from global to per-workspace, so configurations are
restored only within the same workspace. Handles remote workspaces too.
Opening a new window will start with a fresh panel defaults e.g. width.

Release Notes:

- Improved project panel, outline panel, and collab panel to persist
width on a per-workspace basis. New windows will use the width specified
in the `default_width` setting.
2025-05-14 00:05:42 +05:30
Stanislav Alekseev
1ace5a27bc
editor: Fix signature hover popover incorrect width instead of adapting to its content (#30646)
Before:
<img width="935" alt="Screenshot 2025-05-13 at 18 03 21"
src="https://github.com/user-attachments/assets/5320e559-7c60-4ad6-8ab6-99dcbcd1d42e"
/>

After:
<img width="349" alt="Screenshot 2025-05-13 at 18 45 21"
src="https://github.com/user-attachments/assets/98412e13-b879-490a-a1b4-88f97bb84774"
/>
----

Release Notes:

- Fixed issue where signature popover displayed at incorrect width
instead of adapting to its content.

----
cc @smitbarmase
2025-05-13 21:34:11 +05:30
Agus Zubiaga
dd6594621f
Add image input support for OpenAI models (#30639)
Release Notes:

- Added input image support for OpenAI models
2025-05-13 17:32:42 +02:00
Anthony Eid
68afe4fdda
debugger: Add stack frame multibuffer (#30395)
This PR adds the ability to expand a debugger stack trace into a multi
buffer and view each frame as it's own excerpt.

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-05-13 14:55:05 +00:00