Commit log

64a5153 collab: Make unsupported for MinGW toolchain (#23518)

Click to expand commit body
Closes #23451

reverts #23117 for MinGW. collab can't be compiled for MinGW because
webrtc itself doesn't support MinGW compilers

Release Notes:

- N/A

Maksim Bondarenkov created

5d005a7 Canonicalize paths when running tests (#23655)

Click to expand commit body
In the Windows test environment, the paths generated by `temp_tree()`
are symlink paths, which causes certain tests to fail.

I later noticed that when opening a project, we seem to always use
`canonicalize` to normalize the paths, as shown here:
https://github.com/zed-industries/zed/pull/21039.

This PR adopts a similar approach for the test environment to address
the issue.

Release Notes:

- N/A

张小白 created

0f8e2e3 Remove scripts used in merging the refactoring (#23669)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

84b945e Revert making keybinding display in Mac menus use standard precedence (#23661)

Click to expand commit body
Closes #23621

Change was in #23378. Also adds a comment to clarify why this is
inconsistent with all other uses of `bindings_for_action`.

Release Notes:

- N/A

Michael Sloan created

6fca1d2 Eliminate GPUI View, ViewContext, and WindowContext types (#22632)

Click to expand commit body
There's still a bit more work to do on this, but this PR is compiling
(with warnings) after eliminating the key types. When the tasks below
are complete, this will be the new narrative for GPUI:

- `Entity<T>` - This replaces `View<T>`/`Model<T>`. It represents a unit
of state, and if `T` implements `Render`, then `Entity<T>` implements
`Element`.
- `&mut App` This replaces `AppContext` and represents the app.
- `&mut Context<T>` This replaces `ModelContext` and derefs to `App`. It
is provided by the framework when updating an entity.
- `&mut Window` Broken out of `&mut WindowContext` which no longer
exists. Every method that once took `&mut WindowContext` now takes `&mut
Window, &mut App` and every method that took `&mut ViewContext<T>` now
takes `&mut Window, &mut Context<T>`

Not pictured here are the two other failed attempts. It's been quite a
month!

Tasks:

- [x] Remove `View`, `ViewContext`, `WindowContext` and thread through
`Window`
- [x] [@cole-miller @mikayla-maki] Redraw window when entities change
- [x] [@cole-miller @mikayla-maki] Get examples and Zed running
- [x] [@cole-miller @mikayla-maki] Fix Zed rendering
- [x] [@mikayla-maki] Fix todo! macros and comments
- [x] Fix a bug where the editor would not be redrawn because of view
caching
- [x] remove publicness window.notify() and replace with
`AppContext::notify`
- [x] remove `observe_new_window_models`, replace with
`observe_new_models` with an optional window
- [x] Fix a bug where the project panel would not be redrawn because of
the wrong refresh() call being used
- [x] Fix the tests
- [x] Fix warnings by eliminating `Window` params or using `_`
- [x] Fix conflicts
- [x] Simplify generic code where possible
- [x] Rename types
- [ ] Update docs

### issues post merge

- [x] Issues switching between normal and insert mode
- [x] Assistant re-rendering failure
- [x] Vim test failures
- [x] Mac build issue



Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: max <max@zed.dev>
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Mikayla Maki <mikaylamaki@Mikaylas-MacBook-Pro.local>
Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
Co-authored-by: joão <joao@zed.dev>

Nathan Sobo , Antonio Scandurra , Cole Miller , Mikayla , Joseph , max , Michael Sloan , Mikayla Maki , Mikayla , and joão created

21b4a0d Adjust `editor: open excerpts split` key binding (#23646)

Click to expand commit body
The pattern in Zed and in other editors is to use `cmd` to modify some
file-opening action to open it in a split rather than in the current
pane.

- In the project pane, a `click` opens a file, and a `cmd-click` opens
it in a split
- In the file finder, `enter` opens the file, and a `cmd-enter` opens it
in a split

It makes sense to me that if `alt-enter` opens a file from the excerpt,
that `cmd-alt-enter` opens it in a split, following the pattern above.

Note: I'm not auto-merging this, as others might disagree.
Note: I didn't touch the Vim binding.

Release Notes:

- Breaking Change: Changed `editor: open excerpts split` key binding to
`cmd-alt-enter` on macOS and `ctrl-alt-enter` on Linux.

Joseph T. Lyons created

da2bd4b Rework go to line infrastructure (#23654)

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


https://github.com/user-attachments/assets/60ea3dbd-b594-4bf5-a44d-4bff925b815f

* Fixes incorrect line selection for certain corner cases

Before:

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/35aaee6c-c120-4bf1-9355-448a29d1b9b5"
/>

After:

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/abd97339-4594-4e8e-8605-50d74581ae86"
/>


* Reworks https://github.com/zed-industries/zed/pull/16420 to display
selection length with less performance overhead.
Improves the performance more, doing a single selections loop instead of
two.

* Fixes incorrect caret position display when text contains UTF-8 chars
with size > 1
Also fixes tooltop values for this case

* Fixes go to line to treat UTF-8 chars with size > 1 properly when
navigating

* Adds a way to fill go to line text editor with its tooltip on `Tab`

Release Notes:

- Fixed incorrect UTF-8 characters handling in `GoToLine` and caret
position

Kirill Bulatov created

7c0a39d Add key binding for `editor: open selections in multibuffer` (#23648)

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

- Existing: `alt-enter` to open files from multi-buffer selections
- New: `alt-enter` to open multi-buffer from file selections

I updated the original PR changelog line.

Release Notes:

- N/A

Joseph T. Lyons created

392b95b Use proper path separator for multi buffer headers (#23635)

Click to expand commit body
Before: 


![bad](https://github.com/user-attachments/assets/ab20836a-b3bb-4b33-8ce4-eecc79d5f02f)


After:


![good](https://github.com/user-attachments/assets/40c328d1-2ef1-4a9b-9de9-9be9bba26756)


Release Notes:

- N/A

Kirill Bulatov created

5f417ed Fix repl "plain" terminals enqueing events without ever dequeuing (#23641)

Click to expand commit body
Bringing back part of #23631 which was reverted in #23636. Different but
related memory leak to what's described in #23008

Release Notes:

- N/A

Michael Sloan created

75b507d Open selections in multi buffer (#23644)

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

Release Notes:

- Added an `editor: open selections in multibuffer` command.

Joseph T. Lyons created

f510283 Revert terminal memory leak fixes (#23636)

Click to expand commit body
New mechanism had introduced the following regressions:

* Windows tasks are not registering child exit properly, sometimes
getting stuck in dirty state (even with
https://github.com/zed-industries/zed/pull/23631):


https://github.com/user-attachments/assets/6d406f17-aa76-4012-9c3b-be72d6d5beae

* Overall, the terminal editing started to feel more sluggish, esp. in
regards to deletions (ctrl-w and backspace), tested on macOS:


https://github.com/user-attachments/assets/3a69fe2e-e394-45e8-8f51-0f5ac396cb24


Release Notes:

- N/A

Kirill Bulatov created

b7c6ffa Fix panic when multi-cursor edit attempted in deleted hunk (#23633)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

ba16b4e assistant2: Show accept terms UI in thread empty state (#23630)

Click to expand commit body
<img
src="https://github.com/user-attachments/assets/cea93cfb-8a40-48c4-9d90-f1751c79603b"
width=400>



Release Notes:

- N/A

---------

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

Agus Zubiaga and Danilo created

ec5d02d Use `send` instead of `feed` on terminal events channel (#23631)

Click to expand commit body
Potentially fixes a bug where tasks are not marked as finished.

Release Notes:

- N/A

Michael Sloan created

d2c55cb Rework diff rendering to allow putting the cursor into deleted text, soft-wrapping and scrolling deleted text correctly (#22994)

Click to expand commit body
Closes #12553

* [x] Fix `diff_hunk_before`
* [x] Fix failure to show deleted text when expanding hunk w/ cursor on
second line of the hunk
* [x] Failure to expand diff hunk below the cursor.
* [x] Delete the whole file, and expand the diff. Backspace over the
deleted hunk, panic!
* [x] Go-to-line now counts the diff hunks, but it should not
* [x] backspace at the beginning of a deleted hunk deletes too much text
* [x] Indent guides are rendered incorrectly 
* [ ] Fix randomized multi buffer tests

Maybe:
* [ ] Buffer search should include deleted text (in vim mode it turns
out I use `/x` all the time to jump to the next x I can see).
* [ ] vim: should refuse to switch into insert mode if selection is
fully within a diff.
* [ ] vim `o` command when cursor is on last line of deleted hunk.
* [ ] vim `shift-o` on first line of deleted hunk moves cursor but
doesn't insert line
* [x] `enter` at end of diff hunk inserts a new line but doesn't move
cursor
* [x] (`shift-enter` at start of diff hunk does nothing)
* [ ] Inserting a line just before an expanded hunk collapses it

Release Notes:


- Improved diff rendering, allowing you to navigate with your cursor
inside of deleted text in diff hunks.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: João <joao@zed.dev>

Max Brunsfeld , Conrad , Cole , Mikayla , Conrad Irwin , Michael , Agus , and João created

1fdae4b Update Rust crate tokio to v1.43.0 (#22882)

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

| Package | Type | Update | Change |
|---|---|---|---|
| [tokio](https://tokio.rs)
([source](https://redirect.github.com/tokio-rs/tokio)) | dependencies |
minor | `1.42.0` -> `1.43.0` |
| [tokio](https://tokio.rs)
([source](https://redirect.github.com/tokio-rs/tokio)) |
workspace.dependencies | minor | `1.42.0` -> `1.43.0` |

---

### Release Notes

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

###
[`v1.43.0`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.43.0):
Tokio v1.43.0

[Compare
Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.0)

### 1.43.0 (Jan 8th, 2025)

##### Added

-   net: add `UdpSocket::peek` methods ([#&#8203;7068])
-   net: add support for Haiku OS ([#&#8203;7042])
-   process: add `Command::into_std()` ([#&#8203;7014])
-   signal: add `SignalKind::info` on illumos ([#&#8203;6995])
-   signal: add support for realtime signals on illumos ([#&#8203;7029])

##### Fixed

- io: don't call `set_len` before initializing vector in `Blocking`
([#&#8203;7054])
- macros: suppress `clippy::needless_return` in `#[tokio::main]`
([#&#8203;6874])
-   runtime: fix thread parking on WebAssembly ([#&#8203;7041])

##### Changes

-   chore: use unsync loads for `unsync_load` ([#&#8203;7073])
-   io: use `Buf::put_bytes` in `Repeat` read impl ([#&#8203;7055])
-   task: drop the join waker of a task eagerly ([#&#8203;6986])

##### Changes to unstable APIs

- metrics: improve flexibility of H2Histogram Configuration
([#&#8203;6963])
-   taskdump: add accessor methods for backtrace ([#&#8203;6975])

##### Documented

- io: clarify `ReadBuf::uninit` allows initialized buffers as well
([#&#8203;7053])
- net: fix ambiguity in `TcpStream::try_write_vectored` docs
([#&#8203;7067])
-   runtime: fix `LocalRuntime` doc links ([#&#8203;7074])
- sync: extend documentation for `watch::Receiver::wait_for`
([#&#8203;7038])
-   sync: fix typos in `OnceCell` docs ([#&#8203;7047])

[#&#8203;6874]: https://redirect.github.com/tokio-rs/tokio/pull/6874

[#&#8203;6963]: https://redirect.github.com/tokio-rs/tokio/pull/6963

[#&#8203;6975]: https://redirect.github.com/tokio-rs/tokio/pull/6975

[#&#8203;6986]: https://redirect.github.com/tokio-rs/tokio/pull/6986

[#&#8203;6995]: https://redirect.github.com/tokio-rs/tokio/pull/6995

[#&#8203;7014]: https://redirect.github.com/tokio-rs/tokio/pull/7014

[#&#8203;7029]: https://redirect.github.com/tokio-rs/tokio/pull/7029

[#&#8203;7038]: https://redirect.github.com/tokio-rs/tokio/pull/7038

[#&#8203;7041]: https://redirect.github.com/tokio-rs/tokio/pull/7041

[#&#8203;7042]: https://redirect.github.com/tokio-rs/tokio/pull/7042

[#&#8203;7047]: https://redirect.github.com/tokio-rs/tokio/pull/7047

[#&#8203;7053]: https://redirect.github.com/tokio-rs/tokio/pull/7053

[#&#8203;7054]: https://redirect.github.com/tokio-rs/tokio/pull/7054

[#&#8203;7055]: https://redirect.github.com/tokio-rs/tokio/pull/7055

[#&#8203;7067]: https://redirect.github.com/tokio-rs/tokio/pull/7067

[#&#8203;7068]: https://redirect.github.com/tokio-rs/tokio/pull/7068

[#&#8203;7073]: https://redirect.github.com/tokio-rs/tokio/pull/7073

[#&#8203;7074]: https://redirect.github.com/tokio-rs/tokio/pull/7074

</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 these
updates again.

---

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

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

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

renovate[bot] and renovate[bot] created

9d8d21a git: Disable "stage all" checkbox when no entries (#23608)

Click to expand commit body
Release Notes:

- N/A

Cole Miller created

40c18be Make editor autoscroll put cursor to the left of scrollbar not under (#23586)

Click to expand commit body
Closes #19706

Release Notes:

- Improved editor horizontal autoscroll to now place the cursor to the
left of the scrollbar rather than under it.

Michael Sloan created

15d041c Document elm-language-server not supporting linked_edits correctly (#23616)

Peter Tripp created

ed54af3 Support `yaml-language-server` as formatter without `lsp` settings (#23612)

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

Peter Tripp created

d5c7e0b git_ui: Add keybinding for focusing the git panel (#23613)

Click to expand commit body
Adds a keybinding for opening/toggling focus to the git panel

Release Notes:

- N/A

Nate Butler created

77e9d01 task: Always use untruncated label if it is short (#23611)

Click to expand commit body
Also changed rust tasks to be less mouthful.

Release Notes:

- Shortened Rust task labels.
- Task modal will now use full task label when it does not require
truncation.

Piotr Osiewicz created

7c2b175 assistant2: Adjust empty state when there is no provider (#23609)

Click to expand commit body
This PR add a "Configure a Provider" button if the user gets to the
assistant panel with no provider configured. Then, upon configuring it,
they'll see a similar welcome message.

| No provider | Empty state |
|--------|--------|
| <img width="1233" alt="Screenshot 2025-01-24 at 12 25 48 PM"
src="https://github.com/user-attachments/assets/2f3c602f-9e46-4c79-95cd-4bb3717f68a3"
/> | <img width="1233" alt="Screenshot 2025-01-24 at 12 26 01 PM"
src="https://github.com/user-attachments/assets/a4a204dd-9531-45ab-89a2-f1d84f375a7b"
/> |

Release Notes:

- N/A

Danilo Leal created

fc3a871 assistant2: Adjust spacing and icons on the context picker (#23607)

Click to expand commit body
Just fine-tuning spacing, icon size and color, and ensure they're are
consistent throughout.

Release Notes:

- N/A

Danilo Leal created

8efed4c search: Move invalid UTF-8 errors to debug level (#23602)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

7b69c42 title_bar: Use an `IconButton` for the user menu (#23601)

Click to expand commit body
That's specifically when we're not rendering the user menu with an
Avatar. We were previously rendering a `ButtonLike` with unnecessary
flex styles there. Just a little fine-tune.

Release Notes:

- N/A

Danilo Leal created

ad63bdf assistant2: Disable the Submit button when missing requirements (#23598)

Click to expand commit body
This PR disables the Assistant 2 Submit button when either there is no
message written in the editor or there's no model selected. To guide the
user, there will be a tooltip displayed on top of the button to indicate
what to do.

Release Notes:

- N/A

Danilo Leal created

802d742 assistant: Adjust the ToS acceptance card design (#23599)

Click to expand commit body
Just fine-tuning the copywriting and design here.

| Before | After |
|--------|--------|
| <img width="1233" alt="Screenshot 2025-01-24 at 9 28 30 AM"
src="https://github.com/user-attachments/assets/ca91a985-8a20-4ece-b0e4-3a6779db2fda"
/> | <img width="1233" alt="Screenshot 2025-01-24 at 9 27 49 AM"
src="https://github.com/user-attachments/assets/edc9c2ef-4ae0-4caf-a496-9887748673c9"
/> |

Release Notes:

- N/A

Danilo Leal created

f2c2ed0 Allow the context menu to take an `icon_color` (#23600)

Click to expand commit body
Doing this to enable customization in the Assistant 2 context picker.

Release Notes:

- N/A

Danilo Leal created

813bbec Fix terminal memory leak by deduping alacritty events on background thread (#23593)

Click to expand commit body
Closes #23008

Release Notes:

- Fixed case where the terminal can leak memory when it produces events
at a faster rate than could be processed.

Michael Sloan created

dd8ee76 docs: context_servers json example (#23588)

Shivam Mishra created

c55cdd0 assistant2: Add thread persistence (#23582)

Click to expand commit body
This PR adds persistence for threads in Assistant2.

Threads are now persisted to an LMDB database.

Release Notes:

- N/A

Marshall Bowers created

fb63f61 search: Add heuristic for discarding matching of binary files (#23581)

Click to expand commit body
Fixes #23398 
Closes #23398

We'll bail on searches of files that we know are binary (thus even if we
were to find a match in them, they'd be thrown away by buffer loader).

Release Notes:

- Improved project search performance in worktrees with binary files

Piotr Osiewicz created

35ddb43 assistant_context_editor: Put `use`s in the right spot (#23579)

Click to expand commit body
This PR cleans up some `use` statements that weren't at the very top of
the module.

Release Notes:

- N/A

Marshall Bowers created

ec91a8d assistant2: Expose `ActiveThread::thread` via a getter (#23577)

Click to expand commit body
This PR exposes the `thread` file on the `ActiveThread` via a getter
rather than exposing the field directly.

Release Notes:

- N/A

Marshall Bowers created

52494f3 Update some editor methods to instead take immutable references (#23578)

Click to expand commit body
Makes the signatures more informative and can be more convenient as
multiple immutable borrows are allowed.

Release Notes:

- N/A

Michael Sloan created

9665336 Disable zeta predictions in assistant completion menu (#23573)

Click to expand commit body
We don't want the zeta predictions entry to show in the assistant
context editor when completing slash commands. Zeta will still make
suggestions in the rest of the context editor, like the other providers
do.

Release Notes:

- N/A

Agus Zubiaga created

06f0f07 Autoscroll when running `editor: swap selection ends` (#23575)

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

Release Notes:

- Improved `editor: swap selection ends` by always scrolling the cursor
into view

Joseph T. Lyons created

d8c9fdd project: Revert project tree impl (again) (#23572)

Piotr Osiewicz created

2a2c332 docs: Document `ZED_DEVELOPMENT_AUTH` (#23571)

Click to expand commit body
This PR adds documentation for the `ZED_DEVELOPMENT_AUTH` environment
variable, in the hopes that it helps folks find it sooner.

Release Notes:

- N/A

Marshall Bowers created

76bf468 ui: Don't add an `on_click` handler for disabled `ListItem`s (#23569)

Click to expand commit body
This PR updates the `ListItem` component to not register an `on_click`
handler for `ListItem`s that are disabled.

When working on #23350 I noticed that even when the context menu entry
was disabled you could still click on the entry to fire the action.

Release Notes:

- Fixed some instances of disabled list items still registering clicks.

Marshall Bowers created

5ef5b75 Disable Copy Permalink context menu item when not in git repo (#23350)

Click to expand commit body
Closes #13979

Please review this approach to hide the permalink, or alternatively to
disable it instead?

Release Notes:

- The Copy Permalink menu item is now disabled when not in a Git
repository.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Swiftaff and Marshall Bowers created

0ef53bf vim: Add support for ctrl-g (#23562)

Click to expand commit body
Co-Authored-By: Jon Walstedt <jon@walstedt.se>

Closes #22094

Release Notes:

- vim: Added support for ctrl-g

Co-authored-by: Jon Walstedt <jon@walstedt.se>

Conrad Irwin and Jon Walstedt created

f38d0ff ollama: Set default max_tokens for llama3.3 (#23558)

Peter Tripp created

3dee32c inline completion: Add syntax highlighting for edit prediction (#23361)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Agus <agus@zed.dev>

Bennet Bo Fenner , Antonio Scandurra , and Agus created

75ae4da Remove unwrap in GitTraversal::synchronize_statuses (#23555)

Click to expand commit body
Release Notes:

- Fixed a potential panic in handling of Git statuses.

Co-authored-by: Marshall <marshall@zed.dev>

Cole Miller and Marshall created

1ac7da8 terraform: Bump to v0.1.2 (#23546)

Click to expand commit body
Includes:
- https://github.com/zed-industries/zed/pull/22268

Peter Tripp created

469bfa7 scheme: Bump to v0.0.2 (#23545)

Click to expand commit body
Includes:
- https://github.com/zed-industries/zed/pull/18728
- https://github.com/zed-industries/zed/pull/20206

Peter Tripp created

fb332a0 git_panel: Toggle stage all when clicking changes label (#23548)

Click to expand commit body
When clicking the checkbox label fire the toggle action.

At first I wasn't sure this is what we wanted, but after looking at a
few existing implementations of checkboxes with labels it seems like
this is reasonably standard.

Eventually this piece of UI will be updated to a CheckboxWithLabel, but
for now it is custom due to some specific style requirements.

Release Notes:

- N/A

Nate Butler created