22473fc
Stop sending redundant LSP proto requests (#35581)
Click to expand commit body
Before, each time any LSP feature was used on client remote, it always
produced a `proto::` request that always had been sent to the host, from
where returned as an empty response.
Instead, propagate more language server-related data to the client,
`lsp::ServerCapability`, so Zed client can omit certain requests if
those are not supported.
On top of that, rework the approach Zed uses to query for the data
refreshes: before, editors tried to fetch the data when the server start
was reported (locally and remotely).
Now, a later event is selected: on each `textDocument/didOpen` for the
buffer contained in this editor, we will query for new LSP data, reusing
the cache if needed.
Before, servers could reject unregistered files' LSP queries, or process
them slowly when starting up.
Now, such refreshes are happening later and should be cached.
This requires a collab DB change, to restore server data on rejoin.
Release Notes:
- Fixed excessive LSP requests sent during remote sessions
Kirill Bulatov
created
5b40b36
Add `workspace::ToggleEditPrediction` for toggling inline completions globally (#35418)
Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/23704
Existing action is `editor::ToggleEditPrediction` ("This Buffer").
This action is `workspace::ToggleEditPredction` ("All Files").
You can add a custom keybind wi shortcut with:
```json
{ "context": "Workspace", "bindings": { "ctrl-alt-cmd-e": "workspace::ToggleEditPrediction" } },
```
<img width="212" height="439" alt="Screenshot 2025-07-31 at 12 52 19"
src="https://github.com/user-attachments/assets/15879daa-7d4d-4308-ab2b-5e78507f2fa5"
/>
Release Notes:
- Added `workspace::ToggleEditPrediction` action for toggling
`show_edit_predictions` in settings (Edit Predictions menu -> All
Files).
Peter Tripp
created
4972524
agent: Update link to OpenAI compatible docs (#35620)
We want Ruff to be built with newer Rust version (as it was built
pre-1.84 where we've fixed a bug in std).
Closes #35627
Release Notes:
- N/A
Piotr Osiewicz
created
efba436
Ensure client reconnects if an error occurs during authentication (#35629)
Click to expand commit body
In #35471, we added a new `AuthenticationError` variant to the client
enum `Status`, but the reconnection logic was ignoring it when
determining whether to reconnect.
This pull request fixes that regression and introduces test coverage for
this case.
Release Notes:
- N/A
Add more logging to collab in order to help diagnose throughput issues.
IMPORTANT: Do not deploy this PR without pinging me.
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
- [x] Handle uploading minidumps from the remote_server
- [x] Associate minidumps with panics with some sort of ID (we don't use
session_id on the remote)
- [x] Update the protobufs and client/server code to request panics
- [x] Upload minidumps with no corresponding panic
- [x] Fill in panic info when there _is_ a corresponding panic
- [x] Use an env var for the sentry endpoint instead of hardcoding it
Release Notes:
- Zed now generates minidumps for crash reporting
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Julia Ryan
and
Max Brunsfeld
created
07e3d53
sum_tree: Do not implement Dimension on tuples, use new Dimensions wrapper instead (#35482)
Click to expand commit body
This is a bit of a readability improvement IMHO; I often find myself
confused when dealing when dimension pairs, as there's no easy way to
jump to the implementation of a dimension for tuples to remind myself
for the n-th time how exactly that impl works. Now it should be possible
to jump directly to that impl.
Another bonus is that Dimension supports 3-ary tuples as well - by using
a () as a default value of a 3rd dimension.
Release Notes:
- N/A
Piotr Osiewicz
created
be2f54b
agent: Update pieces of copy in the settings view (#35621)
Click to expand commit body
Some tiny updates to make the agent panel's copywriting sharper.
Release Notes:
- N/A
Danilo Leal
created
a9c44ac
assistant_tool: Fix rejecting edits deletes newly created and accepted files (#35622)
Click to expand commit body
Closes #34108
Closes #33234
This PR fixes a bug where a file remained in a Created state after
accept, causing following reject actions to incorrectly delete the file
instead of reverting back to previous state. Now it changes it to
Modified state upon "Accept All" and "Accept Hunk" (when all edits are
accepted).
- [x] Tests
Release Notes:
- Fixed issue where rejecting AI edits on newly created files would
delete the file instead of reverting to previous accepted state.
Smit Barmase
created
06226e1
onboarding: Show indication that settings have already been imported (#35615)
Click to expand commit body
Co-Authored-By: Danilo <danilo@zed.dev>
Co-Authored-By: Anthony <anthony@zed.dev>
Release Notes:
- N/A
Ben Kunkle
created
e1d0e3f
onboarding: Add explainer tooltips for the editing and AI section (#35619)
Click to expand commit body
Includes the ability to add a tooltip for both the badge and switch
field components.
Release Notes:
- N/A
Danilo Leal
created
afc4f50
debugger: Ensure that Python's adapter work dir exists (#35618)
Click to expand commit body
Closes #ISSUE
cc @Sansui233 who triaged this in
https://github.com/zed-industries/zed/issues/35388#issuecomment-3146977431
Release Notes:
- debugger: Fixed an issue where a Python debug adapter could not be
installed when debugging Python projects for the first time.
Piotr Osiewicz
created
91bbdb7
debugger: Install debugpy into user's venv if there's one selected (#35617)
Click to expand commit body
Closes #35388
Release Notes:
- debugger: Fixed Python debug sessions failing to launch due to a
missing debugpy installation. Debugpy is now installed into user's venv
if there's one available.
Piotr Osiewicz
created
182edbf
git_panel: Improve toast messages for push/pull/fetch (#35092)
Click to expand commit body
On GitLab, when pushing a branch and a MR already existing the remote
log contains "View merge request" and the link to the MR.
Fixed `Already up to date` stdout check on pull (was `Everything up to
date` on stderr)
Fixed `Everything up-to-date` check on push (was `Everything up to
date`)
Improved messaging for up-to-date for fetch/push/pull
Fixed tests introduced in
https://github.com/zed-industries/zed/pull/33833.
<img width="470" height="111" alt="Screenshot 2025-07-31 at 18 37 05"
src="https://github.com/user-attachments/assets/2a5dcc4c-6f53-4a85-b983-8e25149efcc0"
/>
Release Notes:
- Git UI: Add "View Pull Request" when pushing to Gitlab remotes
- git: Improved toast messages on fetch/push/pull
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Guillaume Launay
and
Peter Tripp
created
24e7f86
onboarding: Go back to not having system be separate (#35499)
Click to expand commit body
Going back to having system be mutually exclusive with light/dark to
simplify the system. We instead just show both light and dark when
system is selected
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Ben Kunkle
,
Danilo Leal
, and
Anthony Eid
created
68c2465
zeta: Collect git sha / remote urls when data collection from OSS is enabled (#35514)
Click to expand commit body
Release Notes:
- Edit Prediction: Added Git info to edit predictions requests (only
sent for opensource projects when data collection is enabled). The sent
Git info is the SHA of the current commit and the URLs for the `origin`
and `upstream` remotes.
Michael Sloan
created
3df5394
linux: Make desktop file executable (#35597)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/35545
Release Notes:
- linux: Improved support for `zed://` urls on Linux
Peter Tripp
created
6e77c6a
onboarding: Adjust the welcome page a bit (#35600)
f3f2dba
Minor stylistic cleanup in Windows platform (#35503)
Click to expand commit body
This PR doesn't change any logic, it just cleans up some naming and
style in the windows platform layer.
* Rename `WindowsWindowStatePtr` to `WindowsWindowInner`, since it isn't
a pointer type.
* Move window event handler methods into an impl on this type, so that
all of the `state_ptr: &Rc<WindowsWindowInner>` parameters can just be
replaced with `&self`.
* In window creation, use a `match` instead of a conditional followed by
an unwrap
There's a lot of whitespace in the diff, so view it with `w=1`.
Release Notes:
- N/A
Max Brunsfeld
created
0ea4016
onboarding: Adjust skip button as flow progresses (#35596)
Click to expand commit body
Release Notes:
- N/A
Danilo Leal
created
9fa634f
git: Add option to branch from default branch in branch picker (#34663)
Click to expand commit body
Closes #33700
The option shows up as an icon that appears on entries that would create
a new branch. You can also branch from the default by secondary
confirming, which the icon has a tooltip for as well.
We based the default branch on the results from this command: `git
symbolic-ref refs/remotes/upstream/HEAD` and fallback to `git
symbolic-ref refs/remotes/origin/HEAD`
Release Notes:
- Add option to create a branch from a default branch in git branch
picker
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Anthony Eid
and
Cole Miller
created
fa8dd1c
agent: Adjust full screen menu item label and background color (#35592)
Click to expand commit body
Release Notes:
- N/A
Danilo Leal
created
2c8f144
workspace: Fix not able to close tab when buffer save fails (#35589)
Click to expand commit body
Closes #26216, Closes #35517
Now we prompt user if buffer save failed, asking them to close without
saving or cancel the action.
Release Notes:
- Fixed issue where closing read-only or deleted buffer would not close
that tab.
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Smit Barmase
and
Lukas Wirth
created
bf361c3
search: Update results multi-buffer before search is finished (#35470)
Click to expand commit body
I'm not sure when we've lost that notify, but it's causing the time to
first search result equal to the time to run the whole search, which is
not great.
Co-authored-by: Remco <djsmits12@gmail.com>
This discussion has originally started in #35444
Release Notes:
- Improved project search speed.
Co-authored-by: Remco <djsmits12@gmail.com>
Piotr Osiewicz
and
Remco
created
65018c2
Rename remaining mentions of "inline completion" to "edit prediction" (#35512)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
8588572
agent: Fix scrolling in the "Add LLM Provider" modal (#35584)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/35402
Release Notes:
- agent: Fix scrolling in the "Add LLM Provider" modal
Danilo Leal
created
899bc8a
Fix edit prediction disablement with `"disable_ai": true` setting (#35513)
Click to expand commit body
Even after #35327 edit predictions were still being queried and shown
after setting `"disable_ai": true`
Also moves `DisableAiSettings` to the `project` crate so that it gets
included in tests via existing use of `Project::init_settings(cx)`.
Release Notes:
- Fixed `"disable_ai": true` setting disabling edit predictions.
Michael Sloan
created
d577ef5
thread view: Scroll to the bottom when sending new messages + adjust controls display (#35586)
Click to expand commit body
Release Notes:
- N/A
Danilo Leal
created
bb5af6f
Fix escape in terminal with JetBrains keymap (#35585)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/35429
Closes https://github.com/zed-industries/zed/issues/35091
Follow-up to: https://github.com/zed-industries/zed/pull/35230
Release Notes:
- Fix `escape` in Terminal broken in JetBrains compatability keymaps
5f77c6a
docs: Rewrite the OpenAI compatible API section (#35558)
Click to expand commit body
This PR updates the OpenAI compatible API section clarifying that API
keys aren't stored in the `settings.json`. It also updates the JSON as
some fields are not available anymore.
Release Notes:
- docs: Updated the OpenAI compatible API section to clarify API keys
aren't stored in your `settings.json`.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This is really just a small beginning, as there are many other icons to
be revised and cleaned up. Our current set is a bit of a mess in terms
of dimension, spacing, stroke width, and terminology. I'm sure there are
more non-used icons I'm not covering here, too. We'll hopefully tackle
it all soon leading up to 1.0.
Closes https://github.com/zed-industries/zed/issues/35576
Release Notes:
- N/A
Danilo Leal
created
8b573d4
evals: Retry on Anthropic's internal and transient I/O errors (#35395)
This fixes a regression introduced in
https://github.com/zed-industries/zed/pull/35471, where we treated
stored credentials as invalid when failing to retrieve the authenticated
user for any reason. This had the side effect of triggering the auth
flow even when e.g. the client/server had temporary networking issues.
This pull request changes the logic to only trigger authentication when
getting a 401 from the server.
Release Notes:
- N/A
Antonio Scandurra
created
5ca5d90
Use a better type for language IDs field (#35566)
Click to expand commit body
Part of the preparation for proto capabilities.
Release Notes:
- N/A
Kirill Bulatov
created
1b3d613
Add libx11 to openSUSE build dependencies (#35553)
Click to expand commit body
building on opensuse fails without `libx11-devel`
**Repro:**
```bash
$ cd $(mktemp -d)
$ git clone https://github.com/zed-industries/zed .
$ docker run --rm -it -v $(pwd):/zed -w /zed opensuse/tumbleweed
(opensuse) $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(opensuse) $ ./script/linux
(opensuse) $ cargo build --release
```
**Expected:** to work
**Actual:**
```
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/x11-2.21.0/build.rs:42:14:
called `Result::unwrap()` on an `Err` value:
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags x11 'x11 >= 1.4.99.1'
The system library `x11` required by crate `x11` was not found.
The file `x11.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `x11.pc`.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```
Ahmed ElSayed
created
2db19e1
Improve the yaml outline to show the key value if it's a simple string (#35562)
Click to expand commit body
Before:
<img width="753" height="890" alt="Screenshot 2025-08-03 at 8 58 16 PM"
src="https://github.com/user-attachments/assets/a3816acd-66b2-4042-8181-fbc15881bd4b"
/>
After:
<img width="648" height="634" alt="Screenshot 2025-08-03 at 8 59 30 PM"
src="https://github.com/user-attachments/assets/0ab35f3e-36d6-42b5-bb5f-09431985878e"
/>
Release Notes:
- Improved the yaml outline to include the key's value if it's a simple
string.
Mikayla Maki
created
ea7c3a2
Add option to open settings profile selector in user menu (#35556)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
f14f0c2
Fix false positive for editing status in agent panel (#35554)
Case A - Correct:
https://github.com/user-attachments/assets/2ab943ea-ca5b-4b6b-a8ca-a0b02072293e
Case B - Incorrect:
https://github.com/user-attachments/assets/912be46a-73b2-48a8-b490-277a1e89d17d
Case B - Fixed:
https://github.com/user-attachments/assets/98c2311d-eebc-4091-ad7a-6cf857fda9c3
Release Notes:
- Fixed a bug where dragging a pinned tab onto an unpinned tab wouldn't
decrease the pinned tab count
Joseph T. Lyons
created
986e3e7
agent_ui: Improve message editor history navigation (#35532)
Click to expand commit body
- We no longer move through history if a message has been edited by the
user -
It is possible to navigate back down to an empty message
Co-authored-by: Cole Miller <cole@zed.dev>
Release Notes:
- N/A
Co-authored-by: Cole Miller <cole@zed.dev>
a50d0f2
Make `editor::AcceptPartialCopilotSuggestion` a deprecated alias (#35507)
Click to expand commit body
This is consistent with there being no copilot expecific variant of
`editor::AcceptEditPrediction`. It also fixes a case where the
`disable_ai: true` has effects at init time that aren't undone when
changed, added in #35327.
Release Notes:
- N/A
Michael Sloan
created
a8422d4
Fix showing/hiding copilot actions when `disable_ai` setting is changed (#35506)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
4d79edc
project: Fix extra } at the end of import on completion accept (#35494)
Click to expand commit body
Closes #34094
Bug in https://github.com/zed-industries/zed/pull/11157
**Context:**
In https://github.com/zed-industries/zed/pull/31872, we added logic to
avoid re-querying language server completions
(`textDocument/completion`) when possible. This means the list of
`lsp::CompletionItem` objects we have might be stale and not contain
accurate data like `text_edit`, which is only valid for the buffer at
the initial position when these completions were requested. We don't
really care about this because we already extract all the useful data we
need (like insert/replace ranges) into `Completion`, which converts
`text_edit` to anchors. This means further user edits simply push/move
those anchors, and our insert/replace ranges persist for completion
accept.
```jsonc
// on initial textDocument/completion
"textEdit":{"insert":{"start":{"line":2,"character":0},"end":{"line":2,"character":11}},"replace":{"start":{"line":2,"character":0},"end":{"line":2,"character":11}}
```
However, for showing documentation of visible `Completion` items, we
need to call resolve (`completionItem/resolve`) with the existing
`lsp::CompletionItem`, which returns the same `text_edit` and other
existing data along with additional new data that was previously
optional, like `documentation` and `detail`.
**Problem:**
This new data like `documentation` and `detail` doesn't really change on
buffer edits for a given completion item, so we can use it. But
`text_edit` from this resolved `lsp::CompletionItem` was valid when the
the initial (`textDocument/completion`) was queried but now the
underlying buffer is different. Hence, creating anchors from this ends
up creating them in wrong places.
```jsonc
// calling completionItem/resolve on cached lsp::CompletionItem results into same textEdit, despite buffer edits
"textEdit":{"insert":{"start":{"line":2,"character":0},"end":{"line":2,"character":11}},"replace":{"start":{"line":2,"character":0},"end":{"line":2,"character":11}}
```
It looks like the only reason to override the new text and these ranges
was to handle an edge case with `typescript-language-server`, as
mentioned in the code comment. However, according to the LSP
specification for [Completion
Request](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion):
> All other properties (usually sortText, filterText, insertText and
textEdit) must be provided in the textDocument/completion response and
**must not be changed during resolve.**
If any language server responds with different `textEdit`, `insertText`,
etc. in `completionItem/resolve` than in `textDocument/completion`, they
should fix that. Bug in this case in `typescript-language-server`:
https://github.com/typescript-language-server/typescript-language-server/pull/303#discussion_r869102064
We don't really need to override these at all. Keeping the existing
Anchors results in correct replacement.
Release Notes:
- Fixed issue where in some cases there would be an extra `}` at the end
of imports when accepting completions.