MCPcopy Create free account
hub / github.com/codehamr/codehamr / humanTokens

Function humanTokens

internal/tui/format.go:16–25  ·  view source on GitHub ↗

humanTokens renders a token count compactly: `900 tok`, `1.2k tok`, `1.5M tok`. The k/M ranges always keep one decimal (`2.0k`, not `2k`) so the live counter holds a constant width as it ticks past round thousands: it reads `1.9k → 2.0k → 2.1k`, not a jumpy `1.9k → 2k → 2.1k`.

(n int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

finalizeTurnMethod · 0.85
TestHumanTokensFormatFunction · 0.85
renderStatusBarMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestHumanTokensFormatFunction · 0.68