@@ -2129,7 +2129,7 @@ impl ChatSession {
21292129 user_input
21302130 } ;
21312131
2132- // For tool approval responses (y/n/t), preserve continuation ID for billing consistency
2132+ // For tool approval responses (y/n/t), preserve continuation ID
21332133 let preserve_continuation_id = is_simple_tool_interaction ( & input_trimmed) ;
21342134 self . conversation . abandon_tool_use_with_continuation_policy (
21352135 & self . tool_uses ,
@@ -3700,7 +3700,7 @@ fn is_reject_response(input: &str) -> bool {
37003700}
37013701
37023702/// Check if input is any simple tool interaction response (y/Y/n/N/t/T)
3703- /// These responses should preserve continuation ID for billing consistency
3703+ /// These responses should preserve continuation ID
37043704fn is_simple_tool_interaction ( input : & str ) -> bool {
37053705 is_trust_response ( input) || is_accept_response ( input) || is_reject_response ( input)
37063706}
@@ -4455,28 +4455,3 @@ mod tests {
44554455 }
44564456 }
44574457}
4458-
4459- // Helper method to save the agent config to file
4460- async fn save_agent_config ( os : & mut Os , config : & Agent , agent_name : & str , is_global : bool ) -> Result < ( ) , ChatError > {
4461- let config_dir = if is_global {
4462- directories:: chat_global_agent_path ( os)
4463- . map_err ( |e| ChatError :: Custom ( format ! ( "Could not find global agent directory: {}" , e) . into ( ) ) ) ?
4464- } else {
4465- directories:: chat_local_agent_dir ( os)
4466- . map_err ( |e| ChatError :: Custom ( format ! ( "Could not find local agent directory: {}" , e) . into ( ) ) ) ?
4467- } ;
4468-
4469- tokio:: fs:: create_dir_all ( & config_dir)
4470- . await
4471- . map_err ( |e| ChatError :: Custom ( format ! ( "Failed to create config directory: {}" , e) . into ( ) ) ) ?;
4472-
4473- let config_file = config_dir. join ( format ! ( "{}.json" , agent_name) ) ;
4474- let config_json = serde_json:: to_string_pretty ( config)
4475- . map_err ( |e| ChatError :: Custom ( format ! ( "Failed to serialize agent config: {}" , e) . into ( ) ) ) ?;
4476-
4477- tokio:: fs:: write ( & config_file, config_json)
4478- . await
4479- . map_err ( |e| ChatError :: Custom ( format ! ( "Failed to write agent config file: {}" , e) . into ( ) ) ) ?;
4480-
4481- Ok ( ( ) )
4482- }
0 commit comments