Documentation
¶
Index ¶
- Constants
- func AppendCmd(cmds *[]tea.Cmd, cmd tea.Cmd)
- func ApplyStructuredFilters(conversations []conv.Conversation, dims [FilterDimCount]DimensionFilter) []conv.Conversation
- func BlankDailyRateCells(plotWidth int) []string
- func ClaudeTurnChartPoints(metrics []statspkg.PositionTokenMetrics, ...) []canvas.Float64Point
- func ClaudeTurnChartRange(metrics []statspkg.PositionTokenMetrics) (float64, float64)
- func ClearNotificationAfter(kind NotificationKind) tea.Cmd
- func Commit() string
- func ComposeFooterRow(width int, left, right string) string
- func DailyRateChartDimensions(height int) (int, bool)
- func DailyRatePlotWidth(slots []DailyRateBarSlot) int
- func ExtractFilterValues(conversations []conv.Conversation) [FilterDimCount][]string
- func FilterBadges(dims [FilterDimCount]DimensionFilter) []string
- func FilterDimensionIsBool(dim FilterDimension) bool
- func FilterDimensionLabel(dim FilterDimension) string
- func FilterFooterStatusParts(conversations []conv.Conversation, filter FilterState) []string
- func FitToWidth(s string, width int) string
- func FormatFloat(value float64) string
- func FramedBodyHeight(totalHeight int) int
- func FramedFooterContentWidth(width int) int
- func GroupedDailyValueBarSlots(buckets []groupedDailyValueBucket, plotWidth int) []groupedDailyValueBarSlot
- func HeatmapCellWidth(width int) int
- func HeatmapIntervalCells(cells [7][24]int) [7][heatmapIntervalCount]int
- func HelpItemKeyText(item HelpItem) string
- func HistogramValueLabelPlacement(scaledHeight, maxHeight int) (int, bool)
- func JoinNonEmpty(items []string, sep string) string
- func MonotonicScaledHeight(value, maxValue float64, height int) int
- func NotificationCmd(msg NotificationMsg) tea.Cmd
- func NotificationDuration(kind NotificationKind) time.Duration
- func RenderDailyRateLabelLine(buckets []DailyRateBucket, plotWidth int, slots []DailyRateBarSlot) string
- func RenderFramedBody(width, bodyHeight int, borderColor color.Color, content string) string
- func RenderFramedFooter(width int, topRow, statusRow string) string
- func RenderHorizontalStackedBarsBody(items []StackedRowItem, width int) string
- func RenderInsetBox(width int, borderColor color.Color, content string) string
- func RenderSparkline(points []statspkg.PerformancePoint, width int) string
- func RenderTurnBarXAxisRows(columns []TurnBarColumn, axisLabelWidth, graphWidth int) []string
- func RenderWrappedTokens(tokens []string, width int) string
- func ResolveFloatSegmentHeights(totalHeight int, values []float64) []int
- func ResolveStackedBarWidths(totalWidth int, values []int) []int
- func ScaledFloatWidth(value, maxValue float64, width int) int
- func ScaledWidth(value, maxValue, width int) int
- func SetVersionDetails(versionValue, commitValue, dateValue string)
- func ShortenPath(path string) string
- func SplitAndFitLines(content string, width int) []string
- func SplitTurnSeriesKeys(series []statspkg.SplitTurnSeries) []string
- func StatsColumnWidths(width, leftWeight, rightWeight, minColumnWidth int) (int, int, bool)
- func TrimFooterRow(row string, width int) string
- func TruncateFooterText(row string, width int) string
- func TurnBarAxisLabelWidth(maxY float64) int
- func TurnBarLevelLabel(level, plotHeight int, maxY float64) string
- func TurnBarScaledHeight(current, maxY float64, plotHeight int) int
- func Version() string
- func VersionInfo() string
- type BarItem
- type BoolFilterState
- type Chip
- type ClearNotificationMsg
- type DailyRateBarSlot
- type DailyRateBucket
- type DailyValueBucket
- type DimensionFilter
- type FilterDimension
- type FilterState
- type HelpItem
- type HelpPriority
- type HelpSection
- type HistBucket
- type HistogramLayout
- type Notification
- type NotificationKind
- type NotificationMsg
- func ErrorNotification(text string) NotificationMsg
- func FormatResumeErrorNotification(err error, cwd string, providerUnavailable error) NotificationMsg
- func InfoNotification(text string) NotificationMsg
- func NewNotification(kind NotificationKind, text string) NotificationMsg
- func SuccessNotification(text string) NotificationMsg
- type StackedHistBucket
- type StackedHistSegment
- type StackedRowItem
- type StackedRowSegment
- type TableRow
- type Theme
- func (t *Theme) HistogramAxisLabel(text string) string
- func (t *Theme) HistogramAxisLine(text string) string
- func (t *Theme) RenderActivityHeatmap(title string, cells [7][24]int, width int) string
- func (t *Theme) RenderActivityHeatmapBody(cells [7][24]int, width int) string
- func (t *Theme) RenderBoolSummary(state BoolFilterState, maxWidth int) string
- func (t *Theme) RenderBorderTop(title string, width int, fg, bg color.Color) string
- func (t *Theme) RenderColumns(left, right string, leftWidth, rightWidth int, stacked bool) string
- func (t *Theme) RenderDailyRateColumnChart(rates []statspkg.DailyRate, width, height int, barColor color.Color, ...) string
- func (t *Theme) RenderFilterDimensionRow(filter FilterState, dim FilterDimension, width int) string
- func (t *Theme) RenderFilterDimensionSummary(filter FilterState, dim FilterDimension, maxWidth int) string
- func (t *Theme) RenderFilterExpandedValues(filter FilterState, dim FilterDimension, width int) []string
- func (t *Theme) RenderFilterOverlayWithConversations(conversations []conv.Conversation, filter FilterState, width, height int) string
- func (t *Theme) RenderFittedHelpItems(items []HelpItem, width int) string
- func (t *Theme) RenderFramedBox(title string, width int, borderColor color.Color, content string) string
- func (t *Theme) RenderFramedPane(title string, width, bodyHeight int, borderColor color.Color, content string) string
- func (t *Theme) RenderHelpFooter(width int, items []HelpItem, rightParts []string, n Notification) string
- func (t *Theme) RenderHelpItem(item HelpItem) string
- func (t *Theme) RenderHelpItems(items []HelpItem) string
- func (t *Theme) RenderHelpOverlay(width, height int, title string, sections []HelpSection) string
- func (t *Theme) RenderHistogramAxis(axisLabelWidth, graphWidth, width int) string
- func (t *Theme) RenderHistogramLabels(buckets []HistBucket, axisLabelWidth int, bucketWidths []int, ...) string
- func (t *Theme) RenderHorizontalBars(title string, items []BarItem, width int, barColor color.Color) string
- func (t *Theme) RenderHorizontalBarsBody(items []BarItem, width int, barColor color.Color) string
- func (t *Theme) RenderInlineTitledRule(title, rightMeta string, width int, titleColor color.Color) string
- func (t *Theme) RenderNotification(n Notification) string
- func (t *Theme) RenderPreformattedColumns(left, right string, leftWidth, rightWidth int, stacked bool) string
- func (t *Theme) RenderRankedTable(title string, rows []TableRow, maxWidth int) string
- func (t *Theme) RenderRankedTableBody(rows []TableRow, maxWidth int) string
- func (t *Theme) RenderSearchFooter(width int, prompt, right string, n Notification) string
- func (t *Theme) RenderSelectionSummary(f DimensionFilter, values []string, maxWidth int) string
- func (t *Theme) RenderSideBySide(left, right string, width int) string
- func (t *Theme) RenderSingleChip(label, value string) string
- func (t *Theme) RenderSplitDailyRateChartBody(series []statspkg.SplitDailyValueSeries, width, height int, ...) string
- func (t *Theme) RenderSplitDailyShareChartBody(shares []statspkg.SplitDailyShare, width, height int, ...) string
- func (t *Theme) RenderSplitDailyValueChartBody(series []statspkg.SplitDailyValueSeries, width, height int, ...) string
- func (t *Theme) RenderSplitTurnGroupedChartBody(series []statspkg.SplitTurnSeries, width, height int, ...) string
- func (t *Theme) RenderStatsTitle(title string) string
- func (t *Theme) RenderSummaryChips(chips []Chip, width int) string
- func (t *Theme) RenderTokenValue(text string) string
- func (t *Theme) RenderTurnBarAxis(axisLabelWidth, graphWidth, width int) string
- func (t *Theme) RenderTurnBarChartBody(metrics []statspkg.PositionTokenMetrics, width, height int, ...) string
- func (t *Theme) RenderVerticalHistogram(title string, buckets []HistBucket, width, maxHeight int) string
- func (t *Theme) RenderVerticalHistogramBody(buckets []HistBucket, width, maxHeight int, barColor color.Color) string
- func (t *Theme) RenderVerticalHistogramWithColor(title string, buckets []HistBucket, width, maxHeight int, barColor color.Color) string
- func (t *Theme) RenderVerticalStackedHistogramBody(buckets []StackedHistBucket, width, maxHeight int, yLabel func(int) string) string
- type TurnBarColumn
- type UniformTurnBarLayout
Constants ¶
const ( BoolValueYes = "yes" BoolValueNo = "no" )
const ( FilterOverlayIndent = " " FilterOverlayCursorOn = "▸ " FilterOverlayCursorOff = " " FilterOverlayCheckOff = " " )
const ( FramedChromeHeight = 4 // top border + bottom border + footer rows )
const ( HelpOverlayIndent = " " HelpOverlayColumnGap = " " )
const NoDataLabel = "No data"
Variables ¶
This section is empty.
Functions ¶
func ApplyStructuredFilters ¶
func ApplyStructuredFilters( conversations []conv.Conversation, dims [FilterDimCount]DimensionFilter, ) []conv.Conversation
func BlankDailyRateCells ¶
func ClaudeTurnChartPoints ¶
func ClaudeTurnChartPoints( metrics []statspkg.PositionTokenMetrics, value func(statspkg.PositionTokenMetrics) float64, ) []canvas.Float64Point
func ClaudeTurnChartRange ¶
func ClaudeTurnChartRange(metrics []statspkg.PositionTokenMetrics) (float64, float64)
func ClearNotificationAfter ¶
func ClearNotificationAfter(kind NotificationKind) tea.Cmd
func ComposeFooterRow ¶
func DailyRatePlotWidth ¶
func DailyRatePlotWidth(slots []DailyRateBarSlot) int
func ExtractFilterValues ¶
func ExtractFilterValues(conversations []conv.Conversation) [FilterDimCount][]string
func FilterBadges ¶
func FilterBadges(dims [FilterDimCount]DimensionFilter) []string
func FilterDimensionIsBool ¶
func FilterDimensionIsBool(dim FilterDimension) bool
func FilterDimensionLabel ¶
func FilterDimensionLabel(dim FilterDimension) string
func FilterFooterStatusParts ¶
func FilterFooterStatusParts( conversations []conv.Conversation, filter FilterState, ) []string
func FitToWidth ¶
func FormatFloat ¶
func FramedBodyHeight ¶
func GroupedDailyValueBarSlots ¶
func GroupedDailyValueBarSlots( buckets []groupedDailyValueBucket, plotWidth int, ) []groupedDailyValueBarSlot
func HeatmapCellWidth ¶
func HeatmapIntervalCells ¶
func HelpItemKeyText ¶
func JoinNonEmpty ¶
func MonotonicScaledHeight ¶
MonotonicScaledHeight maps a positive value into a 1..height integer slot using a ceiling, so that distinct non-zero values map to distinct heights whenever the chart resolution allows. Used by stacked histogram and stacked turn renderers where round-to-nearest would otherwise collapse adjacent small values onto the same row.
func NotificationCmd ¶
func NotificationCmd(msg NotificationMsg) tea.Cmd
func NotificationDuration ¶
func NotificationDuration(kind NotificationKind) time.Duration
func RenderDailyRateLabelLine ¶
func RenderDailyRateLabelLine(buckets []DailyRateBucket, plotWidth int, slots []DailyRateBarSlot) string
func RenderFramedBody ¶
func RenderFramedFooter ¶
func RenderHorizontalStackedBarsBody ¶
func RenderHorizontalStackedBarsBody(items []StackedRowItem, width int) string
func RenderInsetBox ¶
func RenderSparkline ¶
func RenderSparkline(points []statspkg.PerformancePoint, width int) string
func RenderTurnBarXAxisRows ¶
func RenderTurnBarXAxisRows( columns []TurnBarColumn, axisLabelWidth, graphWidth int, ) []string
func RenderWrappedTokens ¶
func ResolveStackedBarWidths ¶
func ScaledFloatWidth ¶
func ScaledWidth ¶
func SetVersionDetails ¶
func SetVersionDetails(versionValue, commitValue, dateValue string)
func ShortenPath ¶
func SplitAndFitLines ¶
func SplitTurnSeriesKeys ¶
func SplitTurnSeriesKeys(series []statspkg.SplitTurnSeries) []string
func StatsColumnWidths ¶
func TrimFooterRow ¶
func TruncateFooterText ¶
func TurnBarAxisLabelWidth ¶
func TurnBarLevelLabel ¶
func TurnBarScaledHeight ¶
func VersionInfo ¶
func VersionInfo() string
VersionInfo returns a formatted version string for CLI output.
Types ¶
type BoolFilterState ¶
type BoolFilterState int
const ( BoolFilterAny BoolFilterState = iota BoolFilterYes BoolFilterNo )
func CycleBoolFilter ¶
func CycleBoolFilter(state BoolFilterState) BoolFilterState
type ClearNotificationMsg ¶
type ClearNotificationMsg struct{}
type DailyRateBarSlot ¶
func DailyRateBarSlots ¶
func DailyRateBarSlots(bucketCount, plotWidth int) []DailyRateBarSlot
type DailyRateBucket ¶
type DailyRateBucket = DailyValueBucket
func BucketDailyRates ¶
func BucketDailyRates(rates []statspkg.DailyRate, columnCount int) []DailyRateBucket
type DailyValueBucket ¶
type DimensionFilter ¶
type DimensionFilter struct {
Selected map[string]bool
Regex string
CompiledRe *regexp.Regexp
UseRegex bool
BoolState BoolFilterState
}
func (DimensionFilter) IsActive ¶
func (f DimensionFilter) IsActive() bool
type FilterDimension ¶
type FilterDimension int
const ( FilterDimProvider FilterDimension = iota FilterDimProject FilterDimModel FilterDimVersion FilterDimGitBranch FilterDimHasPlans FilterDimMultiPart FilterDimCount )
type FilterState ¶
type FilterState struct {
Active bool
Cursor int
Expanded int
ExpandedScroll int
ExpandedCursor int
RegexEditing bool
RegexInput textinput.Model
Dimensions [FilterDimCount]DimensionFilter
Values [FilterDimCount][]string
}
func CopyFilterState ¶
func CopyFilterState(filter FilterState) FilterState
func NewFilterState ¶
func NewFilterState() FilterState
func (FilterState) HasActiveFilters ¶
func (f FilterState) HasActiveFilters() bool
func (FilterState) MatchCount ¶
func (f FilterState) MatchCount(conversations []conv.Conversation) int
type HelpItem ¶
type HelpItem struct {
Key string
Desc string
Detail string
Toggle bool
On bool
Glow bool
Priority HelpPriority
}
func FilterDimensionFooterItems ¶
func FilterDimensionFooterItems(filter FilterState) []HelpItem
func FilterFooterItems ¶
func FilterFooterItems(filter FilterState) []HelpItem
func WithHelpDetail ¶
type HelpPriority ¶
type HelpPriority int
const ( HelpPriorityLow HelpPriority = iota HelpPriorityNormal HelpPriorityHigh HelpPriorityEssential )
type HelpSection ¶
func LogInfoSection ¶
func LogInfoSection(logFilePath string) HelpSection
func VersionInfoSection ¶
func VersionInfoSection() HelpSection
type HistBucket ¶
type HistogramLayout ¶
func ResolveHistogramLayout ¶
func ResolveHistogramLayout(graphWidth, bucketCount int) HistogramLayout
type Notification ¶
type Notification struct {
Kind NotificationKind
Text string
}
type NotificationKind ¶
type NotificationKind string
const ( NotificationInfo NotificationKind = "info" NotificationSuccess NotificationKind = "success" NotificationError NotificationKind = "error" )
type NotificationMsg ¶
type NotificationMsg struct {
Notification Notification
}
func ErrorNotification ¶
func ErrorNotification(text string) NotificationMsg
func FormatResumeErrorNotification ¶
func FormatResumeErrorNotification(err error, cwd string, providerUnavailable error) NotificationMsg
func InfoNotification ¶
func InfoNotification(text string) NotificationMsg
func NewNotification ¶
func NewNotification(kind NotificationKind, text string) NotificationMsg
func SuccessNotification ¶
func SuccessNotification(text string) NotificationMsg
type StackedHistBucket ¶
type StackedHistBucket struct {
Label string
Total int
Segments []StackedHistSegment
}
type StackedHistSegment ¶
type StackedRowItem ¶
type StackedRowItem struct {
Label string
Scale float64
Value string
Segments []StackedRowSegment
}
type StackedRowSegment ¶
type Theme ¶
type Theme struct {
ColorPrimary color.Color
ColorSecondary color.Color
ColorAccent color.Color
ColorHighlight color.Color
ColorSelectedFg color.Color
ColorDiffRemove color.Color
ColorDiffHunk color.Color
ColorToolBg color.Color
ColorFgOnBg color.Color
ColorStatusFg color.Color
ColorNormalTitle color.Color
ColorNormalDesc color.Color
ColorTitleFg color.Color
ColorChartBar color.Color
ColorChartToken color.Color
ColorChartTime color.Color
ColorChartError color.Color
ColorHeatmap0 color.Color
ColorHeatmap1 color.Color
ColorHeatmap2 color.Color
ColorHeatmap3 color.Color
ColorHeatmap4 color.Color
StyleSubtitle lipgloss.Style
StyleToolCall lipgloss.Style
StyleToolCallItalic lipgloss.Style
StyleMetaLabel lipgloss.Style
StyleMetaValue lipgloss.Style
StyleSearchMatch lipgloss.Style
StyleCurrentMatch lipgloss.Style
StyleRuleHR lipgloss.Style
StyleHistogramAxisLabel lipgloss.Style
StyleHistogramAxisLine lipgloss.Style
StyleHistogramValueLabel lipgloss.Style
StyleBadgeUser lipgloss.Style
StyleBadgeAssistant lipgloss.Style
StyleBadgeSystem lipgloss.Style
StyleThinkLabel lipgloss.Style
StyleThinkBorder lipgloss.Style
StyleThinkLine lipgloss.Style
StyleSelectedPreview lipgloss.Style
StyleNormalPreview lipgloss.Style
StyleDimmedPreview lipgloss.Style
StyleDiffBg lipgloss.Style
StyleDiffAdd lipgloss.Style
StyleDiffRemoveLine lipgloss.Style
StyleDiffHunkLine lipgloss.Style
StyleToolResultBadge lipgloss.Style
StyleToolResultErrorBadge lipgloss.Style
StylePaneTitle lipgloss.Style
StyleHeatmapCells [5]lipgloss.Style
}
func (*Theme) HistogramAxisLabel ¶
func (*Theme) HistogramAxisLine ¶
func (*Theme) RenderActivityHeatmap ¶
func (*Theme) RenderActivityHeatmapBody ¶
func (*Theme) RenderBoolSummary ¶
func (t *Theme) RenderBoolSummary(state BoolFilterState, maxWidth int) string
func (*Theme) RenderBorderTop ¶
RenderBorderTop builds a custom top border line with an embedded title badge: ╭─ Title ──────────────────────╮
func (*Theme) RenderColumns ¶
func (*Theme) RenderDailyRateColumnChart ¶
func (*Theme) RenderFilterDimensionRow ¶
func (t *Theme) RenderFilterDimensionRow(filter FilterState, dim FilterDimension, width int) string
func (*Theme) RenderFilterDimensionSummary ¶
func (t *Theme) RenderFilterDimensionSummary(filter FilterState, dim FilterDimension, maxWidth int) string
func (*Theme) RenderFilterExpandedValues ¶
func (t *Theme) RenderFilterExpandedValues(filter FilterState, dim FilterDimension, width int) []string
func (*Theme) RenderFilterOverlayWithConversations ¶
func (t *Theme) RenderFilterOverlayWithConversations( conversations []conv.Conversation, filter FilterState, width, height int, ) string
func (*Theme) RenderFittedHelpItems ¶
func (*Theme) RenderFramedBox ¶
func (*Theme) RenderFramedPane ¶
func (*Theme) RenderHelpFooter ¶
func (*Theme) RenderHelpItem ¶
func (*Theme) RenderHelpItems ¶
func (*Theme) RenderHelpOverlay ¶
func (t *Theme) RenderHelpOverlay(width, height int, title string, sections []HelpSection) string
func (*Theme) RenderHistogramAxis ¶
func (*Theme) RenderHistogramLabels ¶
func (*Theme) RenderHorizontalBars ¶
func (*Theme) RenderHorizontalBarsBody ¶
func (*Theme) RenderInlineTitledRule ¶
func (t *Theme) RenderInlineTitledRule(title, rightMeta string, width int, titleColor color.Color) string
RenderInlineTitledRule renders a horizontal rule with an inline title, like "─── Title ────────────". When rightMeta is non-empty it is embedded on the right side, like "─── Title ─── rightMeta ───"; the caller owns its styling. If the width cannot fit the full layout with rightMeta, the meta segment is dropped and the rule falls back to a title-only render. The title is foregrounded in titleColor, and the dashes use the theme's StyleRuleHR styling.
func (*Theme) RenderNotification ¶
func (t *Theme) RenderNotification(n Notification) string
func (*Theme) RenderPreformattedColumns ¶
func (*Theme) RenderRankedTable ¶
func (*Theme) RenderRankedTableBody ¶
func (*Theme) RenderSearchFooter ¶
func (t *Theme) RenderSearchFooter(width int, prompt, right string, n Notification) string
func (*Theme) RenderSelectionSummary ¶
func (t *Theme) RenderSelectionSummary(f DimensionFilter, values []string, maxWidth int) string
func (*Theme) RenderSideBySide ¶
func (*Theme) RenderSingleChip ¶
func (*Theme) RenderSplitDailyRateChartBody ¶
func (*Theme) RenderSplitDailyShareChartBody ¶
func (*Theme) RenderSplitDailyValueChartBody ¶
func (*Theme) RenderSplitTurnGroupedChartBody ¶
func (t *Theme) RenderSplitTurnGroupedChartBody( series []statspkg.SplitTurnSeries, width, height int, colorByKey map[string]color.Color, mode statspkg.StatisticMode, value func(statspkg.PositionTokenMetrics) float64, emptyState string, ) string
func (*Theme) RenderStatsTitle ¶
func (*Theme) RenderSummaryChips ¶
func (*Theme) RenderTokenValue ¶
func (*Theme) RenderTurnBarAxis ¶
func (*Theme) RenderTurnBarChartBody ¶
func (*Theme) RenderVerticalHistogram ¶
func (t *Theme) RenderVerticalHistogram(title string, buckets []HistBucket, width, maxHeight int) string
func (*Theme) RenderVerticalHistogramBody ¶
func (*Theme) RenderVerticalHistogramWithColor ¶
func (*Theme) RenderVerticalStackedHistogramBody ¶
type TurnBarColumn ¶
type TurnBarColumn struct {
Start int
End int
Anchor int
Position int
StartPosition int
EndPosition int
Height int
}
func TurnBarColumns ¶
func TurnBarColumns( metrics []statspkg.PositionTokenMetrics, graphWidth, plotHeight int, maxY float64, value func(statspkg.PositionTokenMetrics) float64, ) []TurnBarColumn
type UniformTurnBarLayout ¶
func ResolveUniformTurnBarLayout ¶
func ResolveUniformTurnBarLayout(graphWidth, barCount int) (UniformTurnBarLayout, bool)
Source Files
¶
- browser_filter.go
- browser_filter_overlay.go
- cmds.go
- footer.go
- help.go
- help_fit.go
- help_overlay.go
- helpers.go
- notifications.go
- stats_charts.go
- stats_columns_preformatted.go
- stats_daily_rate_chart.go
- stats_daily_rate_layout.go
- stats_daily_rate_scale.go
- stats_filter.go
- stats_float_segments.go
- stats_heatmap.go
- stats_histogram.go
- stats_split_daily_rate.go
- stats_split_daily_rate_layout.go
- stats_split_daily_share.go
- stats_split_turn_chart.go
- stats_split_turn_chart_layout.go
- stats_stacked_bar.go
- stats_stacked_histogram.go
- stats_stacked_rows.go
- stats_turn_chart.go
- stats_turn_layout.go
- stats_vertical_bar_layout.go
- styles.go
- version.go