
Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com> Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
20 lines
570 B
Rust
20 lines
570 B
Rust
use agentic_coding_protocol as acp;
|
|
use anyhow::Result;
|
|
use futures::future::{FutureExt as _, LocalBoxFuture};
|
|
|
|
pub trait AgentConnection {
|
|
fn request_any(
|
|
&self,
|
|
params: acp::AnyAgentRequest,
|
|
) -> LocalBoxFuture<'static, Result<acp::AnyAgentResult>>;
|
|
}
|
|
|
|
impl AgentConnection for acp::AgentConnection {
|
|
fn request_any(
|
|
&self,
|
|
params: acp::AnyAgentRequest,
|
|
) -> LocalBoxFuture<'static, Result<acp::AnyAgentResult>> {
|
|
let task = self.request_any(params);
|
|
async move { Ok(task.await?) }.boxed_local()
|
|
}
|
|
}
|