This PR updates collab to pick the `zed.dev` URL based on the current
environment rather than always using `https://zed.dev`.
This means that when developing locally we'll use
`http://localhost:3000` to be taken to the locally-running version of
`zed.dev`.
Release Notes:
- N/A
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [async-task](https://togithub.com/smol-rs/async-task) | dependencies |
patch | `4.7.0` -> `4.7.1` |
---
### Release Notes
<details>
<summary>smol-rs/async-task (async-task)</summary>
###
[`v4.7.1`](https://togithub.com/smol-rs/async-task/blob/HEAD/CHANGELOG.md#Version-471)
[Compare
Source](https://togithub.com/smol-rs/async-task/compare/v4.7.0...v4.7.1)
- Improve the panic message for when a task is polled after completion.
([#​73](https://togithub.com/smol-rs/async-task/issues/73))
</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This UI change is behind a `ZedPro` feature flag so that it won't be
visible until we're ready to launch that service.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
This PR updates the rate limits to adapt based on the user's current
plan.
For the free plan rate limits I just took one-tenth of the existing rate
limits (which are now the Pro limits). We can adjust, as needed.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
This PR renames and added a new pane event to indicate the difference
between `removing` and `removed` event. This change is needed for the
debugger implementation, if you close a pane we have to send a
`terminateThread` request to the adapter because it's not supported to
reopen a pane. So when the pane is removing we have to know what thread
it is what is stored on the panel itself, so we have to be able to get
this information before the pane is actually removed.
So my idea how to fix this was by adding a new event called
`RemovedItem` which is a rename of `RemoveItem` which also makes a bit
more sense because the item is removed at that point. And seeing the
name `RemoveItem` does not really say that it's removed, more like we
are removing the item.
/cc @mikayla-maki
Release Notes:
- N/A
There was/is some race condition that gets triggered only with the
zed.dev provider when opening the provider that would cause a
double-borrow on workspace.
This PR fixes the issue by cloning the workspace weakly. Turns out we
can go very far with just the weak reference.
We're still a bit unsure why exactly the race condition happened, since
it's hard to reproduce, but we're working on configuration
view/management in #15490 anyway.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
This is the revised version of #15527.
We also added new events to notify subscribers when new providers are
added or removed.
Co-Authored-by: Thorsten <thorsten@zed.dev>
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Something seems to have broke on `main` in last few days.
Bug was reproducible like this:
- Open assistant panel
- Choose provider that wasn't authenticated
- See auth prompt
- Close the tab (!) in the assistant panel
- Reactivate the assistant panel
- Bug: panel is blank!
This fixes the bug by consolidating the behavior of checking credentials
and showing auth prompt.
Release Notes:
- N/A
With zed.dev provider becoming more popular, it helps alleviate
confusion when showing not only the model name but also the provider
name.
Release Notes:
- N/A
This fixes an issue where the window's hovered state would be incorrect,
causing the cursor not to update because it would think the window
wasn't hovered ([relevant
check](a03beeeb5b/crates/gpui/src/window.rs (L3016-L3017))).
The code here doesn't really seem to make sense, since there's already
the `XinputEnter` and `XinputLeave` events that indicate mouse focus
state on the window. The properties change event wouldn't necessarily
indicate when mouse focus changes.
Thanks @Emc2356 for reporting this on the Discord and helping figure out
the issue!
Release Notes:
- Linux: Fixed the cursor sometimes not changing on X11
This PR adds a new `GET /billing/subscriptions` endpoint to collab for
retrieving the subscriptions to display on the account settings page.
Release Notes:
- N/A
This PR makes it so we always construct a real HTTP client in the
`ExtensionBuilder`.
This used to be the case, but was inadvertently changed in
https://github.com/zed-industries/zed/pull/15470.
Release Notes:
- N/A
This PR updates the user menu to show the user's current plan.
Also adds a new RPC message to send this information down to the client
when Zed starts.
This is behind a feature flag.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
- Disable Terminal ctrl-a (conflicts with readline).
- Standardize modifier order to use ctrl-shift instead of shift-ctrl to match existing keys.
- Move ctrl-shift-c (collab) to \!Terminal context (fix flickering in terminal right click menu).
- Consolidate two Terminal blocks in linux keybind
This PR reworks how we process Stripe events for reconciliation
purposes.
The previous approach in #15480 turns out to not be workable, on account
of the Stripe event IDs not being strictly in order. This meant that we
couldn't reliably compare two arbitrary event IDs and determine which
one was more recent.
This new approach leans on the guidance that Stripe provides for
webhooks events:
> Webhook endpoints might occasionally receive the same event more than
once. You can guard against duplicated event receipts by logging the
[event IDs](https://docs.stripe.com/api/events/object#event_object-id)
you’ve processed, and then not processing already-logged events.
>
> https://docs.stripe.com/webhooks#handle-duplicate-events
We now record processed Stripe events in the `processed_stripe_events`
table and use this to filter out events that have already been
processed, so we do not process them again.
When retrieving events from the Stripe events API we now buffer the
unprocessed events so that we can sort them by their `created` timestamp
and process them in (roughly) the order they occurred.
Release Notes:
- N/A
Release Notes:
- N/A
Currently, the `img` element provided by GPUI only supports FilePath or
URL, but in actual applications we need to let `img` load an image
embedded in Assets.
The `svg` element can currently support this, but `img` cannot.
For example:
We have such an Assets directory:
```
assets
|- icons
|- images
|--- foo.png
```
```rs
// If give a path, considered an Asset
img("images/foo.png");
// If give a URI, considered a Remote image
img("https://foo.bar/images/foo.png");
// If give a PathBuf, considered a Local file
img(PathBuf::from("path/to/foo.png"));
```
## Example test
```
cargo run -p gpui --example image
```
<img width="827" alt="image"
src="https://github.com/user-attachments/assets/e45dcf7f-4626-4fb0-aca9-9b6e1045a952">
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
We also eliminate the `completion` crate and moved its logic into
`LanguageModelRegistry`.
Release Notes:
- N/A
---------
Co-authored-by: Nathan <nathan@zed.dev>
This PR improves our Stripe event handling by keeping track of the last
event we've seen for each record.
The `billing_customers` and `billing_subscriptions` tables both have a
new `last_stripe_event_id` column. When we apply an event to one of
these records, we store the event ID that was applied.
Then, when we are going through events we can ignore any event that has
an ID that came before the `last_stripe_event_id` (based on the
lexicographical ordering of the IDs).
Release Notes:
- N/A
This simplifies `PathWithPosition` by making the common use case
concrete and removing the manual, incomplete Windows path parsing.
Windows paths also don't get '/'s replaced by '\\'s anymore to limit the
responsibility of the code to just parsing out the suffix and creating
`PathBuf` from the rest. `Path::file_name()` is now used to extract the
filename and potential suffix instead of manual parsing from the full
input. This way e.g. Windows paths that begin with a drive letter are
handled correctly without platform-specific hacks.
Release Notes:
- N/A
Previously, the following lead to a bug:
1. Set OpenAI key
2. Switch to Anthropic
3. Restart Zed
4. Switch provider to OpenAI -> get prompted for authentication prompt
With this change, you won't get prompted for the OpenAI key again.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Additionally, I've generalized the implementation of tab switcher so
that - instead of explicitly listing panels it supports (at the time of
writing it was just the terminal panel and nothing else), it now relies
on Panel::pane trait method. As long as that's implemented, you get a
tab switcher support for free.
Release Notes:
- Added support for tab switcher in Assistant panel.
This adds the optional `PRESERVED_KEYS` constant to the `Settings`
trait,
which allows users of the trait to specify which keys should be written
to
the settings file, even if their current value matches the default
value.
That's useful for tagged settings that have, for example, a `"version"`
field
that should always be present in the user settings file, so we can then
reparse
the user settings based on the version.
Co-Authored-By: Thorsten <thorsten@zed.dev>
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
# Summary
This commit implements Github Copilot Chat support within the existing
Assistant panel/framework. It required a little bit of trickery and
internal API modification, as Copilot doesn't use the same
authentication-style as all of the existing providers, opting to use
OAuth and a short lived API key instead of a straight API key. All
existing Assistant features should work.
Release Notes:
- Added Github Copilot Chat support
([#4673](https://github.com/zed-industries/zed/issues/4673)).
## Screenshots
<img width="1552" alt="A screenshot showing a conversation between a
user and Github Copilot Chat within the Zed editor."
src="https://github.com/user-attachments/assets/73eaf6a2-792b-4c40-a7fe-f763bd6417d7">
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
This PR lays the initial groundwork for using the Stripe events API to
reconcile the data in our system with what's in Stripe.
We're using the events API over webhooks so that we don't need to stand
up the associated infrastructure needed to handle webhooks effectively
(namely an asynchronous job queue).
Since we haven't configured the Stripe API keys yet, we won't actually
spawn the reconciliation background task yet, so this is currently a
no-op.
Release Notes:
- N/A
This PR adds a new `billing_customers` table to hold the billing
customers.
Previously we were storing both the `stripe_customer_id` and
`stripe_subscription_id` in the `billable_subscriptions` table. However,
this creates problems when we need to correlate subscription events back
to the subscription record, as we don't know the user that the Stripe
event corresponds to.
By moving the `stripe_customer_id` to a separate table we can create the
Stripe customer earlier in the flow—before we create the Stripe Checkout
session—and associate that customer with a user. This way when we
receive events down the line we can use the Stripe customer ID to
correlate it back to the user.
We're doing some destructive actions to the `billing_subscriptions`
table, but this is fine, as we haven't started using them yet.
Release Notes:
- N/A