Commit log

f10e44f Bump to 0.172.3 for @osiewicz

Zed Bot created

1be2281 Fix data collection permission asked multiple times for same worktree (#24016)

Click to expand commit body
After the user confirmation, only the current instance of the
completions provider had the answer stored.

In this PR, the changes are propagated by having each provider have an
`Entity<choice>`, and having a lookup map with one `Entity<choice>` for
each worktree that `Zeta` has seen.

Release Notes:

- N/A

João Marcos created

edf69b3 workspace: Make "New Window" bring app to foreground (#24015)

Click to expand commit body
Closes #ISSUE

Release Notes:

- "New Window" action will now bring App to foreground.

Piotr Osiewicz created

2d1d5b8 Fix two bugs in new diff hunk handling (#23990)

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

Release Notes:

- Fixed a crash that could happen when expanding certain diff hunks
- Fixed a bug where diff hunks were not syntax highlighted when
reopening a project with previously-opened buffers.

Max Brunsfeld created

08e363c Bump to 0.172.2 for @maxbrunsfeld

Zed Bot created

e87ff54 Fix formatting

Agus Zubiaga created

8436dfc Fix ttest fake_completion closure

Agus Zubiaga created

2609a70 zed 0.172.1

Joseph T. Lyons created

b0b9e64 zeta: Onboarding and title bar banner (#23797)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: João Marcos <joao@zed.dev>

Agus Zubiaga , Danilo Leal , Danilo , and João Marcos created

0d2e6fd Revise "Hide/Show Inline Completions" menu (#23808)

Click to expand commit body
> **Note:** https://github.com/zed-industries/zed/pull/23813 should be
merged first!

@nathansobo and I paired on revising this menu, including adding the
"Predict Edits at Cursor" menu item (to make the keyboard shortcut more
discoverable; clicking it makes the inline edits show up, as shown in
the second screenshot) and switching from "Hide/Show" language to
checkboxes.

## Before
<img width="282" alt="Screenshot 2025-01-28 at 4 51 37 PM"
src="https://github.com/user-attachments/assets/309c82c1-8fb5-44db-950e-1a8789a63993"
/>

## After
<img width="1138" alt="Screenshot 2025-01-28 at 4 50 05 PM"
src="https://github.com/user-attachments/assets/302a126c-9389-42a4-bb7d-2896bce859e7"
/>

We also switched to use `SharedString` in more places, where it made
more sense.

@danilo-leal This isn't necessarily *exactly* what we want, but we were
pairing and decided to get it in a state where we can actually try it
out and tweak from here.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Richard Feldman , Nathan , Danilo Leal , and Marshall Bowers created

e716eb6 Revert "Attempt to suppress embeds in Discord webhook (#23807)" (#23855)

Click to expand commit body
Didn't work.

Release Notes:

- N/A

Joseph T. Lyons created

dc808ae v0.172.x preview

Joseph T. Lyons created

5ecff15 collab: Add internal `POST /snowflake/events` endpoint (#23842)

Click to expand commit body
This PR adds a new internal `POST /snowflake/events` endpoint to collab.

This endpoint is protected with the admin token like our other internal
endpoints.

This endpoint accepts a `SnowflakeRow` in the body and writes it to the
AWS Kinesis stream.

Release Notes:

- N/A

Marshall Bowers created

fb9b4ee edit prediction: Remove zeta codename from action (#23835)

Click to expand commit body
Release Notes:

- N/A

Bennet Bo Fenner created

07161d6 Bind editor::OpenSelectionsInMultibuffer in `full` editors only (#23832)

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

Binding `alt-enter` to all editors breaks
https://github.com/zed-industries/zed/blob/46f45464be2d45def9ac51e29dea8690da051302/assets/keymaps/default-macos.json#L281
key binding for buffer search, and it's impossible to select all search
matches anymore.

Release Notes:

- N/A

Kirill Bulatov created

9bf5e55 Revert "inline completion: Add syntax highlighting for edit prediction (#23361)" (#23829)

Click to expand commit body
This reverts commit 3dee32c43dc34ffdad9943c58194ee6de501eb34.

Release Notes:

- N/A

Bennet Bo Fenner created

46f4546 Fix terminal drag and drop (#23827)

Click to expand commit body
Closes https://github.com/zed-industries/zed/discussions/23823

* Fixes terminal drag and drop not working after
https://github.com/zed-industries/zed/pull/23256
* Fixes project panel items drag and drop not working after selection
overhaul even earlier: now, all marked items are added to terminal on
drag and drop

Release Notes:

- Fixed terminal drag and drop, including project panel items

Kirill Bulatov created

d2d9f49 edit prediction: Do not log error when prediction cannot be interpolated (#23826)

Click to expand commit body
Previously we returned an error when the interpolation failed in
`process_completion_response`.
However, it is not an error when interpolation returns `None`. That just
means that the predicted edits can be discarded, because the user typed
something that is not a subset of what the model predicted OR if the
model responds with a no-op.
```
2025-01-29T09:44:30.221135+01:00 [ERROR] zeta prediction failed

Caused by:
    Interpolated edits are empty
```

Release Notes:

- N/A

Bennet Bo Fenner created

6d4ccb0 Fix `project_panel::NewDirectory` in TextMate keymap (#23825)

Click to expand commit body
Release Notes:

- Fixed incorrect action names in TextMate keymap.

Jason Lee created

dbdf140 Show settings file errors on startup (#23817)

Click to expand commit body
Required using a global `LazyLock<Mutex<AppNotifications>>` instead of a
context global because settings errors first occur before initialization
of the notifications global.

Release Notes:

- Errors in settings file are now reported in UI on startup.

Michael Sloan created

06936c6 Prompt users to use Discussions for feature requests (#23821)

Click to expand commit body
I'm moving forward on this - we can revert if it ends up being a bad
move.

Release Notes:

- N/A

Joseph T. Lyons created

43f3491 Add comment explaining why AddSurrounds target is not deserializable (#23820)

Click to expand commit body
See #23088

Release Notes:

- N/A

Michael Sloan created

16004d4 Fix deprecated alias for toggling hunks (#23818)

Click to expand commit body
Release Notes:

- N/A

João Marcos created

9e31b10 vim: Add any brackets to support motions like ab and ib to work with any type of brackets (#23679)

Click to expand commit body
# Add AnyBrackets text object for Vim mode

## Overview
This PR introduces a new text object `AnyBrackets` that allows
operations on the closest matching pair of brackets, regardless of the
bracket type. This enhances the editing experience by reducing the need
to identify specific bracket types before performing text operations.

By default, this feature is NOT mapped to any key in vim.json. However,
it can be enabled manually, and the recommended key for mapping is b:

If you want to add it to your zed keymap config you need to add the
following config:
```json
{
	"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
	"bindings": {
		"b": "vim::AnyBrackets"
	}
}
```

## Features
- New text object that works with parentheses `()`, square brackets
`[]`, curly braces `{}`, they are also know as round brackets, square
brackets and curly brackets in english.
- Automatically finds the closest matching pair of any bracket type
- Works with all standard Vim operators (delete, change, yank)
- Supports both "inside" and "around" variants (`i` and `a`)

## Usage Examples
```vim
# Delete inside the closest brackets
di(  # Works on (), [] or {} depending on which is closest

# Change around the closest brackets
ca[  # Works on (), [] or {}  depending on which is closest

# Visual select inside the closest brackets
vi{  # Works on (), [] or {}  depending on which is closest
```

# References:
- Based on the popular plugin https://github.com/echasnovski/mini.ai

# Important Notes
This PR also fixes a bug with nested quotes on AnyQuotes, now it works
fine with any type of quotes or brackets.
Please take a look at the new tests to understand the expected behavior.

Release Notes:

- vim: Add `ab`/`ib` "AnyBrackets" text objects that are the smallest of
`a(`, `a[` or `a{` or `i(`, `i[` or `i{`
- vim: Fix aq/iq "AnyQuotes" text objects when they are nested

Osvaldo created

442ea50 Ensure hunk controls have unique element ids (#23815)

Click to expand commit body
This fixes an edge case when two hunk controls button groups were
visible (due to having text cursor on one hunk, and mouse cursor on the
other). In that situation, the mouse states for the two button groups
would mirror.

Release Notes:

- N/A

Max Brunsfeld created

33d1145 Refactor to use `SharedString` in more places (#23813)

Click to expand commit body
Splitting this off from
https://github.com/zed-industries/zed/pull/23808, per @maxdeviant's
suggestion!

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>

Richard Feldman and Nathan created

92a1cb8 Restore go to type definition et.al (#23810)

Click to expand commit body
Accidentally dropped by the GPUI3 refactr

Release Notes:

- N/A

Conrad Irwin created

3b6e1be collab: Fix error message when missing Kinesis region (#23811)

Click to expand commit body
This PR fixes a typo in the error that occurs when trying to construct
an AWS Kinesis client and the `kinesis_region` value is missing.

Release Notes:

- N/A

Marshall Bowers created

353ae31 prisma: Update grammar and syntax highlighting (#23596)

Click to expand commit body
- Updates the bindings
([tree-sitter-prisma](https://github.com/victorhqc/tree-sitter-prisma))
to its latest update (recently updated to use latest tree-sitter)
- Improves syntax highlighting
- Adds the `view` keyword

**After**

<img width="1174" alt="Screenshot 2025-01-24 at 12 44 57"
src="https://github.com/user-attachments/assets/84e6afe0-5340-4cdf-ad85-9a800a757323"
/>

**Before**

<img width="1174" alt="Screenshot 2025-01-24 at 12 44 45"
src="https://github.com/user-attachments/assets/11296998-fdfe-4fe8-8e5b-feeb41c24385"
/>

Release Notes:

- N/A

---------

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

Victor Quiroz and Marshall Bowers created

e1646e6 Attempt to suppress embeds in Discord webhook (#23807)

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

(hopefully 🤞)

Release Notes:

- N/A

Joseph T. Lyons created

1973bf5 Allow buffer search to search deleted hunks (#23632)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

22afec3 Revert "project: Fine-grained language server management" (#23804)

Click to expand commit body
Reverts zed-industries/zed#23708

Piotr Osiewicz created

bda2690 ci: Restrict more jobs to only run in the `zed-industries` organization (#23803)

Click to expand commit body
This PR updates the GitHub Action definitions to restrict more CI jobs
to only run in the `zed-industries` organization (and thus, not on
forks).

Release Notes:

- N/A

Marshall Bowers created

c4e6c61 project: Fine-grained language server management (#23708)

Click to expand commit body
This reverts commit d8c9fdd014d3e8e9302a1faa82724573478ea836.

Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

2b67773 Don't re-wrap unneccessarily on expanding hunks (#23796)

Click to expand commit body
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- N/A

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

Conrad Irwin and Max created

7b901ca Fix rendering of gutter diff hunks that extend to EOF, w/o newline (#23790)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

47dcbdf gpui: Fix `pattern` example (#23786)

Click to expand commit body
This PR fixes the `pattern` example, which was merged in
https://github.com/zed-industries/zed/pull/23576 without being updated
with the new GPUI changes.

Release Notes:

- N/A

Marshall Bowers created

2367298 gpui: Add support for slash pattern fills (`///`) (#23576)

Click to expand commit body
TODO:
- [x] Add BackgroundTag::PatternSlash
- [x] Support metal slash pattern fills
- [x] Support blade slash pattern fills
---

Adds support for a new background type in gpui, `pattern_slash`.

Usage:

```rust
div().size(px(56.0)).bg(pattern_slash(gpui::red()))
```
This will create a 56px square with a red slash pattern fill.

You can run the pattern example with `cargo run -p gpui --example
pattern`:

![CleanShot 2025-01-23 at 16 22
09@2x](https://github.com/user-attachments/assets/39d9f8c8-816c-4d3b-bc75-fcc122747e17)

---

After talking with @as-cii at length about how we want to support
patterns in gpui, we decided for now we'll simply add a new
BackgroundTag specific to this pattern.

It isn't the best long term plan however – we'll likely want to
introduce the concept of a `Fill` at some point so we can have
`Fill::Solid`, `Fill::Gradient(LinearGradient)`, etc in the future.

The pattern is designed to seamlessly tile vertically for elements of
the same height. For example, for use in editor line backgrounds:

![CleanShot 2025-01-23 at 16 27
41@2x](https://github.com/user-attachments/assets/d51b94bc-cfc2-4aff-89e3-289a04ea8841)

---


Release Notes:

(do we do gpui release notes?)
- Adds support for slash pattern fills in `gpui`.

---------

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

Nate Butler and Antonio Scandurra created

070890d anthropic: Don't bail out on unknown model ID (#23782)

Click to expand commit body
This PR fixes an issue introduced in
https://github.com/zed-industries/zed/pull/20551/ that would prevent
models with unknown IDs from working in the LLM service.

We only need to look up a model from its ID for the beta headers, and if
we can't find that particular model we should fall back to the default
beta headers instead of bailing out completely,

Release Notes:

- N/A

Marshall Bowers created

2b160f4 Omit gitignored files from context file picker (#23777)

Click to expand commit body
In both `thread` and `prompt editor` the context file picker, gitignored
files are hidden (as expected) when searching files by path, but they
are still shown initially as you create the file picker.

Plus, selecting gitignored files in the `prompt editor` is bugged and
collapses everything.

This PR settles on not showing gitignored files to solve these
inconsistencies.

Release Notes:

- Fix gitignored files filter occasionally not working in context file
picker.

João Marcos created

a5957bf Sanitize another pair of brackets when hovering over a path in the terminal (#23776)

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

Release Notes:

- Improved terminal hover word matching

Kirill Bulatov created

b74a273 project search: Do not bail on search when a binary file is encountered (#23775)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

7105f9c Show entries in remote git panels (#23773)

Click to expand commit body
Now both remote collab and ssh remote get entries shown and updated in
the git panel.
This seems to be quite a step towards remote git support, hence
submitting a PR.

Further steps: remove `get_local_repo` and allow getting the repo from
`Worktree`, not its local counterpart + have another, remote impl of the
`GitRepository` trait.

Release Notes:

- N/A

Kirill Bulatov created

fc5461a Revert "edit prediction: Fix crash in `highlight_text` (#23766)" (#23771)

Click to expand commit body
This reverts commit dfed43ab24ab9cdf41a5645382d46fa67edfcdd9.

Closes #ISSUE

Release Notes:

- N/A

Bennet Bo Fenner created

57a3d8c edit prediction: Hide rate completions modal behind feature flag (#23597)

Click to expand commit body
This hides the ability to rate completions behind the
`predict-edits-rate-completions` feature flag

Release Notes:

- N/A

Bennet Bo Fenner created

dfed43a edit prediction: Fix crash in `highlight_text` (#23766)

Click to expand commit body
This fixes the panics we we're seeing in `EditPreview::highlight_edits`.
The reason for this was that we were interpolating edits incorrectly.

Here's an example:

```rust
let a = 0; // existing code
let c = 2; // suggested by edit prediction
```
The edits would look like this: `[(Point(1, 0)..Point(1, 0), "let c =
2;"]`

Now i type:
```rust
let a = 0; // existing code
let b = 1; // added this line
let c = 2; // suggested by edit prediction
```

Before this change, the `interpolate` function would allow insertions
before the edit prediction edits, the anchors will move to the next
line.
The edits would look now like this: `[(Point(2, 0)..Point(2, 0), "let c
= 2;"]`

However, now we end up with a call to `EditPreview::highlight_edits`,
with the following parameters:
- current_snapshot: 
  ```rust
  let a = 0;
  let b = 1;
  ```
- edits: `[(Point(2, 0)..Point(2, 0), "let c = 2;"]`
- applied_edits_snapshot:
  ```rust
  let a = 0;
  let c = 2;
  ```

And here you can see the issue, applying the `edits` to the
`current_snapshot` should always end up re-creating the text that is
present in the `applied_edits_snapshot`. That is not the case here
though, meaning that the offsets in the new buffer are not correct,
which can either lead to a confusing popup or a crash if the suggestion
is at the end of the file.

Here's a real world example (edit prediction is ONLY suggesting to
delete a new line):

<img width="487" alt="Screenshot 2025-01-27 at 13 05 26"
src="https://github.com/user-attachments/assets/a0a8064e-8cfa-48b2-9f1c-efc2d0d9d7d4"
/>

We fixed this by only allowing interpolation if the user is editing
after all the edit predictions OR if the user edit is a subset of the
model suggestion.



Co-Authored-by: Antonio <antonio@zed.dev>

Release Notes:

- N/A

Co-authored-by: Antonio <antonio@zed.dev>

Bennet Bo Fenner and Antonio created

b99159c snippets: Fix snippets not updating while containing comments (#23755)

Click to expand commit body
Closes #23699

Release Notes:

- Fixed issue where snippets would not update when a snippets file
contained comments.

loczek created

bb59e7f Refine syntax highlighting for Python docstrings (#20898)

Click to expand commit body
Following up on #20763, this PR adds support for module- and class-level
docstrings, adds "additional docstrings" as described in [PEP
257](https://peps.python.org/pep-0257/), and fixes function-level
docstrings so that only the first string literal in a function gets
treated as a docstring.

One question that occurs to me is: Would it be good to capture attribute
and additional docstrings differently from regular docstrings? E.g.
`@string.doc.attribute`, `@string.doc.additional`? PEP 257 mentions that
unlike regular docstrings, these docstrings are ignored by the
interpreter (regular docstrings get added as the `__doc__` property of
the object they document), so I can see someone potentially wanting to
style them a little differently.

Release notes:

* Added Python syntax highlighting for class- and module-level
docstrings, additional docstrings, and improved recognition of
function-level docstrings.

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

jfmontanaro and Piotr Osiewicz created

b643080 Use proper names for actions' async context (#23763)

Click to expand commit body
Post-PR merge fixes.

Release Notes:

- N/A

Kirill Bulatov created

02af8dd menus: Add "Open File" action for Linux and Windows (#23707)

Click to expand commit body
This PR adds menu item for `workspace::OpenFiles` in app menu on Linux
and Windows.

Context:
When opening a file or folder on Linux and Windows via the native file
picker, the picker can be either in file-only mode or folder-only mode.
This means you have to open it already knowing whether you want to open
a file or a folder, unlike macOS, which lets you choose either in the
same picker.

For this reason, a new action, `workspace::OpenFiles`, was recently
added for Linux and Windows. This is basically file-only mode, alongside
the existing `workspace::Open` action, which is folder-only. In macOS,
the `workspace::Open` action is sufficient to open both file and folder.

Before:  
<img
src="https://github.com/user-attachments/assets/67dc95d6-e98d-438a-9568-570e87617f85"
alt="Before" width="200" />

After:  
<img
src="https://github.com/user-attachments/assets/d0ffd02c-0f48-4edc-b426-4d430f2e0c86"
alt="After" width="200" />

Release Notes:

- Added "Open File" action in file menu for Linux and Windows.

tims created