This commit refactors the interaction between the diagnostics editors
(`BufferDiagnosticsEditor` and `ProjectDiagnosticsEditor`) so that,
instead of passing an optional enum to the `ToolbarControls` struct, as
well as the `DiagnosticBlock`, we pass a reference to a type that
implements a new trait, `DiagnosticsToolbarEditor`, which defines the
methods that the toolbar controls needs, namely:
- `include_warnings`
- `toggle_warnings`
- `has_stale_excerpts`
- `is_updating`
- `stop_updating`
- `refresh_diagnostics`
- `get_diagnostics_for_buffer`
This makes it so that both `ToolbarControls` and `DiagnosticBlock`
implementations don't need to be aware of the internal details of each
of the editors, as well as avoiding duplicating the
`DiagnosticsEditorHandle` enum.
Update the `diagnostics::diagnostics_tests` module with three new tests
for the `BufferDiagnosticsEditor` view:
- `test_buffer_diagnostics` - Asserts that the `BufferDiagnosticsEditor`
displays diagnostics only for the provided project path, ignoring other
paths with diagnostics.
- `test_buffer_diagnostics_without_warnings` - Asserts that if
`include_warnings` is `false`, the `BufferDiagnosticsEditor` displays
only errors in the editor, without showing warnings.
- `test_buffer_diagnostics_multiple_servers` - Asserts that if the
project path has multiple diagnostics for different language servers,
all diagnostics are shown and included in the summary.
Additionally, the
`project::lsp_store::LspStore.diagnostic_summary_for_path` method has
been updated to return the total count of warnings and errors across all
language servers for the provided path, rather than just the first
language server. This change aligns it with the behavior when
diagnostics are displayed, as all language servers are considered.
This commit also updates the `BufferDiagnosticsEditor::deploy` function
in order to fetch the buffer directly from the active editor and provide
it to `BufferDiagnosticsEditor::new`. This avoids having to spawn the
background task that would open the buffer and update the
`BufferDiagnosticsEditor.buffer` field.
Introduce a new diagnostics view, `BufferDiagnosticsEditor`, which
allows users to view the diagnostics for the currently open file. A new
action has also been introduced so users can deploy this view from the
command palette, `diagnostics: deploy current file`.
This view is very similar in behaviour to `ProjectDiagnosticsEditor`,
but it was worth noting that, while `ProjectDiagnosticsEditor` reads and
writes to the global `IncludeWarnings` setting,
`BufferDiagnosticsEditor` only reads its value when first being created,
otherwise it keeps its own `include_warnings` state so as to not affect
the `ProjectDiagnosticsEditor` or other `BufferDiagnosticsEditor`
entities.
A new method was introduced to make it easier to retrieve the diagnostic
summary for a specific path rather for all paths,
`project::lsp_store::LspStore.diagnostic_summary_for_path`, seeing as
`BufferDiagnosticsEditor` only needs to display the summary for a single
path.
Closes https://github.com/zed-industries/zed/issues/29746
| Action | New Key | Old Key | Former Conflict |
| - | - | - | - |
| `edit_prediction::ToggleMenu` | `ctrl-alt-shift-i` | `ctrl-shift-i` |
`editor::Format` |
| `editor::ToggleEditPrediction` | `ctrl-alt-shift-e` | `ctrl-shift-e` |
`project_panel::ToggleFocus` |
These aren't great keys and I'm open to alternate suggestions, but the
will work out of the box without conflict.
Release Notes:
- N/A
Previously, we wouldn't finalize the diff if an error occurred during
editing or the tool call was canceled.
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Closes #ISSUE
Release Notes:
- The environment of original remote dev cannot be changed without sudo
because of the behavior of "sh -c". This PR changes "sh -c" to "sh -lc"
to let the shell source $HOME/.profile and support customized
environment like customized $PATH variable.
Related #4642
Compatible with #34136
Release Notes:
- Helix: `Shift+R` works as Paste instead of taking you to ReplaceMode
- Helix: `g .` goes to last modification place (similar to `. in vim)
Closes#33736
Use `thiserror` to implement error stack and `anyhow` to report is to
user.
Also move some code from main to remote_server to have better crate
isolation.
Release Notes:
- N/A
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Support to show diagnostics on the tab switcher in the same way they are
displayed on the tab bar. This follows the setting
`tabs.show_diagnostics`.
This will improve user experience when disabling the tab bar and still
being able to see the diagnostics when switching tabs
Preview:
<img width="768" height="523" alt="Screenshot From 2025-07-16 11-02-42"
src="https://github.com/user-attachments/assets/308873ba-0458-485d-ae05-0de7c1cdfb28"
/>
Release Notes:
- Added diagnostics indicators to the tab switcher
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Adds support for per-session prompt capabilities and capability changes
on the Zed side (ACP itself still only has per-connection static
capabilities for now), and uses it to reflect image support accurately
in 1PA threads based on the currently-selected model.
Release Notes:
- N/A
Reverts zed-industries/zed#36012
We thought we didn't need this UI, but it turns out it was load bearing
:)
Release Notes:
- Restored the zoomed panel padding
As of
db52fc3655,
the Kotlin extension has two language servers. However, following that
change, no default language server for Kotlin was configured within this
repo, which led to two language servers being activated for Kotlin by
default.
This PR makes `kotlin-language-server` the default language server for
the extension. This also ensures that the [documentation within the
repository](https://github.com/zed-extensions/kotlin?tab=readme-ov-file#kotlin-lsp)
matches what is actually the case.
Release Notes:
- kotlin: Made `kotlin-language-server` the default language server.
Using prompt injection, the agent may be tricked into making a fetch
request that includes unexpected data from the conversation in the URL.
As agent conversations may contain sensitive information (like private
code, or
potentially even API keys), this seems bad.
The easiest way to prevent this is to require the user to look at the
URL
before the model is allowed to fetch it.
Thanks to @ant4g0nist for bringing this to our attention.
Release Notes:
- agent panel: The fetch tool now requires confirmation.
A beta user reported that following was "lost" when asking for
confirmation, I
suspect they moved their cursor in the agent file while reviewing the
change.
Now we will resume following when the agent starts up again.
Release Notes:
- N/A
In the thread view, when focusing on the user message, we display the
editing control container absolutely-positioned in the top right.
However, if there are no rules items and no restore checkpoint button
_and_ it is the very first message, the editing controls container would
be cut-off. This PR fixes that by giving it a bit more top padding.
Release Notes:
- N/A
We were rendering a Markdown link like `[Read file x.rs (lines
Y-Z)](@selection)` while the tool ran, but then switching to just `x.rs`
as soon as we got the file location from the tool call (due to an
if/else in the UI code that applies to all tools). This caused a
flicker, which is fixed by having `initial_title` return just the
filename from the input as it arrives instead of a link that we're going
to stop rendering almost immediately anyway.
Release Notes:
- N/A