Commit log

8fd8fac Bump to 0.167.2 for @maxdeviant

Zed Bot created

65954bc zed: Add timeouts for feature flag resolution in workspace panel initialization (cherry-pick #22715) (#22722)

Click to expand commit body
Cherry-picked zed: Add timeouts for feature flag resolution in workspace
panel initialization (#22715)

This PR adds timeouts when resolving feature flags during workspace
panel initialization so that we don't block indefinitely if Zed is not
connected to the internet.

Right now we wait for 5 seconds, but this value was chosen arbitrarily.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

gcp-cherry-pick-bot[bot] and Marshall Bowers created

f377403 Return back Rust completion details (cherry-pick #22648) (#22650)

Click to expand commit body
Cherry-picked Return back Rust completion details (#22648)

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

In Zed, Rust's label generators expected the details to come in ` (use
std.foo.Bar)` form, but recently, r-a started to send these details
without the leading whitespace which broke the code generation.

The PR makes LSP results parsing more lenient to work with both details'
forms.

Release Notes:

- Fixed Rust completion labels not showing the imports

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

e12daa7 language_model_selector: Refresh the models when the providers change (cherry-pick #22624) (#22627)

Click to expand commit body
Cherry-picked language_model_selector: Refresh the models when the
providers change (#22624)

This PR fixes an issue introduced in #21939 where the list of models in
the language model selector could be outdated.

Since we're no longer recreating the picker each render, we now need to
make sure we are updating the list of models accordingly when there are
changes to the language model providers.

I noticed it specifically in Assistant1.

Release Notes:

- Fixed a staleness issue with the language model selector.

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

gcp-cherry-pick-bot[bot] and Marshall Bowers created

3a33fe5 Fix tooltips too eager to disappear when there's a gap between the tooltip source and the tooltip itself (#22583)

Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/22548

Release Notes:

- N/A

Co-authored-by: Peter Tripp <peter@zed.dev>

Kirill Bulatov and Peter Tripp created

342b41a Remove stuck tooltips (cherry-pick #22548) (#22549)

Click to expand commit body
Cherry-picked Remove stuck tooltips (#22548)

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

Follow-up of https://github.com/zed-industries/zed/pull/22488
Previous PR broke git blame tooltips, which are expected to be open when
hovered, even if the mouse cursor is moved away from the actual blame
entry that caused the tooltip to appear.

Current version moves the invalidation logic into `prepaint_tooltip`,
where the new data about the tooltip origin is used to ensure we
invalidate only tooltips that have no mouse cursor in either origin
bounds or tooltip bounds (if it's hoverable).


Release Notes:

- Fixed tooltips getting stuck

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

a2264c3 v0.167.x stable

Peter Tripp created

78e1512 Revert "Invalidate tooltips when mouse leaves element's hitbox (#22488)" (cherry-pick #22542) (#22544)

Click to expand commit body
Cherry-picked Revert "Invalidate tooltips when mouse leaves element's
hitbox (#22488)" (#22542)

This reverts commit 344284e01331667c018e6ade5d791a20598a3a5c.

That change broke git blame tooltips, as Zed should also show tooltips
which are hovered, even though the mouse had left the origin element's
bounds.

Release Notes:

- N/A

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

3ca88f3 Deduplicate edits from WorkspaceEdit LSP responses (cherry-pick #22512) (#22514)

Click to expand commit body
Cherry-picked Deduplicate edits from WorkspaceEdit LSP responses
(#22512)

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

Release Notes:

- Fixed zls renames applying duplicate edits

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

68fe03a Ensure zls is used for Zig as a primary language server (cherry-pick #22511) (#22513)

Click to expand commit body
Cherry-picked Ensure zls is used for Zig as a primary language server
(#22511)

Part of https://github.com/zed-industries/zed/issues/22415

I've noticed that I cannot work with any Zig projects, as there were no
"go to definition", formatting and inlay hints.

After debugging, I've discovered that `typos` was registered as a first
language server, becoming the "primary" one for Zig.
That one does not have any proper capabilities, hence all corresponding
LSP requests were no-op.

While this solution is not ideal (I wonder, how many other set-ups are
broken due to the same thing?), we'd better fix things for now this way
at least.

Release Notes:

- Fixed `zls` not working properly when `typos` extension is installed

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

b8ad3a5 Invalidate tooltips when mouse leaves element's hitbox (cherry-pick #22488) (#22489)

Click to expand commit body
Cherry-picked Invalidate tooltips when mouse leaves element's hitbox
(#22488)

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

In case of the task rerun button tooltip from



https://github.com/zed-industries/zed/blob/f6dabadaf79bd29c89c8d55a1e9f1d33236f736e/crates/terminal_view/src/terminal_view.rs#L1051-L1070

, the actual button element is not styled as invisible, only its parent.
Zed won't render such element since it's parent is hidden, but will
consider it "visible" all the time its `paint` is called, spawning a
task with the delay, that will create the tooltip:



https://github.com/zed-industries/zed/blob/f6dabadaf79bd29c89c8d55a1e9f1d33236f736e/crates/gpui/src/elements/div.rs#L1949-L1959

When the parent is hidden, the child won't be painted anymore, and no
mouse listeners will be able to detect this fact and hide the tooltip.

Hence, check such cases separately, during `prepaint`, and invalidate
the tooltips that are not valid anymore.
We cannot use `hitbox.is_hovered(cx)` as it's not really hovered during
prepaint, so a mouse position check is used instead.

Release Notes:

- Fixed tooltips getting stuck

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

600923b Fix Project strong reference leaks (#22470)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/21906

* After https://github.com/zed-industries/zed/pull/21238,
`TerminalPanel` and `Project` strong references were moved into
`Pane`-related closures, creating a cycle, that did not allow
registering project release and shutting down corresponding language
servers

* After https://github.com/zed-industries/zed/pull/22329, a special
`Editor` was created with a strong reference to the `Project` which
seemed to do nothing bad in general, but when a working Zed was running
a Zed Dev build, had the same issue with preventing language servers
from shutting down.

The latter is very odd, and seems quite dangerous, as any arbitrary
`Editor` with `Project` in it may do the same, yet it seems that we did
not store them before the way git panel does.

I have tried creating a test, yet seems that we need to initialize a lot
of Zed for it which I failed — all my attempts resulted in a single
language server being present in the `Project`'s statuses.

Release Notes:

- Fixed language servers not being released between project reopens

Kirill Bulatov created

36018ff copilot: Update Copilot Chat to o1 GA model version (#22376)

Click to expand commit body
Closes #22375

Release Notes:

- Fixed model version of o1 in GitHub Copilot Chat

---------

Co-authored-by: Peter Tripp <peter@zed.dev>

Marcel Kersten and Peter Tripp created

ab02944 Resolve completion items once exactly (#22448)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/19214
Closes https://github.com/zed-industries/zed/pull/22443

Adds `resolved` property into Zed completion item data, to ensure we
resolve every completion item exactly once.

There are 2 paths for singplayer Zed, and corresponding 2 analogues for
multi player code, where resolve may happen:
* completions menu display & selection, that ends up using
`resolve_completions` in `lsp_store.rs`
* applying a completion menu entry, that ends up using
`apply_additional_edits_for_completion` in `lsp_store.rs`

Now, all local counterparts check `enabled` field before resolving and
set it to true afterwards, and reuse the same `resolve_completion_local`
method for resolving the items.

A logic for re-generating docs and item labels was moved out from the
`resolve_completion_local` method into a separate method, as
`apply_additional_edits_for_completion` does not need that, but needs
the rest of the logic for resolving.
During the extraction, I've noted that multiplayer clients are not
getting the item labels, regenerated after the resolve — as the Zed
protocol-based flow is not the exact copy of the local resolving.
To improve that, `resolve_completion_remote` needs to be adjusted, but
this change is omitted to avoid bloating the PR.

Release Notes:

- Fixed autocomplete inserting multiple imports

Kirill Bulatov created

b9d1431 terminal: Clear output after venv is activated (#22256)

Click to expand commit body
The command used to activate the venv can still be accessed/scrolled to
if needed.

Release Notes:

- The Python virtual environment activation command is no longer shown
in the terminal output by default.

Co-authored-by: Peter Tripp <peter@zed.dev>

Piotr Osiewicz and Peter Tripp created

d60635b zed 0.167.1

Peter Tripp created

0e288bf Fix project environment not working correctly with multiple worktrees (#22246)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/21972

This fixes two bugs:

**Bug 1**: this bug caused us to only ever load a single environment in
a multi-worktree project, thanks to this line:

```rust
if let Some(task) = self.get_environment_task.as_ref()
```

We'd only ever run a single task per project, which is wrong.

What does code does is to cache the tasks per `worktree_id`, which means
we don't even need to cache the environments again, since we can just
cache the `Shared<Task<...>>`.

**Bug 2**: we assumed that every `worktree_abs_path` is a directory,
which lead to `Failed to run direnv` log messages when opening a project
that had a worktree with a single file open (easy to reproduce: open a
normal project, open your settings, close Zed, reopen it — the settings
faile caused environments to not load)

It's fixed by checking whether the `worktree_abs_path` is an absolute
directory. Since this is always running locally, it's fine to use
`smol::fs` here instead of using our `Fs`.

Release Notes:

- Fixed shell environments not being loaded properly to be used by
language servers and terminals in case a project had multiple worktrees.
- Fixed `Failed to run direnv` messages showing up in case Zed restored
a window that contained a worktree with a single file.
https://github.com/zed-industries/zed/issues/21972

Thorsten Ball created

a8776f8 v0.167.x preview

Peter Tripp created

433cb99 Remove main push from `bump-zed-minor-versions` script (#22170)

Click to expand commit body
Motivation for this is to allow the `main` branch to be protected. This will enable use of auto-merge and merge queue.

Co-authored-by: Peter Tripp <peter@zed.dev>

Michael Sloan and Peter Tripp created

670ade9 extensions_ui: Don't block scrolling on disabled extension cards (#22189)

Click to expand commit body
This PR fixes an issue where disabled extension cards would block scroll
events when the mouse was over them.

Instead of using `.occlude`—which captures _all_ mouse events—we use
`.block_mouse_down` to just block mouse down events (to prevent clicking
the buttons on the disabled card). We also set the cursor style to the
default, as it was still switching to the pointer when hovered over top
of one of the buttons.

Release Notes:

- Fixed disabled extensions blocking scroll events in the extensions
list.

Marshall Bowers created

4a6f071 vim: Add support for :g/ and :v/ (#22177)

Click to expand commit body
Closes #ISSUE

Still TODO to make this feature good is better command history

Release Notes:

- vim: Add support for `:g/<pattern>/<cmd>` and `:v/<pattern>/<cmd>`

Conrad Irwin created

2ecbd97 vim: Support count with [x and ]x (#22176)

Click to expand commit body
Fixes: #21577
Fixes: #17245

Release Notes:

- vim: Add <count> support for [x/]x

Conrad Irwin created

a0a095c zeta: Show deletions when inline completion is shown in menu (#22186)

Click to expand commit body
If an inline completion isn't shown in a menu, we highlight text in the
editor as deleted.

But if it's shown in the menu, we didn't even show deleted text, which
makes it hard to understand what's going on.

This fixes it.
![screenshot-2024-12-18-14 34
55@2x](https://github.com/user-attachments/assets/579639e4-5ed9-4fe6-8e21-65166d192432)


Release Notes:

- N/A

Thorsten Ball created

4bfc107 Fix inconsistencies in "Transform" vs "Generate" tooltips for assistant v2 (#22160)

Click to expand commit body
Also makes the inline assistant and inline terminal assistant share a
bunch more code.

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Agus Zubiaga <hi@aguz.me>

Richard Feldman , Agus , and Agus Zubiaga created

6192c83 Show inline completions in menu only for supported providers (#22181)

Click to expand commit body
This changes #22093 by making the change only have an effect for the
supported provider: Zeta.

Made the change because the UX is still experimental and I don't want to
break existing workflows for Copilot/Supermaven users.

Even Zeta users can opt-out of it by setting
`"show_inline_completions_in_menu": false` in their settings, in case
they want the old show-inline-completion-or-show-lsp-completion behavior
back.

Release Notes:

- N/A

Thorsten Ball created

e8c9283 Fix the illegal JSON in the documentation (#22175)

Click to expand commit body
Release Notes:

- N/A

Hai Zhu created

2469122 Fix panic when calculating inline completion (#22180)

Click to expand commit body
Possible panic here in case we can't find the excerpt in the
multibuffer.

I thought this could happen when the inline completion references an
excerpt that disappeared from the multibuffer, but looking at the code
I'm not sure anymore - we use the same multibuffer snapshot in this
whole function and the `anchor_in_excerpt` method clips the anchors.

Still, let's be safe here.

Release Notes:

- N/A

Thorsten Ball created

6898a31 Fix panic in linked editing ranges (#21905)

Click to expand commit body
We were committing the cardinal sin of subtracting one from a column
without clipping

Closes #ISSUE

Release Notes:

- Fixed a panic in linked editing ranges

Conrad Irwin created

94bfb93 More telemetry events (#22171)

Click to expand commit body
- **Convert more events to telemetry::event**
- **And call events**

Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

1b83020 Update collab local development instructions (#22018)

Click to expand commit body
When running the collab server locally on a new machine, I found there
were some instructions missing for setting up the Postgres database.
Namely, the user mentioned on the `.env.toml` is not created by default.

Ref: https://github.com/zed-industries/zed/issues/8260

Release Notes:

- N/A

Enrique Kessler Martínez created

613deb6 Remove panics from X11Window::set_title (#22173)

Click to expand commit body
Release Notes:

- N/A

Cole Miller created

672fc76 Fix panic in activate_pane_in_direction (#21948)

Click to expand commit body
Ah, invalid SecondaryMap key, we meet again...

Release Notes:

- Fixed panic when jumping between panes

Cole Miller created

5d7b614 Improve context menu aside layout via custom logic (#22154)

Click to expand commit body
* Presence of the aside no longer affects position or size of the
context menu.

* Prefers to fit to the right, then on same side of line, then other
side of line, within the following preference order:
  - Max possible size within text area.
  - Max possible size within window.
- Actual size within window. This is the only case that could cause it
to jump around with less stability.

A further enhancement atop this might be to dynamically resize aside
height to fit.

Release notes are N/A as they are covered by the notes for #22102.

Closes #8523

Release Notes:

* N/A

Michael Sloan created

6aad616 assistant2: Fix focus issues with opening history (#22169)

Click to expand commit body
This PR fixes some focus issues with opening the thread history, which
required that the Assistant2 panel be focused in order for the history
to open.

Release Notes:

- N/A

Marshall Bowers created

918866b assistant2: Allow creating a new thread via the command palette (#22168)

Click to expand commit body
This PR allows a new thread to be created via the command palette when
the Assistant2 panel is not focused.

Release Notes:

- N/A

Marshall Bowers created

5b2653a Improve GitHub Issue template for Environment (#22147)

Click to expand commit body
Add support for pre-filling feature request template from zed::RequestFeature action.

Co-authored-by: Agus <agus@zed.dev>

Peter Tripp and Agus created

ba44db7 gpui: Rename `GPUSpecs` to `GpuSpecs` (#22166)

Click to expand commit body
This PR renames the `GPUSpecs` type to `GpuSpecs` to match Rust naming
conventions.

Release Notes:

- N/A

Marshall Bowers created

ce97e4d assistant2: Add temporary icon for the status bar item (#22156)

Click to expand commit body
This is temporary and should be removed whenever we fully transition to
Assistant 2.

<img width="800" alt="Screenshot 2024-12-17 at 16 50 48"
src="https://github.com/user-attachments/assets/61137993-ec2c-4754-9f9a-7559d1b21d89"
/>

Release Notes:

- N/A

Danilo Leal created

63d8a43 assistant2: Fix file context picker (#22163)

Click to expand commit body
This PR fixes an issue with the Assistant2 file context picker where
files weren't being attached properly.

We needed to retrieve the files from the worktree without the worktree
root name in the file path.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>

Marshall Bowers and Max created

81c118d Store focus handles in AppContext instead of Window (#22158)

Click to expand commit body
Previously, each window stored its own collection of focus handles. This
meant that to create a focus handle, you needed to have access to a
Window. I'm working on a simplification to gpui's context types that
removes `WindowContext` and `ViewContext` in favor of passing a window
reference explicitly when rendering or handling events. You'll still
need a window to manipulate focus, but it will be helpful to be able to
create focus handles without a window.

cc @mgsloan 

Release Notes:

- N/A

Nathan Sobo created

e1ca5ed zed: Fix formatting in workspace initialization (#22152)

Click to expand commit body
This PR fixes some formatting issues in the workspace initialization
code that stemmed from certain constructs causing `rustfmt` to bail out
of the formatting.

The bulk of the content of `initialize_workspace` has been factored out
into functions, as having nested closures within closures seems to be
the primary cause of `rustfmt` being unhappy.

Release Notes:

- N/A

Marshall Bowers created

fa1b1c6 docs: Fix indentation of JSON example lsp settings (#22162)

Peter Tripp created

0511f92 Add tooltip for Markdown Preview copy code button (#22057)

Peter Tripp created

70f82f8 telemetry: Fix license symlink (#22153)

Click to expand commit body
This PR fixes the `LICENSE-GPL` symlink in the `telemetry` crate.

Release Notes:

- N/A

Marshall Bowers created

1c48689 Allow the use of both Assistants when in the `assistant2` feature flag (#22150)

Click to expand commit body
This PR makes it so both Assistant panels are visible when in the
`assistant2` feature flag.

This way folks can continue using Assistant1 if Assistant2 isn't meeting
their needs.

Right now they are shown as two different panels shown in the status bar
(although using the same icon), but this is just a temporary state until
we can surface the Assistant1 functionality in Assistant2 somehow.

Note that the inline assist will always use the Assistant2 panel.

Release Notes:

- N/A

Marshall Bowers created

c86cf2c zeta: Refine visuals for the completion popover (#22142)

Click to expand commit body
Most notably, trying out a different icon and adding the "Completion"
word to the side of the provider name.

<img width="800" alt="Screenshot 2024-12-17 at 13 04 55"
src="https://github.com/user-attachments/assets/6dcaa699-f358-4242-9812-e1668f426207"
/>

Release Notes:

- N/A

Danilo Leal created

7425d24 Add telemetry::event! (#22146)

Click to expand commit body
CC @JosephTLyons

Release Notes:

- N/A

Conrad Irwin created

b17f208 assistant2: Sketch in directory context picker (#22148)

Click to expand commit body
This PR sketches in the structure for the directory context picker.

Waiting on implementing the actual behavior until we fix the issues with
the file context picker.

Release Notes:

- N/A

Marshall Bowers created

68e3d79 assistant2: Use `ContextKind` to match on `ContextPicker` entries (#22143)

Click to expand commit body
This PR updates the `ContextPicker` entries to match on the
`ContextKind` instead of using strings.

Release Notes:

- N/A

Marshall Bowers created

ed3e647 editor: Add horizontal scrollbar (#19495)

Click to expand commit body
![editor_scrollbars](https://github.com/user-attachments/assets/76c26776-8fe4-47f8-9c79-9add7d7d2151)

Closes #4427 

Release Notes:

- Added a horizontal scrollbar to the editor panel
- Added `axis` option to `scrollbar` in the Zed configuration, which can
forcefully disable either the horizontal or vertical scrollbar
- Added `horizontal_scroll_margin` equivalent to
`vertical_scroll_margin` in the Zed configuration

Rough Edges:

This feature seems mostly stable from my testing. I've been using a
development build for about a week with no issues. Any feedback would be
appreciated. There are a few things to note as well:

1. Scrolling to the lower right occasionally causes scrollbar clipping
on my end, but it isn't consistent and it isn't major. Some more testing
would definitely be a good idea. [FIXED]
2. Documentation may need to be modified
3. I added an `AxisPair` type to the `editor` crate to manage values
that have a horizontal and vertical variant. I'm not sure if that's the
optimal way to do it, but I didn't see a good alternative. The `Point`
type would technically work, but it may cause confusion.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Carlos Kieliszewski and Piotr Osiewicz created