term

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

TODO(V2): detect non-TTY (e.g. stdout redirected to file) and degrade Spinner to plain newline-based output to avoid \r\033[K noise in logs.

Index

Constants

View Source
const (
	ColorReset  = "\033[0m"
	ColorCyan   = "\033[36m"
	ColorYellow = "\033[33m"
	ColorGreen  = "\033[32m"
	ColorRed    = "\033[31m"
	ColorGray   = "\033[90m"
)

Variables

This section is empty.

Functions

func FmtBytes

func FmtBytes(n int) string

func FmtDur

func FmtDur(d time.Duration) string

func PrintAIReasoning

func PrintAIReasoning(content string)

func PrintThinkingDone

func PrintThinkingDone(round int, elapsed time.Duration)

func PrintToolDone

func PrintToolDone(name, argsDisplay string, elapsed time.Duration, resultLen int, isErr bool)

func PrintToolOutput

func PrintToolOutput(result string, maxLines int)

func PrintToolStart

func PrintToolStart(name, argsDisplay string)

func TruncLine

func TruncLine(s string, maxRunes int) string

TruncLine truncates a string to maxRunes runes, appending "..." if truncated.

Types

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func StartSpinner

func StartSpinner(msg string) *Spinner

func (*Spinner) Stop

func (s *Spinner) Stop()

Jump to

Keyboard shortcuts

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