@@ -306,7 +306,11 @@ fn run_interactive(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
306306
307307 let total_files = file_pairs. len ( ) ;
308308 for ( idx, ( path, diff) ) in file_pairs. into_iter ( ) . enumerate ( ) {
309- let category = categorize_file_interactive ( idx, total_files, & path) ?;
309+ let category = if commitbot:: is_lock_file ( & path) {
310+ FileCategory :: Lock
311+ } else {
312+ categorize_file_interactive ( idx, total_files, & path) ?
313+ } ;
310314 file_changes. push ( FileChange {
311315 path,
312316 category,
@@ -329,7 +333,9 @@ fn run_interactive(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
329333 . expect ( "progress style template" ) ,
330334 ) ;
331335 line. set_prefix ( fc. path . clone ( ) ) ;
332- if matches ! ( fc. category, FileCategory :: Ignored ) {
336+ if matches ! ( fc. category, FileCategory :: Lock ) {
337+ line. finish_with_message ( dimmed ( "lock file updated, not summarized" ) ) ;
338+ } else if matches ! ( fc. category, FileCategory :: Ignored ) {
333339 line. finish_with_message ( dimmed ( "ignored" ) ) ;
334340 } else {
335341 line. enable_steady_tick ( Duration :: from_millis ( 120 ) ) ;
@@ -346,20 +352,27 @@ fn run_interactive(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
346352
347353 let mut indices_to_summarize = Vec :: new ( ) ;
348354 let mut ignored_count = 0usize ;
355+ let mut lock_count = 0usize ;
349356
350357 for ( idx, fc) in file_changes. iter ( ) . enumerate ( ) {
351- if matches ! ( fc. category, FileCategory :: Ignored ) {
352- pb. inc ( 1 ) ;
353- ignored_count += 1 ;
354- } else {
355- indices_to_summarize. push ( idx) ;
358+ match fc. category {
359+ FileCategory :: Ignored => {
360+ pb. inc ( 1 ) ;
361+ ignored_count += 1 ;
362+ }
363+ FileCategory :: Lock => {
364+ pb. inc ( 1 ) ;
365+ lock_count += 1 ;
366+ }
367+ _ => indices_to_summarize. push ( idx) ,
356368 }
357369 }
358370
359371 log:: info!(
360- "Summarizing {} files ({} ignored). max_concurrent_requests = {}" ,
372+ "Summarizing {} files ({} ignored, {} lock ). max_concurrent_requests = {}" ,
361373 indices_to_summarize. len( ) ,
362374 ignored_count,
375+ lock_count,
363376 cfg. max_concurrent_requests,
364377 ) ;
365378
@@ -450,11 +463,18 @@ fn run_auto(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
450463
451464 let mut file_changes: Vec < FileChange > = file_pairs
452465 . into_iter ( )
453- . map ( |( path, diff) | FileChange {
454- path,
455- category : FileCategory :: Main ,
456- diff,
457- summary : None ,
466+ . map ( |( path, diff) | {
467+ let category = if commitbot:: is_lock_file ( & path) {
468+ FileCategory :: Lock
469+ } else {
470+ FileCategory :: Main
471+ } ;
472+ FileChange {
473+ path,
474+ category,
475+ diff,
476+ summary : None ,
477+ }
458478 } )
459479 . collect ( ) ;
460480
@@ -481,8 +501,12 @@ fn run_auto(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
481501 fc. path . clone ( )
482502 } ;
483503 line. set_prefix ( prefix) ;
484- line. enable_steady_tick ( Duration :: from_millis ( 120 ) ) ;
485- line. set_message ( "waiting" ) ;
504+ if matches ! ( fc. category, FileCategory :: Lock ) {
505+ line. finish_with_message ( dimmed ( "lock file updated, not summarized" ) ) ;
506+ } else {
507+ line. enable_steady_tick ( Duration :: from_millis ( 120 ) ) ;
508+ line. set_message ( "waiting" ) ;
509+ }
486510 file_lines. push ( line) ;
487511 }
488512
@@ -492,11 +516,22 @@ fn run_auto(cli: &Cli, cfg: &Config, llm: &dyn LlmClient) -> Result<()> {
492516 . unwrap_or_else ( |_| ProgressStyle :: default_bar ( ) ) ,
493517 ) ;
494518
495- let indices_to_summarize: Vec < usize > = ( 0 ..total) . collect ( ) ;
519+ let mut indices_to_summarize: Vec < usize > = Vec :: new ( ) ;
520+ let mut lock_count = 0usize ;
521+
522+ for ( idx, fc) in file_changes. iter ( ) . enumerate ( ) {
523+ if matches ! ( fc. category, FileCategory :: Lock ) {
524+ pb. inc ( 1 ) ;
525+ lock_count += 1 ;
526+ } else {
527+ indices_to_summarize. push ( idx) ;
528+ }
529+ }
496530
497531 log:: info!(
498- "Auto-summarizing {} files. max_concurrent_requests = {}" ,
499- total,
532+ "Auto-summarizing {} files ({} lock). max_concurrent_requests = {}" ,
533+ indices_to_summarize. len( ) ,
534+ lock_count,
500535 cfg. max_concurrent_requests,
501536 ) ;
502537
0 commit comments