The current filter icon button in the file finder picker footer confused
me because it is a really a toggleable button that adds a specific
filter. From the icon used, I was expecting more configuration options
rather than just one. Also, I was really wanting a way to trigger it
with the keyboard, even if I need my mouse to initially learn about the
keybinding.
So, this PR transforms that icon button into an actual popover trigger,
in which (for now) there's only one filter option. However, being a menu
is cool because it allows to accomodate more items like, for example,
"Include Git Submodule Files" and others, in the future. Also, there's
now a keybinding that you can hit to open that popover, as well as an
indicator that pops in to communicate that a certain item inside it has
been toggled.
Lastly, also added a keybinding to the "Split" menu in the spirit of
making everything more keyboard accessible!
| Before | After |
|--------|--------|
| 
| 
|
Release Notes:
- Improved the keyboard navigability of the file finder filtering
options.
We report the total number of input tokens by summing the numbers of
1. Prompt tokens
2. Cached tokens
But Google API returns prompt tokens (1) that already include cached
tokens (2), so we were double counting tokens in some cases.
Release Notes:
- Fixed bug with double-counting tokens in Gemini
The optimization to not move a tab being pinned (when the destination
index is the same as its index) in
https://github.com/zed-industries/zed/pull/31871 caused a regression, as
we were no longer calling `cx.notify()` indirectly through `move_item`.
Thanks for catching this, @smitbarmase.
Release Notes:
- N/A
Closes#31662
Currently, we assume `insert_range` will always end at the cursor and
`replace_range` will also always end after the cursor for calculating
range to replace. This is a particular case for the rust-analyzer, but
not widely true for other language servers.
This PR fixes this assumption, and now `insert_range` and
`replace_range` both can end before cursor.
In this particular case:
```ts
let x: string | undefined;
x.tostˇ // here insert as well as replace range is just "." while new_text is "?.toString()"
```
This change makes it such that if final range to replace ends before
cursor, we extend it till the cursor.
Bonus:
- Improves suffix and subsequence matching to use `label` over
`new_text` as `new_text` can contain end characters like `()` or `$`
which is not visible while accepting the completion.
- Make suffix and subsequence check case insensitive.
- Fixes broken subsequence matching which was not considering the order
of characters while matching subsequence.
Release Notes:
- Fixed an issue where autocompleting optional chaining methods in
TypeScript, such as `x.tostr`, would result in `x?.toString()tostr`
instead of `x?.toString()`.
Closes https://github.com/zed-industries/zed/issues/31870
Release Notes:
- Allowed opening 1 more item if `n` tabs are pinned, where `n` equals
`max_tabs` count.
- Fixed a bug where pinned tabs would eventually be closed out when
exceeding the `max_tabs` count.
- Fixed a bug where a tab could be lost when pinning a tab while at the
`max_tabs` count.
- Fixed a bug where pinning a tab when already at the `max_tabs` limit
could cause other tabs to be incorrectly closed.
This PR adds a comprehensive test that ensures that no item-closing
action will panic when no items are present. A test already existed
(`test_remove_active_empty `) that ensured `CloseActiveItem` didn't
panic, but the new test covers:
- `CloseActiveItem`
- `CloseInactiveItems`
- `CloseAllItems`
- `CloseCleanItems`
- `CloseItemsToTheRight`
- `CloseItemsToTheLeft`
I plan to do a bit more clean up in `pane.rs` and this feels like a good
thing to add before that.
Release Notes:
- N/A
This PR implements the previously unimplemented window_handle and
display_handle methods in the wayland platform. It also exposes the
display_handle method through the Window struct.
Release Notes:
- N/A
https://github.com/zed-industries/zed/pull/31668 renamed
`CompletionMode::Max` to `CompletionMode::Burn` which is a good change,
but this broke the deserialization for threads whose completion mode was
stored in LMDB. This adds a deserialization alias so that both values
work.
We could make a full new `SerializedThread` version which migrates this
value, but that seems overkill for this single change, we can batch that
with more changes later. Also, people in nightly already have some v1
threads with `burn` stored, so it wouldn't quite work for everybody.
Release Notes:
- N/A
This will fix a lot of weird problems that are based on file access
issues.
As discussed in
https://github.com/zed-industries/zed/pull/31219#issuecomment-2905371710,
for now it's better to just prevent running Zed with root privileges.
Release Notes:
- Explicitly disallow running Zed with root privileges
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
When we moved to schema-based debug configs, we've added validate_config
- a trait method
that is supposed to both validate the configuration and determine
whether it is a launch configuration
or an attach configuration.
The validation bit is a bit problematic though - we received reports on
Discords about
scenarios not starting up properly; it turned out that Javascript's
implementation was overly strict.
Thus, I got rid of any code that tries to validate the config - let's
let the debug adapter itself
decide whether it can digest the configuration or not. validate_config
is now left unimplemented for most
DebugAdapter implementations (except for PHP), because all adapters use
`request`: 'launch'/'attach' for that.
Let's leave the trait method in place though, as nothing guarantees this
to be true for all adapters.
cc @Anthony-Eid
Release Notes:
- debugger: Improved error messages when the debug scenario is not
valid.
- debugger: Fixed cases where valid configs were rejected.
Adds manual icon-theme selection persistence
Store manually selected icon-themes to maintain selection when query
changes. This allows the theme selector to remember the user's choice
rather than resetting selection when filtering results.
mentioned in #28081 and #28278
Release Notes:
- Improved persistence when selecting themes and icon themes.
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Ollama increased their default context size from 2048 to 4096 tokens in
version v0.6.7, which released over a month ago.
https://github.com/ollama/ollama/releases/tag/v0.6.7
Release Notes:
- ollama: Update default model context to 4096 (matching upstream)
With this, a semi-working debug session is possible from the JS/TS
gutter tasks:
https://github.com/user-attachments/assets/8db6ed29-b44a-4314-ae8b-a8213291bffc
For now, available in debug builds only as a base to improve on later on
the DAP front.
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
Closes#16527
Release Notes:
- Added MacOS titlebar double-click action
---
Unfortunately, Apple doesn't seem to make the "Fill" API public or
documented anywhere.
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This PR updates the `POST /billing/subscriptions/sync` endpoint to use
the `StripeClient` trait instead of using `stripe::Client` directly.
Release Notes:
- N/A
Previously, the vision request header was only set if the last message
in a thread contained an image. This caused 400 errors from the Copilot
API when sending follow-up messages in a thread that contained images in
earlier messages.
Modified the `is_vision_request` check to scan all messages in a thread
for image content instead of just the last one, ensuring the proper
header is set for the entire conversation.
Added a unit test to verify all cases function correctly.
Release Notes:
- Fix GitHub Copilot chat provider error when sending follow-up messages
in threads containing images
This PR updates the `sync_subscription` function to use the
`StripeClient` trait instead of using `stripe::Client` directly.
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Another batch of allocation savings. Noteworthy ones are
`find_path_tool.rs` where one clone of *all* found matches was saved and
`web_tool_search.rs` where the tooltip no longer clones the entire url
on every hover.
I'd also like to propose using `std::borrow::Cow` a lot more around the
codebase instead of Strings. There are hundreds if not 1000+ clones that
can be saved pretty regularly simply by switching to Cow. ´Cow´'s are
likely not used because they aren't compatible with futures and because
it could cause lifetime bloat. However if we use `Cow<'static, str>`
(static lifetime) for when we need to pass them into futures, we could
save a TON of allocations for `&'static str`. Additionally I often see
structs being created using `String`'s just to be deserialized
afterwards, which only requires a reference.
Release Notes:
- N/A
Release Notes:
- N/A
----
The before version GPUI used `Cancel` for cancel text, if we use
non-English text (e.g.: "取消" in Chinese), then the press `Esc` to cancel
will not work.
So this PR to change it by use `PromptButton` to instead the `&str`,
then we can use `PromptButton::cancel("取消")` for the `Cancel` button.
Run `cargo run -p gpui --example window` to test.
---
Platform Test:
- [x] macOS
- [x] Windows
- [x] Linux (x11 and Wayland)
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Previously only used model ID for deduplication, which incorrectly
filtered models with the same name from different providers.
Release Notes:
- Fix to make sure all provider models are shown in the model picker
This PR adds a Danger check to remind engineers that any changes to our
various prompts need to be verified against the LLM Worker.
When changes to the prompt files are detected, we will fail the PR with
a message:
<img width="929" alt="Screenshot 2025-05-30 at 8 40 58 AM"
src="https://github.com/user-attachments/assets/79afab4e-e799-45f1-a90e-0fd7c9a73706"
/>
Once the corresponding changes have been made (or no changes to the LLM
Worker have been determined to be necessary), including the indicated
attestation message will convert the errors into informational messages:
<img width="926" alt="Screenshot 2025-05-30 at 8 41 52 AM"
src="https://github.com/user-attachments/assets/ff51c17a-7a76-46a7-b468-a7d864d480c3"
/>
Release Notes:
- N/A
…ailed (#31291)"
This reverts commit aab76208b5.
Closes#31737
I cannot repro the original issue that this commit was trying to solve
anymore.
Release Notes:
- N/A