Change the "Apply" and "Discard" buttons to match @danilo-leal's design!
Here are some different states:
### Cursor in the first hunk
Now that the cursor is in a particular hunk, we show the "Apply" and
"Discard" names, and the keyboard shortcut. If I press the keyboard
shortcut, it will only apply to this hunk.
<img width="759" alt="Screenshot 2024-11-23 at 10 54 45 PM"
src="https://github.com/user-attachments/assets/68e0f109-9493-4ca2-a99c-dfcbb4d1ce0c">
### Cursor in the second hunk
Moving the cursor to a different hunk changes which buttons get the
keyboard shortcut treatment. Now the keyboard shortcut is shown next to
the hunk that will actually be affected if you press that shortcut.
<img width="749" alt="Screenshot 2024-11-23 at 10 56 27 PM"
src="https://github.com/user-attachments/assets/59c2ace3-6972-4a60-b806-f45e8c25eaae">
Release Notes:
- Restyled Apply/Discard buttons
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Fix cmd-pipe
Remove redudnant jetbrains/sublime keybinds (these exist as `cmd-{` and `cmd-}` under default vscode keymap) and were broken as part of the recent keybind changes.
Remove excess JSON whitespace from tests to make them more readable.
Follow-up of https://github.com/zed-industries/zed/pull/21173
Rust-analyzer with `checkOnSave` enabled will push diagnostics for a
file after each diagnostics refresh (e.g. save, file open, file close).
If there's a file that is not open in any pane and has only warnings,
and the diagnostics editor has warnings toggled off, then
0. rust-analyzer will push the corresponding warnings after initial load
1. the diagnostics editor code registers
`project::Event::DiagnosticsUpdated` for the corresponding file path and
opens the corresponding buffer to read its associated diagnostics from
the snapshot
2. opening the buffer would send `textDocument/didOpen` which would
trigger rust-analyzer to push the same diagnostics
3. meanwhile, the diagnostics editor would filter out all diagnostics
for that buffer, dropping the open buffer and effectively closing it
4. closing the buffer will send `textDocument/didClose` which would
trigger rust-analyzer to push the same diagnostics again, as those are
`cargo check` ones, still present in the file
5. GOTO 1
Release Notes:
- Fixed diagnostics editor not scrolling properly under certain
conditions
This PR restructures the storage of the tool uses and results in
`assistant2` so that they don't live on the individual messages.
It also introduces a `LanguageModelToolUseId` newtype for better type
safety.
Release Notes:
- N/A
This PR adds rudimentary support for using tools to `assistant2`. There
are currently no visual affordances for tool use.
This is gated behind the `assistant-tool-use` feature flag.
<img width="1079" alt="Screenshot 2024-11-25 at 7 21 31 PM"
src="https://github.com/user-attachments/assets/64d6ca29-c592-4474-8e9d-c344f855bc63">
Release Notes:
- N/A
This PR factors the tool definitions out of the `assistant` crate so
that they can be shared between `assistant` and `assistant2`.
`ToolWorkingSet` now lives in `assistant_tool`. The tool definitions
themselves live in `assistant_tools`, with the exception of the
`ContextServerTool`, which has been moved to the `context_server` crate.
As part of this refactoring I needed to extract the
`ContextServerSettings` to a separate `context_server_settings` crate so
that the `extension_host`—which is referenced by the `remote_server`—can
name the `ContextServerSettings` type without pulling in some undesired
dependencies.
Release Notes:
- N/A
This PR makes it so previous messages in the thread are included when
constructing the completion request, instead of only sending up the most
recent user message.
Release Notes:
- N/A
This is a pure refactor, motivated by wanting to introduce to the
BufferStore new logic for opening staged and committed changes.
I found the `BufferStoreImpl` trait a little bit confusing, particularly
how the different implementors of the trait held a handle back to the
owning buffer store. I was able to reduce the amount of code
considerably (-78 lines) by using a two-variant enum instead, similar to
what we do for `LspStore`, `WorktreeStore` and `Worktree`.
Release Notes:
- N/A
This reverts #20824 and #20899. After adding them last week we came to
the conclusion that the hints are too distracting in everyday use, see
#21128 for more details.
Release Notes:
- N/A
Fixes a bug with terminal splits panicking during writing a command in
the command input
Release Notes:
- N/A
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
@bennetbo @as-cii @mrnugget I'm really not liking the hints about AI on
every line. It feels too distracting to me and damaging to the user
experience. I'm wondering if we can hide them and work with design for
other ideas. Or at least talk it through.
Release Notes:
- N/A
This needs scrutinized. Detailed breakdown of what events I kept and
threw out here:
https://zed.dev/channel/app-events-17178/notes
I also removed a few fake events and tossed out json properties that
were being inserted for things we don't have logic to track. See PR
review comments below.
I think the only bad data we have are that we were identifying all node,
pnpm, and yarn projects as 'node' in the `project_type` property, so a
few days of lost data there.
Release Notes:
- N/A
This PR factors the language model selector out into its own
`language_model_selector` crate so that it can be reused in
`assistant2`.
Also renamed it from `ModelSelector` to `LanguageModelSelector` to be a
bit more specific.
Release Notes:
- N/A
This PR breaks ground on a new `assistant2` crate.
In order to see this new version of the assistant, both of the following
must be true:
1. The `assistant2` feature flag is enabled for your user
- It is **not** currently enabled for all staff.
2. You are running a development build of Zed
The intent here is to enable the folks working on `assistant2` to
incrementally land work onto `main` without breaking use of the current
Assistant for anyone.
<img width="1136" alt="Screenshot 2024-11-23 at 10 46 08 AM"
src="https://github.com/user-attachments/assets/5723a13f-5be1-4486-9460-ead7329ba78e">
Release Notes:
- N/A
Fixes docs to reflect that Protobuf support is via extension.
Comment out references ProtoLS formatter.
Need to test both protols and protobuf-language-server to ensure both work.
Closes https://github.com/zed-industries/zed/issues/21077
* BREAKING: rename `file_finder::OpenMenu` into
`file_finder::ToggleMenu`
* Display the keybinding for menu toggling when the menu is open
* Fix `enter` not working in the menu
Release Notes:
- Fixed enter not working and menu toggle binding not shown in the file
finder menu
This PR overhauls extension registration in order to make it more
modular.
The `extension` crate now contains an `ExtensionHostProxy` that can be
used to register various proxies that the extension host can use to
interact with the rest of the system.
There are now a number of different proxy traits representing the
various pieces of functionality that can be provided by an extension.
The respective crates that provide this functionality can implement
their corresponding proxy trait in order to register a proxy that the
extension host will use to register the bits of functionality provided
by the extension.
Release Notes:
- N/A
* Fixes registration of event handler for xinput-2 device changes,
revealed by this improvement.
* Pushes `.unwrap()` panic-ing outwards to callers.
* Includes a description of what the X11 call was doing when a failure
was encountered.
* Fixes a variety of places where the X11 reply wasn't being inspected
for failures.
* Destroys windows on failure during setup. New structure makes it
possible for the caller of `open_window` to carry on despite failures,
and so partially initialized window should be removed (though all calls
I looked at also panic currently).
Considered pushing this through `linux/x11/client.rs` too but figured
it'd be nice to minimize merge conflicts with #20853.
Release Notes:
- N/A
Closes#20593
Release Notes:
- Fixed a bug where it is possible to get in near-unrecoverable panel
state by resizing the panel past the edge of the workspace.
Co-authored-by: Trace <violet.white.batt@gmail.com>
Closes#20739
The JSON LSP adapter now merges user settings with cached settings, and
util::merge_json_value_into pushes array contents from source to target.
Closes https://github.com/zed-industries/zed/issues/13246
Supersedes: https://github.com/zed-industries/zed/pull/16192
I couldn't push to the git fork this user was using, so here's the exact
same PR but with some style nits implemented.
Release Notes:
- Added image rendering to the Markdown preview
---------
Co-authored-by: dovakin0007 <dovakin0007@gmail.com>
Co-authored-by: dovakin0007 <73059450+dovakin0007@users.noreply.github.com>
Fix for getting File exists "os error 17" with `"use_system_path_prompts": false,`
This was reproducible when the first worktree is a non-folder worktree
(e.g. setting.json) so we were trying to create the new file with a path
under ~/.config/zed/settings.json/newfile.ext
Co-authored-by: Conrad Irwin <conrad@zed.dev>
The goal is to be able to hide these lines from a task output:
```sh
⏵ Task `...` finished successfully
⏵ Command: ...
```
---------
Co-authored-by: Peter Tripp <peter@zed.dev>