@@ -39,14 +39,14 @@ pub struct APICallResponse {
3939/// VS Code API call representation
4040#[ allow( dead_code) ]
4141pub struct APICall {
42- /// Extension ID
43- extension_id : String ,
44- /// API method
45- api_method : String ,
46- /// Arguments
47- arguments : Vec < serde_json:: Value > ,
48- /// Timestamp
49- timestamp : u64 ,
42+ /// Extension ID
43+ extension_id : String ,
44+ /// API method
45+ api_method : String ,
46+ /// Arguments
47+ arguments : Vec < serde_json:: Value > ,
48+ /// Timestamp
49+ timestamp : u64 ,
5050}
5151
5252/// API method handler callback
@@ -56,30 +56,30 @@ type APIMethodHandler = fn(&str, Vec<serde_json::Value>) -> Result<serde_json::V
5656/// Async API method handler callback
5757#[ allow( dead_code) ]
5858type AsyncAPIMethodHandler =
59- fn ( & str , Vec < serde_json:: Value > ) -> Box < dyn std:: future:: Future < Output = Result < serde_json:: Value > > + Send + Unpin > ;
59+ fn ( & str , Vec < serde_json:: Value > ) -> Box < dyn std:: future:: Future < Output = Result < serde_json:: Value > > + Send + Unpin > ;
6060
6161/// API method registration
6262#[ derive( Clone ) ]
6363pub struct APIMethodInfo {
64- /// Method name
65- #[ allow( dead_code) ]
66- name : String ,
67- /// Description
68- #[ allow( dead_code) ]
69- description : String ,
70- /// Parameters schema (JSON Schema)
71- #[ allow( dead_code) ]
72- parameters : Option < serde_json:: Value > ,
73- /// Return type schema (JSON Schema)
74- #[ allow( dead_code) ]
75- returns : Option < serde_json:: Value > ,
76- /// Whether this method is async
77- #[ allow( dead_code) ]
78- is_async : bool ,
79- /// Call count
80- call_count : u64 ,
81- /// Total execution time in microseconds
82- total_time_us : u64 ,
64+ /// Method name
65+ #[ allow( dead_code) ]
66+ name : String ,
67+ /// Description
68+ #[ allow( dead_code) ]
69+ description : String ,
70+ /// Parameters schema (JSON Schema)
71+ #[ allow( dead_code) ]
72+ parameters : Option < serde_json:: Value > ,
73+ /// Return type schema (JSON Schema)
74+ #[ allow( dead_code) ]
75+ returns : Option < serde_json:: Value > ,
76+ /// Whether this method is async
77+ #[ allow( dead_code) ]
78+ is_async : bool ,
79+ /// Call count
80+ call_count : u64 ,
81+ /// Total execution time in microseconds
82+ total_time_us : u64 ,
8383}
8484
8585/// VS Code API bridge for Grove
@@ -396,10 +396,10 @@ mod tests {
396396 #[ tokio:: test]
397397 async fn test_method_registration ( ) {
398398 let bridge = APIBridgeImpl :: new ( ) ;
399- let result: Result < ( ) > = bridge. register_method ( "test.method" , "Test method" , None , None , false ) . await ;
399+ let result: Result < ( ) > = bridge. register_method ( "test.method" , "Test method" , None , None , false ) . await ;
400400 assert ! ( result. is_ok( ) ) ;
401401
402- let methods: Vec < APIMethodInfo > = bridge. get_methods ( ) . await ;
402+ let methods: Vec < APIMethodInfo > = bridge. get_methods ( ) . await ;
403403 assert ! ( methods. iter( ) . any( |m| m. name == "test.method" ) ) ;
404404 }
405405
0 commit comments