@@ -232,6 +232,7 @@ pub(crate) fn classify_submission(is_running: bool, text: &str) -> SubmitAction
232232}
233233
234234#[ cfg( feature = "git-worktree" ) ]
235+ #[ allow( clippy:: too_many_arguments) ]
235236async fn spawn_merge_agent (
236237 branch : & str ,
237238 target : & str ,
@@ -1307,10 +1308,10 @@ pub async fn run_interactive(
13071308 "chain declined — won't ask again this session" ,
13081309 C_AGENT ,
13091310 ) ?;
1310- if let Some ( ref name) = context. current_prompt_name {
1311- if !context. chain_declined. contains( name) {
1312- context . chain_declined . push ( name . clone ( ) ) ;
1313- }
1311+ if let Some ( ref name) = context. current_prompt_name
1312+ && !context. chain_declined. contains( name)
1313+ {
1314+ context . chain_declined . push ( name . clone ( ) ) ;
13141315 }
13151316 refresh_display( & mut renderer, & mut input, session, is_running, loop_label. as_deref( ) , context. current_prompt_name. as_deref( ) , perm_mode( ) . as_deref( ) , chain_label_msg. as_deref( ) , btw_total_cost, btw_total_in, btw_total_out) ?;
13161317 continue ;
@@ -1319,7 +1320,7 @@ pub async fn run_interactive(
13191320 renderer. chain_but_mode = true ;
13201321 renderer. chain_prompt = None ;
13211322 input. clear_buffer( ) ;
1322- chain_label_msg = chain_pending. map( |p| p. chain_label( ) . to_string( ) . into ( ) ) ;
1323+ chain_label_msg = chain_pending. map( |p| p. chain_label( ) . to_string( ) ) ;
13231324 refresh_display( & mut renderer, & mut input, session, is_running, loop_label. as_deref( ) , context. current_prompt_name. as_deref( ) , perm_mode( ) . as_deref( ) , chain_label_msg. as_deref( ) , btw_total_cost, btw_total_in, btw_total_out) ?;
13241325 continue ;
13251326 }
@@ -2101,30 +2102,30 @@ pub async fn run_interactive(
21012102 }
21022103
21032104 #[ cfg( feature = "advisor" ) ]
2104- if let Some ( ref mut rx) = handoff_rx {
2105- if let Ok ( handoff_req) = rx. try_recv ( ) {
2106- handle_human_handoff (
2107- handoff_req ,
2108- & mut renderer ,
2109- & mut user_rx ,
2110- & mut agent_line_started ,
2111- & mut was_reasoning ,
2112- )
2113- . await ? ;
2114- refresh_display (
2115- & mut renderer ,
2116- & mut input ,
2117- session ,
2118- is_running ,
2119- loop_label . as_deref ( ) ,
2120- context . current_prompt_name . as_deref ( ) ,
2121- perm_mode ( ) . as_deref ( ) ,
2122- chain_label_msg . as_deref ( ) ,
2123- btw_total_cost ,
2124- btw_total_in ,
2125- btw_total_out ,
2126- ) ? ;
2127- }
2105+ if let Some ( ref mut rx) = handoff_rx
2106+ && let Ok ( handoff_req) = rx. try_recv ( )
2107+ {
2108+ handle_human_handoff (
2109+ handoff_req ,
2110+ & mut renderer ,
2111+ & mut user_rx ,
2112+ & mut agent_line_started ,
2113+ & mut was_reasoning ,
2114+ )
2115+ . await ? ;
2116+ refresh_display (
2117+ & mut renderer ,
2118+ & mut input ,
2119+ session ,
2120+ is_running ,
2121+ loop_label . as_deref ( ) ,
2122+ context . current_prompt_name . as_deref ( ) ,
2123+ perm_mode ( ) . as_deref ( ) ,
2124+ chain_label_msg . as_deref ( ) ,
2125+ btw_total_cost ,
2126+ btw_total_in ,
2127+ btw_total_out ,
2128+ ) ? ;
21282129 }
21292130 }
21302131
0 commit comments