Commit Graph

25690 Commits

Author SHA1 Message Date
Jakub Konka
637296ce6e git_panel: Removing offending notify 2025-11-13 17:15:12 +01:00
Jakub Konka
90710b91c5 git_panel: Clean up a little 2025-11-12 23:14:18 +01:00
Jakub Konka
53f1fd5a27 git_panel: Debugging flickers 2025-11-12 19:21:05 +01:00
Joseph T. Lyons
e98de8c7ca v0.212.x stable 2025-11-12 10:15:09 -05:00
zed-zippy[bot]
fbd98c1fdc agent_servers: Fix panic when setting default mode (#42452) (cherry-pick to preview) (#42455)
Cherry-pick of #42452 to preview

----
Closes ZED-35A

Release Notes:

- Fixed an issue where Zed would panic when trying to set the default
mode for ACP agents

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2025-11-11 17:12:44 +01:00
zed-zippy[bot]
50b491b360 gpui: Do not panic when unable to find the selected fonts (#42212) (cherry-pick to preview) (#42456)
Cherry-pick of #42212 to preview

----
Fixes ZED-329

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-11 16:44:51 +01:00
zed-zippy[bot]
9dab0e5f9b remote: Add more context to error logging in wsl (#42450) (cherry-pick to preview) (#42451)
Cherry-pick of #42450 to preview

----
cc https://github.com/zed-industries/zed/issues/40892

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-11 15:20:50 +00:00
zed-zippy[bot]
b0c8952b0c gpui: Fix invalid unwrap in windows window creation (#42426) (cherry-pick to preview) (#42429)
Cherry-pick of #42426 to preview

----
Fixes ZED-34M

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-11 12:18:48 +01:00
zed-zippy[bot]
47bdf9f026 terminal: Spawn terminal process on main thread on macos again (#42411) (cherry-pick to preview) (#42413)
Cherry-pick of #42411 to preview

----
Closes https://github.com/zed-industries/zed/issues/42365, follow up to
https://github.com/zed-industries/zed/pull/42234

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-11 11:57:24 +01:00
zed-zippy[bot]
02cc7765f9 diagnostics: Fix panic due non-sorted diagnostics excerpt ranges (#42416) (cherry-pick to preview) (#42419)
Cherry-pick of #42416 to preview

----
Fixes ZED-356

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>

Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-11-11 10:36:06 +00:00
zed-zippy[bot]
07ffb17991 remote: Flush to stdin when writing to sftp (#42103) (cherry-pick to preview) (#42361)
Cherry-pick of #42103 to preview

----

https://github.com/zed-industries/zed/issues/42027#issuecomment-3497210172

Release Notes:

- Fixed ssh remoting potentially failing due to not flushing stdin to
sftp

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-10 21:34:08 +00:00
Zed Bot
f7dac91680 Bump to 0.212.3 for @bennetbo 2025-11-10 16:35:26 +00:00
zed-zippy[bot]
5a8a80a956 diagnostics: Keep diagnostic excerpt ranges properly ordered (#42298) (cherry-pick to preview) (#42300)
Cherry-pick of #42298 to preview

----
Fixes ZED-2CQ

We were doing the binary search by buffer points, but due to await
points within this function we could end up mixing points of differing
buffer versions.

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-10 14:37:03 +00:00
zed-zippy[bot]
0c64f5185f acp: Fix issue with mentions when embedded_context is set to false (#42260) (cherry-pick to preview) (#42320)
Cherry-pick of #42260 to preview

----
Release Notes:

- acp: Fixed an issue where Zed would not respect
`PromptCapabilities::embedded_context`

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2025-11-10 09:14:19 +00:00
zed-zippy[bot]
56bf1e09f7 agent_ui: Always allow to include symbols (#42261) (cherry-pick to preview) (#42321)
Cherry-pick of #42261 to preview

----
We can always include symbols, since we either include a ResourceLink to
the symbol (when `PromptCapabilities::embedded_context = false`) or a
Resource (when `PromptCapabilities::embedded_context = true`)

Release Notes:

- Fixed an issue where symbols could not be included when using specific
ACP agents

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2025-11-10 08:16:21 +00:00
zed-zippy[bot]
1ce5974917 Fix crash during drag-and-drop on Windows (#42227) (cherry-pick to preview) (#42301)
Cherry-pick of #42227 to preview

----
The HGLOBAL is itself the HDROP. Do not dereference it.

Release Notes:

- windows: Fixed crashes during drag-and-drop operations

Co-authored-by: John Tur <john-tur@outlook.com>
2025-11-09 11:29:39 +00:00
zed-zippy[bot]
db7d11e879 terminal: Spawn terminal process on main thread on unix (#42234) (cherry-pick to preview) (#42236)
Cherry-pick of #42234 to preview

----
Otherwise the terminal will not process the signals correctly 

Release Notes:

- Fixed ctrl+c and friends not working in the terminal on macOS and
linux

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 21:08:56 +00:00
Joseph T. Lyons
c70617c69e zed 0.212.2 2025-11-07 11:25:35 -05:00
zed-zippy[bot]
17afd49adb settings_ui: Use any open workspace window when opening settings links (#42106) (cherry-pick to preview) (#42196)
Cherry-pick of #42106 to preview

----
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-11-07 09:49:54 -05:00
zed-zippy[bot]
6984c9b459 workspace: Do not panic when the database is corruped (#42186) (cherry-pick to preview) (#42189)
Cherry-pick of #42186 to preview

----
Fixes ZED-1NK

Release Notes:

- Fixed zed not starting when the database cannot be loaded

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 13:22:52 +00:00
Lukas Wirth
577467bed8 agent_ui: Do not show Codex wsl warning on wsl take 2 (#42096)
https://github.com/zed-industries/zed/pull/42079#discussion_r2498472887

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 13:30:38 +01:00
Lukas Wirth
18ddbc044f agent_ui: Do not show Codex wsl warning on wsl (#42079)
Release Notes:

- Fixed the codex wsl warning being shown on wsl itself
2025-11-07 13:30:30 +01:00
Lukas Wirth
5e1da57f25 remote: Fix detect_can_exec detection (#42087)
Closes https://github.com/zed-industries/zed/issues/42036

Release Notes:

- Fixed an issuer with wsl exec detection eagerly failing, breaking
remote connections
2025-11-07 13:30:21 +01:00
Lukas Wirth
4bee58f70e util: Fix shell environment fetching with cmd (#42093)
Release Notes:

- Fixed shell environment fetching failing when having `cmd` configured
as terminal shell
2025-11-07 13:30:11 +01:00
Lukas Wirth
7eda0cd996 zlog: Add env var to enable line number logging (#41905)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-11-07 13:29:37 +01:00
zed-zippy[bot]
c21c47e8ef remote: Flush to stdin when writing to sftp 2 (#42126) (cherry-pick to preview) (#42187)
Cherry-pick of #42126 to preview

----
https://github.com/zed-industries/zed/pull/42103#issuecomment-3498137130

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 13:28:41 +01:00
zed-zippy[bot]
92142fc2b2 diagnostics: Fix diagnostics view no clearing blocks correctly (#42179) (cherry-pick to preview) (#42181)
Cherry-pick of #42179 to preview

----
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 11:25:39 +00:00
zed-zippy[bot]
ed0121dc3a project: Remove unnecessary panic (#42167) (cherry-pick to preview) (#42168)
Cherry-pick of #42167 to preview

----
If we are in a remote session with the remote dropped, this path is very
much reachable if the call to this function got queued up in a task.

Fixes ZED-124

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-11-07 07:07:06 +00:00
Zed Bot
3aeeed0b30 Bump to 0.212.1 for @smitbarmase 2025-11-06 15:03:25 +00:00
Smit Barmase
7e6cdabb26 language: Fix completion menu no longer prioritizes relevant items for Typescript and Python (#42065)
Closes #41672

Regressed in https://github.com/zed-industries/zed/pull/40242

Release Notes:

- Fixed issue where completion menu no longer prioritizes relevant items
for TypeScript and Python.
2025-11-06 13:37:37 +05:30
Richard Feldman
f91f3f24ef Run ACP login from same cwd as agent server (#42038)
This makes it possible to do login via things like `cmd: "node", args:
["my-node-file.js", "login"]`

Also, that command will now use Zed's managed `node` instance.

Release Notes:

- ACP extensions can now run terminal login commands using relative
paths
2025-11-06 08:08:30 +01:00
Danilo Leal
4ebc20b30c agent_ui: Fix how icons from external agents are displayed (#42034)
Release Notes:

- N/A
2025-11-06 08:08:09 +01:00
Danilo Leal
ac6aa735e4 gpui: Add support for rendering SVG from external files (#42024)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-11-06 08:07:31 +01:00
John Tur
418d850375 Fix corrupted characters being inserted when Alt is pressed (#42033)
The Alt+Numpad buffer that's maintained by the input stack is getting
corrupted, leading to garbage characters being inserted on keystrokes
like Alt+Up. Disable the automatic handling of Alt+Numpad for now until
the cause of this corruption is understood. The Alt+Numpad input did not
work anyway, so this does not regress anything.

Release Notes:

- windows: Fixed corrupted characters being inserted when Alt is pressed
(preview only)
2025-11-05 16:11:55 -05:00
Joseph T. Lyons
7ad3cf4387 v0.212.x preview 2025-11-05 12:07:10 -05:00
Cameron Mcloughlin
366a5db2c0 collab_ui: Show parents when searching channels (#42005)
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-11-05 16:51:10 +00:00
Danilo Leal
81e87c4cd6 settings ui: Fix divider in items that doesn't have subfields (#42016)
Release Notes:

- N/A

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2025-11-05 16:49:19 +00:00
Andrew Farkas
b8ba663c20 Revert "Refactor completions" (#42014)
Reverts zed-industries/zed#41939
2025-11-05 16:48:28 +00:00
Anthony Eid
27fb1098fa Revert "editor: Add action to move between snippet tabstop positions" (#42008)
Reverts zed-industries/zed#41466

This PR would add "in_snippet" context when there wasn't a completion
menu visible, causing some actions to not be hit.

Release Note:

- N/A
2025-11-05 11:16:39 -05:00
Danilo Leal
0f5a63a9b0 agent_ui: Make "waiting confirmation" state more apparent (#41998)
This PR changes the loading/generating indicator when in the "waiting
for tool call confirmation" state so that's a bit more visible and
discernible as needing your attention, as opposed to a regular
generating state.

<img width="400" alt="Screenshot 2025-11-05 at 10  46@2x"
src="https://github.com/user-attachments/assets/88adbf97-20fb-49c4-9c77-b0a3a22aa14e"
/>

Release Notes:

- agent: Improved the "waiting for confirmation" state visibility so
that you more rapidly know the agent is waiting for you to act.
2025-11-05 11:45:44 -03:00
Danilo Leal
c8ada5b1ae agent_ui: Reduce label repetitiveness on new thread menu (#42001)
Mostly just removing "thread" from all external agent menu items; I
think we can do without it and it already becomes much better/cleaner.

Release Notes:

- N/A
2025-11-05 11:45:31 -03:00
Techy
27a18843d4 open_ai: Make the deltas optional (#39142)
I am using an Azure OpenAI instance since that is what is provided at
work and with how they have it setup not all responses contain a delta,
which lead to errors and truncated responses. This is related to how
they are filtering potentially offensive requests and responses. I don't
believe this filter was made in-house, instead I believe it is provided
by Microsoft/Azure, so I suspect this fix may help other users.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-11-05 13:47:14 +01:00
Smit Barmase
2bc1d60c52 remote: Fix open terminal fails when $SHELL is not set (#41990)
Closes #41644

Release Notes:

- Fixed issue where it failed to spawn terminal on systems such as
Alpine.
2025-11-05 18:15:15 +05:30
Vitaly Slobodin
cd87307289 language: Fix language detection for injected syntax layers (#41111)
Closes #40632

**TL;DR:** The `wrap selections in tag` action was unavailable in ERB
files, even when the cursor was positioned in HTML content (outside of
Ruby code blocks). This happened because `syntax_layer_at()` incorrectly
returned the Ruby language for positions that were actually in HTML.
**NOTE:** I am not familiar with that part of Zed so it could be that
the fix here is completely incorrect.

Previously, `syntax_layer_at` incorrectly reported injected languages
(e.g., Ruby in ERB files) even when the cursor was in the base language
content (HTML). This broke actions like `wrap selections in tag` that
depend on language-specific configuration.

The issue had two parts:
1. Missing start boundary check: The filter only checked if a layer's
end was after the cursor (`end_byte() > offset`), not if it started
before, causing layers outside the cursor position to be included. See
the `BEFORE` video: when I click on the HTML part it reports `Ruby`
language instead of `HTML`.
2. Wrong boundary reference for injections: For injected layers with
`included_sub_ranges` (like Ruby code blocks in ERB), checking the root
node boundaries returned the entire file range instead of the actual
injection ranges.

This fix:
- Adds the containment check using half-open range semantics [start,
end) for root node boundaries. That ensures proper reporting of the
detected language when a cursor (`|`) is located right after the
injection:

   ```
   <body>
    <%= yield %>|
  </body>
   ```

- Checks `included_sub_ranges` for injected layers to determine if the
cursor is actually within an injection
- Falls back to root node boundaries for base layers without sub-ranges.
This is the original behavior.

Fixes ERB language support where actions should be available based on
the cursor's actual language context. I think that also applies to some
other template languages like HEEX (Phoenix) and `*.pug`. On short
videos below you can see how I navigate through the ERB template and the
terminal on the right outputs the detected language if you apply the
following patch:

```diff
diff --git i/crates/editor/src/editor.rs w/crates/editor/src/editor.rs
index 15af61f5d2..54a8e0ae37 100644
--- i/crates/editor/src/editor.rs
+++ w/crates/editor/src/editor.rs
@@ -10671,6 +10671,7 @@ impl Editor {
         for selection in self.selections.disjoint_anchors_arc().iter() {
             if snapshot
                 .language_at(selection.start)
+                .inspect(|language| println!("Detected language: {:?}", language))
                 .and_then(|lang| lang.config().wrap_characters.as_ref())
                 .is_some()
             {
```

**Before:**


https://github.com/user-attachments/assets/3f8358f4-d343-462e-b6b1-3f1f2e8c533d


**After:**



https://github.com/user-attachments/assets/c1b9f065-1b44-45a2-8a24-76b7d812130d



Here is the ERB template:

```
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style>
      /* Email styles need to be inline */
    </style>
  </head>
  <body>
    <%= yield %>
  </body>
</html>
```

Release Notes:

- N/A
2025-11-05 12:16:28 +01:00
Lukas Wirth
c061698229 project: Fetch latest lsp data in deduplicate_range_based_lsp_requests (#41971)
Fixes ZED-2MK

Release Notes:

- Fixed a panic in inlay hints
2025-11-05 08:30:22 +00:00
John Tur
b4f7af066e Work around codegen bug with GetKeyboardState (#41970)
Works around an issue, which can be reproduced in the following program:
```rs
use windows::Win32::UI::Input::KeyboardAndMouse::{GetKeyboardState, VK_CONTROL};

fn main() {
    let mut keyboard_state = [0u8; 256];
    unsafe {
        GetKeyboardState(&mut keyboard_state).unwrap();
    }

    let ctrl_down = (keyboard_state[VK_CONTROL.0 as usize] & 0x80) != 0;
    println!("Is Ctrl down: {ctrl_down}");
}
```

In debug mode, this program prints the correct answer. In release mode,
it always prints false. The optimizer appears to think that
`keyboard_state` isn't mutated and remains zeroed, and folds the
`modifier_down` comparisons to `false`.

Release Notes:

- N/A
2025-11-05 08:06:14 +00:00
Smit Barmase
c83621fa1f editor: Fix setting multi_cursor_modifier opens implementation in new pane instead of new tab (#41963)
Closes #41014

Release Notes:

- Fixed an issue where `multi_cursor_modifier` set to `cmd_or_ctrl`
opens implementation in new pane instead of new tab.
2025-11-05 11:31:56 +05:30
Richard Feldman
0da52d6774 Add ACP terminal-login via _meta field (#41954)
As discussed with @benbrandt and @mikayla-maki:

* We now tell ACP clients we support the nonstandard `terminal-auth`
`_meta` field for terminal-based authentication
* In the future, we anticipate ACP itself supporting *some* form of
terminal-based authentication, but that hasn't been designed yet or gone
through the RFD process
* For now, this unblocks terminal-based auth

Release Notes:

- Added experimental terminal-based authentication to ACP support
2025-11-04 21:40:35 -05:00
Richard Feldman
60ee0dd19b Use our node runtime for ACP extensions (#41955)
Release Notes:

- Now ACP extensions use Zed's managed Node.js runtime

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-11-04 21:40:23 -05:00
John Tur
2ead8c42fb Improve Windows text input for international keyboard layouts and IMEs (#41259)
- Custom handling of dead keys has been removed. UX for dead keys is now
the same as other applications on Windows.
- We could bring back some kind of custom UI, but only if UX is fully
compatible with expected Windows behavior (e.g. ability to move the
cursor after typing a dead key).
  - Fixes https://github.com/zed-industries/zed/issues/38838
- Character input via AltGr shift state now always has priority over
keybindings. This applies regardless of whether the keystroke used the
AltGr key or Ctrl+Alt to enter the shift state.
- In particular, we use the following heuristic to determine whether a
keystroke should trigger character input first or trigger keybindings
first:
- If the keystroke does not have any of Ctrl/Alt/Win down, trigger
keybindings first.
- Otherwise, determine the character that would be entered by the
keystroke. If it is a control character, or no character at all, trigger
keybindings first.
- Otherwise, the keystroke has _any_ of Ctrl/Alt/Win down and generates
a printable character. Compare this character against the character that
would be generated if the keystroke had _none_ of Ctrl/Alt/Win down:
- If the character is the same, the modifiers are not significant;
trigger keybindings first.
- If there is no active input handler, or the active input handler
indicates that it isn't accepting text input (e.g. when an operator is
pending in Vim mode), character entry is not useful; trigger keybindings
first.
- Otherwise, assume the modifiers enable access to an otherwise
difficult-to-enter key; trigger character entry first.
  - Fixes https://github.com/zed-industries/zed/issues/35862
- Fixes
https://github.com/zed-industries/zed/issues/40054#issuecomment-3447833349
  - Fixes https://github.com/zed-industries/zed/issues/41486
- TranslateMessage calls are no longer skipped for unhandled keystrokes.
This fixes language input keys on Japanese and Korean keyboards (and
surely other cases as well).
- To avoid any other missing-TranslateMessage headaches in the future,
the message loop has been rewritten in a "traditional" Win32 style,
where accelerators are handled in the message loop and TranslateMessage
is called in the intended manner.
  - Fixes https://github.com/zed-industries/zed/issues/39971
  - Fixes https://github.com/zed-industries/zed/issues/40300
  - Fixes https://github.com/zed-industries/zed/issues/40321
  - Fixes https://github.com/zed-industries/zed/issues/40335
  - Fixes https://github.com/zed-industries/zed/issues/40592
  - Fixes https://github.com/zed-industries/zed/issues/40638
- As a bonus, Alt+Space now opens the system menu, since it is triggered
by the WM_SYSCHAR generated by TranslateMessage.
- VK_PROCESSKEYs are now ignored rather than being unwrapped and matched
against keybindings. This ensures that IMEs will reliably receieve
keystrokes that they express interest in. This matches the behavior of
native Windows applications.
  - Fixes https://github.com/zed-industries/zed/issues/36736
  - Fixes https://github.com/zed-industries/zed/issues/39608
  - Fixes https://github.com/zed-industries/zed/issues/39991
  - Fixes https://github.com/zed-industries/zed/issues/41223
  - Fixes https://github.com/zed-industries/zed/issues/41656
  - Fixes https://github.com/zed-industries/zed/issues/34180
  - Fixes https://github.com/zed-industries/zed/issues/41766


Release Notes:

- windows: Improved keyboard input handling for international keyboard
layouts and IMEs
2025-11-04 20:28:12 -05:00