Skip to content

v0.2.4 - Token Savings Counter

Choose a tag to compare

@jgravelle jgravelle released this 03 Mar 00:56

What's New

Real-Time Token Savings Counter

Every tool response now includes _meta.tokens_saved and _meta.total_tokens_saved showing how many tokens were saved compared to reading raw source files directly.

  • tokens_saved: Tokens saved by this specific call
  • total_tokens_saved: Cumulative tokens saved across all calls (persisted to ~/.code-index/_savings.json)

Works across all tools:

  • get_file_outline: raw file size vs sum of symbol byte lengths
  • get_symbol / get_symbols: raw file size vs symbol byte length
  • get_repo_outline: sum of all file sizes vs metadata-only response
  • search_symbols: matched file sizes vs returned symbol byte lengths

Token estimation uses fast os.stat calls only — no extra file reads or API calls.