@@ -23,7 +23,8 @@ import (
2323// CreateCommitMsg launches the interactive flow for reviewing, regenerating,
2424// editing, and accepting AI-generated commit messages in the current repo.
2525// If dryRun is true, it displays the prompt without making an API call.
26- func CreateCommitMsg (Store * store.StoreMethods , dryRun bool , autoCommit bool ) {
26+ // If verbose is true, shows detailed diff statistics and processing info.
27+ func CreateCommitMsg (Store * store.StoreMethods , dryRun bool , autoCommit bool , verbose bool ) {
2728 // Validate COMMIT_LLM and required API keys
2829 useLLM , err := Store .DefaultLLMKey ()
2930 if err != nil {
@@ -67,6 +68,12 @@ func CreateCommitMsg(Store *store.StoreMethods, dryRun bool, autoCommit bool) {
6768 pterm .Println ()
6869 display .ShowFileStatistics (fileStats )
6970
71+ if verbose {
72+ pterm .Info .Printf ("Repository: %s\n " , currentDir )
73+ pterm .Info .Printf ("File summary: %d staged, %d unstaged, %d untracked\n " ,
74+ len (fileStats .StagedFiles ), len (fileStats .UnstagedFiles ), len (fileStats .UntrackedFiles ))
75+ }
76+
7077 if fileStats .TotalFiles == 0 {
7178 pterm .Warning .Println ("No changes detected in the Git repository." )
7279 pterm .Info .Println ("Tips:" )
@@ -124,12 +131,16 @@ func CreateCommitMsg(Store *store.StoreMethods, dryRun bool, autoCommit bool) {
124131
125132 pterm .Info .Printf ("Truncated diff to %d lines, %d characters.\n " , actualLineCount , len (changes ))
126133 pterm .Info .Println ("Consider committing smaller changes for more accurate commit messages." )
134+ } else if verbose {
135+ pterm .Info .Printf ("Diff statistics: %d lines, %d characters (within limits).\n " , len (diffLines ), len (changes ))
136+ inputTokens := estimateTokens (changes )
137+ pterm .Info .Printf ("Estimated tokens for LLM: %d input tokens.\n " , inputTokens )
127138 }
128139
129140 // Handle dry-run mode: display what would be sent to LLM without making API call
130141 if dryRun {
131142 pterm .Println ()
132- displayDryRunInfo (commitLLM , config , changes , apiKey )
143+ displayDryRunInfo (commitLLM , config , changes , apiKey , verbose )
133144 return
134145 }
135146
@@ -561,7 +572,7 @@ func displayMissingCredentialHint(provider types.LLMProvider) {
561572}
562573
563574// displayDryRunInfo shows what would be sent to the LLM without making an API call
564- func displayDryRunInfo (provider types.LLMProvider , config * types.Config , changes string , apiKey string ) {
575+ func displayDryRunInfo (provider types.LLMProvider , config * types.Config , changes string , apiKey string , verbose bool ) {
565576 pterm .DefaultHeader .WithFullWidth ().
566577 WithBackgroundStyle (pterm .NewStyle (pterm .BgBlue )).
567578 WithTextStyle (pterm .NewStyle (pterm .FgWhite , pterm .Bold )).
@@ -633,11 +644,17 @@ func displayDryRunInfo(provider types.LLMProvider, config *types.Config, changes
633644 }
634645
635646 statsData = append (statsData , []string {"Estimated Processing Time" , fmt .Sprintf ("%d-%d seconds" , minTime , maxTime )})
647+ if verbose {
648+ statsData = append (statsData , []string {"Prompt Length" , fmt .Sprintf ("%d characters" , len (prompt ))})
649+ }
636650
637651 pterm .DefaultTable .WithHasHeader (false ).WithData (statsData ).Render ()
638652
639653 pterm .Println ()
640654 pterm .Success .Println ("Dry-run complete. To generate actual commit message, run without --dry-run flag." )
655+ if ! verbose {
656+ pterm .Info .Println ("Use --toggle flag to see debug details." )
657+ }
641658}
642659
643660// maskAPIKey masks the API key for display purposes
0 commit comments