93b88a9
Remove not implemented minimap settings (#30253)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/30250
Based on
https://github.com/zed-industries/zed/pull/26893#issuecomment-2847338831
Release Notes:
- N/A
Kirill Bulatov
created
85fda90
Do not remove the item from pane twice (#30254)
Click to expand commit body
Probably a merge artifact?
Release Notes:
- N/A
Kirill Bulatov
created
b343a8a
language_models: Improve subscription states in the Agent configuration view (#30252)
Click to expand commit body
This PR improves the subscription states in the Agent configuration view
to the new billing system.
Zed Free (legacy):
<img width="638" alt="Screenshot 2025-05-08 at 8 42 59 AM"
src="https://github.com/user-attachments/assets/7b62d4c1-2a9c-4c6a-aa8f-060730b6d7b3"
/>
Zed Free (new):
<img width="640" alt="Screenshot 2025-05-08 at 8 43 56 AM"
src="https://github.com/user-attachments/assets/8a48448e-813e-4633-955d-623d3e6d603c"
/>
Zed Pro trial:
<img width="641" alt="Screenshot 2025-05-08 at 8 45 52 AM"
src="https://github.com/user-attachments/assets/1ec7ee62-e954-48e7-8447-4584527307c9"
/>
Zed Pro:
<img width="636" alt="Screenshot 2025-05-08 at 8 47 21 AM"
src="https://github.com/user-attachments/assets/f934b2e3-0943-4b78-b8dc-0a31e731d8fb"
/>
Release Notes:
- agent: Improved the subscription-related information in the
configuration view.
Marshall Bowers
created
3a3d3c0
Improve token counting for OpenAI models (#30242)
Click to expand commit body
tiktoken_rs is a bit behind (and even upstream tiktoken doesn't have all
of these models)
We were incorrectly using the cl100k tokenizer for some models that
actually use the o200k tokenizers. So that is updated.
I also made the match arms specific so that we do a better job of
catching whether or not tiktoken-rs accurately supports new models we
add in.
I will also do a PR upstream to see if we can move some of this logic
back out if tiktoken better supports the newer models.
Release Notes:
- Improved tokenizer support for openai models.
Ben Brandt
created
ee56706
debugger: Fix up Rust test tasks definitions (#30232)
Superseded #30222
On Windows, `MoveFileExW` fails if another process is holding a handle
to the file. This PR fixes that issue by switching to `ReplaceFileW`
instead.
I’ve also added corresponding tests.
According to [this Microsoft research
paper](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/04/tr-2006-45.pdf)
and the [official
documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf#applications-updating-a-single-file-with-document-like-data),
`ReplaceFileW` is considered an atomic operation. even though the
official docs don’t explicitly state whether `MoveFileExW` or
`ReplaceFileW` is guaranteed to be atomic.
Release Notes:
- N/A
张小白
created
4b5158b
indexed_docs: Remove some unnecessary cloning (#30236)
Click to expand commit body
Other small patch to reduce allocations.
`.iter().cloned().collect()` calls `Clone` per element, whereas
`.into_iter().collect()` preallocates the `Vec`.
The Zed repo for example has up to 1700 packages on some build
configurations, meaning this change theoretically saves up to 1699
allocations. It's likely the compiler has already optimized this away,
but it's good to be explicit.
Release Notes:
- N/A
tidely
created
a61958e
language: Remove some unnecessary cloning (#30229)
Click to expand commit body
Another tiny patch to reduce allocations
`.iter().cloned().collect()` calls `Clone` per element, whereas
`into_iter().collect()` preallocates memory
Release Notes:
- N/A
tidely
created
d06d0e6
Use fit instead of center for Agent following (#30228)
Click to expand commit body
Makes it easier to review the Agent edits since more of the previous
edits will be visible on screen.
Release Notes:
- N/A
Remove excess clone when invoking callback in workspace
Release Notes:
- N/A
tidely
created
fcf066a
fs: Fall back from atomic write to regular fs write when file handle is in use on Windows (#30222)
Click to expand commit body
Closes #30054
For reference, another way to work around this is to drop the file
handle which we can't do in this case, as it would require reopening the
settings.json worktree, which is a rather unpleasant fix.
Another approach might be to open the file handle with some special
flags, but I couldn't get that to work at the time of writing.
Release Notes:
- Fixed "Backup and Update" in settings migration not working on
Windows.
Smit Barmase
created
b4109a2
Prevent keybindings from triggering requests that should be disabled (#30221)
Click to expand commit body
Extracts authorization logic to a single method and add early
returns in message handlers to prevent sending requests when the model
configuration is invalid or terms haven't been accepted.
This was allowing for the TOS popup to show up even for logged out users
because they could bypass the disabled button with the keybinding.
Now the behavior should be the same either way, that the request isn't
made unless they can send it.
The text thread already has a banner to tell the user to configure a
model provider, so I don't think we need to pop up a separate modal,
since the button is disabled anyway.
Release Notes:
- N/A
Closes #30056
Apparently the API supports the "default" field now, so we can remove
that transformation.
However, optional is not supported
See https://ai.google.dev/api/caching#Schema
Release Notes:
- agent: Improve tool schema compatibility for Gemini models
1ec466b
editor: Ensure scrollbar thumb is not layouted when content size is smaller than viewport (#30189)
Click to expand commit body
As discussed and explained in
https://github.com/zed-industries/zed/pull/26893#discussion_r2074102719
This PR fixes an issue where we would have zero-divisions during
scrollbar layouting for small files.
This happened due to the fact that for small files,
https://github.com/zed-industries/zed/blob/9c1b2afa492755a1e8cb0a77f929845941c97cdc/crates/editor/src/element.rs#L8562-L8563
would be `NaN`, since `(total_text_units - text_units_per_page).max(0.)`
would return `0.`, which we would divide by.
However, this was neccessary to be in place, as this prevented the
scroll thumb from being rendered for small files: Due to this being
`NaN`, the thumb origin would be `Pixels(NaN)`, which prevented the
rendering of the scrollbar thumb.
This PR fixes this behavior by accounting for this scenario and changing
the thumb bounds to be an `Option<Bounds<Pixels>>` instead. This
furthermore has the advantage that we have to compute the thumb only
once and storing it in the layout, which was previously not possible.
Most notably, this enables scrollbar markers to show for smaller files:
https://github.com/user-attachments/assets/9fa5d240-8795-4fae-9933-aed144df4f5e
Currently, no markers are shown due to the fact that `Pixels(NaN)` is
set as the origin point.
Also, I changed that the cursor style will only be changed on the
scrollbar hitbox when we will actually show a thumb. This way, for small
files (where viewport > content size) the cursor will not change when a
user hovers with their mouse over the scrollbars hitbox.
Theoretically, I could also include the change mentioned in
https://github.com/zed-industries/zed/pull/26893#discussion_r2076316956
here. Given the introduction of the minimap as well as #29316 and the
cursor style taken care of here, removing the guard would not change
anything and creates the possibility to soon introduce scrollbars for
auto height editors. Please let me know whether we want to have this in
this PR or whether I shall create a seperate one.
Release Notes:
- Enabled scrollbar marker rendering for small files.
Finn Evers
created
a127ff4
search: Do not consider filters if they are toggled off (#30162)
Click to expand commit body
Closes #30134
This PR ensures that path filters are only applied to searches when the
filters are actually enabled (and visible).
Release Notes:
- Fixed the project search considering included and excluded filters
after toggling them off.
Finn Evers
created
f16f430
debugger: Fix `spawn straight away` behavior when there's a single non-debug task on the line (#30154)
3615d6d
Load Profile state from Thread and tie visibility to the thread's model (#30090)
Click to expand commit body
When deciding if a model supports tools or not, we weren't reading from
the configured model in a given thread.
This also stores the profile on the thread, which matches the behavior
of the Model and Max Mode, which we also already store per thread.
Hopefully this helps alleviate some confusion.
Release Notes:
- agent: Save profile selection per-Agent thread
Ben Brandt
created
02ed4ae
mistral: Add new Mistral medium model (#30171)
Click to expand commit body
Release Notes:
- Added `mistral-medium` to the Mistral provider.
versecafe
created
6cc6e4d
agent: Rename a number of constructs from Assistant to Agent (#30196)
Click to expand commit body
This PR renames a number of constructs in the `agent` crate from the
"Assistant" terminology to "Agent".
Not comprehensive, but it's a start.
Release Notes:
- N/A
@jyn514 mentioned that this would be nice to have while trying out zed,
and it seemed simple enough so I added it.
Release Notes:
- Added `OpenDocs` action to open Zed's docs in a browser, aliased to
`:h[elp]` in vim.
Julia Ryan
created
37010aa
Allow opening the FS root dir as a remote project (#30190)
Click to expand commit body
### Todo
* [x] Allow opening `ssh://username@host:/` from the CLI
* [x] Allow selecting `/` in the `open path` picker
* [x] Allow selecting the home directory in the `open path` picker
Release Notes:
- Changed the initial state of the SSH project picker to show the full
path to your home directory on the remote machine, instead of `~`.
- Added the ability to open `/` as a project folder over SSH
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This PR removes the `assistant` crate, as it is no longer used.
Release Notes:
- N/A
Marshall Bowers
created
011aa71
Fix workspace update notifications not being suppressed (#30180)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/30015
Release Notes:
- N/A
Kirill Bulatov
created
3339c84
ruby: Update documentation about new LS activation sequence (#30160)
Click to expand commit body
Hi, this pull request updates the Ruby extension documentation to
reflect new language server activation sequence and autoinstallation
shipped in
[v0.7.0](https://github.com/zed-extensions/ruby/releases/tag/v0.7.0).
Release Notes:
- N/A
Vitaly Slobodin
created
9c1b2af
theme: Add `scrollbar_thumb_active_background` color (#30177)
Click to expand commit body
Follow-up to #28064
This PR adds the `scrollbar_thumb_active_background` to themes and uses
it for the editor scrollbars to color these whilst they are being
dragged. This way, we provide the best customizabiliy for the scrollbars
and enable theme authors to add good contrasts between all the three
states `ScrollbarThumbState::Idle`, `ScrollbarThumbState::Hovered` and
ScrollbarThumbState::Dragging`.
It also adds this to the VsCode theme importer so any future imported
themes will have this set as well.
Whenever the property is not set, I decided it is best to fall back to
the normal `thumb_background` for the time being, as this way the
distinction and contrast between hovered and active state is better than
having the same color for hovering and dragging the scrollbar.
Example with active color set via `experimental.theme_overrides` in the
settings:
https://github.com/user-attachments/assets/9934e75b-6e0a-4a41-90ba-bfffb89865e7
Release Notes:
- Added the `scrollbar.thumb.active_background` color to themes. Theme
authors can use this property in combination with
`scrollbar.thumb.hover_background` to customize the color of the editor
scrollbar thumbs while these are hovered or being dragged.
## Overview
This PR adds the minimap feature to the Zed editor, closely following
the [design from Visual Studio
Code](https://code.visualstudio.com/docs/getstarted/userinterface#_minimap).
When configured, a second instance of the editor will appear to the left
of the scrollbar. This instance is not interactive and it has a slimmed
down set of annotations, but it is otherwise just a zoomed-out version
of the main editor instance. A thumb shows the line boundaries of the
main viewport, as well as the progress through the document. Clicking on
a section of code in the minimap will jump the editor to that code.
Dragging the thumb will act like the scrollbar, moving sequentially
through the document.

## New settings
This adds a `minimap` section to the editor settings with the following
keys:
### `show`
When to show the minimap in the editor.
This setting can take three values:
1. Show the minimap if the editor's scrollbar is visible: `"auto"`
2. Always show the minimap: `"always"`
3. Never show the minimap: `"never"` (default)
### `thumb`
When to show the minimap thumb.
This setting can take two values:
1. Show the minimap thumb if the mouse is over the minimap: `"hover"`
2. Always show the minimap thumb: `"always"` (default)
### `width`
The width of the minimap in pixels.
Default: `100`
### `font_size`
The font size of the minimap in pixels.
Default: `2`
## Providing feedback
In order to keep the PR focused on development updates, please use the
discussion thread for feature suggestions and usability feedback: #26894
## Features left to add
- [x] fix scrolling performance
- [x] user settings for enable/disable, width, text size, etc.
- [x] show overview of visible lines in minimap
- [x] clicking on minimap should navigate to the corresponding section
of code
- ~[ ] more prominent highlighting in the minimap editor~
- ~[ ] override scrollbar auto setting to always when minimap is set to
always show~
Release Notes:
- Added minimap for high-level overview and quick navigation of editor
contents.
---------
Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Evan Simkowitz
,
MrSubidubi
, and
Kirill Bulatov
created
902931f
git_ui: Only register conflict addon for full mode editors (#30049)
Click to expand commit body
Noticed this whilst working on #26893
This PR prevents that single line and auto height editors have a
conflict addon attached (and are observed for any excerpt changes).
From how I understand it, it does not really make sense to register the
conflict addon for single line or auto height editors.
These editors will never show a conflict nor will they be used to
resolve one. Furthermore, neither of these ever have a project attached
upon creation:
https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1385
https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1403
https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1415
so their buffers will never be added here:
https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/git_ui/src/conflict_view.rs#L116-L120
Thus, we could potentially even extend the check with an additional `||
editor.project.is_none()`. Yet, as I am not entirely sure how all of
this exactly works, I left this out for now, but I can definitely add
this if wanted.
Release Notes:
- N/A
Finn Evers
created
3c128ef
Avoid empty schema in copilot dummy tool (#30178)
Click to expand commit body
Copilot chat still returns a 400 if the dummy tool uses the `{}` schema.
This is a follow-up to https://github.com/zed-industries/zed/pull/30007.
Release Notes:
- Fixed a bug where agent edits would fail when using GitHub Copilot
Chat.
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Max Brunsfeld
and
Agus Zubiaga
created
0d72660
editor: Fix punctuation in JSX tags breaks the linked edit to the closing tag (#30167)
Click to expand commit body
Closes #29983
While we only care about `.`, just enabling punctuation in case of
linked edits shouldn't hurt.
Release Notes:
- Fixed JSX component names with periods (e.g., <Animated.View>) now
maintain linked edits between opening and closing tags.
Smit Barmase
created
466a53b
title_bar: Add link indicator to current plan entry in user menu (#30153)
Click to expand commit body
This PR adds a link indicator to the `Current Plan: ...` entry in the
user menu
<img width="232" alt="link_indicator"
src="https://github.com/user-attachments/assets/89c6247c-08cb-4cac-b136-5c5b71f1a975"
/>
to indicate this opens an external link and not something within Zed.
Release Notes:
- N/A
Finn Evers
created
358c324
editor: Use default gutter margin instead of `horizontal_padding` for horizontal content padding (#30138)
Click to expand commit body
This PR changes the way a horizontal margin is added in editors. It
removes the possibility to set a custom `horizontal_padding` for an
editor and utilizes the default `gutter_dimension` instead.
This change is made to ensure that no issues with soft-wrapping occurs
for any editor that has a `horizontal_margin` set (see #26893 for more
context on the implications here`. Furthermore, it ensures that the text
actually renders properly when scrolling horizontally and is not
cut-off.
### Horizontal padding:
| `main` | This PR |
| --- | --- |
| 
| 
|
### Editor horizontally scrolled:
| `main` | This PR |
| --- | --- |
| 
| 
|
Notice the difference at the horizontal borders.
The margin added for the `edit_file_tool` was 4 pixels. The `descent`,
whilst not exactly, is roughly the same here and also scales with the
font size nicely. Furthermore, it seems that the
`gutter_dimensions.margin` should be present anyway, given the following
comment
https://github.com/zed-industries/zed/blob/0b00256f5884fd17b4f834730b31f365613f3683/crates/editor/src/element.rs#L6887-L6889
so ensuring this property is actually set and not 0 seems to be
reasonable given the circumstances.
Please note though that this will apply to all editors in the app.
Again, this seems like it should be the case anyway, just wanted to
mention this again.
Should the fix like this not be wanted, I can change this here so that
the `horizontal_margin` is better accounted for when soft-wrapping in an
editor. Feel free to let me know in this case.
Release Notes:
- N/A
Finn Evers
created
6e19c9b
Add a way to clear activity indicator (#30156)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/30015
* Restyles the dismiss and close buttons a bit: change the dismiss icon
and add tooltips with the bindings to both
* Allows ESC to clear any status that's in the activity indicator now,
if all notifications are cleared: this won't suppress any further status
additions though, so statuses may resurface later
Release Notes:
- Added a way to clear activity indicator
Kirill Bulatov
created
77ac825
agent: Improve consecutive tool use callout spacing (#30145)
7c76cee
language: Fix indent suggestions for significant indented languages like Python (#29625)
Click to expand commit body
Closes #26157
This fixes multiple cases where Python indentation breaks:
- [x] Adding a new line after `if`, `try`, etc. correctly indents in
that scope
- [x] Multi-cursor tabs correctly preserve relative indents
- [x] Adding a new line after `else`, `finally`, etc. correctly outdents
them
- [x] Existing Tests
Future Todo: I need to add new tests for all the above cases.
Before/After:
1. Multi-cursor tabs correctly preserve relative indents
https://github.com/user-attachments/assets/08a46ddf-5371-4e26-ae7d-f8aa0b31c4a2
2. Adding a new line after `if`, `try`, etc. correctly indents in that
scope
https://github.com/user-attachments/assets/9affae97-1a50-43c9-9e9f-c1ea3a747813
Release Notes:
- Fixes indentation-related issues involving tab, newline, etc for
Python.
Smit Barmase
created
22ad207
agent: Fix profile menu hover flicker after settings update (#30109)
Click to expand commit body
Closes #30091
Follow-up to #29958
This PR fixes the profile menu flickering due to the documentation aside
after updating the agent dock position over the settings file.
The problem arose because the `documentation_side` could get out of sync
with the actual agent panel dock position. The `documentation_side` was
only updated whenever the user changed the agent panel position using
the UI, but not when updating the position in the settings file.
You can reproduce this easily by changing the `agent.dock` position to
the opposite site in your settings, which will make the profile menu
flicker again in some scenarios due to the de-sync.
This PR fixes this behavior by computing the position during render,
thus the actual set panel position and the documentation position can
never get out of sync
Release Notes:
- Fixed the agent profile menu flickering after updating the assistant
panel dock position in the settings.
Finn Evers
created
4469b73
language_models: Update copy for Zed Pro subscription (#30152)
Click to expand commit body
This PR updates the copy around the Zed Pro description to be more
accurate.
Release Notes:
- agent: Updated some copy about Zed Pro in the configuration view.
Updated terms for Agent panel launch.
Release Notes:
- N/A
Peter Tripp
created
89430a0
Fix agent reading and editing files over SSH (#30144)
Click to expand commit body
Release Notes:
- Fixed a bug that would prevent the agent from working over SSH.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
Antonio Scandurra
,
Nathan Sobo
,
Richard Feldman
,
Max Brunsfeld
, and
Cole Miller
created
This PR updates the `GET /billing/preferences` endpoint to return the
user's `trial_started_at` timestamp alongside the billing preferences.
Release Notes:
- N/A
This conflicts for space with breakpoints, and seems borderline in terms
of utility.
We could consider bringing it back in a way that is closer to the
cursor, or be content with our right-click menu discovery.
Release Notes:
- Remove the code actions indicator from the gutter. It is still
available from the right click menu, or with the keyboard shortcut.
Tone down the grid background a bit more so text is more legible.
Release Notes:
- N/A
Danilo Leal
created
d50562e
collab: Remove code for syncing token-based billing events (#30130)
Click to expand commit body
This PR removes the code related to syncing token-based billing events
to Stripe.
We don't need this anymore with the new billing.
Release Notes:
- N/A
Marshall Bowers
created
a34fb6f
Send up Zed version with edit prediction and completion requests (#30136)
Click to expand commit body
This PR makes it so we send up an `x-zed-version` header with the
client's version when making a request to llm.zed.dev for edit
predictions and completions.
Release Notes:
- N/A
Marshall Bowers
created
5ca114b
agent: Make feedback buttons more minimal (#30133)
Click to expand commit body
Also swapped out the svgs for `ThumbsDown` and `ThumbsUp`, and added
`DocumentText`.
Release Notes:
- N/A