1414
1515use std:: cell:: Cell ;
1616
17- use agent_client_protocol:: {
18- self as acp, AuthenticateResponse , Client , ExtNotification , ExtRequest , ExtResponse ,
19- SessionNotification , SetSessionModeResponse ,
20- } ;
17+ use agent_client_protocol:: { self as acp, Client as _} ;
2118use serde_json:: json;
2219use tokio:: sync:: { mpsc, oneshot} ;
2320use tokio_util:: compat:: { TokioAsyncReadCompatExt as _, TokioAsyncWriteCompatExt as _} ;
@@ -56,9 +53,9 @@ impl acp::Agent for ExampleAgent {
5653 async fn authenticate (
5754 & self ,
5855 arguments : acp:: AuthenticateRequest ,
59- ) -> Result < AuthenticateResponse , acp:: Error > {
56+ ) -> Result < acp :: AuthenticateResponse , acp:: Error > {
6057 log:: info!( "Received authenticate request {arguments:?}" ) ;
61- Ok ( AuthenticateResponse :: default ( ) )
58+ Ok ( acp :: AuthenticateResponse :: default ( ) )
6259 }
6360
6461 async fn new_session (
@@ -99,7 +96,7 @@ impl acp::Agent for ExampleAgent {
9996 let ( tx, rx) = oneshot:: channel ( ) ;
10097 self . session_update_tx
10198 . send ( (
102- SessionNotification {
99+ acp :: SessionNotification {
103100 session_id : arguments. session_id . clone ( ) ,
104101 update : acp:: SessionUpdate :: AgentMessageChunk { content } ,
105102 meta : None ,
@@ -125,7 +122,7 @@ impl acp::Agent for ExampleAgent {
125122 args : acp:: SetSessionModeRequest ,
126123 ) -> Result < acp:: SetSessionModeResponse , acp:: Error > {
127124 log:: info!( "Received set session mode request {args:?}" ) ;
128- Ok ( SetSessionModeResponse :: default ( ) )
125+ Ok ( acp :: SetSessionModeResponse :: default ( ) )
129126 }
130127
131128 #[ cfg( feature = "unstable" ) ]
@@ -137,7 +134,7 @@ impl acp::Agent for ExampleAgent {
137134 Ok ( acp:: SetSessionModelResponse :: default ( ) )
138135 }
139136
140- async fn ext_method ( & self , args : ExtRequest ) -> Result < ExtResponse , acp:: Error > {
137+ async fn ext_method ( & self , args : acp :: ExtRequest ) -> Result < acp :: ExtResponse , acp:: Error > {
141138 log:: info!(
142139 "Received extension method call: method={}, params={:?}" ,
143140 args. method,
@@ -146,7 +143,7 @@ impl acp::Agent for ExampleAgent {
146143 Ok ( serde_json:: value:: to_raw_value ( & json ! ( { "example" : "response" } ) ) ?. into ( ) )
147144 }
148145
149- async fn ext_notification ( & self , args : ExtNotification ) -> Result < ( ) , acp:: Error > {
146+ async fn ext_notification ( & self , args : acp :: ExtNotification ) -> Result < ( ) , acp:: Error > {
150147 log:: info!(
151148 "Received extension notification: method={}, params={:?}" ,
152149 args. method,
0 commit comments