File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -522,14 +522,16 @@ impl SessionHooks for RecordingHooks {
522522 input : PostToolUseInput ,
523523 _ctx : HookContext ,
524524 ) -> Option < PostToolUseOutput > {
525- let output = ( input. tool_name == "report_intent" ) . then ( || PostToolUseOutput {
526- modified_result : Some ( json ! ( {
527- "textResultForLlm" : "modified by post hook" ,
528- "resultType" : "success" ,
529- "toolTelemetry" : { } ,
530- } ) ) ,
531- suppress_output : Some ( false ) ,
532- ..PostToolUseOutput :: default ( )
525+ let output = ( self . post_tool . is_some ( ) && input. tool_name == "report_intent" ) . then ( || {
526+ PostToolUseOutput {
527+ modified_result : Some ( json ! ( {
528+ "textResultForLlm" : "modified by post hook" ,
529+ "resultType" : "success" ,
530+ "toolTelemetry" : { } ,
531+ } ) ) ,
532+ suppress_output : Some ( false ) ,
533+ ..PostToolUseOutput :: default ( )
534+ }
533535 } ) ;
534536 if let Some ( tx) = & self . post_tool {
535537 let _ = tx. send ( input) ;
You can’t perform that action at this time.
0 commit comments