Skip to content

Commit d5489b8

Browse files
committed
Improve commit message display with colored text and truncation
1 parent b4aacdf commit d5489b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/commit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ var commitCmd = &cobra.Command{
144144
}
145145

146146
log.Debug("Sending diff to Otto...")
147-
fmt.Print("Commit Msg: ")
147+
utils.PrintColoredText("Commit Msg: ", conf.OttoColor)
148148
stream, err := ai.CommitMessage(diff, conventional, conf)
149149
if err != nil {
150150
log.Error(err)
@@ -166,7 +166,7 @@ var commitCmd = &cobra.Command{
166166
newMsg = strings.Split(msg, ".")[0]
167167
}
168168
if len(newMsg) != len(msg) {
169-
fmt.Println("Truncated commit message: ", newMsg)
169+
utils.PrintColoredTextLn("Truncated commit message: "+newMsg, conf.OttoColor)
170170
msg = newMsg
171171
}
172172
}

0 commit comments

Comments
 (0)