Commit graph

20460 commits

Author SHA1 Message Date
Danilo Leal
152432f1d9
title bar: Adjust the onboarding banner component API (#27455)
This PR encapsulates the layout building of the Onboarding Banner
component inside of it, allowing to, at the call site, just pass an
icon, title, and subtitle. The `subtitle` parameter, by default, uses
the `Introducing:` label, which I think will be the one we'll use most
of the time for this specific component.

Release Notes:

- N/A
2025-03-25 17:57:42 -03:00
Marshall Bowers
5953c6167b
assistant2: Allow profiles to manage context server tools (#27452)
This PR updates the agent profiles with support for managing context
server tools.

Release Notes:

- N/A
2025-03-25 19:55:59 +00:00
Danilo Leal
aab02a4166
Fix color swatch shrinking in the LSP completion menu (#27450)
### Before

Note how in the second time I try to add a color property, the color
swatch is shrunk.


https://github.com/user-attachments/assets/677a37b2-8ae4-408d-8dea-d9cc4bc2e119

### After


https://github.com/user-attachments/assets/aa902573-1f44-48e1-a396-e22ad5703155

Release Notes:

- Fixed color swatches shrinking upon re-adding a color-related
property.
2025-03-25 16:55:42 -03:00
Michael Sloan
9fc570c4be
Remove Pixels: Mul<Pixels, Output = Pixels> impl, add ScaledPixels ops (#27451)
It doesn't make sense to have `Pixels: Mul<Pixels, Output = Pixels>` as
the output should be `Pixels^2` (area), so these impls are removed. All
code where these impls were used are improved by instead multiplying by
`f32` or `usize`.

Also adds math op impls that are present for `Pixels` but absent for
`ScaledPixels`. Adds missing `Mul<Pixels> for usize` to both.

Release Notes:

- N/A
2025-03-25 19:34:26 +00:00
Marshall Bowers
581d67398a
Remove ui dependency from assistant_tool and context_server (#27449)
This PR removes the dependency on the `ui` crate from the
`assistant_tool` and `context_server` crates.

These crates were only depending on it for `IconName`, which can now be
depended on from `icons` directly.

Release Notes:

- N/A
2025-03-25 18:37:15 +00:00
Marshall Bowers
4a30b960d4
language_model: Remove dependency on ui (#27448)
This PR removes the dependency on the `ui` crate from the
`language_model` crate.

We were only depending on it to import `IconName`—which now lives in
`icons`—and some re-exported GPUI items.

Release Notes:

- N/A
2025-03-25 18:30:46 +00:00
Marshall Bowers
503bf607c5
Add icons crate (#27447)
This PR adds a new `icons` crate and moves the `IconName` into it.

We have a number of crates that are taking a dependency on `ui` just so
they can talk about icons, which is not ideal.

Release Notes:

- N/A
2025-03-25 18:18:22 +00:00
Agus Zubiaga
46e86f003f
assistant tools: Add Tool::icon method instead of matching on name (#27444)
Release Notes:

- N/A
2025-03-25 18:17:36 +00:00
Marshall Bowers
0339d654d2
zed: Make inline assist quick action dispatch an action (#27445)
This PR makes the "Inline Assist" quick action in the quick action bar
work by dispatching the `InlineAssist` action.

This fixes an issue where the button was not working with Assistant 2.

Release Notes:

- N/A
2025-03-25 18:11:30 +00:00
Agus Zubiaga
24d76a64c3
Reapply #27200 after bad conflict resolution (#27446)
Release Notes:

- N/A
2025-03-25 18:06:45 +00:00
Piotr Osiewicz
3ba624391f
debugger ui: Make variable values muted by default (#27441)
Closes #ISSUE

Release Notes:

- N/A
2025-03-25 18:43:27 +01:00
Michael Sloan
31e3c13ea9
Add .github/copilot-instructions.md to paths loaded for rules (#27442)
Release Notes:

- N/A
2025-03-25 17:30:37 +00:00
Marshall Bowers
0fec04a1b7
assistant2: Disable "Add Server" button when the required fields are empty (#27440)
This PR updates the add context server modal to disable the "Add Server"
button when the required fields are not filled out.

Release Notes:

- N/A
2025-03-25 17:19:30 +00:00
Richard Feldman
bf255486c0
Add find-replace-file tool, use it by default over edit-files-tool (#27438)
@agu-z and paired on trying out a "one tool call per edit" approach for
editing files. (The previous approach is still available, it's just
unchecked by default for now.)

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
2025-03-25 13:12:50 -04:00
Nathan Sobo
cd1e56d6c7
Add support for dashed borders to GPUI (#27139)
Features:

* Scales dash spacing with border width.
* Laying out dashes around rounded corners.
* Varying border widths with rounded corners - now uses an ellipse for the inner edge of the border.
* When there are no rounded corners, each straight border is laid out separately, so that the dashes to meet at the corners.
* All sides of each dash are antialiased.

![image](https://github.com/user-attachments/assets/b3789a98-a5be-4f97-9736-c4e59615afe6)

![image](https://github.com/user-attachments/assets/739bdc57-4580-42c8-bfc3-6e287411a408)

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
2025-03-25 11:11:04 -06:00
Piotr Osiewicz
2fe2028e20
debugger: Fix typing in active buffer resulting a jump to an active debug line (#27439)
/cc @iamnbutler 

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-03-25 17:08:36 +00:00
Piotr Osiewicz
f9212a001e
debugger: Make UI a bit more dense (#27429)
Closes #ISSUE

Release Notes:

- N/A
2025-03-25 17:58:51 +01:00
Marshall Bowers
275cecb262
assistant2: Add modal for adding context servers (#27434)
This PR adds a modal for adding context servers from the Assistant 2
configuration view:

<img width="1394" alt="Screenshot 2025-03-25 at 12 22 50 PM"
src="https://github.com/user-attachments/assets/52fe194f-7d88-4f3b-aee1-8c6385136e6b"
/>

Release Notes:

- N/A
2025-03-25 16:37:56 +00:00
Richard Feldman
6b7167a32d
Gracefully handle models searching for empty glob (#27370)
Sometimes we've seen models provide an empty string for the path search
glob. This assumes they meant "*" when that happens.

Separately, this also removes an unnecessary `clone` of a `String`.

Release Notes:

- N/A
2025-03-25 12:32:20 -04:00
Agus Zubiaga
408e157d0f
assistant edit tool: Reliability improvements (#27431)
- Add instructions in description to read before editing
- Add instructions in edit prefix to explicitly ask for reads
- Fix `connection error: delay between messages too long` by processing
chunks off a channel

Release Notes:

- N/A
2025-03-25 12:34:01 -03:00
Ben Kunkle
e273de5490
python: Fix incorrect indenting of except, finally, else, and elif control flow (#27428)
Closes #10832

Note: This PR only fixes the issue where when entering one of `except`,
`finally`, `else`, and `elif` after another block like so:

```python
try:
    for i in range(n):
        pass
except:|
```

The `except` would be indented resulting in the following:

```python
try:
    for i in range(n):
        pass
    except:|
```

This PR does not fix a separate issue in which the indentation is not
corrected from the second example to the first, i.e. if example 2 is
typed verbatim in Zed it will not auto-indent to look like example 1.
Handling of this case would likely require specific logic to handle, or
changes to the tree-sitter grammar for Python, as the current grammar
results in ERROR nodes that obscure the natural structure (cannot tie
the `except` to the `try`)

Release Notes:

- Fixed an issue where `except`, `finally`, `else`, and `elif` control
flow keywords in Python would be incorrectly indented when entered at
the correct level of indentation.
2025-03-25 14:58:41 +00:00
Richard Feldman
7046b9641d
Add create-file-tool (#27381)
<img width="627" alt="Screenshot 2025-03-24 at 12 52 04 PM"
src="https://github.com/user-attachments/assets/0e8c061a-11c5-4d60-a694-55575b6c8f5e"
/>

Release Notes:

- N/A
2025-03-25 10:56:41 -04:00
Naim A.
d9dcc59334
Merge clangd's inactiveRegions with existing diagnostics (#26737)
Closes: https://github.com/zed-industries/zed/issues/13089

This PR attempts to resolve the issues discussed in my previous PR
#26146.

Release Notes:

- Fixed: `inactiveRegions` doesn't replace existing diagnostics anymore
2025-03-25 15:13:53 +02:00
Smit Barmase
8f1023360d
extension: Add support for additional_workspace_configuration and additional_initialization_options (#27407)
Closes #22410

With this PR extensions can provide additional workspace configuration
for other LSP Adapters. This allows extensions like Astro, Svelte, Vue,
etc to provide plugins for vtsls typescript server, fixing issues like:
https://github.com/zed-industries/zed/issues/4577,
https://github.com/zed-industries/zed/issues/21697,
https://github.com/zed-industries/zed/issues/26901#issuecomment-2737485096

Todo:

- [x] Test case when extension is installed, does vtsls workspace config
refreshes?

Before:
<img width="450" alt="image"
src="https://github.com/user-attachments/assets/f242167c-5264-44ab-b5a7-8c90eb75c6a1"
/>

After:
<img width="450" alt="image"
src="https://github.com/user-attachments/assets/6a5f1afe-a0e1-4f64-8a95-919b0bf97614"
/>

Release Notes:

- N/A
2025-03-25 18:23:59 +05:30
Danilo Leal
9468b9699e
assistant2: Add icon for copy-path tool (#27421)
Release Notes:

- N/A
2025-03-25 12:44:44 +00:00
Nate Butler
f1a9fdddab
docs: Improve Git page (#26566)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-03-25 09:22:01 -03:00
Jason Lee
d40f8889b9
title_bar: Anchor user menu popover at top right corner (#27329)
Release Notes:

- Improved user menu placement

| Before | After |
| --- | --- |
| ![Pasted image
(2)](https://github.com/user-attachments/assets/fae750fd-d6bc-45d2-9ab0-7a1a1c6262ba)
|
![image](https://github.com/user-attachments/assets/c5d0453f-5bd5-45e2-a56d-e200e90c0a2a)
|
2025-03-25 08:20:50 -03:00
Danilo Leal
6715c8582f
assistant2: Remove the Prompt Library section from the settings (#27404) 2025-03-25 07:34:11 -03:00
isomo
baf03e355b
copilot: Add Claude 3.7-Sonnet-Thought model to Copilot Chat (#27409)
- Follow-up to: #25529 

Release Notes:

- Added Claude Sonnet 3.7 Thought to GitHub Copilot Chat
2025-03-25 10:56:27 +01:00
Mikayla Maki
35ec4753b4
Make a single re-usable banner component (#27412)
Release Notes:

- Fixed an issue where both the predict edit and git onboarding banners
would both show at the same time.
2025-03-25 07:05:25 +00:00
张小白
b85492bd00
windows: Detect pwsh (#25713)
Closes #22015


Release Notes:

- N/A
2025-03-24 22:31:11 -07:00
Mikayla Maki
42f01cc903
Set edit predictions to default to the Zed provider (#27394)
Release Notes:

- Changed the default edit prediction provider from Copilot to Zed
2025-03-24 20:45:06 -07:00
Ben Kunkle
ffa736e566
zlog: Implement better scope map (#27408)
Another step towards having `zlog` as the default logging solution in
Zed.
The new ScopeMap replaces the previous HashMap based implementation used
for scope lookups to:

A. Reduce complexity
B. Increase speed at which non-enabled logs can be filtered out
C. Provide more granular control over how scopes are determined to be
enabled/disabled,
   and what caching/other speed increase opportunities are available

Release Notes:

- N/A
2025-03-25 03:05:32 +00:00
Richard Feldman
e9e6529df4
Add copy-path tool (#27371)
<img width="631" alt="Screenshot 2025-03-24 at 11 01 10 AM"
src="https://github.com/user-attachments/assets/7e144619-83d0-4455-8d80-cc7ec6a7b03e"
/>

Release Notes:

- N/A
2025-03-24 21:21:55 -04:00
Piotr Osiewicz
3205ae3884
debugger/lldb: Remove xcrun-based lldb-dap binary lookup (#27405)
Closes #ISSUE
/cc @RemcoSmitsDev 

Release Notes:

- N/A
2025-03-25 00:21:09 +00:00
Danilo Leal
03102b4d7e
assistant: Allow opening the Prompt Library via the command palette (#27368)
Also took the opportunity to rename the action to something that would
be clearer in the command palette, from `DeployPromptLibrary` to
`OpenPromptLibrary`.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-03-24 21:00:33 -03:00
Danilo Leal
c32dece1b8
assistant2: Add tiny design improvements (#27399)
Really small stuff, like adding icons and adjusting colors.

Release Notes:

- N/A
2025-03-24 21:00:21 -03:00
Remco Smits
bcfc9e4437
debugger: Improve variable list keyboard navigation (#27308)
This PR improves the keyboard navigation for the variable list. 
Before this PR, if you want to open/close nested variables, you had to
use the right/left & up/down arrow keys.
Now you can step through with just only using your left/right arrow
keys, this feels a bit more natural and more similar to how other
editors allow you to navigate through variables.

This PR also fixes the following issues:
- Allow selecting a scope to be the start of your selection
- Allow selecting previous item if the first item is selected

-----


https://github.com/user-attachments/assets/aff0b133-97be-4c09-8ee6-b11495ad5568

Release Notes:

- N/A
2025-03-25 00:36:09 +01:00
Marshall Bowers
a52095f558
copilot: Switch to official @github/copilot-language-server (#27401)
This PR updates Copilot to use the official
[`@github/copilot-language-server`](https://github.com/github/copilot-language-server-release).

It's [available on
npm](https://www.npmjs.com/package/@github/copilot-language-server), so
we're installing it from there.

I tested it out locally and it seemed to be working as expected.

Release Notes:

- Updated Copilot to use the official
[`@github/copilot-language-server`](https://github.com/github/copilot-language-server-release).
2025-03-24 23:35:29 +00:00
Finn Evers
be83c5e1c5
migrator: Add migration for settings changed prior to migrator-introduction (#27375)
This PR updates two existing settings to use the settings migrator
instead of a manually implemented visitor. Both of these settings were
changed prior to the introduction of automatic migrations and the
visitor ensured that the settings were kept backwards compatible. See
https://github.com/zed-industries/zed/pull/22200 and
https://github.com/zed-industries/zed/pull/22364 respectively.

WIth this change, existing user configurations are updated accordingly
and the corresponding settings can derive `Deserialize` again.

I also added tests for the replacement of settings values, as there was
no test for this behaviour. Additionally, I added a seperate test for
the existing migration of `always_show_close_button`, since that
migration updated both the key and value.

Release Notes:

- N/A
2025-03-25 04:35:01 +05:30
Conrad Irwin
46d67a33c7
Don't assume that the excerpt can be found (#27395)
Release Notes:

- Fix (rare) panic in the project diff view
2025-03-24 16:12:26 -06:00
João Marcos
10c04afc81
Fix regression in do_completion changes (#27396)
Caused by #27313

Release Notes:

- N/A
2025-03-24 21:53:03 +00:00
Marshall Bowers
920eda07a5
zed_extension_api: Fork new version of extension API (#27390)
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.

Release Notes:

- N/A
2025-03-24 17:06:05 -04:00
Richard Feldman
5d05c4aa70
Remove Lua scripting tool (#27388)
We decided to take this out for now. It doesn't seem necessary, and it
complicates the code a lot. We can always put it back later if desired.

Release Notes:

- N/A
2025-03-24 15:58:07 -04:00
João Marcos
bbc7fcc54f
Fix crash when toggling deleted hunk (#27138)
Release Notes:

- Fix rare crash when toggling deleted hunks.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-03-24 19:25:56 +00:00
João Marcos
11552cc0bd
Git: reload index before reading it (#27386)
This is one of the causes for race conditions, but isn't a specific bug fix by itself.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-03-24 19:03:57 +00:00
Bennet Bo Fenner
699369995b
assistant2: Rework @mentions (#26983)
https://github.com/user-attachments/assets/167f753f-2775-4d31-bfef-55565e61e4bc

Release Notes:

- N/A
2025-03-24 19:32:52 +01:00
Piotr Osiewicz
e661a0afd6
python: Enable subroot detection for pylsp and pyright (#27364)
This is not going to fully fix the multi-root story, as we still need to
weave venvs through. Hence, no release note just yet.

Release Notes:

- N/A
2025-03-24 18:56:18 +01:00
张小白
57ffd6d78d
Update windows-rs (#27379)
Release Notes:

- N/A
2025-03-24 16:29:18 +00:00
Anthony Eid
350c1e41d2
Serialize breakpoints when changing the state of a breakpoint (#27373)
This fixes a rare bug where a breakpoint isn't saved in the database
when a user toggles a breakpoint and immediately exits out of zed.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
2025-03-24 12:25:17 -04:00