Commit log

c769a9c Bump to 0.170.4 for @maxdeviant

Zed Bot created

44d2ed5 Add DeepSeek support to Zed Stable (#23734)

Click to expand commit body
This PR is a port of https://github.com/zed-industries/zed/pull/23551 to
Zed Stable.

Release Notes:

- Added support for DeepSeek to the Assistant.

Marshall Bowers created

2d019ff Bump to 0.170.3 for @SomeoneToIgnore

Zed Bot created

f10b436 Avoid panics when normalizing completion label with invalid ranges (cherry-pick #23712) (#23718)

Click to expand commit body
Cherry-picked Avoid panics when normalizing completion label with
invalid ranges (#23712)

Dev builds show panics related to completion label normalization

<details>
<summary>Panic</summary>

```
index out of bounds: the len is 103 but the index is 103
zed::reliability::init_panic_hook::{{closure}}::h78130eff43c84f6f+110375521
std::panicking::rust_panic_with_hook::hfe205f6954b2c97b+87457752
std::panicking::begin_panic_handler::{{closure}}::h6cb44b3a50f28c44+87456967
std::sys::backtrace::__rust_end_short_backtrace::hf1c1f2a92799bb0e+87449337
rust_begin_unwind+87456084
core::panicking::panic_fmt::h3d8fc78294164da7+7033011
core::panicking::panic_bounds_check::h9397cb495d89a72d+7033511
project::lsp_store::ensure_uniform_list_compatible_label::haf80316ce11edd67+72663592
project::lsp_store::populate_labels_for_completions::{{closure}}::hc93c3c540ef7d2d6+72642960
project::lsp_store::LspStore::completions::{{closure}}::{{closure}}::hb4b5432e24432ca8+72336627
async_task::raw::RawTask<F,T,S,M>::run::hf444c3dc07dd583b+68504803
<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run::hbf5a316eb781a10d+50646579
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run::hc85518d4552fc4cd+50496669
gpui::app::App::run::hca4e2eaf984ca6f6+109905269
zed::main::h849467ac1a6d32c9+110413414
std::sys::backtrace::__rust_begin_short_backtrace::h81b5ee155a7cf505+110835475
std::rt::lang_start::{{closure}}::h48a83f884cfb6865+110834761
std::rt::lang_start_internal::h5e7c81cecd7f0954+87382485
main+110425932
__libc_start_call_main+22789462491720
__libc_start_main_alias_1+22789462491915
_start+10436606
```
</details>

This can only happen when either `label.runs` or `label.filter_range`
has a range that's larger than the label text, which is an error.
Instead of panicking, log such errors and fall back to last index (which
is not really helpful, but still).

Release Notes:

- N/A

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

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

b66f875 openai: Add back O1-Preview (#23715)

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

Peter Tripp created

24a544a Remove unwrap in GitTraversal::synchronize_statuses (#23559)

Click to expand commit body
This is a backport of https://github.com/zed-industries/zed/pull/23555
to Stable, as we couldn't cherry-pick the fix cleanly.

Release Notes:

- Fixed a potential panic in handling of Git statuses.

Marshall Bowers created

43b8788 Bump to 0.170.2 for @SomeoneToIgnore

Zed Bot created

27bbc07 Fix LSP violation when dismissing server notifications (cherry-pick #23531) (#23535)

Click to expand commit body
Cherry-picked Fix LSP violation when dismissing server notifications
(#23531)

Part of https://github.com/zed-industries/zed/issues/22606
Closes https://github.com/zed-industries/zed/issues/23509

When a user sees an odd notification from the language server like

<img width="508" alt="image"

src="https://github.com/user-attachments/assets/6f5ef1aa-0f09-4705-a02a-aaf81dd8620c"
/>

they usually dismiss that.

Zed uses channels to wait and handle user interactions with such
notifications, and, due to `?`, sends back
```json
{"jsonrpc":"2.0","id":1,"error":{"message":"receiving from an empty and closed channel"}}
```

which is not spec-compliant:

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showMessageRequest

> Response:
>
> * result: the selected

[MessageActionItem](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#messageActionItem)
| null if none got selected.
> * error: code and message set in case an exception happens during
showing a message.

Unfortunately, vtsls (and, potentially, others) crash if receive such
non-compliant requests, and do not get back.

After the fix, the message is correct:
```json
{"jsonrpc":"2.0","id":1,"result":null}
```


Release Notes:

- Fixed vtsls crashing on notification dismiss

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>

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

gcp-cherry-pick-bot[bot] , Kirill Bulatov , and Piotr Osiewicz created

5f6cbce Omit `tsdk_path` from the servers' options if it does not exist

Kirill Bulatov created

b4b2e55 v0.170.x stable

Peter Tripp created

365398a 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

058bdae ollama: Add deepseek-r1 context size to defaults (#23420)

Peter Tripp created

a64b75f zed 0.170.1

Peter Tripp created

c251987 Fix completion labels becoming overly large due to LSP completion items with newlines (cherry-pick #23407) (#23409)

Click to expand commit body
Cherry-picked Fix completion labels becoming overly large due to LSP
completion items with newlines (#23407)

Reworks https://github.com/zed-industries/zed/pull/23030 and
https://github.com/zed-industries/zed/pull/15087
Closes https://github.com/zed-industries/zed/issues/23352
Closes https://github.com/zed-industries/zed/issues/23310 

Zed's completion items use `label` from LSP completion items as a base
to show in the list:

https://github.com/zed-industries/zed/blob/d290da7dac922fdc67c4774cdd371fba23fe62e3/crates/project/src/lsp_store.rs#L4371-L4374

Besides that, certain language plugins append `detail` or
`label_details.description` as a suffix:

https://github.com/zed-industries/zed/blob/d290da7dac922fdc67c4774cdd371fba23fe62e3/crates/languages/src/vtsls.rs#L178-L188

Either of these 3 properties may return `\n` (or multiple) in it,
spoiling Zed's completion menu, which uses `UniformList` to render those
items: a uniform list uses common, minimum possible height for each
element, and `\n` bloats that overly.

Good approach would be to use something else:
https://github.com/zed-industries/zed/issues/21403 but that has its own
drawbacks and relatively hard to use instead (?).

We could follow VSCode's approach and move away all but `label` from
`CodeLabel.text` to the side, where the documentation is, but that does
not solve the issue with `details` having newlines.

So, for now, sanitize all labels and remove any newlines from them. If
newlines are found, also replace whitespace sequences if there's more
than 1 in a row.

Later, this approach can be improved similarly to how Helix and Zed's
inline completions do: rendering a "ghost" text, showing the
completion's edit applied to the editor.

Release Notes:

- Fixed completion labels becoming overly large due to LSP completion
items with newlines

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

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

8a90fa1 Fix older Anthropic models not supporting `-latest` tags (#23372)

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

Peter Tripp created

eadddc6 keybindings: Fix AcceptPartialInlineCompletion on macOS (#23357)

Click to expand commit body
Related issue: https://github.com/zed-industries/zed/issues/20167

Release Notes:

- Changed the default keybinding to accept partial inline completions
from `ctrl-right` to `ctrl-cmd-right` on macOS, because `ctrl-right` is
already bound to jump to the end of the line.

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>

Thorsten Ball , Antonio , Kirill , and Bennet created

ea02a95 editor: Hide horizontal scrollbar if not visible (cherry-pick #23337) (#23339)

Click to expand commit body
Cherry-picked editor: Hide horizontal scrollbar if not visible (#23337)

This PR fixes two visual issues, that were caused by the fact that we
were always painting the horizontal scrollbar even if there is no
horizontal scrolling possible

Obscuring deleted lines when using the inline assistant:


https://github.com/user-attachments/assets/f8460c3f-403e-40a6-8622-65268ba2d875

Cutting off text even when horizontal scrolling is not possible:


https://github.com/user-attachments/assets/23c909f7-1c23-4693-8edc-40a2f089d4a8

This issue was only present in some themes (e.g. Nord, Catpuccin)


Closes #22716

Release Notes:

- Fixed an issue where horizontal scrollbars of editors would always be
painted (even if there is no horizontal scrolling to be done)

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>

gcp-cherry-pick-bot[bot] and Bennet Bo Fenner created

fba2828 Fix accepting partial inline completion (cherry-pick #23312) (#23327)

Click to expand commit body
Cherry-picked Fix accepting partial inline completion (#23312)

Release Notes:

- Fixed a bug that could prevent accepting a partial inline completion.

Co-authored-by: Antonio Scandurra <me@as-cii.com>

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

ce3752d v0.170.x preview

Peter Tripp created

88cb9bb Add fn-f keyboard shortcut for Fullscreen (mac-only) (#23184)

Click to expand commit body
- See:
https://github.com/zed-industries/zed/issues/22674#issuecomment-2593133447

Release Notes:

- macos: Added `fn-f` keyboard shortcut for fullscreen toggle.

Peter Tripp created

61db8be ci: Cleanup for disabled Merge Queue / merge_group (#23187)

Click to expand commit body
Only run actions dependency-review-action if running in a PR action.

This broke when run as part of action for commit on main and on a
preview branch:
- https://github.com/zed-industries/zed/actions/runs/12793068921/job/35664998296
- https://github.com/zed-industries/zed/actions/runs/12793045639

Originally introduced in:
- https://github.com/zed-industries/zed/pull/21424

But was only tested with `merge_group` which has since been reverted.

Peter Tripp created

72f1b32 project_panel: Remove useless comments (#23186)

Click to expand commit body
This PR removes some comments in the `project_panel` that are just
restating what the code is doing.

Release Notes:

- N/A

Marshall Bowers created

0150eaf Revert docs-only test-skipping with Merge Queue (#23180)

Click to expand commit body
These checks were not functioning as intended. Notably tests were
skipped for today's hotfix release of Preview
[v0.169.2-pre](https://github.com/zed-industries/zed/actions/runs/12790602047):

Separately these checks were flawed as they would only be considered
"docs only" if the diff between the PR branch base and main also did not
have any subsequent non-docs changes.

Reverting until we can figure out something better.

Peter Tripp created

cc8746a Increase timeout for macos release builds (#23183)

Click to expand commit body
Today's Preview hotfix timed out during notarization:
- https://github.com/zed-industries/zed/actions/runs/12790602047/job/35656767355

Peter Tripp created

f50a118 Refactor shell wrapping (#23108)

Click to expand commit body
I want to use this to implement ! in vim, so move it from terminal_view
to task, and split windows/non-windows more cleanly.

Release Notes:

- N/A

Conrad Irwin created

45198f2 Add "tool" support to go.mod (#22995)

Click to expand commit body
Closes #ISSUE

Release Notes:

- Fixed highlighting of ["tool"
directives](https://tip.golang.org/doc/go1.24#tools) in go.mod

Conrad Irwin created

67525cc Add ollama phi4 context size defaults (#23036)

Click to expand commit body
Add `phi4` maximum context length (128K).
By default this clamps to `16384` but if you have enough video memory
you can set it higher or connect to a non-local machine via settings:

```json
"language_models": {
  "ollama": {
    "api_url": "http://localhost:11434",
    "available_models": [
      {
        "name": "phi4",
        "display_name": "Phi4 64K",
         "max_tokens": 65536
      }
    ]
  }
}
```

Release Notes:

- Improve support for Phi4 with ollama.

Peter Tripp created

0e4a619 Revert "Log an error when there are no buffer snapshots for some LSP version (#22934)" (#23179)

Click to expand commit body
https://github.com/zed-industries/zed/pull/22934#issuecomment-2592239448
and myself had noted quite an increase in junk logging after that:


https://github.com/user-attachments/assets/b678d4ec-c301-4d0e-9a12-99aa7f6da0a2


Release Notes:

- N/A

Kirill Bulatov created

74620e6 Improve performance of go-to-diagnostic when many diagnostics are present (#23166)

Click to expand commit body
Instead of eagerly calling `to_offset` on the anchor ranges for each
diagnostic in the direction of the search, work lazily in terms of
anchors and convert to offsets at the very end.

Release Notes:

- N/A

Cole Miller created

9d3a059 Exclude function keys from input handler (#23070)

Click to expand commit body
Fixes #22674

Release Notes:

- Fixed a bug binding to `fn-X` (where X is a printing key) on macOS

Conrad Irwin created

b1cfc11 edit prediction: Fix width of completion item (#23177)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>

Thorsten Ball , Agus , Bennet , and Antonio created

4a76302 Check for `predict-edits` feature flag, remove `is_staff` check (#23165)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>

Agus Zubiaga and Thorsten Ball created

da8e65b Show loading state for predictions (#23172)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>

Antonio Scandurra , Thorsten , Danilo Leal , and Agus Zubiaga created

bf75b33 vim: Fix inline completions not disappearing in normal mode (#23176)

Click to expand commit body
Closes #23042

Release Notes:

- Fixed inline completions (Copilot, Supermaven, ...) still being
visible sometimes after leaving Vim's insert mode.

Thorsten Ball created

bd3f64c zeta: Allow viewing prompt details in rate completion modal (#23142)

Click to expand commit body
Co-Authored-by: Danilo <danilo@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>

Bennet Bo Fenner , Danilo , Danilo Leal , and Thorsten Ball created

ae74693 settings: Rename 'zeta' to 'zed' (#23174)

Click to expand commit body
Old:

```settings.json
{
  "features": {
    "inline_completion_provider": "zeta"
  }
}
```

New & cool:

```settings.json
{
  "features": {
    "inline_completion_provider": "zed"
  }
}
```

Release Notes:

- N/A

Thorsten Ball created

37c2ebe Revert "linux: Fix saving file with root ownership (#22045)" (#23162)

Click to expand commit body
Release Notes:

- (temporarily) Removes the linux "save file as root" feature while we
figure out bugs.

Updates https://github.com/zed-industries/zed/pull/22045

Conrad Irwin created

e86fe1d Fix git commands for staging and unstaging (#23147)

Click to expand commit body
This fixes a bug that prevents unstaging added files.

I've also removed the batching/debouncing logic in the long-running task
that launches the git invocations---I added this originally but I don't
think it's really necessary.

Release Notes:

- N/A

Cole Miller created

de6216a ui: Move `IconDecoration` and `DecoratedIcon` to their own modules (#23157)

Click to expand commit body
This PR moves the `IconDecoration` and `DecoratedIcon` components to
their own modules.

Release Notes:

- N/A

Marshall Bowers created

167c564 theme: Pull directory and chevron icons out of `IconTheme::file_icons` (#23155)

Click to expand commit body
This PR pulls the directory and chevron icons out of the
`IconTheme::file_icons` collection and promotes them to named fields.

This makes things less stringly-typed when looking up these icons.

Release Notes:

- N/A

Marshall Bowers created

1178b3e gpui: Clean up `AppContext` doc comments (#23154)

Click to expand commit body
This PR cleans up some doc comments for the `AppContext.

Release Notes:

- N/A

Marshall Bowers created

88e42cc Refactor file icons to use `IconTheme` (#23153)

Click to expand commit body
This PR adds the initial concept of an `IconTheme` and refactors
`FileIcons` to use it to resolve the icons.

The `IconTheme` will ultimately be used to allow users to select a
different set of icons to use. Currently, however, this is just laying
the foundation for that work.

The association between file types and icons is now handled by the icon
theme when we resolve file icons. This mapping has been moved out of
`file_types.json` and into `icon_theme.rs`.

Release Notes:

- N/A

Marshall Bowers created

07d5824 assistant2: Revise thread visual design (#23083)

Click to expand commit body
This PR adjusts the design of the assistant 2 threads with the goal of
reducing visual busyness. My intention is to remove the amount of lines
and borders given it is a relatively tight space. It also refines the
"generating" floating container style, finally leveraging linear
gradients that were recently added to GPUI! Now, we only display headers
for "you" messages. Assistant responses will be rendered right in the
panel; not bounded by a card container.

<img width="800" alt="Screenshot 2025-01-14 at 7 08 39 PM"
src="https://github.com/user-attachments/assets/a8ffa780-0ef2-4d4b-ae19-3f02fd2d63a6"
/>

Release Notes:

- N/A

Danilo Leal created

077767a Migrate more events to telemetry::event (#22178)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

b7fd571 Revert "Add emacs keybindings for mark emulation" (#23146)

Click to expand commit body
- Reverts zed-industries/zed#22904
- See also: https://github.com/zed-industries/zed/issues/8580

After using it full-time for a day I very much think an implicit "mark
mode" when the emacs base keymap is enabled is the wrong approach.

Release Notes:

- Reverted "Add emacs keybindings for mark emulation" #23146 (main only)

Peter Tripp created

c038696 Add LM Studio support to the Assistant (#23097)

Click to expand commit body
#### Release Notes:

- Added support for [LM Studio](https://lmstudio.ai/) to the Assistant.

#### Quick demo:


https://github.com/user-attachments/assets/af58fc13-1abc-4898-9747-3511016da86a

#### Future enhancements:
- wire up tool calling (new in [LM Studio
0.3.6](https://lmstudio.ai/blog/lmstudio-v0.3.6))

---------

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

Yagil Burowski and Marshall Bowers created

4445679 Fix a typo in the task example (#23148)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

a3e7444 Git panel polish (#23144)

Click to expand commit body
- Clicking checkbox in the header stages or unstages all changes
- Adds tooltips to header checkbox
- Addis the ability for checkboxes to have tooltips
- Ensure an entry in the list is always selected
- Hide revert all button for now

Release Notes:

- N/A

Nate Butler created

d13d099 git: Restore basic jump-to-file functionality (#23140)

Click to expand commit body
This just opens the file for the selected `GitListEntry` right now;
we'll add back integration with the project diff view later.

Release Notes:

- N/A

---------

Co-authored-by: Nate <nate@zed.dev>

Cole Miller and Nate created

de5f023 assistant2: Cancel generation button (#23137)

Click to expand commit body
Turns the "esc to cancel" label into a button so it can be dispatched
via click or keyboard. The keybinding isn't hardcoded anymore.

![CleanShot 2025-01-14 at 13 44
22@2x](https://github.com/user-attachments/assets/a947f58b-7de2-400b-b95a-384b78c79697)


Release Notes:

- N/A

Agus Zubiaga created