From e4b5e132d66ec1d916e882f23aa06ce31bdb2fd3 Mon Sep 17 00:00:00 2001 From: kevin9327 Date: Thu, 3 Sep 2026 07:55:51 +0900 Subject: [PATCH] chore: restore a green make check on main - output.rs: the read_lints test helper (#398) builds ToolCall without the argument_error field added in d83e14a, so the lib-test target does not compile - connect_wire.rs: cursor::router takes NetworkClients since 2dad593 - runtime.rs: clippy::nonminimal_bool from 5cdf642 - update/mod.rs: clippy::needless_return in the Windows arm, ddaa61c --- apps/desktop/src-tauri/src/update/mod.rs | 4 ++-- server/src/cursor/conversation/runtime.rs | 4 ++-- server/src/cursor/tools/tool_call_result/exec/output.rs | 1 + server/tests/connect_wire.rs | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src-tauri/src/update/mod.rs b/apps/desktop/src-tauri/src/update/mod.rs index a6f0e62..3a83f6c 100644 --- a/apps/desktop/src-tauri/src/update/mod.rs +++ b/apps/desktop/src-tauri/src/update/mod.rs @@ -57,9 +57,9 @@ pub(crate) async fn check_portable_update( #[cfg(target_os = "windows")] { let update = portable_update(&app).await?; - return Ok(update.map(|update| PortableUpdateInfo { + Ok(update.map(|update| PortableUpdateInfo { version: update.version, - })); + })) } #[cfg(not(target_os = "windows"))] { diff --git a/server/src/cursor/conversation/runtime.rs b/server/src/cursor/conversation/runtime.rs index 3a1edec..dae5cf5 100644 --- a/server/src/cursor/conversation/runtime.rs +++ b/server/src/cursor/conversation/runtime.rs @@ -172,9 +172,9 @@ impl ConversationRuntime { break; } TransportCommand::RunFinished { generation, finish } => { - if !current + if current .as_ref() - .is_some_and(|current| current.id == generation) + .is_none_or(|current| current.id != generation) { continue; } diff --git a/server/src/cursor/tools/tool_call_result/exec/output.rs b/server/src/cursor/tools/tool_call_result/exec/output.rs index 316085c..2441a5a 100644 --- a/server/src/cursor/tools/tool_call_result/exec/output.rs +++ b/server/src/cursor/tools/tool_call_result/exec/output.rs @@ -459,6 +459,7 @@ mod tests { name: "ReadLints".into(), arguments_text: String::new(), arguments: json!({ "paths": paths }), + argument_error: None, } } diff --git a/server/tests/connect_wire.rs b/server/tests/connect_wire.rs index a370f36..3a4f0a6 100644 --- a/server/tests/connect_wire.rs +++ b/server/tests/connect_wire.rs @@ -21,6 +21,7 @@ use cursor_server::{ proto::{agent::v1 as pb, aiserver::v1 as ai}, }, cursor::transport::TransportRegistry, + network::NetworkClients, }; use flate2::{write::GzEncoder, Compression}; use prost::Message; @@ -102,6 +103,7 @@ async fn bidi_append_gzip_body_is_decompressed_before_protobuf_decode() { .as_path(), ) .unwrap(); + let clients = NetworkClients::new(store.clone()); let registry = TransportRegistry::new( store, Arc::new(fake_provider::FakeProvider::default()), @@ -118,7 +120,7 @@ async fn bidi_append_gzip_body_is_decompressed_before_protobuf_decode() { encoder.write_all(&wire).unwrap(); let compressed = encoder.finish().unwrap(); - let response = cursor::router(registry) + let response = cursor::router(registry, clients) .unwrap() .oneshot( Request::post("/aiserver.v1.BidiService/BidiAppend")