Commit log

cae548a collab: Fix issues with syncing LLM usage to Stripe (#18970)

Click to expand commit body
This PR fixes some issues with our previous approach to synching LLM
usage over to Stripe.

We now have a separate LLM access price in Stripe that is a marker price
to allow us to create the initial subscription with that as its
subscription item

We then dynamically set the LLM usage price during the reconciliation
sync based on the usage for the current month.

Release Notes:

- N/A

---------

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

Marshall Bowers , Antonio , and Richard created

6971166 collab: Make LLM billing fields required in `LlmTokenClaims` (#18959)

Click to expand commit body
This PR makes the `has_llm_subscription` and
`max_monthly_spend_in_cents` fields in the `LlmTokenClaims` required.

This change will be safe to deploy in ~45 minutes.

Release Notes:

- N/A

Marshall Bowers created

b2e1572 Update actions/checkout digest to eef6144 (#18940)

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

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | digest | `692973e` -> `eef6144` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTQuMCIsInVwZGF0ZWRJblZlciI6IjM4LjExNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

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

renovate[bot] and renovate[bot] created

66ea968 Update Rust crate clap to v4.5.20 (#18953)

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

| Package | Type | Update | Change |
|---|---|---|---|
| [clap](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.5.19` -> `4.5.20` |

---

### Release Notes

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

###
[`v4.5.20`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4520---2024-10-08)

[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.19...v4.5.20)

##### Features

-   *(unstable)* Add `CommandExt`

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTQuMCIsInVwZGF0ZWRJblZlciI6IjM4LjExNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

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

renovate[bot] and renovate[bot] created

3db789e collab: Include max monthly spend preference in LLM token (#18955)

Click to expand commit body
This PR updates the LLM token claims to include the maximum monthly
spend.

Release Notes:

- N/A

Marshall Bowers created

99a6a3d Update cloudflare/wrangler-action digest to 9681c29 (#18949)

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

| Package | Type | Update | Change |
|---|---|---|---|
|
[cloudflare/wrangler-action](https://redirect.github.com/cloudflare/wrangler-action)
| action | digest | `168bc28` -> `9681c29` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTQuMCIsInVwZGF0ZWRJblZlciI6IjM4LjExNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

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

renovate[bot] and renovate[bot] created

d316577 collab: Add billing preferences for maximum LLM monthly spend (#18948)

Click to expand commit body
This PR adds a new `billing_preferences` table.

Right now there is a single preference: the maximum monthly spend for
LLM usage.

Release Notes:

- N/A

---------

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

Marshall Bowers and Richard created

7111809 Tone down model summarization logs (#18943)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

49c75eb Rework remote task synchronization (#18746)

Click to expand commit body
Reworks the way tasks are stored, accessed and synchronized in the
`project`.
Now both collab and ssh remote projects use the same TaskStorage kind to
get the task context from the remote host, and worktree task templates
are synchronized along with other worktree settings.

Release Notes:

- Adds ssh support to tasks, improves collab-remote projects' tasks sync

Kirill Bulatov created

f1053ff collab: Clarify naming around free tier spending limits (#18936)

Click to expand commit body
This PR renames the `MONTHLY_SPENDING_LIMIT` constant to
`FREE_TIER_MONTHLY_SPENDING_LIMIT` to clarify it.

This will help distinguish it from the user's specified limit on their
paid monthly spending.

Release Notes:

- N/A

Marshall Bowers created

817a41c collab: Add a `Cents` type (#18935)

Click to expand commit body
This PR adds a new `Cents` type that can be used to represent a monetary
value in cents.

This cuts down on the primitive obsession we were using when dealing
with money in the billing code.

Release Notes:

- N/A

Marshall Bowers created

bc23d1e docs: Add gopls install instructions (#18919)

Peter Tripp created

bc4abd2 ssh session: Fix hang when doing state update in reconnect (#18934)

Click to expand commit body
This snuck in last-minute.

Release Notes:

- Fixed a potential hang and panic when an SSH project goes through a
slow reconnect.

Thorsten Ball created

71f4ca6 Use WHOLE_WORD search option in vim mode's whole-word search (#18725)

Click to expand commit body
Instead of wrapping the search term with `\<...\>`, enable the
`WHOLE_WORD` search option.

The advantage of the search option is that it can be toggled with one
click/key press (alt+w by default), and it doesn't require regex mode.

Release Notes:

- Vim mode's whole word search now uses the search bar's "Match whole
words" option, instead of wrapping the search term with `\<...\>`. This
allows easier toggling of whole-word search, and it also works without
enabling the regex mode.

Γ–mer Sinan Ağacan created

f05b440 Improve syntax highlights (#18728)

Click to expand commit body
Closes #18722

- Replace the `@escape` capture name with `@string.escape` for escape
sequences in Go, Python, Regex, Racket, Ruby, and Scheme.
- Rust
  - Add syntax highlighting for escape sequences. Close #18722
- Fix the issue where `@punctuation.delimiter` is being overwritten by
`@operator`.
  - Add the period (".") to `@punctuation.delimiter`.

Release Notes:

- N/A

狐狸 created

1cbaca6 Remove `historical_event` column in editor events (#18932)

Click to expand commit body
We have a lot of data in Clickhouse. This column was used when migrating
the events dataset between analytics databases and has no purpose today.

Naive maths: 257,170,993 editor event rows * 1 byte per boolean =
257,170,993 bytes, or ~0.24 GB

I'll drop the column after deploying a new collab.

Going forward, I'd like to remove more data that we never touch, to try
to keep things more focused. We should discuss some TTL at some point.

Release Notes:

- N/A

Joseph T. Lyons created

8911fd4 Do not log errors when no worktree is found for certain assistant panel editors (#18923)

Click to expand commit body
Nothing in the assistant panel needs LSP so far, so the errors are not
useful.

Release Notes:

- N/A

Kirill Bulatov created

926e54b v0.158.x dev

Joseph T Lyons created

b6ba4fc Silence the logs

Kirill Bulatov created

b703514 project: Observe SshRemoteClient to get notified about state changes (#18918)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

c674d73 remote server: Do not spawn server when proxy reconnects (#18864)

Click to expand commit body
This ensures that we only ever reconnect to a running server and not
spawn a new server with no state.

This avoids the problem of the server process crashing, `proxy`
reconnecting, starting a new server, and the user getting errors like
"unknown buffer id: ...".

Release Notes:

- N/A

---------

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

Thorsten Ball and Bennet Bo Fenner created

dbf986d telemetry: Refactor telemetry request into separate method (#18890)

Click to expand commit body
Refactor telemetry request into separate method to make it easier to
override in a fork.

Release Notes:

- N/A

---------

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

Adam Wolff and Marshall Bowers created

a62a2fa Always wait for completion resolve before applying the completion edits (#18907)

Click to expand commit body
After https://github.com/rust-lang/rust-analyzer/pull/18167 and certain
people who type and complete rapidly, it turned out that we have not
waited for `completionItem/resolve` to finish before applying the
completion results.

Release Notes:

- Fixed completion items applied improperly on fast typing

Kirill Bulatov created

f50bca7 ssh: Improve dismissal behaviour (#18900)

Click to expand commit body
Do not always close current window in SshConnectionModal; only do so
when the window was spawned from ssh modal. Assign unique IDs to "Open
folder" buttons

Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

9c54bd1 macOS: Drop input handler to avoid editor/project not being dropped (#18898)

Click to expand commit body
This fixes the problem of a `Project` sometimes not being dropped when
closing the single, last window of Zed.

Turns out, it wasn't get dropped for the following reason:

1. `editor::Editor` held a reference to project
2. The macOS `input_handler` on the `Window` held a reference to that
`Editor`
3. The AppKit window (and its input handler) get dropped asynchronously
(in the code in this diff), after the window is closed.
4. After the window is closed and no `cx.update()` calls are made
anymore, `flush_effects` is not called anymore.
5. But `flush_effects` is where we dropped entities that don't have any
more references.

In short: we dropped `Editor`, which held a reference to `Project`, out
of band, `flush_effects` wasn't called anymore, and thus the `Project`
wasn't dropped.

cc @ConradIrwin @bennetbo since we talked about this.

Release Notes:

- N/A

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

Thorsten Ball and Antonio created

5d5c4b6 Revert http client changes (#18892)

Click to expand commit body
These proved to be too unstable. Will restore these changes once the issues have been fixed.

Release Notes:

- N/A

Mikayla Maki created

e351148 Fix bugs in expanding diff hunk (#18885)

Click to expand commit body
Release Notes:

- Fixed an issue where diff hunks at the boundaries of multi buffer
excerpts could not be expanded

Max Brunsfeld created

b0a9005 client: Send telemetry events with `Content-Type: application/json` (#18886)

Click to expand commit body
This PR updates the telemetry events sent to collab to use
`Content-Type: application/json` instead of `Content-Type: text/plain`.

The POST bodies are JSON, so `application/json` is the correct MIME
type.

I suspect the `text/plain` is a remnant from when the events were still
going through Vercel.

Release Notes:

- N/A

Marshall Bowers created

801210c collab: Make `github_user_login` required in `LlmTokenClaims` (#18882)

Click to expand commit body
This PR makes the `github_user_login` field required in the
`LlmTokenClaims`.

We previously added this in
https://github.com/zed-industries/zed/pull/16316 and made it optional
for backwards-compatibility.

It's been more than long enough for all of the previous LLM tokens to
have expired, so we can now make the field required.

Release Notes:

- N/A

Marshall Bowers created

f861479 collab: Update billing code for LLM usage billing (#18879)

Click to expand commit body
This PR reworks our existing billing code in preparation for charging
based on LLM usage.

We aren't yet exercising the new billing-related code outside of
development.

There are some noteworthy changes for our existing LLM usage tracking:

- A new `monthly_usages` table has been added for tracking usage
per-user, per-model, per-month
- The per-month usage measures have been removed, in favor of the
`monthly_usages` table
- All of the per-month metrics in the Clickhouse rows have been changed
from a rolling 30-day window to a calendar month

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Max <max@zed.dev>

Marshall Bowers , Antonio Scandurra , Richard , and Max created

a95fb8f ssh: Fix text wrapping in loading text (#18876)

Click to expand commit body
This PR adds `flex_wrap` to the loading text container to prevent the
loading modal layout to break.

Release Notes:

- N/A

Danilo Leal created

744891f Provide a default value for `is_via_ssh` when it isn't sent via older clients (#18874)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

f33019c Document extension bump process (#18872)

Click to expand commit body
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Peter Tripp and Marshall Bowers created

7960468 dart: Bump to v0.1.1 (#18859)

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

Peter Tripp created

5377674 csharp: Add support for triple-slash doc comments (#18869)

Click to expand commit body
This PR adds support for triple-slash (`///`) doc comments in C#.

As requested by https://github.com/zed-industries/zed/issues/18766.

Release Notes:

- N/A

Marshall Bowers created

af9a595 ssh: Add tweaks to the UI (#18817)

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

---

Release Notes:

- N/A

Danilo Leal created

3f2de17 collab: Set cached token values when initially creating lifetime usage records (#18865)

Click to expand commit body
This PR fixes an issue where we weren't setting the cached token fields
when initially creating a lifetime usage record.

Release Notes:

- N/A

Marshall Bowers created

77bf2ad Add is_via_ssh field to edit events (#18867)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

3da1902 worktree: Depend on `rpc` with `test-support` feature in tests (#18866)

Click to expand commit body
This PR updates the `worktree` crate to depend on `rpc` with the
`test-support` feature flag when running tests.

This fixes an issue I was seeing locally when trying to run tests in the
`worktree` crate:

```
Ξ» cargo test -p worktree -- test_repository_subfolder_git_status
   Compiling worktree v0.1.0 (/Users/maxdeviant/projects/zed/crates/worktree)
error[E0432]: unresolved import `rpc::AnyProtoClient`
  --> crates/worktree/src/worktree.rs:39:18
   |
39 | use rpc::{proto, AnyProtoClient};
   |                  ^^^^^^^^^^^^^^ no `AnyProtoClient` in the root

For more information about this error, try `rustc --explain E0432`.
error: could not compile `worktree` (lib test) due to 1 previous error
```

Release Notes:

- N/A

Marshall Bowers created

4139e2d In proposed change editors, apply diff hunks in batches (#18841)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

ff7aa02 remote server on macOS: Sign with entitlements (#18863)

Click to expand commit body
This does two things:

- Prevent feature unification
- Sign the remote-server binary with the same entitlements we use for
Zed because we saw this in crash report:

Crashed Thread: 4 Dispatch queue: com.apple.root.user-initiated-qos

Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
      Exception Codes:       UNKNOWN_0x32 at 0x0000000103636644
      Exception Codes:       0x0000000000000032, 0x0000000103636644

      Termination Reason:    Namespace CODESIGNING, Code 2 Invalid Page

VM Region Info: 0x103636644 is in 0x103634000-0x103638000; bytes after
start: 9796 bytes before end: 6587
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
VM_ALLOCATE 103630000-103634000 [ 16K] r--/rwx SM=ZER
---> VM_ALLOCATE 103634000-103638000 [ 16K] r-x/rwx SM=COW
VM_ALLOCATE 103638000-103640000 [ 32K] r--/rwx SM=ZER

  Which sounds a lot like codesigning/jit/entitlements stuff.


Release Notes:

- N/A

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

Thorsten Ball , Piotr , and Bennet created

d295c46 Remove deprecated copilot event (#18862)

Click to expand commit body
`CopilotEvent` was succeeded by `InlineCompletionEvent` 5 months ago.

Release Notes:

- N/A

Joseph T. Lyons created

4c7a6f5 Add is_via_ssh field to editor events (#18837)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

dd44168 dart: Improve indentation (#18845)

Click to expand commit body
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Peter Tripp and Marshall Bowers created

5bb18ad Inform users they can ask us to reopen issues closed by the stale issue action (#18857)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

b2eb439 remote server: Add more debug logging (#18855)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Thorsten Ball created

f0566d5 ssh: Log error when remote server panics (#18853)

Click to expand commit body
Release Notes:

- N/A

Bennet Bo Fenner created

be53165 Direnv warn (#18850)

Click to expand commit body
Follow-up fixes to #18567

Release Notes:

- N/A

Thorsten Ball created

fa85238 ssh: Limit amount of reconnect attempts (#18819)

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

Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>

Bennet Bo Fenner and Thorsten created

910a773 Display environment loading failures in the activity indicator (#18567)

Click to expand commit body
As @maan2003 noted in #18473, we should warn the user if direnv call
fails

Release Notes:

- Show a notice in the activity indicator if an error occurs while
loading the shell environment

Stanislav Alekseev created