ui

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForInput

func AskForInput(prompt string, required bool) string

AskForInput prompts the user for text input. If required is true, it will loop until non-empty input is received.

func AskYesNo

func AskYesNo(prompt string, defaultYes bool) bool

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 PrintError

func PrintError(message string)

PrintError displays an error message.

func PrintInfo

func PrintInfo(message string)

PrintInfo displays an informational message.

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(message string, url string)

PrintRepoLink prints a repository link with the URL part in blue.

func PrintSuccess

func PrintSuccess(message string)

PrintSuccess displays a success message.

func StartSpinner

func StartSpinner(message string) *spinner.Spinner

StartSpinner starts a CLI spinner with the given message.

func StopSpinner

func StopSpinner(s *spinner.Spinner)

StopSpinner stops the given spinner. If the spinner is nil (e.g., not a TTY), it does nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL