5f9a148
assistant: Make `/file` emit events as they occur (#19743)
Click to expand commit body
This PR updates the `/file` command to emit its `SlashCommandEvent`s in
a way that can actually be streamed.
Previously it was buffering up all of the events and then returning them
all at once.
Note that we still don't yet support streaming in the context editor on
`main`, so there won't be any visible changes just yet.
Release Notes:
- N/A
Marshall Bowers
created
5c2238c
ssh remoting: Use matching versions of remote server binary (#19740)
Click to expand commit body
This changes the download logic to not fetch the latest version, but to
fetch the version matching the current version of Zed.
Release Notes:
- Changed the update logic of the SSH remote server to not fetch the
latest version for a current channel, but to fetch the version matching
the current Zed version. If Zed is updated, the server is updated too.
If the server is newer than the Zed version an error will be displayed.
Thorsten Ball
created
5769065
project panel: Persist full filename when renaming auto-folded entries (#19728)
Click to expand commit body
This fixes a debug-only panic when processing filenames. The underflow
that happens in Preview/Stable shouldn't cause any issues (other than
maybe unmarking an entry in the project panel).
/cc @notpeter
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
0173479
ssh remoting: Lock file becomes stale if connection drops & no update if binary is running (#19724)
Click to expand commit body
Release Notes:
- Changed the update process of the remote server binary to not attempt
an update if we can detect that the current binary is used by another
process.
- Changed the update process of the remote server binary to mark the
lock file as stale in case the SSH connection of the process that
created the lock file isn't open anymore.
Thorsten Ball
created
08a3c54
Allow editor blocks to replace ranges of text (#19531)
Click to expand commit body
This PR adds the ability for editor blocks to replace lines of text, but
does not yet use that feature anywhere. We'll update assistant patches
to use replace blocks on another branch:
https://github.com/zed-industries/zed/tree/assistant-patch-replace-blocks
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Marshall Bowers <marshall@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
,
Antonio Scandurra
,
Richard Feldman
,
Marshall Bowers
, and
Nathan Sobo
created
3617873
project panel: Fix interactions with auto-folded directories (#19723)
Co-authored-by: Kirill <kirill@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Fixes #9896
Release Notes:
- Fixed an issue where clicking on an image inside the project panel
would not re-use an existing image tab
Co-authored-by: Kirill <kirill@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
This restores all the init behaviour into main again. This means we
never need to call init_ui (and so we can't call it more than once).
Release Notes:
- (Nightly only) fixes a panic when using the cli to open another file
in a running zed.
Conrad Irwin
created
42a7402
assistant: Use a labeled button for the slash command menu (#19703)
Click to expand commit body
This should help a bit more the discoverability of the slash commands.
Release Notes:
- N/A
Danilo Leal
created
6cd5c9e
assistant: Tweak the model selector design (#19704)
Click to expand commit body
Exploring using the UI font for it, as it is more common for dropdowns
and popovers throughout the app. Feeling like it makes it lighter and
also shorter in width!
| Before | After |
|--------|--------|
| <img width="1296" alt="Screenshot 2024-10-24 at 16 39 04"
src="https://github.com/user-attachments/assets/0412f922-77a9-4d83-adf9-5632534d6c5b">
| <img width="1296" alt="Screenshot 2024-10-24 at 16 38 26"
src="https://github.com/user-attachments/assets/8bf52ba7-fda7-4437-b53e-903c282f2931">
|
Release Notes:
- N/A
Co-Authored-By: Max <max@zed.dev>
Closes #ISSUE
Release Notes:
- SSH Remoting: Reuse connections across hosts
---------
Co-authored-by: Max <max@zed.dev>
Conrad Irwin
and
Max
created
3a9c071
Fix partial downloads of ssh remote server (#19700)
Click to expand commit body
Release Notes:
- SSH Remoting: fix a bug where inerrrupting ssh connecting could leave
your local binary cached in an invalid state
Conrad Irwin
created
ca861bb
ui: Fix swapped element background colors (#19701)
Click to expand commit body
This PR fixes an issue introduced in
https://github.com/zed-industries/zed/pull/18768 where the element
backgrounds colors for `ElevationIndex::ElevatedSurface` and
`ElevationIndex::Surface` were swapped.
Release Notes:
- N/A
Use `Fs` instead of `std::fs` and do entry existence checks better:
* first, check the worktree entry existence without any FS checks
* then, only for local cases, use `Fs` to check for abs_path existence
of items, in case those came from single-filed worktrees that got closed
and removed.
Remote entries do not get file existence checks, so might try opening
previously removed buffers for now.
Release Notes:
- N/A
Kirill Bulatov
created
3ec015b
docs: Example theme_overrides for docstrings as italic (#19694)
TODO:
- [ ] Check that workspace migration worked
- [ ] Add server migrations and make sure SeaORM files are in sync
(maybe?)
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Mikayla Maki
,
Conrad
, and
Conrad Irwin
created
b5f816d
assistant: Add implementation for `/delta` argument completion (#19693)
Click to expand commit body
This PR fixes a panic that could occur when trying to complete arguments
for the `/delta` slash command.
We were using `unimplemented!()` instead of providing a default no-op
implementation like we do for other slash commands that do not support
completing arguments.
Closes https://github.com/zed-industries/zed/issues/19686.
Release Notes:
- Fixed a panic that could occur when trying to complete arguments with
the `/delta` command.
Marshall Bowers
created
499e145
Fix crash in collab when sending worktree updates (#19678)
Click to expand commit body
This pull request does a couple of things:
- In 29c2df73e1448bb510aebfbc954deb067fc88032, we introduced a safety
guard that prevents this crash from happening again in the future by
returning an error instead of panicking when the payload is too large.
- In 3e7a2e5c3067c53bb12cd0c76c6e7b09af7c8fcf, we introduced chunking
for updates coming from SSH servers (previously, we were sending the
whole changeset and initial set of paths in their entirety).
- In 122b5b4, we introduced a panic hook that sends panics to Axiom.
For posterity, this is how we figured out what the panic was:
```
kubectl logs current-pod-name --previous --namespace=production
```
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>
Antonio Scandurra
,
Thorsten
,
Bennet
, and
Kirill
created
b5aea54
ssh: Capitalize error and connection strings (#19675)
Click to expand commit body
Another tiny PR for the sake of consistency :)
Release Notes:
- N/A
Danilo Leal
created
3c6a505
docs: Add tweaks to the Remote Development page (#19674)
Click to expand commit body
Just making just we also add the other keybinding to open the Remote
Projects dialog and capitalize every "SSH" mention for consistency. Tiny
stuff!
Release Notes:
- N/A
Danilo Leal
created
efc4d3e
ssh remoting: Fix wrong working directory for SSH terminals (#19672)
Click to expand commit body
Before this change, we would save the working directory *on the client*
of each shell that was running in a terminal.
While it's technically right, it's wrong in all of these cases where
`working_directory` was used:
- in inline assistant
- when resolving file paths in the terminal output
- when serializing the current working dir and deserializing it on
restart
Release Notes:
- Fixed terminals opened on remote hosts failing to deserialize with an
error message after restarting Zed.
See #12673
https://github.com/user-attachments/assets/94079afc-a851-4206-9c9b-4fad3542334e
TODO:
- [x] Make active indent guides work for autofolded directories
- [x] Figure out which theme colors to use
- [x] Fix horizontal scrolling
- [x] Make indent guides easier to click
- [x] Fix selected background flashing when hovering over entry/indent
guide
- [x] Docs
Release Notes:
- Added indent guides to the project panel
Bennet Bo Fenner
created
e040b20
project_panel: Make up/down in file rename editor not select items (#19670)
Click to expand commit body
Closes #19017
Release Notes:
- Fixed project panel bug when renaming files where up/down keys could
select other files.
This snuck in when Bennet and I were debugging why our connection to the
SSH host would break. We suspected that somewhere something was logging
to STDOUT and, I guess, we changed all `println!` to `eprintln!`.
Now, two weeks later, I'm sitting here, wondering why the version check
doesn't work anymore. The server always reports a version of `""`.
Turns out we take the command's STDOUT and not STDERR, which is correct.
But it also turns out we started to print the version to STDERR, which
breaks the version check.
One-character bug & one-character fix.
Release Notes:
- N/A
Thorsten Ball
created
0ffc92a
Update actions/checkout digest to 11bd719 (#19636)
Click to expand commit body
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | digest | `eef6144` -> `11bd719` |
---
### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate[bot]
and
renovate[bot]
created
d303615
assistant: Update `SlashCommand` trait with streaming return type (#19652)
Click to expand commit body
This PR updates the `SlashCommand` trait to use a streaming return type.
This change is just at the trait layer. The goal here is to decouple
changing the trait's API while preserving behavior on either side.
The `SlashCommandOutput` type now has two methods for converting two and
from a stream to use in cases where we're not yet doing streaming.
On the `SlashCommand` implementer side, the implements can call
`to_event_stream` to produce a stream of events based off the
`SlashCommandOutput`.
On the slash command consumer side we use
`SlashCommandOutput::from_event_stream` to convert a stream of events
back into a `SlashCommandOutput`.
The `/file` slash command has been updated to emit `SlashCommandEvent`s
directly in order for it to work properly.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
Marshall Bowers
and
Max
created
510c71d
Pin crate-ci/typos action to 8e6a428 (#19635)
Click to expand commit body
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [crate-ci/typos](https://redirect.github.com/crate-ci/typos) | action
| pinDigest | -> `8e6a428` |
---
### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate[bot]
and
renovate[bot]
created
013d2d5
Update Rust crate anyhow to v1.0.91 (#19640)
Click to expand commit body
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [anyhow](https://redirect.github.com/dtolnay/anyhow) |
workspace.dependencies | patch | `1.0.89` -> `1.0.91` |
---
### Release Notes
<details>
<summary>dtolnay/anyhow (anyhow)</summary>
###
[`v1.0.91`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.91)
[Compare
Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.90...1.0.91)
- Ensure OUT_DIR is left with deterministic contents after build script
execution
([#​388](https://redirect.github.com/dtolnay/anyhow/issues/388))
###
[`v1.0.90`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.90)
[Compare
Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.89...1.0.90)
- Documentation improvements
</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Update of the SSH remoting docs
Release Notes:
- N/A
Conrad Irwin
created
e87d5e1
Use zstd without dynamic linking due to musl usage (#19627)
Click to expand commit body
Due to leaning towards `musl` builds, unit features for `zstd` and link
it statically too for Zed.
https://github.com/gyscos/zstd-rs/blob/bfe1e34f593c2427e9dc35f1b98d06788174711f/zstd-safe/zstd-sys/build.rs#L260
shows that `ZSTD_SYS_USE_PKG_CONFIG` env var can be used to return this
behavior.
Release Notes:
- N/A
- Closes: https://github.com/zed-industries/zed/issues/19609
Switches us to using `-latest` tags with Anthropic models instead of
pinning to a specific date version.
See: [Anthropic Model
Docs](https://docs.anthropic.com/en/docs/about-claude/models)
This is a no-op for:
- Claude 3 Opus (`claude-3-opus-20240229`)
- Claude 3 Sonnet (`claude-3-sonnet-20240229`)
- Claude 3 Haiku (`claude-3-haiku-20240307`)
For Claude 3.5 Sonnet this will update us from
`claude-3-5-sonnet-20240620` to `claude-3-5-sonnet-20241022`. We will
also pickup any subsequent model updates automatically when Anthropic
updates the `latest` tag.
This matches the behavior for OpenAI where use `gpt-4o` as the
model_name and not `gpt-4o-2024-08-06`.
Peter Tripp
created
9c0dba4
Add a `SlashCommandResult` type alias (#19633)
Click to expand commit body
This PR adds a new `SlashCommandResult` type alias.
We're going to be changing what slash commands can return in order to
support streaming, so having this type alias in place will make that
switch a bit more neat.
Release Notes:
- N/A
9dfe4a3
languages: Do not expose unnecessary captures from tasks (#19625)
Click to expand commit body
This tackles an issue with us exposing unnecessary env variables in
environment which are not actually needed for tasks themselves (and may
have little utility), yet come into the way of ssh remoting.
/cc @ConradIrwin
Release Notes:
- N/A
Piotr Osiewicz
created
69b12f4
semantic_index: Disable embeddings index for non-staff (#19618)
Click to expand commit body
This PR disables the embeddings index for non-staff users.
Release Notes:
- N/A
Marshall Bowers
created
c386080
ssh: Ensure long server names (and nicknames) truncate (#19621)
Click to expand commit body
Just polishing the UI a bit more. One drawback of this, though, is that
if you _do_ have a big nickname or server name, with this current
solution, you won't be able to see it. Ideally, we should be able to
hover over it and see it in a tooltip, but the `div` still doesn't
support that out of the box.
| Main modal | Modal header |
|--------|--------|
| <img width="1136" alt="Screenshot 2024-10-23 at 12 49 18"
src="https://github.com/user-attachments/assets/ed5f0222-faa1-49bd-b249-2f22497566d8">
| <img width="1136" alt="Screenshot 2024-10-23 at 12 49 23"
src="https://github.com/user-attachments/assets/5a464b12-99e8-4934-aa6a-c9c4c40ea4d4">
|
Release Notes:
- N/A
Danilo Leal
created
6a0c19f
ssh remoting: Log server version check result (#19622)
Click to expand commit body
Release Notes:
- N/A
Thorsten Ball
created
622c266
docs: Add documentation for `auto_install_extensions` setting (#19559)
Click to expand commit body
Improved: Documenation for (un)installing extensions automatically.
Signed-off-by: Tom Zaspel <tom@zaspel.it>
Co-authored-by: Peter Tripp <peter@zed.dev>
Tom Zaspel
and
Peter Tripp
created
dc4396b
ssh remoting: Fix overflowing host in titlebar (#19619)
1a59b64
Fill the rest of the prompt data when sending to the client (#19616)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/19587
Release Notes:
- N/A
Kirill Bulatov
created
992155c
Update example node settings in default.json to use the correct key for node path (#19607)
Click to expand commit body
Hey team!
I was investigating the new node settings added in #18172, and when
trying to set the node path I noticed that the example settings in
`default.json` use the wrong key for the `node_path` - it should be
`path` instead.
See
[here](https://github.com/zed-industries/zed/blob/19eebcd349d9ea14aa9ec6e0fe178ae26945f52a/crates/zed/src/main.rs#L488)
for where the setting is used.
Release Notes:
- N/A
We have to do `workspace.with_local_workspace`, otherwise we'll try to
open the settings on the remote host.
Release Notes:
- N/A
Thorsten Ball
created
b85af0e
Fall back to handling the abs path for external worktree entries (#19612)
Click to expand commit body
Certain files like Rust stdlib ones can be opened by cmd-clicking on
terminal, editor contents, etc.
Those files will not belong to the current worktree, so a fake worktree,
with a single file, invisible (i.e. its dir(s) will not be shown in the
UI such as project panel), will be created on the file opening.
When the file is closed, the worktree is closed and removed along the
way, so those worktrees are considered ephemeral and their ids are not
stored in the database.
This causes issues on reopening such files when they are closed.
The PR makes Zed to fall back to opening the file by abs path when it's
not in the project metadata, but has the abs path stored in history or
in the opened items DB data.
Release Notes:
- Handle external worktree entries [re]open better
Kirill Bulatov
created
bce1b7a
ssh remoting: Add setting to download binary on host (#19606)
Click to expand commit body
This adds the following optional setting:
```json
{
"remote_server": {
"download_on_host": false
}
}
```
Right now, it's **off by default** because I haven't tested it enough.
Release Notes:
- N/A
Thorsten Ball
created
c292bdd
docs: Improve language server configuration dotted/nested notation example (#19608)
Peter Tripp
created
1cb9f64
ssh: Clean up bits of the main modal UI (#19604)
Click to expand commit body
This PR main relevant change is removing the logic we had inserted for
keyboard nav scroll as that was unreliable; we need to figure out a
better solution still. I'm also removing the visible on hover behavior
for the scrollbar as that was making us lose the click and drag feature
the component has. Lastly, I added a bit of right-margin in the delete
icon button so that's not too crammed with the scrollbar.
Release Notes:
- N/A
Danilo Leal
created
1bded42
ssh: Dismiss file picker when new window is opened (#19600)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
7f64f04
ssh remoting: Ensure only single instance can upload binary (#19597)
Click to expand commit body
This creates a `<binary_path>.lock` file and checks for it whenever
uploading a binary.
Parameters:
- Wait for other instance to finish: 10m
- Mark lockfile as stale and ignore it after: 10m
- When waiting on another process, check every 5seconds
We can tweak all of them.
Ideally we'd have a value in the lockfile, that lets us detect whether
the other process is still there, but I haven't found something stable
yet:
- We don't have a stable PID on the server side when we run multiple
commands
- The `ControlPath` is on the client side
Release Notes:
- N/A