Commit graph

19282 commits

Author SHA1 Message Date
Kirill Bulatov
980ce5fbf2
Move git status updates to a background thread (#24307)
Part of https://github.com/zed-industries/zed/issues/24099
Part of https://github.com/zed-industries/zed/issues/23025

Git status checks & updates are still slow for such repos, but those are
now not blocking FS entry population and rescans.

Release Notes:

- Improved project panel's speed in large projects
2025-02-05 23:14:26 +00:00
Michael Sloan
1dbca5d9a0
Mostly fix hover tooltips not respecting occlusion (#24319)
Regression in #22644

Unfortunately not a full fix, In the case where a tooltip gets displayed
and then gets occluded after display, it will stick around until the
mouse exits the hover bounds.

Release Notes:

- N/A

Co-authored-by: Ben <ben@zed.dev>
2025-02-05 23:08:56 +00:00
Marshall Bowers
e1919b4121
collab: Add the ability to filter extensions by what they provide (#24315)
This PR adds the ability to filter extension results from the extension
API by the features that they provide.

For instance, to filter down just to extensions that provide icon
themes:

```
https://api.zed.dev/extensions?provides=icon-themes
```

Release Notes:

- N/A
2025-02-05 22:12:18 +00:00
Patrick Detlefsen
c0dd7e8367
open_ai: Include o3-mini in Model::from_id (#24261) 2025-02-05 16:45:38 -05:00
Marshall Bowers
b7244af093
extensions_ui: Show extension features on cards (#24310)
This PR updates the extensions list to display the features that an
extension provides.

<img width="1309" alt="Screenshot 2025-02-05 at 4 12 07 PM"
src="https://github.com/user-attachments/assets/ff0c61cd-b7fe-49c3-9fc8-a0ab6b0511a6"
/>

Note that this will only show up for extensions that have this data
(which will be extensions published/updated on or after now).

Here's the view with some mocked data:

<img width="1309" alt="Screenshot 2025-02-05 at 4 01 56 PM"
src="https://github.com/user-attachments/assets/d6d6a818-d6ac-4162-9309-95472b17833a"
/>

Release Notes:

- N/A
2025-02-05 21:31:52 +00:00
Max Brunsfeld
ca01a8b9cb
Fix two issues with diff highlights (#24309)
* fix syntax highlighting of deleted text when buffer language changes
* do not highlight entire untracked files as created, except in the
project diff view

Release Notes:

- N/A

Co-authored-by: ConradIrwin <conrad.irwin@gmail.com>
Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-05 21:29:39 +00:00
Conrad Irwin
9114ca973c
Revert "Revert "Upgrade to rustls v0.23.22" (#24197)" (#24210)
try to reland rustls without breaking linux arm builders

See: 
- #24197
- #24138

Release Notes:

- N/A
2025-02-05 14:24:21 -07:00
Max Brunsfeld
b710945949
Fix replication of head text when head matches index (#24306)
Release Notes:

- N/A

---------

Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-05 20:37:32 +00:00
Marshall Bowers
59738f88c2
collab: Store features provided by extensions in the database (#24303)
This PR adds new columns to the `extension_versions` table to record
which features an extension provides.

These `provides_*` columns are populated from the `provides` field on
the extension manifest.

We'll be able to leverage this data in the future for showing what an
extension provides in the extensions UI, as well as allowing to filter
by extensions that provide a certain feature.

Release Notes:

- N/A
2025-02-05 19:50:24 +00:00
Marshall Bowers
2f5abe2b5a
panel: Remove unneeded lib.name field in Cargo.toml (#24301)
This PR removes the `name` field from under `lib` in the `Cargo.toml`
file for the `panel` crate, as it isn't necessary.

Also removed it from `script/new-crate`.

Release Notes:

- N/A
2025-02-05 19:30:06 +00:00
Conrad Irwin
44a7614a74
Fix panic when editing diff (#24298)
Release Notes:

- N/A
2025-02-05 12:14:02 -07:00
Conrad Irwin
9369b72475
Delete old project diff code (#24299)
Closes #ISSUE

Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A
2025-02-05 12:13:54 -07:00
Conrad Irwin
971a91ced7
Commit All Mode (#24293)
- **Base diffs on uncommitted changes**
- **Show added files in project diff view**
- **Fix git panel optimism**
- **boop**
- **Co-Authored-By: Cole <cole@zed.dev>**
- **Fix commit (all) buttons state**
- **WIP**
- **WIP: commit all mode**

Closes #ISSUE

Release Notes:

- N/A
2025-02-05 12:13:32 -07:00
Nate Butler
6d81ad1e0b
git_ui: Start unifying panel style with other panels (#24296)
- Adds the `panel` crate for defining UI shared between panels, like
common button and header designs, etc
- Starts to update the git ui to be more consistent with other panels

Release Notes:

- N/A
2025-02-05 13:54:14 -05:00
Conrad Irwin
70b1e0eec0
Fix expand buttons adjacent to folded hunks (#24297)
Release Notes:

- Fix expand buttons adjacent to folded hunks
2025-02-05 11:48:33 -07:00
Cole Miller
ffe503d77c
Fix spurious addition hunks in files with no git repo (#24288)
Release Notes:

- N/A
2025-02-05 13:41:08 -05:00
Marshall Bowers
5a25751521
extension_cli: Include the list of what an extension provides in the generated manifest (#24295)
This PR updates the Zed extension CLI with support for populating the
`provides` field in the generated extension manifest.

This field will contain the set of features that the extension provides.

For example:

```
"provides": ["themes", "icon-themes"]
```

Release Notes:

- N/A
2025-02-05 18:17:19 +00:00
Kirill Bulatov
aaf432fcd2
Revert recent anti-aliasing improvements (#24289)
This reverts commit 31fa414422.
This reverts commit b9e0aae49f.

`lyon` commit revert:

![image](https://github.com/user-attachments/assets/0243f61c-0713-416d-b8db-47372e04abaa)

`MSAA` commit revert:

![image](https://github.com/user-attachments/assets/b1a4a9fe-0192-47ef-be6f-52e03c025724)

cc @huacnlee , @\as-cii had decided to revert this PR due to a selection
right corner rendering bug.
Not sure what to propose for a fix from my side

Release Notes:

- N/A
2025-02-05 17:17:26 +00:00
Bennet Bo Fenner
e1a6d9a485
edit prediction: Improve UX around disabled_globs and show_inline_completions (#24207)
Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-05 17:09:19 +00:00
Danilo Leal
37db1dcd48
Revise the MessageNotification component (#24287)
This PR makes adding icons to the primary and secondary actions, in the
`MessageNotification` component, optional. Also took the opportunity to
remove a probably unnecessary "third action" from it; streamlining the
component API (we had added that for a design that we're not using
anymore). I did keep the "more info" possibility, which may be useful in
the future, though.

Release Notes:

- N/A
2025-02-05 13:39:27 -03:00
Danilo Leal
17a7495332
edit prediction: Fix license detection error logging + check for different spellings (#24281)
Follow-up to https://github.com/zed-industries/zed/pull/24278

This PR ensures we're checking if there's a license-type file in both US
& UK English spelling, and fixes the error logging again, treating for
when the worktree contains just a single file or multiple.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
2025-02-05 13:15:41 -03:00
Cole Miller
6b29616c95
Fix the worktree's repository_for_path (#24279)
Go back to a less optimized implementation for now since the custom
cursor target seems to have some bugs.

Release Notes:

- Fixed missing git blame and status output in some projects with
multiple git repositories
2025-02-05 10:37:51 -05:00
Kirill Bulatov
868e3f75b2
Rework shared commit editors (#24274)
Rework of https://github.com/zed-industries/zed/pull/24130
Uses
1033c0b57e
`COMMIT_EDITMSG` language-related definitions (thanks @d1y )

Instead of using real `.git/COMMIT_EDITMSG` file, create a buffer
without FS representation, stored in the `Repository` and shared the
regular way via the `BufferStore`.
Adds a knowledge of what `Git Commit` language is, and uses it in the
buffers which are rendered in the git panel.


Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: d1y <chenhonzhou@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
2025-02-05 15:36:24 +00:00
Danilo Leal
da4bad3a55
edit prediction: Don't log an error if license file isn't found (#24278)
Logging an error in this case isn't super necessary.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
2025-02-05 12:28:44 -03:00
Agus Zubiaga
630d0add19
edit predictions: Onboarding funnel telemetry (#24237)
Release Notes:

- N/A
2025-02-05 15:26:11 +00:00
Marshall Bowers
0a89d1a479
languages: Sort dependencies in Cargo.toml (#24277)
This PR sorts the dependency lists in the `Cargo.toml` for the
`languages` crate.

Release Notes:

- N/A
2025-02-05 15:07:53 +00:00
Peter Tripp
992125bec2
Revert "copilot: Correct o3-mini context length" (#24275)
Reverts zed-industries/zed#24152
See comment: https://github.com/zed-industries/zed/pull/24152#issuecomment-2636808170
Manually confirmed >20k generates error.
2025-02-05 15:03:45 +00:00
张小白
74c4dbd237
windows: Fix tests on Windows (#22616)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
2025-02-05 14:30:09 +00:00
Agus Zubiaga
f5e8048fcb
edit prediction: Allow enabling OSS data collection with no project open (#24265)
This was an leftover from when we were persisting a per-project setting.

Release Notes:

- N/A
2025-02-05 10:39:20 -03:00
Piotr Osiewicz
88b5f069fb
lsp: Add support for default rename behavior in prepareRename request (#24246)
Fixes #24184

Release Notes:

- Fixed renaming not working with some language servers (e.g. hls)
2025-02-05 13:27:57 +01:00
Michael Sloan
fef567bb49
Remove extra space in zed --version string for non-stable (#24254)
Release Notes:

- N/A
2025-02-05 07:25:03 +00:00
Cole Miller
5a955e208c
Fix panic when deleting an empty line after a deleted hunk (#24255)
Release Notes:

- Fix a panic when deleting text after a deletion hunk
2025-02-05 07:23:02 +00:00
Conrad Irwin
0963401a8d
Git improvements (#24238)
- **Base diffs on uncommitted changes**
- **Show added files in project diff view**
- **Fix git panel optimism**

Release Notes:

- Git: update diffs to be relative to HEAD instead of the index; to pave
the way for showing which hunks are staged

---------

Co-authored-by: Cole <cole@zed.dev>
2025-02-05 06:09:41 +00:00
Cole Miller
7c1132ed88
Refactor change sets to store index text in only one place (#24245)
This is a pure refactor that somewhat reduces the amount of code needed
when handling diff base changes. There's also a small performance gain
from reparsing the staged text and computing a new diff in parallel when
we weren't previously.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2025-02-04 17:11:01 -08:00
Marshall Bowers
f366b97899
collab: Use billing_customers.has_overdue_invoices to gate subscription access (#24240)
This PR updates the check that prevents subscribing with overdue
subscriptions to use the `billing_customers.has_overdue_invoices` field
instead.

This will allow us to set the value of `has_overdue_invoices` to `false`
when the invoices have been paid.

Release Notes:

- N/A
2025-02-04 18:38:00 -05:00
Marshall Bowers
aa3da35e8e
collab: Add has_overdue_invoices to billing_customers (#24239)
This PR adds a new `has_overdue_invoices` field to the
`billing_customers` table.

This will be used to statefully track whether a customer has overdue
invoices, and also to reset it when the invoices are paid.

We will set this field to `true` when a subscription is canceled with
the reason `payment_failed`.

Release Notes:

- N/A
2025-02-04 18:12:35 -05:00
Agus Zubiaga
b13498a5dd
edit prediction: Fix jump cursor position when scrolled (#24230)
We were looking up line layouts without subtracting start row so we
would get the wrong one when scrolled

Release Notes:

- N/A
2025-02-04 21:47:34 +00:00
Marshall Bowers
b02baea9d2
zeta: Use DTOs from zed_llm_client crate (#24229)
This PR updates the `zeta` crate to use the predictive edit DTOs defined
in the `zed_llm_client` crate.

This way we aren't duplicating their definitions (and risk them going
out of sync).

Release Notes:

- N/A
2025-02-04 21:39:15 +00:00
Marshall Bowers
d6a2a0b04a
zeta: Rename data_collection_permission back to can_collect_data (#24225)
This PR renames some bindings from `data_collection_permission` back to
`can_collect_data`, as the latter name is clearer on account of being a
modal verb.

Release Notes:

- N/A
2025-02-04 21:02:26 +00:00
Agus Zubiaga
58db66ef44
edit prediction: Do not render jump cursor until line layout is ready (#24226)
This is pretty rare but I found a case where `line_layouts` didn't have
the requested line yet, so we now skip rendering the cursor for that
period and avoid panicking.

Release Notes:

- N/A
2025-02-04 17:58:25 -03:00
Max Brunsfeld
6f0f9d631e
Allow running cancel-language-server-work action w/o editor focused (#24215)
Release Notes:

- Added the ability to run the `cancel language server work` action
while a panel (like the terminal panel) is focused
2025-02-04 20:49:08 +00:00
Cole Miller
5704b50fb1
git: Compute and synchronize diffs from HEAD (#23626)
This PR builds on #21258 to make it possible to use HEAD as a diff base.
The buffer store is extended to support holding multiple change sets,
and collab gains support for synchronizing the committed text of files
when any collaborator requires it.

Not implemented in this PR:

- Exposing the diff from HEAD to the user
- Decorating the diff from HEAD with information about which hunks are
staged

`test_random_multibuffer` now fails first at `SEED=13277`, similar to
the previous high-water mark, but with various bugs in the multibuffer
logic now shaken out.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
2025-02-04 15:29:10 -05:00
Mikayla Maki
69bb0a0597
Fix slow focus transitions to the terminal panel (#24172)
This long standing bug was caused by `Pane`'s focus_in handler bouncing
the focus to another handle.
Because focus resolution happens _after_ a frame has been rendered, the
only way to deal with this case is to schedule another frame to be
redrawn. However, we where suppressing all window refreshes that occur
during a focus transfer, causing this focus change to be completely
missed. However, changing this behavior can lead to infinite notify
loops, due to drawing a frame causing another to be rendered.

This PR fixes this problem narrowly by adding an `on_next_frame()`
callback in the pane's focus handle, so that the focus changes take
effect almost immediately. But only for this case, where we know it
doesn't cause infinite notify loops.

TODO:
- [x] Fix the infinite notify loop bug or determine a third way to fix
this lag

Release Notes:

- Fixed a bug where shifting focus to the terminal panel could be slow
2025-02-04 20:23:20 +00:00
Mikayla Maki
cfe0932c0a
Implement character index for point (#23989)
Fixes #22939
Fixes #23970
Supersedes https://github.com/zed-industries/zed/pull/23469

Release Notes:

- Fixed a bug where Zed could crash with certain input sources on macOS

---------

Co-authored-by: Louis Brunner <louis.brunner.fr@gmail.com>
Co-authored-by: ben <ben@zed.dev>
2025-02-04 20:15:43 +00:00
Henry Chu
7da60995cc
Enable CSS, JSON, Python, and Tailwind to lookup LSP installed in PATH (#22037)
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-02-04 14:50:49 -05:00
Peter Tripp
ee422dea6e
Bump Zed to v0.174 (#24221) 2025-02-04 14:38:37 -05:00
Michael Sloan
f8c436fe7f
Fix prediction preview binding: Alt + Preview -> Alt Preview (#24220)
Release Notes:

- N/A
2025-02-04 19:32:30 +00:00
Michael Sloan
b5d4b17f60
Fix showing "enter Accept" for prediction with LSP menu open (#24218)
Release Notes:

- N/A
2025-02-04 19:15:14 +00:00
Kirill Bulatov
3e68f7fde4
Revert "Skip COMMIT_EDITMSG contents when opening the file (#24146)" (#24216) 2025-02-04 21:05:10 +02:00
Mikayla Maki
e768eb0a34
Replace Window::parent_view_id() with Window::current_view() (#24212)
Chatted with @as-cii about limitations in the `Window::parent_view_id()`
API (see:
https://github.com/zed-industries/zed/pull/24182/commits/662153dcfdd80804f4041761c09c4a309d79f6d4)
and realized that I shouldn't be using the dispatch tree's data
structures as they are layout dependent. I've introduced a new stack to
`Window`, `rendered_entity_stack`, that tracks exactly which view's
elements are being drawn. As such, I've also been able to remove the
`Option<>` around the previous API.

Release Notes:

- N/A
2025-02-04 18:50:21 +00:00