diff --git a/Cargo.toml b/Cargo.toml index ae119718167e929a0f116deb49ea36a70f91644c..0060735310091a1ff66b1920e3478cd1ed77efa0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -843,7 +843,7 @@ too_many_arguments = "allow" large_enum_variant = "allow" # Boolean expressions can be hard to read, requiring only the minimal form gets in the way -nonminimal_bol = "allow" +nonminimal_bool = "allow" [workspace.metadata.cargo-machete] ignored = [ diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 1bb9b92602ca4cdc1d0426ec84685b0f587e5eef..873aa82606e00d6a5c6b765be6baaaa2ada04739 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -418,9 +418,7 @@ impl AcpThreadView { window: &mut Window, cx: &mut Context, ) -> ThreadState { - if project.read(cx).is_via_collab() - && agent.clone().downcast::().is_none() - { + if !project.read(cx).is_local() && agent.clone().downcast::().is_none() { return ThreadState::LoadError(LoadError::Other( "External agents are not yet supported for remote projects.".into(), )); diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index abb9f8e5ec6e9aebb4d5f2228f68d0621047c419..3623419752384abf6c115dccf89b652c1b351b72 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -1075,7 +1075,7 @@ impl AgentPanel { let workspace = self.workspace.clone(); let project = self.project.clone(); let fs = self.fs.clone(); - let is_via_collab = self.project.read(cx).is_via_collab(); + let is_not_local = !self.project.read(cx).is_local(); const LAST_USED_EXTERNAL_AGENT_KEY: &str = "agent_panel__last_used_external_agent"; @@ -1107,7 +1107,7 @@ impl AgentPanel { agent } None => { - if is_via_collab { + if is_not_local { ExternalAgent::NativeAgent } else { cx.background_spawn(async move { @@ -2509,10 +2509,8 @@ impl AgentPanel { .with_handle(self.new_thread_menu_handle.clone()) .menu({ let workspace = self.workspace.clone(); - let is_via_collab = workspace - .update(cx, |workspace, cx| { - workspace.project().read(cx).is_via_collab() - }) + let is_not_local = workspace + .update(cx, |workspace, cx| !workspace.project().read(cx).is_local()) .unwrap_or_default(); move |window, cx| { @@ -2604,7 +2602,7 @@ impl AgentPanel { ContextMenuEntry::new("New Gemini CLI Thread") .icon(IconName::AiGemini) .icon_color(Color::Muted) - .disabled(is_via_collab) + .disabled(is_not_local) .handler({ let workspace = workspace.clone(); move |window, cx| { @@ -2631,7 +2629,7 @@ impl AgentPanel { menu.item( ContextMenuEntry::new("New Claude Code Thread") .icon(IconName::AiClaude) - .disabled(is_via_collab) + .disabled(is_not_local) .icon_color(Color::Muted) .handler({ let workspace = workspace.clone(); @@ -2664,7 +2662,7 @@ impl AgentPanel { ContextMenuEntry::new(format!("New {} Thread", agent_name)) .icon(IconName::Terminal) .icon_color(Color::Muted) - .disabled(is_via_collab) + .disabled(is_not_local) .handler({ let workspace = workspace.clone(); let agent_name = agent_name.clone(); diff --git a/crates/git_ui/src/branch_picker.rs b/crates/git_ui/src/branch_picker.rs index fb56cdcc5def31765d26545fcfa79b5f8c44e884..2b5a543e932aeed0ca0f00e2596e7fa79a35fb9a 100644 --- a/crates/git_ui/src/branch_picker.rs +++ b/crates/git_ui/src/branch_picker.rs @@ -341,7 +341,6 @@ impl PickerDelegate for BranchListDelegate { }; picker .update(cx, |picker, _| { - #[allow(clippy::nonminimal_bool)] if !query.is_empty() && !matches .first() diff --git a/crates/vim/src/visual.rs b/crates/vim/src/visual.rs index fcce00f0c0ffee43f1b7980fcf9fe3a70f6e7794..c62712af311eb09f1203ecb54d939402f936b21c 100644 --- a/crates/vim/src/visual.rs +++ b/crates/vim/src/visual.rs @@ -216,7 +216,6 @@ impl Vim { // If the file ends with a newline (which is common) we don't do this. // so that if you go to the end of such a file you can use "up" to go // to the previous line and have it work somewhat as expected. - #[allow(clippy::nonminimal_bool)] if !selection.reversed && !selection.is_empty() && !(selection.end.column() == 0 && selection.end == map.max_point())