Compare commits

...

20 Commits

Author SHA1 Message Date
Mikayla Maki
6a58d8c2b1 Fix mouse clicks on remote-open-folder UI (#19851)
Also change Zed's standard style to use
`.track_focus(&self.focus_handle(cx))`, instead of
`.track_focus(&self.focus_handle)`, to catch these kinds of errors more
easily in the future.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-10-28 16:01:13 -04:00
Peter Tripp
d641115d19 zed 0.159.2 2024-10-28 15:50:42 -04:00
Peter Tripp
c300c1d600 Merge branch 'main' into v0.159.x 2024-10-28 15:49:46 -04:00
Kirill Bulatov
fd3b5ff0d6 Fix the tests
These tests were removed in Preview, but that commit was not yet cherry-picked here.
2024-10-28 07:54:56 +02:00
Kirill Bulatov
9517964a04 Fixed outline panel panicking on filtering (#19811)
Closes https://github.com/zed-industries/zed/issues/19732

Release Notes:

- Fixed outline panel panicking on filtering
([#19732](https://github.com/zed-industries/zed/issues/19732))
2024-10-28 02:31:18 +02:00
Kirill Bulatov
0798c642d4 Restore horizontal scrollbar checks (#19767)
Closes https://github.com/zed-industries/zed/issues/19637

Follow-up of https://github.com/zed-industries/zed/pull/18927 , restores
the condition that removed the horizontal scrollbar when panel's items
are not long enough.

Release Notes:

- Fixed horizontal scrollbar not being hidden
([#19637](https://github.com/zed-industries/zed/issues/19637))
2024-10-26 21:58:40 +03:00
Kirill Bulatov
6281df900c Update outline panel representation when a theme is changed (#19747)
Release Notes:

- N/A
2024-10-26 01:40:29 +03:00
Kirill Bulatov
c248d15d13 Properly deserialize active pane in the workspace (#19744)
Without setting the active pane metadata, no center pane events are
emitted on start before the pane is focused manually, which breaks
deserialization of other components like outline panel, which should
show the active pane's active item outlines on start.

Release Notes:

- N/A

Co-authored-by: Thorsten Ball <thorsten@zed.dev>
2024-10-26 01:40:29 +03:00
Conrad Irwin
07612cf0a3 Revert "Show invisibles in editor (#19298)"
This reverts commit 6dcec47235.
2024-10-25 13:57:27 -06:00
Conrad Irwin
7ad9f1b908 Fix partial downloads of ssh remote server (#19700)
Release Notes:

- SSH Remoting: fix a bug where inerrrupting ssh connecting could leave
your local binary cached in an invalid state
2024-10-24 14:37:36 -06:00
Kirill Bulatov
c1fedde6f5 Fix ssh project history (#19683)
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
2024-10-24 21:52:02 +03:00
Marshall Bowers
2f030e3b9a assistant: Add implementation for /delta argument completion (#19693)
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.
2024-10-24 13:40:31 -04:00
Peter Tripp
391243da0a zed 0.159.1 2024-10-24 13:13:02 -04:00
Danilo Leal
80da78b450 ssh: Capitalize error and connection strings (#19675)
Another tiny PR for the sake of consistency :)

Release Notes:

- N/A
2024-10-24 11:00:05 -04:00
Thorsten Ball
3b3477c5a1 ssh remoting: Fix wrong working directory for SSH terminals (#19672)
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.
2024-10-24 10:59:59 -04:00
Thorsten Ball
8e80ce8430 ssh remoting: Fix version check (#19668)
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
2024-10-24 10:59:53 -04:00
Kirill Bulatov
1b1872666c Use zstd without dynamic linking due to musl usage (#19627)
Due to leaning towards `musl` builds, unit features for `zstd` and link
it statically too for Zed.


bfe1e34f59/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
2024-10-24 10:59:47 -04:00
Peter Tripp
ac5cb8b969 Switch to Anthropic -latest tags (#19615)
- 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`.
2024-10-24 10:52:39 -04:00
Antonio Scandurra
c4060fe075 Fix crash in collab when sending worktree updates (#19678)
This pull request does a couple of things:

- In 29c2df73e1, 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 3e7a2e5c30, 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>
2024-10-24 15:58:58 +02:00
Joseph T. Lyons
ca336567ef v0.159.x preview 2024-10-23 13:12:16 -04:00
23 changed files with 31 additions and 31 deletions

2
Cargo.lock generated
View File

@@ -14991,7 +14991,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.160.0"
version = "0.159.2"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -4707,7 +4707,7 @@ impl Render for ConfigurationView {
let mut element = v_flex()
.id("assistant-configuration-view")
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.bg(cx.theme().colors().editor_background)
.size_full()
.overflow_y_scroll()

View File

@@ -2726,7 +2726,7 @@ impl Render for CollabPanel {
.on_action(cx.listener(CollabPanel::collapse_selected_channel))
.on_action(cx.listener(CollabPanel::expand_selected_channel))
.on_action(cx.listener(CollabPanel::start_move_selected_channel))
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.size_full()
.child(if self.user_store.read(cx).current_user().is_none() {
self.render_signed_out(cx)

View File

@@ -185,7 +185,7 @@ impl Render for CopilotCodeVerification {
v_flex()
.id("copilot code verification")
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.elevation_3(cx)
.w_96()
.items_center()

View File

@@ -101,7 +101,7 @@ impl Render for ProjectDiagnosticsEditor {
};
div()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.when(self.path_states.is_empty(), |el| {
el.key_context("EmptyPane")
})

View File

@@ -485,7 +485,7 @@ impl Render for TextInput {
div()
.flex()
.key_context("TextInput")
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.cursor(CursorStyle::IBeam)
.on_action(cx.listener(Self::backspace))
.on_action(cx.listener(Self::delete))
@@ -549,7 +549,7 @@ impl Render for InputExample {
let num_keystrokes = self.recent_keystrokes.len();
div()
.bg(rgb(0xaaaaaa))
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.flex()
.flex_col()
.size_full()

View File

@@ -16,7 +16,7 @@
/// impl Render for Editor {
/// fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
/// div()
/// .track_focus(&self.focus_handle)
/// .track_focus(&self.focus_handle(cx))
/// .keymap_context("Editor")
/// .on_action(cx.listener(Editor::undo))
/// .on_action(cx.listener(Editor::redo))

View File

@@ -271,7 +271,7 @@ impl Render for ImageView {
.left_0();
div()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.size_full()
.child(checkered_background)
.child(

View File

@@ -479,7 +479,7 @@ impl Render for MarkdownPreviewView {
v_flex()
.id("MarkdownPreview")
.key_context("MarkdownPreview")
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.size_full()
.bg(cx.theme().colors().editor_background)
.p_4()

View File

@@ -3787,7 +3787,7 @@ impl Render for OutlinePanel {
}
}),
)
.track_focus(&self.focus_handle);
.track_focus(&self.focus_handle(cx));
if self.cached_entries.is_empty() {
let header = if self.updating_fs_entries {

View File

@@ -52,8 +52,8 @@ impl EmptyHead {
}
impl Render for EmptyHead {
fn render(&mut self, _: &mut ViewContext<Self>) -> impl IntoElement {
div().track_focus(&self.focus_handle)
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
div().track_focus(&self.focus_handle(cx))
}
}

View File

@@ -3136,7 +3136,7 @@ impl Render for ProjectPanel {
}
}),
)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.child(
uniform_list(cx.view().clone(), "entries", item_count, {
|this, range, cx| {
@@ -3268,7 +3268,7 @@ impl Render for ProjectPanel {
.id("empty-project_panel")
.size_full()
.p_4()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.child(
Button::new("open_project", "Open a project")
.full_width()

View File

@@ -149,7 +149,7 @@ impl Render for DisconnectedOverlay {
};
div()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.elevation_3(cx)
.on_action(cx.listener(Self::cancel))
.occlude()

View File

@@ -1266,7 +1266,7 @@ impl Render for RemoteServerProjects {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
self.selectable_items.reset();
div()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.elevation_3(cx)
.w(rems(34.))
.key_context("RemoteServerModal")

View File

@@ -327,7 +327,7 @@ impl Render for ProjectSearchView {
div()
.flex_1()
.size_full()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.child(self.results_editor.clone())
} else {
let model = self.model.read(cx);
@@ -365,7 +365,7 @@ impl Render for ProjectSearchView {
.size_full()
.justify_center()
.bg(cx.theme().colors().editor_background)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.child(
h_flex()
.size_full()

View File

@@ -975,7 +975,7 @@ impl Render for TerminalView {
div()
.size_full()
.relative()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.key_context(self.dispatch_context(cx))
.on_action(cx.listener(TerminalView::send_text))
.on_action(cx.listener(TerminalView::send_keystroke))

View File

@@ -348,7 +348,7 @@ impl Render for ContextMenu {
.min_w(px(200.))
.max_h(vh(0.75, cx))
.overflow_y_scroll()
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.on_mouse_down_out(cx.listener(|this, _, cx| this.cancel(&menu::Cancel, cx)))
.key_context("menu")
.on_action(cx.listener(ContextMenu::select_first))

View File

@@ -72,7 +72,7 @@ impl Render for WelcomePage {
h_flex()
.size_full()
.bg(cx.theme().colors().editor_background)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.child(
v_flex()
.w_80()

View File

@@ -658,7 +658,7 @@ impl Render for Dock {
div()
.key_context(dispatch_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.flex()
.bg(cx.theme().colors().panel_background)
.border_color(cx.theme().colors().border)
@@ -689,7 +689,7 @@ impl Render for Dock {
} else {
div()
.key_context(dispatch_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
}
}
}
@@ -826,8 +826,8 @@ pub mod test {
}
impl Render for TestPanel {
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
div().id("test").track_focus(&self.focus_handle)
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
div().id("test").track_focus(&self.focus_handle(cx))
}
}

View File

@@ -1173,8 +1173,8 @@ pub mod test {
}
impl Render for TestItem {
fn render(&mut self, _: &mut ViewContext<Self>) -> impl IntoElement {
gpui::div().track_focus(&self.focus_handle)
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
gpui::div().track_focus(&self.focus_handle(cx))
}
}

View File

@@ -2574,7 +2574,7 @@ impl Render for Pane {
v_flex()
.key_context(key_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.size_full()
.flex_none()
.overflow_hidden()

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.160.0"
version = "0.159.2"
publish = false
license = "GPL-3.0-or-later"
authors = ["Zed Team <hi@zed.dev>"]

View File

@@ -1 +1 @@
dev
preview