MCPcopy Index your code
hub / github.com/winfunc/opcode / formatTokens

Function formatTokens

src/components/ExecutionControlBar.tsx:37–42  ·  view source on GitHub ↗
(tokens: number)

Source from the content-addressed store, hash-verified

35
36 // Format token count
37 const formatTokens = (tokens: number) => {
38 if (tokens >= 1000) {
39 return `${(tokens / 1000).toFixed(1)}k`;
40 }
41 return tokens.toString();
42 };
43
44 return (
45 <AnimatePresence>

Callers 1

ExecutionControlBarFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected