Documentation
¶
Index ¶
- Variables
- func AskConfirmation(question string) bool
- func EditCommitMessage(initialMessage string, editorErrorMsg string) (string, error)
- func HandleAppError(err error, translations ...*i18n.Translations)
- func PrintDuration(msg string, duration time.Duration)
- func PrintError(w io.Writer, msg string)
- func PrintInfo(msg string)
- func PrintKeyValue(key, value string)
- func PrintSectionBanner(title string)
- func PrintSectionHeader(title string)
- func PrintSuccess(w io.Writer, msg string)
- func PrintTokenUsage(usage *models.TokenUsage, t *i18n.Translations)
- func PrintWarning(msg string)
- func PromptMultiSelect(t *i18n.Translations, message string, options []string) ([]string, error)
- func ResumeSuspendedSpinner()
- func ShowDiff(files []string) error
- func ShowDiffStats(files []string, headerMessage string) error
- func ShowFilesTree(files []string, headerMessage string) error
- func SuspendActiveSpinner()
- type FileChange
- type SmartSpinner
Constants ¶
This section is empty.
Variables ¶
var ( // Colors for different message types Success = color.New(color.FgGreen, color.Bold) Error = color.New(color.FgRed, color.Bold) Warning = color.New(color.FgYellow, color.Bold) Info = color.New(color.FgCyan, color.Bold) Accent = color.New(color.FgMagenta, color.Bold) Dim = color.New(color.FgHiBlack) // Emojis with colors MateEmoji = "🧉" SuccessEmoji = Success.Sprint("✅") WarningEmoji = Warning.Sprint("⚠️") InfoEmoji = Info.Sprint("ℹ️") RocketEmoji = Accent.Sprint("🚀") StatsEmoji = Accent.Sprint("📊") )
Functions ¶
func AskConfirmation ¶
func EditCommitMessage ¶
EditCommitMessage opens an editor for the user to edit the message
func HandleAppError ¶
func HandleAppError(err error, translations ...*i18n.Translations)
HandleAppError handles an application error and displays it in a friendly way. If translations is nil, it will use English defaults.
func PrintDuration ¶
func PrintError ¶
func PrintKeyValue ¶
func PrintKeyValue(key, value string)
func PrintSectionBanner ¶
func PrintSectionBanner(title string)
func PrintSectionHeader ¶ added in v1.7.0
func PrintSectionHeader(title string)
PrintSectionHeader prints a visually distinct section header
func PrintSuccess ¶
func PrintTokenUsage ¶
func PrintTokenUsage(usage *models.TokenUsage, t *i18n.Translations)
func PrintWarning ¶
func PrintWarning(msg string)
func PromptMultiSelect ¶ added in v1.8.0
PromptMultiSelect presents a numbered list of options and asks the user to input comma-separated choices (e.g. "1,3"). Hitting enter without choices defaults to all.
func ResumeSuspendedSpinner ¶
func ResumeSuspendedSpinner()
ResumeSuspendedSpinner resumes the previously suspended spinner.
func ShowDiffStats ¶
ShowDiffStats shows change statistics (like git diff --stat)
func ShowFilesTree ¶
ShowFilesTree shows modified files in tree format
func SuspendActiveSpinner ¶
func SuspendActiveSpinner()
SuspendActiveSpinner temporarily stops the active spinner without deleting its reference, allowing it to be resumed after user interaction.
Types ¶
type FileChange ¶
FileChange represents a modified file with its statistics
type SmartSpinner ¶
type SmartSpinner struct {
// contains filtered or unexported fields
}
SmartSpinner is a spinner with enhanced capabilities
func NewSmartSpinner ¶
func NewSmartSpinner(initialMessage string) *SmartSpinner
NewSmartSpinner creates a new spinner with an initial message
func (*SmartSpinner) Error ¶
func (s *SmartSpinner) Error(msg string)
func (*SmartSpinner) Log ¶
func (s *SmartSpinner) Log(msg string)
func (*SmartSpinner) Start ¶
func (s *SmartSpinner) Start()
Start starts the spinner and registers it as the globally active spinner.
func (*SmartSpinner) Stop ¶
func (s *SmartSpinner) Stop()
Stop stops the spinner and clears the active spinner record.
func (*SmartSpinner) Success ¶
func (s *SmartSpinner) Success(msg string)
func (*SmartSpinner) UpdateMessage ¶
func (s *SmartSpinner) UpdateMessage(msg string)
func (*SmartSpinner) Warning ¶
func (s *SmartSpinner) Warning(msg string)