style(cli): Change display order to tokens first, then characters

- Update top files display format from '(chars, tokens, %)' to '(tokens, chars, %)'
- Emphasizes token count as primary metric since files are now ranked by tokens
- Maintains consistent ordering with the ranking logic
This commit is contained in:
Kazuki Yamada
2025-06-08 17:39:46 +09:00
parent 0772ad0734
commit b1e994efe1

View File

@@ -103,7 +103,7 @@ export const printTopFiles = (
const percentageOfTotal = totalTokens > 0 ? Number(((tokenCount / totalTokens) * 100).toFixed(1)) : 0;
const indexString = `${index + 1}.`.padEnd(3, ' ');
logger.log(
`${pc.white(`${indexString}`)} ${pc.white(filePath)} ${pc.dim(`(${charCount.toLocaleString()} chars, ${tokenCount.toLocaleString()} tokens, ${percentageOfTotal}%)`)}`,
`${pc.white(`${indexString}`)} ${pc.white(filePath)} ${pc.dim(`(${tokenCount.toLocaleString()} tokens, ${charCount.toLocaleString()} chars, ${percentageOfTotal}%)`)}`,
);
});
};