This reverts commit 1b3b825c7f.
When debugging git diffs we found that this introduced a re-ordering of
messages sent to the LSP:
* User hits "format"
* Zed adjusts spacing, and sends "spaces changed" to the LSP
* Zed sends "format" to LSP
With the async approach here, the format request can now arrive before
the space changed request.
You can reproduce this with `test_strip_whitespace_and_format_via_lsp`
under some conditions.
Release Notes:
- N/A
- [x] Basic implementation
- [x] Disable commit buttons when committing is not possible (empty
message, no changes)
- [x] Upgrade GitSummary to efficiently figure out whether there are any
staged changes
- [x] Make CommitAll work
- [x] Surface errors with toasts
- [x] Channel shutdown
- [x] Empty commit message or no changes
- [x] Failed git operations
- [x] Fix added files no longer appearing correctly in the project panel
(GitSummary breakage)
- [x] Fix handling of commit message
Release Notes:
- N/A
---------
Co-authored-by: Nate <nate@zed.dev>
This PR restores the ability to publish the `html_to_markdown` crate
after #23291.
This crate is [published](https://crates.io/crates/html_to_markdown) to
crates.io so that it can be consumed by extensions.
Release Notes:
- N/A
This PR extracts the `PromptLibrary` out of the `assistant` crate and
moves it to the `prompt_library` crate.
The `PromptLibrary` is now decoupled from the specifics of the
`AssistantPanel` and `InlineAssistant`.
Release Notes:
- N/A
This enables having a dedicated color for the line number hover state.
That's relevant because line numbers can now be clicked to jump to
cursor location in multibuffers.
Release Notes:
- N/A
---------
Co-authored-by: João Marcos <marcospb19@hotmail.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [aws-config](https://redirect.github.com/smithy-lang/smithy-rs) |
dependencies | patch | `1.5.13` -> `1.5.14` |
| [aws-sdk-kinesis](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.55.0` -> `1.56.0` |
| [aws-sdk-s3](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.68.0` -> `1.69.0` |
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
A recent change in #22730 (to reduce workspace serialization) means that
a dock "forgets" its active panel whenever it is closed. When opened
again, the change in #22346 (which establishes a panel activation order)
takes effect, always opening the highest-priority panel for that dock
instead of the panel the user previously manually activated.
The result is that if you have, say, the outline panel active on the
right dock, and toggle the dock closed and then back open again, the
assistant panel will always appear instead.
This PR reverts part of the change in #22730 to ensure a dock remembers
its active panel when it is closed.
Closes#22923.
Release Notes:
- Fixed an issue where docks did not remember the active panel.
Now we ensure that task output is fully drained and printed to Zed
terminal pane on task completion.
This change depends on a recent change to alacritty_terminal crate:
5e78d20c70.
Closes https://github.com/zed-industries/zed/issues/18342
Release Notes:
- Fixed missing task terminal output on Linux for short-running commands
I’ve also updated the documentation in
`development\local-collaboration.md` and
`docs\src\development\windows.md`.
Testing collab on my Windows machine:
![屏幕截图 2025-01-14
162021](https://github.com/user-attachments/assets/28b4a36a-e156-4012-981a-5d0a23dcc613)
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Closes#23216
This crash happens in the `update_visible_entries` function, where we
calculate `ancestors` and `current_ancestor_depth`. `ancestors` is map
storing information about folded ancestors and `current_ancestor_depth`
is basically selected ancestor index in reverse order of visibility.
For example, before adding a new file or directory in `a/b/c`, the
`ancestors` might look like:
```jsonc
{
"entry_id_of_c": {
"current_ancestor_depth": 2, // "a" is selected
"ancestors": ["entry_id_of_a", "entry_id_of_b", "entry_id_of_c"]
}
}
```
When new file or directory is added to`a`, ancestors length is reduced,
as `a` now is not part of folded dir due to having multiple children.
But depth still remains the same as while calculating it, we use depth
from `old_ancestors` to preserve selection across renders. This causes
panic.
```jsonc
{
"entry_id_of_c": {
"current_ancestor_depth": 2, // wrong: use of old depth here causes panic
"ancestors": ["entry_id_of_b", "entry_id_of_c"] // correct: notice "a" is missing, as "a" now has multiple children
}
}
```
This PR fixes it by capping depth so it don't exceed `ancestors` array.
This preserves existing depth as well as handles our edge case.
Release Notes:
- Fixed crash when adding a new file or directory to the first folded
directory
Closes#22885Closes#12565
This doesn't yet add history in the command palette, which is painfully
missing.
Release Notes:
- vim: Added `:!`, `:<range>!` and `:r!` support
- vim: Added `!` operator in normal/visual mode
This PR resolves one part of issue #14496
In project panel, when dragging, if you hover over a directory for
~500ms, it now auto-expands so you can drag and drop into nested
directories.
Task cleanup is handled in these cases:
- Dragged onto a different entry.
- Dragged anywhere else, and the 500ms timer runs out (for example, out
of the project panel).
- Dropped onto any entry.
I don’t see any edge cases where task isn’t cleaned up after 500ms.
https://github.com/user-attachments/assets/19da0da1-f9e2-42df-8ee4-fab6dc9a185a
Release Notes:
- Added auto-expand for directories on hover for a while during
dragging.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[tree-sitter-css](https://redirect.github.com/tree-sitter/tree-sitter-css)
| workspace.dependencies | patch | `0.23.1` -> `0.23.2` |
---
### Release Notes
<details>
<summary>tree-sitter/tree-sitter-css (tree-sitter-css)</summary>
###
[`v0.23.2`](https://redirect.github.com/tree-sitter/tree-sitter-css/releases/tag/v0.23.2)
[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-css/compare/v0.23.1...v0.23.2)
**NOTE:** Download `tree-sitter-css.tar.xz` for the *complete* source
code.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR extracts the streaming diff implementation to its own
`streaming_diff` crate.
It was duplicated between `assistant` and `assistant2`, but their
implementations were exactly the same (and I don't see a reason why they
would need to diverge).
Release Notes:
- N/A
To prepare for the introduction of folding in the git panel, these
codepaths need to work with the canonical source of all git status
entries, not just the ones that are visible in the panel.
Release Notes:
- N/A
---------
Co-authored-by: Nate <nate@zed.dev>
This PR adds a new `prompt_library` crate and extracts the `PromptStore`
and `PromptBuilder` to it.
Eventually we'll want to house the `PromptLibrary` itself in this crate,
but right now that involves untangling a few dependencies.
Release Notes:
- N/A
This PR moves the `SlashCommandWorkingSet` out of the `assistant` crate
and into `assistant_slash_command`.
This will unlock moving some things that depend on it out of the
`assistant` crate.
Release Notes:
- N/A
This PR makes the assistant 2 panel switch work with the keyboard via
the `cmd-e` keybinding.
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Makes pane::ReopenClosedItem (`cmd-shift-t` macos / `ctrl-shift-t`
linux) work in Project Panel and other non-`Pane` Dock contexts too
(Diagnostics, Outline, Git, Collab).
This PR removes the `SwitchWithLabel` component because we're adding
`label` as a method to `Switch`. Thus, we no longer need an extra
component just to append a label. Additionally, we're also adding
`keybinding` as a method.
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This is useful if we want to pass random strings as keybindings for any
component that takes one, so we can display them on the debug theme
preview pane.
Release Notes:
- N/A
Co-authored-by: Agus Zubiaga <hi@aguz.me>
While working on PR #23117, I noticed that the Windows runner in our CI
setup doesn't seem to respect the settings defined in
`.cargo/config.toml`. With @SomeoneToIgnore ’s help, Kirill and I
realized this issue isn’t limited to the Windows runner—all of our
runners disregard the configurations in `.cargo/config.toml`.
Later, @osiewicz suggested an excellent workaround. I conducted some
tests on PR #23117 and found that the solution works as intended.
Personally, I prefer using environment variables for global
configuration. However, according to the documentation
[here](https://doc.rust-lang.org/cargo/reference/config.html), it seems
that environment variables always override the settings in
`.cargo/config.toml`.
Release Notes:
- N/A
Motivation for this is using markdown for keymap error notifications in
#23113, but it also benefits the copied text of repl tables.
Release Notes:
- N/A
Falls back on notifying all workspaces if there isn't an active one.
This is to support notifying the user about keymap file errors in
#23113. It will also be useful for notifying about settings file errors.
Release Notes:
- N/A