f14f0c2
Fix false positive for editing status in agent panel (#35554)
Click to expand commit body
Release Notes: - N/A
Ben Brandt created
f14f0c2
Fix false positive for editing status in agent panel (#35554)
Release Notes: - N/A
Ben Brandt created
1b9302d
Reuse `is_tab_pinned` method (#35551)
Release Notes: - N/A
Joseph T. Lyons created
4417bfe
Fix pinned tab becoming unpinned when dragged onto unpinned tab (#35539)
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)
- 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>
Ben Brandt and Cole Miller created
f4391ed
Cleanup `editor.rs` imports (#35509)
Release Notes: - N/A
Michael Sloan created
a50d0f2
Make `editor::AcceptPartialCopilotSuggestion` a deprecated alias (#35507)
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)
Release Notes: - N/A
Michael Sloan created
4d79edc
project: Fix extra } at the end of import on completion accept (#35494)
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.
Smit Barmase created
edac6e4
Add font ligatures and format on save buttons to onboarding UI (#35487)
Release Notes: - N/A
Anthony Eid created
6052115
zeta: Add CLI tool for querying edit predictions and related context (#35491)
Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Michael Sloan and Marshall Bowers created
561ccf8
onboarding: Serialize onboarding page (#35490)
Closes #ISSUE Serializes the onboarding page to the database to ensure that if Zed is closed during onboarding, re-opening Zed restores the onboarding state and the most recently active page (Basics, Editing, etc) restored. Also has the nice side effect of making dev a bit nicer as it removes the need to re-open onboarding and navigate to the correct page on each build. Release Notes: - N/A *or* Added/Fixed/Improved ...
Ben Kunkle created
ac75593
onboarding: Actions for page navigation (#35484)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
Ben Kunkle created
a3a3f11
zeta: Rename binding back to `user_store` (#35486)
This PR renames a binding from `cloud_user_store` to `user_store` now that we've consolidated the two into the `UserStore`. Release Notes: - N/A
Marshall Bowers created
faa45c5
onboarding: Add design adjustments (#35480)
Release Notes: - N/A --------- Co-authored-by: Anthony <anthony@zed.dev>
Danilo Leal and Anthony created
b31f893
Rasterize glyphs without D2D (#35376)
This allows debugging Zed with Renderdoc, and also fixes an issue where glyphs' bounds were miscalculated for certain sizes and scale factors. Release Notes: - N/A --------- Co-authored-by: Kate <kate@zed.dev> Co-authored-by: Julia <julia@zed.dev> Co-authored-by: Junkui Zhang <364772080@qq.com>
Max Brunsfeld , Kate , Julia , and Junkui Zhang created
f888f3f
Start separating authentication from connection to collab (#35471)
This pull request should be idempotent, but lays the groundwork for avoiding to connect to collab in order to interact with AI features provided by Zed. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com> Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Antonio Scandurra , Marshall Bowers , and Richard Feldman created
b01d187
onboarding: Add the AI page (#35351)
This PR starts the work on the AI onboarding page as well as the configuration modal Release Notes: - N/A --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> Co-authored-by: Anthony <anthony@zed.dev>
Finn Evers , Danilo Leal , and Anthony created
e5c6a59
agent_ui: More agent notifications (#35441)
Release Notes: - N/A
Ben Brandt created
106aa0d
Add default binding to open settings profile selector (#35459)
Release Notes: - N/A
Joseph T. Lyons created
f7f9059
inline_completion_button: Replace `UserStore` with `CloudUserStore` (#35456)
This PR replaces usages of the `UserStore` in the inline completion button with the `CloudUserStore`. Release Notes: - N/A
Marshall Bowers created
8be3f48
client: Remove unused `subscription_period` from `UserStore` (#35454)
This PR removes the `subscription_period` field from the `UserStore`, as its usage has been replaced by the `CloudUserStore`. Release Notes: - N/A
Marshall Bowers created
76a8293
editor_tests: Fix for potential race loading editor languages (#35453)
Fix for potential race when loading HTML and JS languages (JS is
slower). Wait for both to load before continue tests.
Observed failure on linux:
[job](https://github.com/zed-industries/zed/actions/runs/16662438526/job/47162345259)
as part of https://github.com/zed-industries/zed/pull/35436
```
thread 'editor_tests::test_autoclose_with_embedded_language' panicked at crates/editor/src/editor_tests.rs:8724:8:
assertion failed: `(left == right)`: unexpected buffer text
Diff < left / right > :
<body><>
<script>
< var x = 1;<>
> var x = 1;<
</script>
</body><>
```
Inserted `<` incorrect gets paired bracket inserted `>`.
I believe because the JS language injection hasn't fully loaded.
Release Notes:
- N/A
Peter Tripp created
2315962
cloud_api_client: Add `accept_terms_of_service` method (#35452)
This PR adds an `accept_terms_of_service` method to the `CloudApiClient`. Release Notes: - N/A
Marshall Bowers created
f8673da
ai_onboarding: Read the plan from the `CloudUserStore` (#35451)
This PR updates the AI onboarding to read the plan from the `CloudUserStore` so that we don't need to connect to Collab. Release Notes: - N/A
Marshall Bowers created
72d354d
Update Agent panel to work with `CloudUserStore` (#35436)
This PR updates the Agent panel to work with the `CloudUserStore` instead of the `UserStore`, reducing its reliance on being connected to Collab to function. Release Notes: - N/A --------- Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Marshall Bowers and Richard Feldman created
09b93ca
Rework authentication for local Cloud/Collab development (#35450)
This PR reworks authentication for developing Zed against a local version of Cloud and/or Collab. You will still connect the same way—using the `zed-local` script—but will need to be running an instance of Cloud locally. Release Notes: - N/A
Marshall Bowers created
7c169fc
debugger: Send initialized event from fake server at a more realistic time (#35446)
The spec says: > :arrow_left: Initialized Event > This event indicates that the debug adapter is ready to accept configuration requests (e.g. setBreakpoints, setExceptionBreakpoints). > > A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the initialize request has finished). Previously in tests, `intercept_debug_sessions` was just spawning off a background task to send the event after setting up the client, so the event wasn't actually synchronized with the flow of messages in the way the spec says it should be. This PR makes it so that the `FakeTransport` injects the event right after a successful response to the initialize request, and doesn't send it otherwise. Release Notes: - N/A
Cole Miller created
2b36d4e
Add a field to MultiLSPQuery span showing the current request (#35372)
Release Notes: - N/A
Mikayla Maki created
4a82b6c
jetbrains: Unmap cmd-k in Jetbrains keymap (#35443)
This only works after a delay in most situations because of the all chorded `cmd-k` mappings in the so disable them for now. Reported by @jer-k: https://x.com/J_Kreutzbender/status/1951033355434336606 Release Notes: - Undo mapping of `cmd-k` for Git Panel in default Jetbrains keymap (thanks [@jer-k](https://github.com/jer-k))
Peter Tripp created
5feb759
Additions for settings profile selector (#35439)
- Added profile selector to `zed > settings` submenu. - Added examples to the `default.json` docs. - Reduced length of the setting description that shows on autocomplete, since it was cutoff in the autocomplete popover. Release Notes: - N/A
Joseph T. Lyons created
410348d
Acquire LLM token from Cloud instead of Collab for Edit Predictions (#35431)
This PR updates the Zed Edit Prediction provider to acquire the LLM token from Cloud instead of Collab to allow using Edit Predictions even when disconnected from or unable to connect to the Collab server. Release Notes: - N/A --------- Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Marshall Bowers and Richard Feldman created
8e7f189
Revert "Increase the number of parallel request handlers per connection" (#35435)
Reverts zed-industries/zed#35046 This made the problem worse ;-; Release Notes: - N/A
Mikayla Maki created
aea1d48
cloud_api_client: Add `create_llm_token` method (#35428)
This PR adds a `create_llm_token` method to the `CloudApiClient`. Release Notes: - N/A
Marshall Bowers created
c946b98
onboarding: Expand power of theme selector (#35421)
Closes #ISSUE
The behavior of the theme selector is documented above the function,
copied here for reference:
```rust
/// separates theme "mode" ("dark" | "light" | "system") into two separate states
/// - appearance = "dark" | "light"
/// - "system" true/false
/// when system selected:
/// - toggling between light and dark does not change theme.mode, just which variant will be changed
/// when system not selected:
/// - toggling between light and dark does change theme.mode
/// selecting a theme preview will always change theme.["light" | "dark"] to the selected theme,
///
/// this allows for selecting a dark and light theme option regardless of whether the mode is set to system or not
/// it does not support setting theme to a static value
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle created
c6947ee
onboarding ui: Add theme preview tiles and button functionality to basic page (#35413)
This PR polishes and adds functionality to the onboarding UI with a focus on the basic page. It added theme preview tiles, got the Vim, telemetry, crash reporting, and sign-in button working. The theme preview component was moved to the UI crate and it now can have a click handler on it. Finally, this commit also changed `client::User.github_login` and `client::UserStore.by_github_login` to use `SharedStrings` instead of `Strings`. This change was made because user.github_login was cloned in several areas including the UI, and was cast to a shared string in some cases too. Release Notes: - N/A --------- Co-authored-by: Remco Smits <djsmits12@gmail.com>
Anthony Eid and Remco Smits created
b59f992
cloud_api_types: Add types for `POST /client/llm_tokens` endpoint (#35420)
This PR adds some types for the new `POST /client/llm_tokens` endpoint. Release Notes: - N/A Co-authored-by: Richard <richard@zed.dev>
Marshall Bowers and Richard created
0a21b84
Tighten up settings profile selector modal width (#35419)
Release Notes: - N/A
Joseph T. Lyons created
6a8be17
Fix panic with completion ranges and autoclose regions interop (#35408)
As reported [in
Discord](https://discord.com/channels/869392257814519848/1106226198494859355/1398470747227426948)
C projects with `"` as "brackets" that autoclose, may invoke panics when
edited at the end of the file.
With a single selection-caret (`ˇ`), at the end of the file,
```c
ifndef BAR_H
#define BAR_H
#include <stdbool.h>
int fn_branch(bool do_branch1, bool do_branch2);
#endif // BAR_H
#include"ˇ"
```
gets an LSP response from clangd
```jsonc
{
"filterText": "AGL/",
"insertText": "AGL/",
"insertTextFormat": 1,
"kind": 17,
"label": " AGL/",
"labelDetails": {},
"score": 0.78725427389144897,
"sortText": "40b67681AGL/",
"textEdit": {
"newText": "AGL/",
"range": { "end": { "character": 11, "line": 8 }, "start": { "character": 10, "line": 8 } }
}
}
```
which replaces `"` after the caret (character/column 11, 0-indexed).
This is reasonable, as regular follow-up (proposed in further
completions), is a suffix + a closing `"`:
<img width="842" height="259" alt="image"
src="https://github.com/user-attachments/assets/ea56f621-7008-4ce2-99ba-87344ddf33d2"
/>
Yet when Zed handles user input of `"`, it panics due to multiple
reasons:
* after applying any snippet text edit, Zed did a selection change:
https://github.com/zed-industries/zed/blob/55379876301bd4dcfe054a146b66288d2e60a523/crates/editor/src/editor.rs#L9539-L9545
which caused eventual autoclose region invalidation:
https://github.com/zed-industries/zed/blob/55379876301bd4dcfe054a146b66288d2e60a523/crates/editor/src/editor.rs#L2970
This covers all cases that insert the `include""` text.
* after applying any user input and "plain" text edit, Zed did not
invalidate any autoclose regions at all, relying on the "bracket" (which
includes `"`) autoclose logic to rule edge cases out
* bracket autoclose logic detects previous `"` and considers the new
user input as a valid closure, hence no autoclose region needed.
But there is an autoclose bracket data after the plaintext completion
insertion (`AGL/`) really, and it's not invalidated after `"` handling
* in addition to that, `Anchor::is_valid` method in `text` panicked, and
required `fn try_fragment_id_for_anchor` to handle "pointing at odd,
after the end of the file, offset" cases as `false`
A test reproducing the feedback and 2 fixes added: proper, autoclose
region invalidation call which required the invalidation logic tweaked a
bit, and "superficial", "do not apply bad selections that cause panics"
fix in the editor to be more robust
Release Notes:
- Fixed panic with completion ranges and autoclose regions interop
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Kirill Bulatov and Max Brunsfeld created
a2aea00
Bump livekit-rust-sdks with another attempt to fix build failures (#35344)
Includes https://github.com/zed-industries/livekit-rust-sdks/pull/7 Release Notes: - N/A
Cole Miller created
98c66ed
windows: Don't create directx device with debug flag when debug layer is missing (#35405)
Release Notes: - N/A
张小白 created
558bbff
title_bar: Show the plan from the `CloudUserStore` (#35401)
This PR updates the user menu in the title bar to show the plan from the `CloudUserStore` instead of the `UserStore`. We're still leveraging the RPC connection to listen for `UpdateUserPlan` messages so that we can get live-updates from the server, but we are merely using this as a signal to re-fetch the information from Cloud. Release Notes: - N/A
Marshall Bowers created
89ed0b9
workspace: Fix multiple remote projects not restoring on reconnect or restart and not visible in recent projects (#35398)
Closes #33787 We were not updating SSH paths after initial project was created. Now we update paths when worktrees are added/removed and serialize these updated paths. This is separate from workspace because unlike local paths, SSH paths are not part of the workspace table, but the SSH table instead. We don't need to update SSH paths every time we serialize the workspace. <img width="400" src="https://github.com/user-attachments/assets/9e1a9893-e08e-4ecf-8dab-1e9befced58b" /> Release Notes: - Fixed issue where multiple remote folders in a project were lost on reconnect, not restored on restart, and not visible in recent projects.
Smit Barmase created
4b9334b
Fix vim `cw` at end of words (#35300)
Fixes #35269 Release Notes: - N/A
Julia Ryan created
47af878
Do not sort settings profiles (#35389)
After playing with this for a bit, I realize it does not feel good to not have control over the order of profiles. I find myself wanting to group similar profiles together and not being able to. Release Notes: - N/A
Joseph T. Lyons created
5488398
onboarding: Refine page and component designs (#35387)
Includes adding new variants to the Dropdown and Numeric Stepper components. Release Notes: - N/A
Danilo Leal created
b1a7993
cloud_api_types: Add more data to the `GetAuthenticatedUserResponse` (#35384)
This PR adds more data to the `GetAuthenticatedUserResponse`. We now return more information about the authenticated user, as well as their plan information. Release Notes: - N/A
Marshall Bowers created
b90fd42
client: Don't fetch the authenticated user once we have them (#35385)
This PR makes it so we don't keep fetching the authenticated user once we have them. Release Notes: - N/A
Marshall Bowers created
e1e2775
docs: Run lychee link check on generated docs output (#35381)
Closes #ISSUE Following #35310, . This PR makes it so the lychee link check is ran before building the docs on the md files to catch basic errors, and then after building on the html output to catch generation errors, including regressions like the one #35380 fixes. Release Notes: - N/A
Ben Kunkle created
ed104ec
Ensure settings are being adjusted via settings profile selector (#35382)
This PR just pins down the behavior of the settings profile selector by checking a single setting, `buffer_font_size`, as options in the selector are changed / selected. Release Notes: - N/A
Joseph T. Lyons created
67a491d
Use outlined bolt icon for the LSP tool (#35373)
| Before | After | |--------|--------| | <img width="266" height="67" alt="image" src="https://github.com/user-attachments/assets/bbfc75b6-6747-4eb1-ab94-ab098eba5335" /> | <img width="266" height="67" alt="image" src="https://github.com/user-attachments/assets/4631be9d-3d5e-4eb6-bf2f-596403fdf014" /> | Release Notes: - Changed the icon of the language servers entry in the status bar.
Kainoa Kanter created