Documentation
¶
Index ¶
- func AskForInput(prompt string, required bool) string
- func AskYesNo(prompt string, defaultYes bool) bool
- func ClearLine()
- func PrintError(message string)
- func PrintInfo(message string)
- func PrintPreGenerationInfo(tokenCount string, tokenLimit int, branchName string, additions int, ...)
- func PrintRepoLink(message string, url string)
- func PrintSuccess(message string)
- func StartSpinner(message string) *spinner.Spinner
- func StopSpinner(s *spinner.Spinner)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForInput ¶
AskForInput prompts the user for text input. If required is true, it will loop until non-empty input is received.
func AskYesNo ¶
AskYesNo prompts the user with a yes/no question and returns the boolean result. It suggests a default answer (Y/n or y/N). Enter accepts the default.
func ClearLine ¶
func ClearLine()
ClearLine clears the current line in the terminal (useful after spinner). This might not be needed if spinner cleans up properly, but can be useful.
func PrintPreGenerationInfo ¶ added in v0.0.11
func PrintPreGenerationInfo(tokenCount string, tokenLimit int, branchName string, additions int, deletions int)
PrintPreGenerationInfo prints information about the current branch, token count, and diff stats. This is displayed before commit message generation. TODO: in future I'd fix the tokens output colors.
func PrintRepoLink ¶ added in v0.0.4
PrintRepoLink prints a repository link with the URL part in blue.
func StartSpinner ¶
StartSpinner starts a CLI spinner with the given message.
func StopSpinner ¶
StopSpinner stops the given spinner. If the spinner is nil (e.g., not a TTY), it does nothing.
Types ¶
This section is empty.