Skip to content

Commit d251fdf

Browse files
committed
Truncate token counts instead of rounding them when displaying in thousands K
1 parent 593d134 commit d251fdf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/ui/src/components/editor/panel/ContextUtilisation/ContextUtilisation.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const format_tokens = (tokens: number): string => {
1010
if (tokens < 1000) {
1111
return tokens.toString()
1212
}
13-
const k = Math.round(tokens / 1000)
13+
const k = Math.floor(tokens / 1000)
1414
return k.toString() + 'K'
1515
}
1616

0 commit comments

Comments
 (0)