@@ -74,16 +74,20 @@ pub(crate) async fn run(
7474 } ;
7575 }
7676
77- let input_json = match serde_json:: to_string ( & PreToolUseCommandInput :: new (
78- request. session_id . to_string ( ) ,
79- request. turn_id . clone ( ) ,
80- request. transcript_path . clone ( ) ,
81- request. cwd . display ( ) . to_string ( ) ,
82- request. model . clone ( ) ,
83- request. permission_mode . clone ( ) ,
84- request. tool_use_id . clone ( ) ,
85- request. command . clone ( ) ,
86- ) ) {
77+ let input_json = match serde_json:: to_string ( & PreToolUseCommandInput {
78+ session_id : request. session_id . to_string ( ) ,
79+ turn_id : request. turn_id . clone ( ) ,
80+ transcript_path : crate :: schema:: NullableString :: from_path ( request. transcript_path . clone ( ) ) ,
81+ cwd : request. cwd . display ( ) . to_string ( ) ,
82+ hook_event_name : "PreToolUse" . to_string ( ) ,
83+ model : request. model . clone ( ) ,
84+ permission_mode : request. permission_mode . clone ( ) ,
85+ tool_name : "Bash" . to_string ( ) ,
86+ tool_input : crate :: schema:: PreToolUseToolInput {
87+ command : request. command . clone ( ) ,
88+ } ,
89+ tool_use_id : request. tool_use_id . clone ( ) ,
90+ } ) {
8791 Ok ( input_json) => input_json,
8892 Err ( error) => {
8993 return serialization_failure_outcome ( common:: serialization_failure_hook_events (
0 commit comments