uiusage

package
v1.3.72 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeTokenCount

func HumanizeTokenCount(n int) string

Types

type ContextDisplay

type ContextDisplay struct {
	UsedTokens       int
	MaxTokens        int
	Threshold        int
	UsagePercent     int
	RemainingPercent int
	UsedLabel        string
	MaxLabel         string
}

func BuildContextDisplay

func BuildContextDisplay(usedTokens, maxTokens, threshold int) (ContextDisplay, bool)

type SessionUsageDisplay

type SessionUsageDisplay struct {
	TotalLabel      string
	InputLabel      string
	OutputLabel     string
	CacheReadLabel  string
	CacheWriteLabel string
	CacheHitPercent int
}

func BuildSessionUsageDisplay

func BuildSessionUsageDisplay(usage provider.TokenUsage) SessionUsageDisplay

Jump to

Keyboard shortcuts

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