Commit log

ca05ff8 agent2: More efficent read file tool (#38407)

Click to expand commit body
Before we were always reading the entire file into memory as a string.
Now we only read the range that is actually requested.

Release Notes:

- N/A

Ben Brandt created

9f9e806 workspace: Pop a toast if manually spawning a task fails (#38405)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

32c868f acp: Fix behavior of read_text_file for ACP agents (#38401)

Click to expand commit body
We were incorrectly handling the line number as well as stripping out
line breaks when returning portions of files.

It also makes sure following is updated even when we load a snapshot
from cache, which wasn't the case before.

We also are able to load the text via a range in the snapshot, rather
than allocating a string for the entire file and then another after
iterating over lines in the file.

Release Notes:

- acp: Fix incorrect behavior when ACP agents requested to read portions
of files.

Ben Brandt created

ed46e2c helix: Apply modification (e.g. switch case) on a single character only in helix mode (#38119)

Click to expand commit body
Closes #34192

Without selection, only current character would be affected.

Also if #38117 is merged too, then transformations in SelectMode behave
correctly too and selection is not collapsed.

Release Notes:

- helix: Implemented `~`, `` ` ``, `` Alt-` `` correctly in normal and
select modes

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>

Romans Malinovskis and Jakub Konka created

d85a6db git_ui: Use margin instead of padding for blame entries (#38397)

Click to expand commit body
This makes the hover background change keep a visible border element
between the gutter and blame entries

Release Notes:

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

Lukas Wirth created

4b1e78c terminal: Fix COLORTERM regression for true color support (#38379)

Click to expand commit body
Closes #38304 

Release Notes:

- Fixed true color detection regression by setting `COLORTERM=truecolor`

---

Reason:

The regression is possibly introduced in [pr#36576: Inject venv
environment via the
toolchain](https://github.com/zed-industries/zed/pull/36576/files#diff-6f30387876b79f1de44f8193401d6c8fb49a2156479c4f2e32bc922ec5d54d76),
where `alacritty_terminal::tty::setup_env();` is removed.

The `alacritty_terminal::tty::setup_env();` does 2 things, which sets
`TERM` & `COLORTERM` envvar.
```rs
/// Setup environment variables.
pub fn setup_env() {
    // Default to 'alacritty' terminfo if it is available, otherwise
    // default to 'xterm-256color'. May be overridden by user's config
    // below.
    let terminfo = if terminfo_exists("alacritty") { "alacritty" } else { "xterm-256color" };
    unsafe { env::set_var("TERM", terminfo) };

    // Advertise 24-bit color support.
    unsafe { env::set_var("COLORTERM", "truecolor") };
}
```

Miao created

eaa1cb0 acp: Add a basic test for ACP remoting (#38381)

Click to expand commit body
Tests that the downstream project can see custom agents configured in
the remote server's settings, and that it constructs an appropriate
`AgentServerCommand`.

Release Notes:

- N/A

Cole Miller created

ea473ee acp: Fix agent servers sometimes not being registered when Zed starts (#38330)

Click to expand commit body
In local projects, initialize the list of agents in the agent server
store immediately. Previously we were initializing the list only after a
delay, in an attempt to avoid sending the `ExternalAgentsUpdated`
message to the downstream client (if any) before its handlers were
initialized. But we already have a separate codepath for that situation,
in the `AgentServerStore::shared`, and we can insert the delay in that
place instead.

Release Notes:

- acp: Fixed a bug where starting an external agent thread soon after
Zed starts up would show a "not registered" error.

---------

Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Agus <agus@zed.dev>

Cole Miller , Michael , and Agus created

4912096 collab: Remove unused feature flag queries (#38360)

Click to expand commit body
This PR removes the feature flag queries, as they were no longer used.

Release Notes:

- N/A

Marshall Bowers created

3c69144 Update release URLs in release actions (#38361)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

96111c6 extension_host: Sanitize cwd path for ResolvedTask (#38357)

Click to expand commit body
Ensures build task's CWD paths use POSIX-friendly path separator on
Windows host so that `std::path::Path` ops work as expected within the
Wasm guest.

Release Notes:

- N/A

Jakub Konka created

f6d08fe Remove `/cargo-workspace` slash command (#38354)

Click to expand commit body
This PR removes the `/cargo-workspace` slash command.

We never fully shipped this—with it requiring explicit opt-in via a
setting—and it doesn't seem like the feature is needed in an agentic
world.

Release Notes:

- Removed the `/cargo-workspace` slash command.

Marshall Bowers created

86a2649 docs: Add whitespace_map (#38355)

Click to expand commit body
Adds docs for settings introduced in:
- https://github.com/zed-industries/zed/pull/37704

Release Notes:

- N/A

Peter Tripp created

f0b2150 editor: Properly layout expand toggles with git blame enabled (#38349)

Click to expand commit body
Release Notes:

- Fixed an issue where expand toggles were too large with the git blame
deployed.

Finn Evers created

3968b9c Add open WSL shortcut (#38342)

Click to expand commit body
Adds a shortcut to add a WSL distro for better wsl feature
discoverability.

- [x] Open wsl from open remote
- [x] Open local folder in wsl action
- [x] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A

localcc created

43f40c6 rope: Fix spelling of `peek_with_bitmaps` (#38341)

Click to expand commit body
This PR fixes the spelling of the `peek_with_bitmaps` method.

Release Notes:

- N/A

Marshall Bowers created

824f695 Rename Windows GitHub Issue template (#38339)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

50326dd project_panel: Collapse top-level entries in `Collapse all entries` command (#38310)

Click to expand commit body
Closes #11760

The command `project panel: collapse all entries` currently does not
collapse top-level entries (the workspaces themselves). I think this
should be expected behaviour if you only have a single workspace in your
project. However, if you have multiple workspaces, we should collapse
their top-level folders as well. This is the expected behaviour in the
screenshots in #11760.

For more context: Atm the `.retain` function empties the
`self.expanded_dir_ids` Hash Map, because the `expanded_entries` Vec is
(almost) never empty - it contains the id of the `root_entry` of the
workspace.


https://github.com/zed-industries/zed/blob/d48d6a745409a8998998ed59c28493a1aa733ebb/crates/project_panel/src/project_panel.rs#L1148-L1152

We then update the `self.expanded_dir_ids` in the
`update_visible_entries` function, and since the Hash Map is empty, we
execute the `hash_map::Entry::Vacant` arm of the following match
statement.


https://github.com/zed-industries/zed/blob/d48d6a745409a8998998ed59c28493a1aa733ebb/crates/project_panel/src/project_panel.rs#L3062-L3073

This change makes sure that we do not clear the `expanded_dir_ids`
HashMap and always keep the keys for all visible workspaces and
therefore we run the `hash_map::Entry::Occupied` arm, which does not
override the `expanded_dir_ids` anymore.



https://github.com/user-attachments/assets/b607523b-2ea2-4159-8edf-aed7bca05e3a

cc @MrSubidubi 

Release Notes:

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

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>

Nils Koch and Finn Evers created

52521ef acp: update to v0.4 of Rust library (#38336)

Click to expand commit body
Release Notes:

- N/A

Ben Brandt created

4a7784c Allow opening a local folder inside WSL (#38335)

Click to expand commit body
This PR adds an option to allow opening local folders inside WSL
containers. (wsl_actions::OpenFolderInWsl). It is accessible via the
command palette and should be available to keybind.

- [x] Open wsl from open remote
- [x] Open local folder in wsl action
- [ ] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A

localcc created

f3b8c61 editor: Fix `unwrap_syntax_node` panicking by not setting selections (#38329)

Click to expand commit body
Fixes ZED-11T

Release Notes:

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

Lukas Wirth created

0f6dd84 Bump Zed to v0.206 (#38327)

Click to expand commit body
Release Notes:

-N/A

Joseph T. Lyons created

405a8ea editor: Fix `BlockMapWriter::blocks_intersecting_buffer_range` creating invalid indexing ranges (#38325)

Click to expand commit body
Fixes ZED-113
Release Notes:

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

Lukas Wirth created

c54e294 Autosave files on close, when setting is `afterDelay` (#36929)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/12149
Closes #35524

Release Notes:

- Improved autosave behavior, to prevent a confirmation dialog when
quickly closing files and using the `afterDelay` setting

---------

Co-authored-by: MrSubidubi <finn@zed.dev>

itsaphel and MrSubidubi created

8683488 editor: Fix completions menu flashes on every keystroke in TSX files with emmet (#38320)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/37774

Bug in https://github.com/zed-industries/zed/pull/32927

Instead of using trigger characters to clear cached completions items,
now we check if the query is empty to clear it. Turns out Emmet defines
whole [alphanumeric as trigger
characters](https://github.com/olrtg/emmet-language-server/blob/279be108725fb391c167690b697ce154fd32657b/index.ts#L116)
which causes flickering.

Clear on trigger characters was introduced to get rid of cached
completions like in the case of "Parent.Foo.Bar", where "." is one of
the trigger characters. This works still since "." is not part of
`completion_query_characters` and hence we use it as a boundary while
building the current query. i.e in this case, the query would be empty
after typing ".", clearing cached completions.

Release Notes:

- Fixed issue where completions menu flashed on every keystroke in TSX
files with emmet extension installed.

Smit Barmase created

a5c2917 editor: Fix incorrect offset passed to acp completion provider (#38321)

Click to expand commit body
Might fix | ZED-15G
Release Notes:

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

Lukas Wirth created

574b943 Add wsl specific icon (#38316)

Click to expand commit body
Release Notes:

- N/A

localcc created

399118f denoise: Fix LICENSE-GPL symlink (#38313)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

5ca3b99 fs: Do panic when failing to query `modified` timestamps (#38312)

Click to expand commit body
Fixes ZED-1EW

Release Notes:

- N/A

Lukas Wirth created

d74b8bc docs: Fix macOS development docs typo (#38311)

Click to expand commit body
Release Notes:

- N/A

Smit Barmase created

28800c2 languages: Fix panic in python lsp adapters assuming settings shape (#38309)

Click to expand commit body
Fixes ZED-1EV
Fixes ZED-S0
Fixes ZED-Q9

Release Notes:

- N/A

Lukas Wirth created

83d9f07 Add WSL opening UI (#38260)

Click to expand commit body
This PR adds an option to open WSL machines from the UI.

- [x] Open wsl from open remote
- [ ] Open local folder in wsl action
- [ ] Open wsl shortcut (shortcuts to open remote)

Release Notes:

- N/A

localcc created

c5ac1e6 editor: Fix `select_larget_syntax_node` overflowing in multibuffers (#38308)

Click to expand commit body
Fixes ZED-18Z

Release Notes:

- N/A

Lukas Wirth created

d48d6a7 Fix empty nodes crash (#38259)

Click to expand commit body
The crash occured because we raced against the platform windowing
backend to render a frame, and if we lost the race there would be no
frame on a window that we return, which breaks most of gpui

Release Notes:

- N/A

localcc created

a2de918 agent_ui: Fix panic on editor changes in inline_assistant (#38303)

Click to expand commit body
Fixes ZED-13P

Release Notes:

- N/A

Lukas Wirth created

531f9ee Give most spawned threads names (#38302)

Click to expand commit body
Release Notes:

- N/A

Lukas Wirth created

64d362c edit prediction: Initial implementation of Tree-sitter index (not yet used) (#38301)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: oleksiy <oleksiy@zed.dev>

Michael Sloan , Agus , and oleksiy created

5d561aa agent_ui: Fix agent panel insertion to use cursor position (#38253)

Click to expand commit body
Fix agent panel insertion to use cursor position

Closes #38216

Release Notes:
- Fixed agent panel text insertion to respect cursor position instead of
always appending to the end

## Before

[before.webm](https://github.com/user-attachments/assets/684d3cbe-4710-4724-8d2d-ac08f430dea8)

## After

[output.webm](https://github.com/user-attachments/assets/d1122d99-4efb-4a24-a408-db128814f98c)

Kyrilasa created

4ee2dae markdown: Fix indented codeblocks having incorrect content ranges (#38225)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/37743

Release Notes:

- Fixed agent panel panicking when streaming indented codeblocks from
agent output

Lukas Wirth created

c27d8e0 editor: Don't pull diagnostics on excerpts change in diagnostics editors (#38212)

Click to expand commit body
This can lead to an infinite regress when using a language server that
supports pull diagnostics, since the excerpts for the diagnostics editor
are set based on the project's diagnostics.

Closes #36772

Release Notes:

- Fixed a bug that could cause duplicated diagnostics with some language
servers.

Cole Miller created

f6c5c68 collab: Remove user backfiller (#38291)

Click to expand commit body
This PR removes the user backfiller from Collab.

Release Notes:

- N/A

Marshall Bowers created

74e5b84 cloud_llm_client: Make `default_model` and `default_fast_model` optional (#38288)

Click to expand commit body
This PR makes the `default_model` and `default_fast_model` fields
optional on the `ListModelsResponse`.

Release Notes:

- N/A

Marshall Bowers created

ee399eb macOS: Make it easier to debug NSAutoFillHeuristicControllerEnabled (#38285)

Click to expand commit body
Uses `setObject` instead of `registerDefaults`, so that it can be read
with `defaults read dev.zed.Zed`. Still can be overrided.

Release Notes:

- N/A

Smit Barmase created

54c82f2 Windows: Unminimize a window when activating it (#38287)

Click to expand commit body
Closes #36287

Release Notes:

- Windows: Fixed an issue where a Zed window would stay minimized when
opening an existing file in that window via the Zed CLI.

Max Brunsfeld created

e14a4ab Fix small spelling mistakes (#38284)

Click to expand commit body
Closes #ISSUE

Release Notes:

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

Uwe Krause created

0343b5f Add new crate denoise required by audio (#38217)

Click to expand commit body
The audio crate will use the denoise crate to remove background noises
from microphone input.

We intent to contribute this to rodio. Before that can happen a PR needs
to land in candle. Until then this lives here.

Uses a candle fork which removes the dependency on `protoc` and has the PR's mentioned above already applied.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>

David Kleingeld and Mikayla created

26202e5 language_models: Use `message` field from Cloud error responses, if present (#38286)

Click to expand commit body
This PR updates the Cloud language model provider to use the `message`
field from the Cloud error response, if it is present.

Previously we would always show the entire JSON payload in the error
message, but with this change we can show just the user-facing `message`
the error response is in a shape that we recognize.

Release Notes:

- N/A

Marshall Bowers created

ee91236 Check if virtual environment is in worktree root (#37510)

Click to expand commit body
The problem from issue #37509 comes from local virtual environments
created with certain approaches (including the 'simple' way of `python
-m venv`) not having a `.project` file with the path to the project's
root directory. When the toolchains are sorted, a virtual environment in
the project is not treated as being for that project and therefore is
not prioritized.

With this change, if a toolchain does not have a `project` associated
with it, we check to see if it is a virtual environment, and if it is we
use its parent directory as the `project`. This will make it the top
priority (i.e. the default) if there are no other virtual environments
for a project, which is what should be expected.

Closes #37509

Release Notes:

- Improved python toolchain prioritization of local virtual
environments.

George Waters created

673a98a Fix a number of spelling mistakes (#38281)

Click to expand commit body
My pre push hooks keep failing on these. This is easier then disabling
and re-enabling those hooks all the time :)

Closes #ISSUE

Release Notes:

- N/A

David Kleingeld created

5674445 Move keyboard shortcut for `pane::GoForward` (#38221)

Click to expand commit body
Move keyboard shortcut for `pane:GoForward` so it's going to be
displayed as a shortcut hint in UI. Currently `Forward` is shown as a
hint, which isn't consistent with `GoBack` action and can be confusing.

Release Notes: 

- Improved the displayed keybinding for the `pane::GoForward` action on
Linux.

VBB created