mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-03 18:23:51 +08:00
chore: restore a green make check on main
- output.rs: the read_lints test helper (#398) builds ToolCall without the argument_error field added ind83e14a, so the lib-test target does not compile - connect_wire.rs: cursor::router takes NetworkClients since2dad593- runtime.rs: clippy::nonminimal_bool from5cdf642- update/mod.rs: clippy::needless_return in the Windows arm,ddaa61c
This commit is contained in:
@@ -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"))]
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -459,6 +459,7 @@ mod tests {
|
||||
name: "ReadLints".into(),
|
||||
arguments_text: String::new(),
|
||||
arguments: json!({ "paths": paths }),
|
||||
argument_error: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user