fix: remove batched json rpc support (#408)

* fix: remove batched json rpc  support

* fix(test): fix schema
This commit is contained in:
4t145 2025-09-03 14:13:55 +08:00 • committed by GitHub
commit f381c2b899
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -468,10 +468,6 @@ impl LocalSessionWorker {
OutboundChannel::Common
}
}
ServerJsonRpcMessage::BatchRequest(_) | ServerJsonRpcMessage::BatchResponse(_) => {
// the server side should never yield a batch request or response now
unreachable!("server side won't yield batch request or response")
}
}
}
async fn handle_server_message(
@ -824,20 +820,6 @@ impl Worker for LocalSessionWorker {
crate::model::JsonRpcMessage::Notification(notification) => {
self.catch_cancellation_notification(notification)
}
crate::model::JsonRpcMessage::BatchRequest(items) => {
for r in items {
match r {
crate::model::JsonRpcBatchRequestItem::Request(request) => {
if let Some(http_request_id) = http_request_id {
self.register_request(request, http_request_id)
}
}
crate::model::JsonRpcBatchRequestItem::Notification(
notification,
) => self.catch_cancellation_notification(notification),
}
}
}
_ => {}
}
context.send_to_handler(json_rpc_message).await?;