4054d4a
assistant2: Fix inline context picker and handle dismiss (#23081)
Click to expand commit body
The new `ContextMenu`-based `ContextPicker` requires initialization when
opened, but we were only doing this for the `ContextStrip` picker, not
the inline one.
Additionally, because we have a wrapper element around ContextMenu, we
need to propagate the `DismissEvent` so that it properly closes when
Escape is pressed.
Release Notes:
- N/A
Agus Zubiaga
created
7c2c409
Show configuration in language server debug logs (#23084)
Click to expand commit body
Release Notes:
- Added configuration sent on initialization to the `Server Info`
section of the language server logs.
Michael Sloan
created
d4e91c1
Add support for namespace changes in action deprecations (#23086)
Click to expand commit body
cc @cole-miller
Release Notes:
- N/A
Michael Sloan
created
b633f62
Add test that JSON schema generation works + actions build from no input (#23049)
These comments are inaccurate. Even if `convert_case` provided a way to
customize which boundaries were used (which is now does, it 0.7.1), they
would be removed from the string and replaced with the new boundary
character (`-`, `_`, ...), and we'd lose the ability to reconstruct the
text the way the author formatted it. This is not a hack, this is the
way we have to do it.
Release Notes:
- N/A
Joseph T. Lyons
created
bd3c7d6
git: Fully implement "all staged" checkbox (#23079)
Click to expand commit body
Also includes some improvements to the "stage/unstage all" actions and
buttons.
Release Notes:
- N/A
Cole Miller
created
2179be1
assistant2: Add an indicator when a response is streaming in (#23078)
Click to expand commit body
This PR adds an indicator to the Assistant message to indicate that it
is still streaming:
<img width="1310" alt="Screenshot 2025-01-13 at 2 10 33 PM"
src="https://github.com/user-attachments/assets/635ee60d-b5ea-40ac-952a-b7bfa7e04fcc"
/>
Release Notes:
- N/A
In current code this doesn't have benefit. In preparation for avoiding a
clone of workspace configuration. Having the interface this way may make
opportunities for efficiency clearer in the future
Release Notes:
- N/A
Michael Sloan
created
c1c767a
assistant2: Make `Esc` cancel current completion (#23076)
Click to expand commit body
This PR makes it so pressing `Esc` in Assistant2 will cancel the current
completion.
Release Notes:
- N/A
Marshall Bowers
created
b59a9f1
Document why rust-analyzer doesn't show action name in action docs (#23072)
Click to expand commit body
rust-analyzer does not support derive_macro expansion in attributes -
https://github.com/rust-lang/rust-analyzer/issues/8092. This could be
worked around via a proc_macro, but I think it'd be best to just require
docs for every action.
Release Notes:
- N/A
TODO:
- [ ] Investigate incorrect hit target for `stage all` button
- [ ] Add top level context menu
- [ ] Add entry context menus
- [x] Show paths in list view
- [ ] For now, `enter` can just open the file
- [ ] 🐞: Hover deadzone in list caused by scrollbar
- [x] 🐞: Incorrect status/nothing shown when multiple worktrees are
added
---
This PR continues work on the feature flagged git panel.
Changes:
- Defines and wires up git panel actions & keybindings
- Re-scopes some actions from `git_ui` -> `git`.
- General git actions (StageAll, CommitChanges, ...) are scoped to
`git`.
- Git panel specific actions (Close, FocusCommitEditor, ...) are scoped
to `git_panel.
- Staging actions & UI are now connected to git!
- Unify more reusable git status into the GitState global over being
tied to the panel directly.
- Uses the new git status codepaths instead of filtering all workspace
entries
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Nate Butler
,
Cole Miller
, and
Cole Miller
created
Closes #17337
Release Notes:
- Add `Diagnostics` key context
- Enables users to specify key bindings for that pane
```json
{
"context": "Diagnostics",
"bindings": {
"alt-q": "diagnostics::ToggleWarnings"
}
}
```
everdrone
created
955248f
copilot_chat: Rename `o1-preview` model to `o1` (#23038)
Click to expand commit body
https://github.blog/news-insights/openais-o1-model-available-in-copilot-chat-and-github-models/
Release Notes:
- Renamed Github Copilot Chat "o1-preview" model to "o1".
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
SkywardSyntax
and
Marshall Bowers
created
7ed834b
terminal: Fix unresponsive buttons on load until center pane is clicked + Auto-focus docked terminal on load if no other item is focused (#23039)
Click to expand commit body
Closes #23006
This PR should have been split into two, but since the changes are
related, I merged them into one.
1. On load, the title bar actions and bottom bar toggles are
unresponsive until the center pane is clicked. This happens because the
terminal captures focus (even if it's closed) long after the workspace
sets focus to itself during loading.
The issue was in the `focus_view` call used in the `new` method of
`TerminalPanel`. Since new terminal views can be created behind the
scenes (i.e., without the terminal being visible to the user), we
shouldn't handle focus for the terminal in this case. Removing
`focus_view` from the `new` method has no impact on the existing
terminal focusing logic. I've tested scenarios such as creating new
terminals, splitting terminals, zooming, etc., and everything works as
expected.
2. Currently, on load, docked terminals do not automatically focus when
they are only visible item to the user. This PR implements it.
Before/After:
1. When only the dock terminal is visible on load. Terminal is focused.
<img
src="https://github.com/user-attachments/assets/af8848aa-ccb5-4a3b-b2c6-486e8d588f09"
alt="image" height="280px" />
<img
src="https://github.com/user-attachments/assets/8f76ca2e-de29-4cc0-979b-749b50a00bbd"
alt="image" height="280px" />
2. When other items are visible along with the dock terminal on load.
Editor is focused.
<img
src="https://github.com/user-attachments/assets/d3248272-a75d-4763-9e99-defb8a369b68"
alt="image" height="280px" />
<img
src="https://github.com/user-attachments/assets/fba5184e-1ab2-406c-9669-b141aaf1c32f"
alt="image" height="280px" />
3. Multiple tabs along with split panes. Last terminal is focused.
<img
src="https://github.com/user-attachments/assets/7a10c3cf-8bb3-4b88-aacc-732b678bee19"
alt="image" height="270px" />
<img
src="https://github.com/user-attachments/assets/4d16e98f-9d7a-45f6-8701-d6652e411d3b"
alt="image" height="270px" />
Future:
When a docked terminal is in a zoomed state and Zed is loaded, we should
prioritize focusing on the terminal over the active item (e.g., an
editor) behind it. This hasn't been implemented in this PR because the
zoomed state during the load function is stale. The correct state is
received later via the workspace. I'm still investigating where exactly
this should be handled, so this will be a separate PR.
cc: @SomeoneToIgnore
Release Notes:
- Fixed unresponsive buttons on load until the center pane is clicked.
- Added auto-focus for the docked terminal on load when no other item is
focused.
tims
created
13405ed
Add emacs keybindings for mark emulation (#22904)
Click to expand commit body
These keybindings extend the already selected text. This allows closer
emacs emulation where subsequent movement commands extend / shrink the
current selection instead of dismissing it.
This is a follow up on
- #21927
Release Notes:
- Added emacs movement keybindings that extend/shrink the current
selection
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Ozan
and
Peter Tripp
created
c26553d
Add more metrics for Fireworks Completion Requested (#23062)
Also:
* Adds `impl_internal_actions!` for deriving the `Action` trait without
registering.
* Removes some deserializers that immediately fail in favor of
`#[serde(skip)]` on fields where they were used. This also omits them
from the schema.
Release Notes:
- Keymap settings file now has more JSON schema information to inform
`json-language-server` completions and info, particularly for actions
that take input.
Michael Sloan
created
4c50201
For informational LSP queries log errors instead of notifying in UI (#23040)
Click to expand commit body
I added these notifies in #23011, but in practive have found them to be
overly disruptive. It would definitely be good to do something better
than logging here, but having a sticky error notification is worse. I
think it is still good to notify on mutation failures, so left those in
In particular with rust-analyzer, "Go to definition" and "Find
references" frequently fail with "Content modified" quite a while after
sending the request. Since users are probably used to these operations
being finicky it doesn't seem useful to have a prominent display of
errors for them.
Michael Sloan
created
fb65044
Reuse vtsls logic for completion details display (#23030)
Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/22833,
https://github.com/zed-industries/zed/issues/22267,
https://github.com/zed-industries/zed/issues/22503
Before:


After:

Copies https://github.com/zed-industries/zed/pull/15087 change into
`typescript-language-server`-related label details rendering code.
Release Notes:
- Improved typescript-language-server's completion details rendering
Kirill Bulatov
created
b6b8740
Do not try to activate the terminal panel twice (#23029)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/23023
Fixes terminal pane button opening two terminals on click.
The culprit is in
https://github.com/zed-industries/zed/blob/61115bd04792d87a540558753cd01a6368baba2a/crates/workspace/src/workspace.rs#L2412-L2417
* We cannot get any panel by index from the Dock, only an active one
* Both `dock.activate_panel(panel_index, cx);` and `dock.set_open(true,
cx);` do `active_panel.panel.set_active(true, cx);`
So, follow other pane's impls that have `active: bool` property for this
case, e.g.
https://github.com/zed-industries/zed/blob/3ec52d8451dd1178c4d036da3a71c827df422f4b/crates/assistant/src/inline_assistant.rs#L2687
Release Notes:
- Fixed terminal pane button opening two terminals on click
Kirill Bulatov
created
61115bd
Fix a completions panic when no fuzzy matches + inline completion (#23019)
Click to expand commit body
My mistake in #22977, in the case where the inline completion was not
selected it set the index to 1 assuming there would be following match
entries.
Michael Sloan
created
5785266
Improve doc comments about keybinding order (#23014)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
daaa250
Include display text for LSP commands in errors (#23012)
Click to expand commit body
https://github.com/zed-industries/zed/pull/23011 adds display of errors
in the UI so it's now more important to contextualize these.
Release Notes:
- N/A
Michael Sloan
created
de2e197
Inline `perform_rename_impl` as its only used in one spot (#23013)
Click to expand commit body
Also removes a redundant use of `to_point_utf16`.
Release Notes:
- N/A
Michael Sloan
created
65c38f2
Notify user about LSP errors from editor actions (#23011)
Click to expand commit body
Closes #22976
Release Notes:
* Improved visibility of errors from language servers by reporting them
in the UI when the user invokes an LSP action.
Michael Sloan
created
6bc89eb
docs: Fix "copy" being used instead of "paste" in vim mode documentation (#23010)
Click to expand commit body
It seems the original author intended to write either "`ctrl+c` to copy"
or "`ctrl+v` to paste". Updated to be "`ctrl+v` to paste".
Release Notes:
- N/A
Co-authored-by: Michael Sloan <michael@zed.dev>
Tyler Albee
and
Michael Sloan
created
bda0c67
Add support for rename with language servers that lack prepareRename (#23000)
Click to expand commit body
This adds support for LSPs that use the old rename flow which does not
first ask the LSP for the rename range and check that it is a valid
range to rename.
Closes #16663
Release Notes:
* Fixed rename symbols action when the language server does not have the
capability to prepare renames - such as `luau-lsp`.
Michael Sloan
created
b65dc8c
Fix jank in LSP debug log autoscroll (#22998)
Click to expand commit body
Not sure why scroll was janky with `Autoscroll::newest()`, but this
appears to fix it. Probably better to conditionally do the autoscroll
requests anyway.
Release Notes:
- N/A
Michael Sloan
created
bbbd1e9
LSP debug logs: Default to soft wrap + fold long lines + autoscroll (#22996)
Click to expand commit body
Closes #18737
Release notes:
- Improved LSP debug logs by defaulting to soft wrap and folding a
suffix of long lines. Also adds autoscroll, so if the cursor is on the
last line of the logs they will scroll like `tail`.
Michael Sloan
created
40ecc38
assistant2: Make `ContextStore::insert_*` methods private (#22989)
Click to expand commit body
This PR makes the `insert_*` methods on the `ContextStore` private, to
reduce confusion with the public `add_*` methods.
Release Notes:
- N/A
Marshall Bowers
created
1fcc9b3
zeta: Report Fireworks request data to Snowflake (#22973)
This addresses this comment here:
https://github.com/zed-industries/zed/issues/9648#issuecomment-2579246865
Release Notes:
- Added ability to configure `workingDirectory` when using ESLint.
Example: `{"lsp": {"eslint": {"settings": {"workingDirectory": {"mode":
"auto" }}}}}`
Thorsten Ball
created
05b48e8
zeta: Add tooltip to completion modal list items (#22987)
Click to expand commit body
This is an extra visual aid to make assessing the status of each list
item faster/easier.
<img width="800" alt="Screenshot 2025-01-10 at 7 01 22 PM"
src="https://github.com/user-attachments/assets/4aa712ed-cc70-4ded-afab-e7ceda535ec0"
/>
Release Notes:
- N/A
- Move function queries under constant queries to avoid uppercase
functions highlighted as constants
- Merge keywords and remove duplicates
- Highlights type aliases on import
- Highlights literal built-in types (null, undefined, true, false) as
`@type.builtin`
Confused about case-based queries, should they be rewritten?
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
狐狸
and
Marshall Bowers
created
1e0ded4
zeta: Show keybinding in completion rating buttons in review modal (#22985)
Click to expand commit body
This PR also removes the `ThumbsUp` action that wasn't being triggered
correctly. We didn't have it's counterpart `ThumbsDown`, too, so I
mostly assumed it would be harmless to remove `ThumbsUp` as well.
<img width="800" alt="Screenshot 2025-01-10 at 6 18 44 PM"
src="https://github.com/user-attachments/assets/9fd5da9f-9dff-454d-9f31-c02f1370b937"
/>
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR inlines the `read` calls on models in a few spots.
Release Notes:
- N/A
Marshall Bowers
created
0f1c2a8
ci: Install `cargo-nextest` with `--locked` (#22984)
Click to expand commit body
This PR makes it so we install `cargo-nextest` with `cargo install
cargo-nextest --locked` in CI.
According to the
[docs](https://nexte.st/docs/installation/from-source/), this is the
**only** supported way to install `cargo-nextest` when building from
source.
Release Notes:
- N/A
Marshall Bowers
created
80cc1f1
assistant2: Hide the status bar icon when disabled via the settings (#22981)
Click to expand commit body
This PR makes it so the status bar icon for Assistant2 is hidden when it
is disabled via the settings.
Release Notes:
- N/A
This PR removes some unneeded `#[allow(unused)]`s from the context types
in Assistant2.
We're using these fields now, so we no longer need to suppress the
unused lint.
Release Notes:
- N/A
Marshall Bowers
created
fe3d409
If completions menu is already displayed, don't select inline completion (#22977)
Click to expand commit body
Before this change, inline completion would displace the user's
selection. Unfortunately this brings less visibility to the inline
completion, I think a good solution to this will be to display a chunk
of the completion inline in the menu, and have a WIP change for that.
Since the current behavior is frustrating, not blocking this improvement
on that
Release Notes:
- N/A
Michael Sloan
created
c74ad61
emacs: Add as Transpose Characters (editor::Transpose) (#22974)
Click to expand commit body
Originally reported here:
-
https://github.com/zed-industries/zed/issues/4856#issuecomment-2578468329
macOS default vscode keymap already has this:
https://github.com/zed-industries/zed/blob/8d42456b8a7c547c6760b604c24d902bd2e12b8b/assets/keymaps/default-macos.json#L55
But it's disabled on Linux default vscode keymap as VSCode has this bind
instead:
https://github.com/zed-industries/zed/blob/8d42456b8a7c547c6760b604c24d902bd2e12b8b/assets/keymaps/default-linux.json#L407
Explicitly add it to both emacs keymaps so we can keep them identical
between macos/linux as long as possible.
Release Notes:
- emacs: Add support for `ctrl-t` transposing characters on Linux
This pull request adds the missing `brackets.scm` for the C#-extension.
Release Notes:
- N/A
Finn Evers
created
4c7b72b
Clarify guests vs collaborators in project sharing docs (#22945)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
3795963
emacs: Fix emacs in embedded terminal on Linux too (#22969)
Click to expand commit body
- Follow-up to #22779 (accidentially did macos only)
- Follow-up to: https://github.com/zed-industries/zed/pull/22590
Release Notes:
- N/A
Peter Tripp
created
b74cb92
docs: Fix missing } in multiple formatters example (#22964)
Click to expand commit body
Add a missing } in the multiple formatters example in the configuring
Zed section of the manual.
Release Notes:
- Fixed a missing } in the multiple formatters doc example
Changing it from "Open File" to "Active Tab" instead.
<img width="800" alt="Screenshot 2025-01-10 at 11 09 54 AM"
src="https://github.com/user-attachments/assets/534e94a4-df61-41d4-ad50-514ab9a87e4e"
/>
Release Notes:
- N/A
Danilo Leal
created
5310e33
assistant2: Fix context strip context popover position in relation to trigger (#22966)
Click to expand commit body
Little visual adjustment here.
| Before | After |
|--------|--------|
| <img width="1336" alt="Screenshot 2025-01-10 at 11 08 06 AM"
src="https://github.com/user-attachments/assets/268c6df6-fdb2-4a1c-b3b8-d6a39b93b206"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 06 17 AM"
src="https://github.com/user-attachments/assets/fb53feef-9ae4-489b-9d12-bd50b349afc1"
/> |
Release Notes:
- N/A
Danilo Leal
created
9248458
assistant2: Change model selector keybinding and make it visible (#22965)
Click to expand commit body
We weren't showing the keybinding in none of the places where the model
selector was visible. Also, I took advantage of the opportunity to
change the keybinding for two reasons:
1. `cmd-shift-m` caused conflict if on an editor (inline assistant case)
2. `cmd-opt-/` is the one Cursor uses; so consistency with something
that might be already consolidated sounds like a low-hanging fruit
| Editor Inline Assist | Terminal Inline Assist | Assistant Panel |
|--------|--------|--------|
| <img width="1336" alt="Screenshot 2025-01-10 at 11 01 24 AM"
src="https://github.com/user-attachments/assets/0782f217-025f-4bc0-b2fa-64b3524c968b"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 29 AM"
src="https://github.com/user-attachments/assets/d05a3b5c-33fd-4593-b1d8-aa9944de816a"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 33 AM"
src="https://github.com/user-attachments/assets/8cb075e7-ccde-46f5-aa05-d20a9d42b286"
/> |
Release Notes:
- N/A