Commit log

db65ee0 Update Rust crate etagere to v0.2.15 (#23493)

Click to expand commit body
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [etagere](https://redirect.github.com/nical/etagere) | dependencies |
patch | `0.2.13` -> `0.2.15` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

renovate[bot] and renovate[bot] created

8ed2a81 feature_flags: Enable `assistant2` for all staff (#23502)

Click to expand commit body
This PR makes it so the `assistant2` feature flag is automatically
enabled for all staff.

Previously all the staff members had been opted in to the feature flag
manually (to allow for opting out), but I think we're ready to
unconditionally ship it to all staff.

Release Notes:

- N/A

Marshall Bowers created

01b57b1 assistant2: Only show thread context in picker when we have a `ThreadStore` (#23501)

Click to expand commit body
This PR fixes an issue with the context picker where it would show
thread context as an option even if there was no `ThreadStore`
available.

Release Notes:

- N/A

Marshall Bowers created

a1077c6 assistant2: Add button to open the prompt library (#23500)

Click to expand commit body
This PR adds a button to open the prompt library from the configuration
view in Assistant2.

<img width="1309" alt="Screenshot 2025-01-22 at 5 38 08 PM"
src="https://github.com/user-attachments/assets/d514abca-53bc-4cde-bead-ab68a1994fb5"
/>

Release Notes:

- N/A

Marshall Bowers created

51fcb71 Dedupe `PromptBuilder` construction (#23496)

Click to expand commit body
This PR dedupes the construction of the `PromptBuilder`.

Previously this was constructed by both `assistant` and `assistant2`,
but now we construct it outside and pass it in.

Release Notes:

- N/A

Marshall Bowers created

aad04e0 Update Rust crate indexmap to v2.7.1 (#23494)

Click to expand commit body
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [indexmap](https://redirect.github.com/indexmap-rs/indexmap) |
workspace.dependencies | patch | `2.7.0` -> `2.7.1` |

---

### Release Notes

<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>

###
[`v2.7.1`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#271-2025-01-19)

[Compare
Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.7.0...2.7.1)

-   Added `#[track_caller]` to functions that may panic.
-   Improved memory reservation for `insert_entry`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

renovate[bot] and renovate[bot] created

3c0d05e lsp: Use replace edits for completions (#23490)

Click to expand commit body
(Late) follow up to #9634.
Fixes #23395

Release Notes:

- Accepting completions while the cursor is in the middle of suggested
completion will now result in smaller edits being applied.

Piotr Osiewicz created

55d99e0 git: Handle git status output for deleted-in-index state (#23483)

Click to expand commit body
When a file exists in HEAD, is deleted in the index, and exists again in
the working copy, git produces two lines for it, one reading `D `
(deleted in index, unmodified in working copy), and the other reading
`??` (untracked). Merge these two into the equivalent of `DA`.

Release Notes:

- Improved handling of files that are deleted in the git index but exist
in HEAD and the working copy

Cole Miller created

08b3c03 project: Allow running multiple instances of a single language server within a single worktree (#23473)

Click to expand commit body
This PR introduces a new entity called Project Tree which is responsible
for finding subprojects within a worktree;
a subproject is a language-specific subset of a worktree which should be
accurately tracked on the language server side. We'll have an ability to
set multiple disjoint workspaceFolders on language server side OR spawn
multiple instances of a single language server (which will be the case
with e.g. Python language servers, as they need to interact with
multiple disjoint virtual environments).
Project Tree assumes that projects of the same LspAdapter kind cannot
overlap. Additionally project nesting is not allowed within the scope of
a single LspAdapter.

Closes https://github.com/zed-industries/zed/issues/5108
Re-lands #22182 which I had to revert due to merging it into todays
Preview.

Release Notes:

- Language servers now track their working directory more accurately.

---------

Co-authored-by: João <joao@zed.dev>

Piotr Osiewicz and João created

2c2a3ef assistant2: Handle LLM providers that do not emit `StartMessage` events (#23485)

Click to expand commit body
This PR updates Assistant2's response streaming to work with LLM
providers that do not emit `StartMessage` events.

Now if we get a `Text` event without having received a `StartMessage`
event we will still insert an Assistant message so we can stream in the
response from the model.

Release Notes:

- N/A

Marshall Bowers created

6aab82c docs: Mention PopOS 24.04 in Linux FAQ for /etc/prime-discrete (#23482)

Peter Tripp created

a811979 git: Fix the panel's update debouncing (#23462)

Click to expand commit body
This PR replaces the update debouncing code in the git panel with a more
correct and conventional structure (holding a `Task` field instead of
spawning a task that runs a loop). I wrote the code that this replaces
without realizing that it doesn't implement debouncing properly.

Release Notes:

- N/A

Cole Miller created

514d9b4 assistant2: Add configuration (#23481)

Click to expand commit body
This PR wires up the ability to configure Assistant2.

<img width="1309" alt="Screenshot 2025-01-22 at 1 52 56 PM"
src="https://github.com/user-attachments/assets/3de47797-7959-47af-bd93-51f105e87c28"
/>

Release Notes:

- N/A

Marshall Bowers created

f770397 assistant: Extract `ConfigurationView` to its own module (#23480)

Click to expand commit body
This PR is a small refactoring that extracts the Assistant's
`ConfigurationView` into its own module.

Release Notes:

- N/A

Marshall Bowers created

09fe1e7 Scroll completions menu to new selection on filter, fix corner case (#23478)

Click to expand commit body
In the future if `filter` was used more this would fix other issues. In
the current code paths, this just fixes the particular corner case of
edit prediction arriving async while `y_flipped = true` (in this case it
needs to be scrolled down to show item with index 0).

Release Notes:

- N/A

Michael Sloan created

9f87145 title_bar: Simplify `git-ui` feature flag check (#23475)

Click to expand commit body
This PR is a follow-up to
https://github.com/zed-industries/zed/pull/23470 that simplifies the way
we check the `git-ui` feature flag in the title bar.

Release Notes:

- N/A

Marshall Bowers created

5930b55 Bump Zed to v0.172 (#23474)

Peter Tripp created

da406ae Revert "project: Allow running multiple instances of a single language server within a single worktree" (#23472)

Click to expand commit body
Reverts zed-industries/zed#22182
I've merged the build too soon as I wanted it to be excluded from todays
Preview.

Piotr Osiewicz created

706e46c vim: Fix % not working for multi-char bracket pairs (#23471)

Click to expand commit body
Closes #23358

Demo/proof:


https://github.com/user-attachments/assets/2036d183-8830-415b-9155-0d3efe3d824c




Release Notes:

- Fixed `%` in Vim mode not working correctly for multi-char brackets,
such as `do/end` in Elixir or `\begin` and `\end` in LaTeX.

Co-authored-by: Conrad <conrad@zed.dev>

Thorsten Ball and Conrad created

5be2784 git_ui: Feature flag repo selector (#23470)

Click to expand commit body
Fixes an issue where the repo selector showed for all users, not just
those in the git_ui feature flag.

This was meant to be included in the `git_ui` feature flag.

Release Notes:

- N/A

Nate Butler created

bed917b project: Allow running multiple instances of a single language server within a single worktree (#22182)

Click to expand commit body
This PR introduces a new entity called Project Tree which is responsible
for finding subprojects within a worktree;
a subproject is a language-specific subset of a worktree which should be
accurately tracked on the language server side. We'll have an ability to
set multiple disjoint `workspaceFolder`s on language server side OR
spawn multiple instances of a single language server (which will be the
case with e.g. Python language servers, as they need to interact with
multiple disjoint virtual environments).
Project Tree assumes that projects of the same LspAdapter kind cannot
overlap. Additionally **project nesting** is not allowed within the
scope of a single LspAdapter.

Closes #5108

Release Notes:

- Language servers now track their working directory more accurately.

---------

Co-authored-by: João <joao@zed.dev>

Piotr Osiewicz and João created

d85fec5 Update "Book Onboarding" destination link (#23464)

Click to expand commit body
This PR updates the Book Onboarding links to point to a new form.

Release Notes:

- N/A

Danilo Leal created

95cde12 Show "tab Accept" only for zeta (#23463)

Click to expand commit body
#23460 brought up we are showing the new "tab Accept" marker for single
line suggestions for non-zeta providers. We think this might be valid
for any provider, but we only want to enable it for zeta initially so it
doesn't affect an existing user base.

Release Notes:

- N/A

Agus Zubiaga created

1e88e29 assistant2: Respect panel dock position (#23465)

Click to expand commit body
This PR fixes an issue where Assistant2 was not respecting the panel
dock position.

Release Notes:

- N/A

Marshall Bowers created

636df12 Only show accept callout if suggestion is all insertions/deletions (#23461)

Click to expand commit body
Release Notes:

- N/A

Agus Zubiaga created

55721c6 Fix single line edit prediction detection (#23456)

Click to expand commit body
#23411 introduced an "Accept" callout for single line edits, but the
logic to detect them was incorrect causing it to trigger for multiline
insertions, this PR fixes that.

Release Notes:

- N/A

Agus Zubiaga created

f0b5b0b lsp: Ignore payload of `DidChangeConfiguration` dynamic registration (#23454)

Click to expand commit body
Fixes #23430

Closes #23430

Release Notes:

- N/A

Piotr Osiewicz created

c66f611 windows: Improve foreground task dispatching on Windows (continued) (#23415)

Click to expand commit body
Closes #22653 again

In PR #23283, I thought that every `runnable` dispatched to the main
thread would correspond to an `EVENT_DISPATCHED` message in the message
queue. However, after testing, some `runnable`s occasionally weren’t
executed.

This PR updated the code as follows:  
```rust
if let Ok(runnable) = self.main_receiver.try_recv() {    <-- before
for runnable in self.main_receiver.drain() {            <-- after
    runnable.run();
}
```

This ensures that runnables are handled more proactively on the main
thread, now we handle `runnable`s with a much higher priority.

A big thanks to @MolotovCherry and @ArthurBrussee for their testing
efforts!

Release Notes:

- N/A

张小白 created

2f1af2a When completions menu is displayed above cursor, reverse order (#23446)

Click to expand commit body
Considered doing this when previously working on completions menu
layout, as it brings the default selection position next to the cursor
position, and is generally more symmetrical. With #23445 there is now a
more compelling reason, as the "translucent, cropped bottom" display
doesn't make sense when displayed above.

Release Notes:

- N/A

Michael Sloan created

1769bc9 Make app notifications appear in new workspaces + dismiss on all workspaces (#23432)

Click to expand commit body
The keymap error notifications got convoluted to support displaying the
notification on startup. This change addresses it systemically for all
future app notifications.

Reverts most of #20531, while keeping the fix to handle keyboard layout
switching. This is a better fix for #20531

Release Notes:

- N/A

Michael Sloan created

1e1997c Wire up `AssistantPanelDelegate` based on `assistant2` feature flag (#23444)

Click to expand commit body
This PR adjusts how the `AssistantPanelDelegate` global is set to be
based on the state of the feature flag.

This should prevent `assistant` and `assistant2` from potentially
clobbering each other.

Release Notes:

- N/A

Marshall Bowers created

9ee1db3 assistant2: Insert default prompt into prompt editor (#23443)

Click to expand commit body
This PR fixes an issue where the default prompt was not being inserted
into the prompt editor in Assistant2.

Release Notes:

- N/A

Marshall Bowers created

c887bf8 Consolidate Assistant panels in `assistant2` feature flag (#23442)

Click to expand commit body
This PR consolidates the two Assistant panels into one for users in the
`assistant2` feature flag.

Now that the Assistant1 prompt editor is accessible through the
Assistant2 panel, we no longer have a need to show both panels.

Release Notes:

- N/A

Marshall Bowers created

7516b8c assistant2: Add prompt editor history (#23439)

Click to expand commit body
This PR adds the prompt editor history to Assistant2.

<img width="1309" alt="Screenshot 2025-01-21 at 9 02 07 PM"
src="https://github.com/user-attachments/assets/d79936fe-1c23-425f-b99d-43f85afd0c39"
/>

Release Notes:

- N/A

Marshall Bowers created

be407e2 Extract `ContextHistory` to `assistant_context_editor` (#23437)

Click to expand commit body
This PR extracts the `ContextHistory` to the `assistant_context_editor`
crate.

Release Notes:

- N/A

Marshall Bowers created

e59c910 assistant2: Add prompt editor (#23436)

Click to expand commit body
This PR adds the Assistant1 experience to Assistant2 as a "prompt
editor".

<img width="1309" alt="Screenshot 2025-01-21 at 7 17 26 PM"
src="https://github.com/user-attachments/assets/3ce2f32b-2b1a-48a8-8e56-4c44e3ac4ce5"
/>

Release Notes:

- N/A

Marshall Bowers created

3d47f32 Add support for `editor::SwapSelectionEnds` everywhere (emacs exchange-point-and-mark) (#23428)

Click to expand commit body
Add `editor:: SwapSelectionEnds ` action which swaps the cursor location from the beginning/end of a given selection.
Renamed from `editor::ExchangeMark` to `editor::SwapSelectionEnds`.
Unbound by default, bound to `ctrl-x ctrl-x` in Emacs keymap.

Peter Tripp created

31909bf git: Implement a basic repository selector (#23419)

Click to expand commit body
This PR adds a rough-and-ready picker for selecting which of the
project's repositories the git panel should display.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Nate <nate@zed.dev>

Cole Miller , Nate Butler , and Nate created

417760a Extract `ContextEditor` to `assistant_context_editor` (#23433)

Click to expand commit body
This PR extracts the `ContextEditor` to the `assistant_context_editor`
crate.

As part of this, we have decoupled the `ContextEditor` from the
`AssistantPanel`.

There is now an `AssistantPanelDelegate` that the `ContextEditor` uses
when it needs to interface with the Assistant panel.

Release Notes:

- N/A

Marshall Bowers created

9a7f1d1 Add `assistant_context_editor` crate (#23429)

Click to expand commit body
This PR adds a new `assistant_context_editor` crate.

This will ultimately house the `ContextEditor` so that it can be
consumed by both `assistant` and `assistant2`.

For the purposes of this PR, we just introduce the crate and move some
supporting constructs to it, such as the `ContextStore`.

Release Notes:

- N/A

Marshall Bowers created

c450cd5 open_ai: Move from o1-preview to o1 for OpenAI Assistant provider (#23425)

Click to expand commit body
- Closes: https://github.com/zed-industries/zed/issues/22521
- Follow-up to: https://github.com/zed-industries/zed/pull/22376

Peter Tripp created

6eaaced Fix button demo in the component preview (#23423)

Click to expand commit body
Problem: If you click on "Tinted Icons", "Icon Color" is also activated.

Release Notes:

- N/A

k4leg created

836b4c1 ci: Remove `paths-ignore` for docs, as it does not work with required status checks (#23424)

Click to expand commit body
This PR removes the `paths-ignore` for docs again, as it causes
docs-only PRs to be unmergable in combination with required status
checks (which we need in order to support merge-when-ready).

We can put these back if and only if we come up with a solution for how
to make it work with required status checks.

Release Notes:

- N/A

Marshall Bowers created

718da3f docs: Fix broken link for the Odin language (#23421)

Hristo Kanchev created

51b6cbf assistant: Extract `ContextEditor` and `ContextHistory` to their own modules (#23422)

Click to expand commit body
This PR extracts the `ContextEditor` and `ContextHistory`
implementations into their own modules so that it's clearer which parts
depend on other constructs in the `assistant` crate.

Release Notes:

- N/A

Marshall Bowers created

c825bb4 assistant2: Propagate move up action to inline picker from message editor (#23416)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Richard <richard@zed.dev>

Agus Zubiaga and Richard created

86ff88a Show "tab Accept" indicator for single line insertions/deletions (#23411)

Click to expand commit body
https://github.com/user-attachments/assets/655f20a9-f22f-4f91-870e-d40b20c8c994

Release Notes:

- N/A

Co-authored-by: Danilo <danilo@zed.dev>

Agus Zubiaga and Danilo created

14cd178 ollama: Add deepseek-r1 context size to defaults (#23420)

Peter Tripp created

aa5fa4b git: Use a buffer for the panel's commit message (#23308)

Click to expand commit body
This PR changes the `GitPanel` and `GitState` to use a
`language::Buffer` for the commit message. This is a small initial step
toward remote editing and collaboration support.

Release Notes:

- N/A

---------

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

Cole Miller and Max created

64f9acf Simplify workspace notification code (#23414)

Click to expand commit body
* Remove `NotificationHandle` trait in favor of just passing `AnyView` -
id field wasn't used.

* Remove `show_notification_once`, doesn't seem to be needed for its
only use.

Release Notes:

- N/A

Michael Sloan created