Module token_tracker

Module token_tracker 

Source
Expand description

Token usage tracking and cost estimation for Gestura

Provides session-level and global token usage tracking with cost estimation, budget limits, and usage statistics for GUI and CLI applications.

Structs§

TokenTracker
Token usage tracker for session and global usage
UsageRecord
A single token usage record with timestamp
UsageStats
Aggregated token usage statistics

Enums§

BudgetStatus
Budget check result

Functions§

format_token_count
Format token count with K/M suffix
get_token_tracker
Get the global token tracker