This PR makes the plus icon button not a dropdown anymore, freeing it up
to be always the new thread action. In consequence, I'm moving all of
the other items into another dropdown, which now houses "new prompt
editor", history, and settings, all of which there are keybindings for.
<img
src="https://github.com/user-attachments/assets/1d0d43da-9447-4218-8b9b-e692c0b74f61"
width="700"/>
Release Notes:
- N/A
This PR switches us back to the upstream `cargo_metadata`.
We had switched to a fork in #27126, but this shouldn't be necessary
after #27117.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/11626
Part of https://github.com/zed-industries/zed/issues/12853
`"restore_on_file_reopen": true` in workspace settings can now be used
to enable and disable editor data between file reopens in the same pane:
https://github.com/user-attachments/assets/8d938ee1-d854-42a8-bbc3-2a4e4d7d5933
The settings are generic and panes' data store can be extended for
further entities, beyond editors.
---------------
Impl details:
Currently, the project entry IDs seem to be stable across file reopens,
unlike BufferIds, so those were used.
Originally, the DB data was considered over in-memory one as editors
serialize their state anyway, but managing and exposing PaneIds out of
the DB is quite tedious and joining the DB data otherwise is not
possible.
Release Notes:
- Started to restore editor state on reopen
While building my own application using GPUI, I found that the `key_up`
event doesn't fire on Windows or macOS, with each platform failing for
different reasons. These events aren't used anywhere in Zed yet, so it
makes sense that the issue hasn't already been caught.
I don't have a Linux machine set up right now, so I don't know if these
events fire correctly on Linux or not.
---
Without this fix, a simple layout like the following:
```rust
div()
.on_key_down(cx.listener(|_, event, _, _| println!("Key down: {:?}", event)))
.on_key_up(cx.listener(|_, event, _, _| println!("Key up: {:?}", event)));
```
...would result in the following logs if the 'a' key was pressed:
```text
Key down: KeyDownEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: Some("a") }, is_held: false }
<eof>
```
With this fix, the `key_up` event fires correctly, resulting in the
following logs:
```text
Key down: KeyDownEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: Some("a") }, is_held: false }
Key up: KeyUpEvent { keystroke: Keystroke { modifiers: Modifiers { control: false, alt: false, shift: false, platform: false, function: false }, key: "a", key_char: None } }
<eof>
```
---
I've made the assumption that the `key_char` field shouldn't be set on
the `key_up` event since, unlike the `key_down` event, it's not an event
that may produce a character.
Happy to make any changes to this PR as required. If it would be
preferable to test this on Linux as well before it's merged, let me know
and I'll sort something out.
Hopefully this makes the experience of building new applications on GPUI
smoother, and potentially saves the Zed team some time if this event is
ever used in the future.
Release Notes:
- N/A
Implement the From trait for some simple conversations between Clipboard
related structs.
This PR only adds the From trait implementations and doesn't touch any
code. In a future PR we can simplify usage throughout the codebase, such
as:
```rust
// impl ClipboardString
fn new(text: String) -> Self {
Self::from(text)
}
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
When a file is deleted outside of Zed, but it doesn't have any unsaved
changes, it shouldn't be considered "dirty" (prompting you before you
close it).
Release Notes:
- Fixed an bug where unchanged buffers were marked as conflicting if
their files were deleted outside of Zed.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Closes#27385
Builds on #27604 so that `vim::OtherEnd` works in visual block mode.
This is accomplished by reversing the order of active selections in the
buffer when the user hit `o`, so that the cursor moves diagonally across
the selection. The current behavior is preserved for `shift-o`, which is
how the cursors behave in vim.
We'll close#27604 since this encapsulates that change, but if you'd
prefer to take only the visual block motion component, we'll keep the
branch for #27604 open.
Test case: growing a box down and to the right, other ending, followed
by growing and shrinking the box:
https://github.com/user-attachments/assets/1df544e1-efce-4354-b354-bbfec007a7df
Test case: growing a box up and to the left, other ending, followed by
growing and shrinking the box:
https://github.com/user-attachments/assets/2f6d7729-c63a-4486-960b-23474c2e507a
Release Notes:
- Improved visual block mode when cursor is at beginning of selection
- Improved visual block mode so that `o` and `shift-o` reach parity with
vim
---------
Co-authored-by: KyleBarton <kjbarton4@gmail.com>
Fixes running git push on a coder instance.
Closes #ISSUE
Release Notes:
- Zed will now use `GIT_ASKPASS` if you already have one set instead of
overriding with our own. Fixes `git push` in Coder.
This PR switches collab over to start minting access tokens using the
new OAEP-based encryption format.
This is a follow-up to #15058 where we added support for this new
encryption format.
Clients that are newer than 8 months ago should be able to decrypt the
new access tokens. It is only clients older than 8 months ago that will
no longer be supported.
Release Notes:
- N/A
This fixes trashing files from the git panel on SSH remotes that don't
run a Desktop environment.
Release Notes:
- Fix trash to work on remotes with no desktop environment configured
This PR does three things
- Right clicking within the gutter outside of the gutter fold area
bounds opens a breakpoint context menu
- Disabled breakpoints are now outline with the debugger accent color
instead of being fully colored at half opacity
- Clicking a breakpoint acts differently now
- Clicking a breakpoint while holding the platform modifier key will
disable/enable it
- Clicking a breakpoint hint while holding the platform modifier key
will set a disabled breakpoint
- Clicking a disabled breakpoint will enable it instead of deleting it
Release Notes:
- N/A
This PR removes an unneeded anonymous lifetime from the `cx` parameter
to `Render::render`.
This makes it so the anonymous lifetime doesn't show up when
implementing the `Render` trait via a code action:
#### Before
```rs
struct Foo;
impl Render for Foo {
fn render(&mut self, window: &mut Window, cx: &mut Context<'_, Self>) -> impl IntoElement {
todo!()
}
}
```
#### After
```rs
struct Foo;
impl Render for Foo {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
todo!()
}
}
```
Release Notes:
- N/A
Swift bindings BEGONE
Release Notes:
- Switched from using the Swift LiveKit bindings, to the Rust bindings,
fixing https://github.com/zed-industries/zed/issues/9396, a crash when
leaving a collaboration session, and making Zed easier to build.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Michael Sloan <michael@zed.dev>
This caused undesirable and unnecessary scrolling, in that if you scroll
up, then as new messages stream into the panel, they jump the scroll bar
back down.
@agu-z and I paired on this and we think this is unnecessary now that we
don't see the Edit button in the UI, but @bennetbo we still see code for
the button in there, so...maybe we do still want this? (If so, we can
revert the second commit and go back to a more conditional way of
scrolling. 😄)
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
This is a fix for this error when trying to run `auto_height_editor`
story:
```sh
thread 'main' panicked at C:\Users\x\dev\zed\crates\settings\src\settings_store.rs:363:32:
unregistered setting type workspace::workspace_settings::WorkspaceSettings
```
Release Notes:
- N/A
This PR adds two more cases to existing LSP completion cases.
- When text_edit exists: (New test)
1. we use text_edit, over insert_text and label
- When edit range exists (and text_edit is None): (New test)
1. insert_text is used over label if exists
2. label is used otherwise
- When not edit range exists (and text_edit is None): (Existing test)
1. insert_text is used over label if exists
2. label is used otherwise
Release Notes:
- N/A
Closes#18153
When calling `uninstall_extension`, the `work_dir` associated with this
`extension` doesn't have its corresponding `FileHandle` properly closed,
preventing the deletion of the `work_dir`. As seen in the image below,
after installing the `toml` extension, `zed.exe` holds two `Handle`s for
the folder `C:\Users\36477\AppData\Local\Zed\extensions\work\toml`.

Therefore, after deleting `extension_dir` and then calling
`this.update(...)`, `zed.exe` releases these two `Handles`, and only
then can the folder
`C:\Users\36477\AppData\Local\Zed\extensions\work\toml` be deleted. See
the corresponding file handles are closed after calling
`this.update(...)`:

However, if there is a running server of the extension, the error will
persist. At this point, I haven’t found a direct way to terminate all
running servers of the extension. Since this feature might affect the
`LspStore` structure, I paused my work here.
See when `toml` extension is running, we can not delete
`C:\Users\36477\AppData\Local\Zed\extensions\work\toml` since
`C:\Users\36477\AppData\Local\Zed\extensions\work\toml\taplo.exe` is
still running:

cc @ConradIrwin You're the expert in this area—what are your thoughts?
Release Notes:
- N/A
This PR removes the `ZedAssistant2` icon.
I went to use it as a placeholder icon, but noticed that the icon wasn't
loaded properly due to a name mismatch.
However, since we aren't using it anywhere I'm opting to remove it.
Release Notes:
- N/A
This PR fixes an issue where we were looking for context server project
settings in _all_ worktrees, not just visible ones.
This meant that if you had a single file worktree open (e.g.,
`settings.json`) this could impact whether context servers defined in
project settings would load.
Release Notes:
- Fixed an issue where context servers defined in project settings would
not be respected in some scenarios.
Co-authored-by: Wilhelm Klopp <wil.klopp@gmail.com>
This is a clean-up PR in anticipation of introduction of Debugger
Registry. I wanna get rid of DebugAdapterKind (or rather, it being an
enum).
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>