termcolor

package
v2026.609.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SystemBorder = "===SYSTEM==="

Variables

This section is empty.

Functions

func BackgroundRGB

func BackgroundRGB(r, g, b uint8) string

func ColorizeAtTagsReplInput added in v2026.606.3

func ColorizeAtTagsReplInput(s string) string

func ColorizeErrorLines added in v2026.601.0

func ColorizeErrorLines(s string) string

func ColorizeImgTags

func ColorizeImgTags(s string) string

func ColorizeImgTagsReplInput

func ColorizeImgTagsReplInput(s string) string

func ColorizeReplInputTags added in v2026.606.3

func ColorizeReplInputTags(s string) string

func EditFileDeleteToolLine added in v2026.606.1

func EditFileDeleteToolLine(path string) string

func Enabled

func Enabled() bool

func ForegroundRGB

func ForegroundRGB(r, g, b uint8) string

func FormatSystemBlock

func FormatSystemBlock(message string) string

func FormatWorkedDuration

func FormatWorkedDuration(secs float64) string

func Init

func Init(opts InitOptions)

func Plain

func Plain(s string) string

func REPLRawStdout added in v2026.608.1

func REPLRawStdout() bool

func ResetSeq

func ResetSeq() string

func SetREPLRawStdout added in v2026.608.1

func SetREPLRawStdout(v bool)

func SystemMessageText

func SystemMessageText(v any) string

func ThoughtForSuffix

func ThoughtForSuffix(secs float64) string

func ToolHeaderLine

func ToolHeaderLine(toolName, body string) string

func ToolLine

func ToolLine(toolName, body string) string

func UsageTokensLine

func UsageTokensLine(contextPromptTok, lastUserPromptTok, reasoningTokens, responseTokens, totalTokens int64, outputTPS, ttftSecs, promptTPS float64, contextEstimated bool, turnWallSecs float64) string

func WelcomeUsageTotals

func WelcomeUsageTotals(userTok, reasoningTok, responseTok, totalTok int64) string

func WrapAssistant

func WrapAssistant(s string) string

func WrapBoldGold

func WrapBoldGold(s string) string

func WrapContext

func WrapContext(s string) string

func WrapEditFileNewString added in v2026.602.2

func WrapEditFileNewString(s string) string

func WrapEditFileOldString added in v2026.602.2

func WrapEditFileOldString(s string) string

func WrapImgTag

func WrapImgTag(tag string) string

func WrapRed

func WrapRed(s string) string

func WrapSystem

func WrapSystem(s string) string

func WrapThinking

func WrapThinking(s string) string

func WrapTool

func WrapTool(s string) string

func WrapUser

func WrapUser(s string) string

func WrapUserReadline

func WrapUserReadline(s string) string

func WrapWhite

func WrapWhite(s string) string

func WriteSystem

func WriteSystem(w io.Writer, message string)

func ZshStyle added in v2026.606.0

func ZshStyle(key ZshStyleKey, s string) string

Types

type ErrorLineWriter added in v2026.601.0

type ErrorLineWriter struct {
	W io.Writer
	// contains filtered or unexported fields
}

func NewErrorLineWriter added in v2026.601.0

func NewErrorLineWriter(w io.Writer) *ErrorLineWriter

func (*ErrorLineWriter) Flush added in v2026.601.0

func (w *ErrorLineWriter) Flush() error

func (*ErrorLineWriter) Write added in v2026.601.0

func (w *ErrorLineWriter) Write(p []byte) (int, error)

type InitOptions

type InitOptions struct {
	Out        io.Writer
	NoColor    bool
	ForceColor bool
}

type ToolLineWriter

type ToolLineWriter struct {
	W io.Writer
	// contains filtered or unexported fields
}

func NewToolLineWriter

func NewToolLineWriter(w io.Writer) *ToolLineWriter

func (*ToolLineWriter) Flush

func (w *ToolLineWriter) Flush() error

func (*ToolLineWriter) Write

func (w *ToolLineWriter) Write(p []byte) (int, error)

type ZshStyleKey added in v2026.606.0

type ZshStyleKey string
const (
	ZshUnknownToken       ZshStyleKey = "unknown-token"
	ZshReservedWord       ZshStyleKey = "reserved-word"
	ZshArg0               ZshStyleKey = "arg0"
	ZshBuiltin            ZshStyleKey = "builtin"
	ZshPath               ZshStyleKey = "path"
	ZshPathPrefix         ZshStyleKey = "path_prefix"
	ZshGlobbing           ZshStyleKey = "globbing"
	ZshSingleQuoted       ZshStyleKey = "single-quoted-argument"
	ZshDoubleQuoted       ZshStyleKey = "double-quoted-argument"
	ZshDollarDoubleQuoted ZshStyleKey = "dollar-double-quoted-argument"
	ZshRedirection        ZshStyleKey = "redirection"
	ZshCommandSeparator   ZshStyleKey = "commandseparator"
	ZshComment            ZshStyleKey = "comment"
	ZshDefault            ZshStyleKey = "default"
)

Jump to

Keyboard shortcuts

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