Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
EstimateTokens provides a rough estimate of token count from byte size Using the cl100k_base tokenizer approximation (GPT-4) This is a very rough estimate: ~1 token per 4 bytes for code
Types ¶
type BarFormatter ¶
BarFormatter formats summaries with visual progress bars for TTY environments
func NewBarFormatter ¶
func NewBarFormatter() *BarFormatter
NewBarFormatter creates a new bar formatter
type CIFormatter ¶
type CIFormatter struct{}
CIFormatter formats summaries for CI/pipeline environments
type DashboardFormatter ¶
type DashboardFormatter struct {
NoEmoji bool
}
DashboardFormatter formats summaries as a speedometer dashboard
func NewDashboardFormatter ¶
func NewDashboardFormatter() *DashboardFormatter
NewDashboardFormatter creates a new dashboard formatter
type Formatter ¶
Formatter defines the interface for summary formatters
func GetFormatter ¶
GetFormatter returns the appropriate formatter based on options and environment
type JSONFormatter ¶
type JSONFormatter struct{}
JSONFormatter formats summaries as JSON for machine processing
func NewJSONFormatter ¶
func NewJSONFormatter() *JSONFormatter
NewJSONFormatter creates a new JSON formatter
type JSONOutput ¶
type JSONOutput struct {
OriginalBytes int64 `json:"original_bytes"`
DistilledBytes int64 `json:"distilled_bytes"`
SavingsPercent float64 `json:"savings_pct"`
DurationMS int64 `json:"duration_ms"`
TokensBefore int64 `json:"tokens_before,omitempty"`
TokensAfter int64 `json:"tokens_after,omitempty"`
TokensSaved int64 `json:"tokens_saved,omitempty"`
TokenSavingsPct float64 `json:"token_savings_pct,omitempty"`
FileCount int `json:"file_count"`
OutputPath string `json:"output_path,omitempty"`
Tokenizer string `json:"tokenizer,omitempty"`
}
JSONOutput represents the JSON structure for summary output
type Options ¶
type Options struct {
Format string // "auto", "ci", "bar", "json", "off"
NoColor bool
NoEmoji bool
}
Options configures summary output behavior
type SparklineFormatter ¶
type SparklineFormatter struct {
NoEmoji bool
}
SparklineFormatter formats summaries in minimalist sparkline style
func NewSparklineFormatter ¶
func NewSparklineFormatter() *SparklineFormatter
NewSparklineFormatter creates a new sparkline formatter
type Stats ¶
type Stats struct {
OriginalBytes int64
DistilledBytes int64
OriginalTokens int64
DistilledTokens int64
Duration time.Duration
FileCount int
OutputPath string
IsStdout bool
}
Stats holds the statistics for a distillation operation
type TickerFormatter ¶
type TickerFormatter struct {
NoEmoji bool
}
TickerFormatter formats summaries in stock ticker style
func NewTickerFormatter ¶
func NewTickerFormatter() *TickerFormatter
NewTickerFormatter creates a new ticker formatter