11use super :: * ;
22use anyhow:: Result ;
3- use async_trait:: async_trait;
43use tokio:: task:: LocalSet ;
54use tokio:: time:: { Duration , timeout} ;
65
76pub struct TestClient ;
87pub struct TestAgent ;
98
10- #[ async_trait( ?Send ) ]
119impl Agent for TestAgent {
12- async fn initialize ( & self , _request : InitializeParams ) -> Result < InitializeResponse > {
10+ async fn initialize ( & self ) -> Result < InitializeResponse > {
1311 Ok ( InitializeResponse {
1412 is_authenticated : true ,
1513 } )
1614 }
1715
18- async fn authenticate ( & self , _request : AuthenticateParams ) -> Result < AuthenticateResponse > {
19- Ok ( AuthenticateResponse )
16+ async fn authenticate ( & self ) -> Result < ( ) > {
17+ Ok ( ( ) )
2018 }
2119
22- async fn send_user_message (
23- & self ,
24- _request : SendUserMessageParams ,
25- ) -> Result < SendUserMessageResponse > {
26- Ok ( SendUserMessageResponse )
20+ async fn send_user_message ( & self , _request : SendUserMessageParams ) -> Result < ( ) > {
21+ Ok ( ( ) )
2722 }
2823
29- async fn cancel_send_message (
30- & self ,
31- _request : CancelSendMessageParams ,
32- ) -> Result < CancelSendMessageResponse > {
33- Ok ( CancelSendMessageResponse )
24+ async fn cancel_send_message ( & self ) -> Result < ( ) > {
25+ Ok ( ( ) )
3426 }
3527}
3628
37- #[ async_trait( ?Send ) ]
3829impl Client for TestClient {
3930 async fn stream_assistant_message_chunk (
4031 & self ,
4132 _request : StreamAssistantMessageChunkParams ,
42- ) -> Result < StreamAssistantMessageChunkResponse > {
43- Ok ( StreamAssistantMessageChunkResponse { } )
33+ ) -> Result < ( ) > {
34+ Ok ( ( ) )
4435 }
4536
4637 async fn request_tool_call_confirmation (
@@ -57,11 +48,8 @@ impl Client for TestClient {
5748 Ok ( PushToolCallResponse { id : ToolCallId ( 0 ) } )
5849 }
5950
60- async fn update_tool_call (
61- & self ,
62- _request : UpdateToolCallParams ,
63- ) -> Result < UpdateToolCallResponse > {
64- Ok ( UpdateToolCallResponse )
51+ async fn update_tool_call ( & self , _request : UpdateToolCallParams ) -> Result < ( ) > {
52+ Ok ( ( ) )
6553 }
6654}
6755
0 commit comments