termcolor

package
v2026.529.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 15 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 ColorizeImgTags

func ColorizeImgTags(s string) string

func ColorizeImgTagsReplInput

func ColorizeImgTagsReplInput(s 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 ResetSeq

func ResetSeq() string

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 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)

Types

type InitOptions

type InitOptions struct {
	Out     io.Writer
	NoColor 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)

Jump to

Keyboard shortcuts

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