File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ var creatCommitMsg = &cobra.Command{
5353 Use : "." ,
5454 Short : "Create Commit Message" ,
5555 RunE : func (cmd * cobra.Command , args []string ) error {
56- CreateCommitMsg ()
56+ dryRun , _ := cmd .Flags ().GetBool ("dry-run" )
57+ CreateCommitMsg (dryRun )
5758 return nil
5859 },
5960}
@@ -68,6 +69,10 @@ func init() {
6869 // Cobra also supports local flags, which will only run
6970 // when this action is called directly.
7071 rootCmd .Flags ().BoolP ("toggle" , "t" , false , "Help message for toggle" )
72+
73+ // Add --dry-run flag to the commit command
74+ creatCommitMsg .Flags ().Bool ("dry-run" , false , "Preview the prompt that would be sent to the LLM without making an API call" )
75+
7176 rootCmd .AddCommand (creatCommitMsg )
7277 rootCmd .AddCommand (llmCmd )
7378 llmCmd .AddCommand (llmSetupCmd )
You can’t perform that action at this time.
0 commit comments