MCPcopy Create free account
hub / github.com/OperationT00/T-Code / formatLine

Method formatLine

src/main/java/com/tcode/agent/Agent.java:522–527  ·  view source on GitHub ↗
(String label, int tokens, int window, int count)

Source from the content-addressed store, hash-verified

520 }
521
522 private static String formatLine(String label, int tokens, int window, int count) {
523 double pct = window > 0 ? (double) tokens / window * 100 : 0;
524 String countLabel = count >= 0 ? String.format(" [%d 条]", count) : "";
525 return String.format(" %-18s %8s (%4.1f%%)%s%n",
526 label + ":", formatTokens(tokens), pct, countLabel);
527 }
528
529 private static String progressBar(double ratio, int width) {
530 ratio = Math.max(0, Math.min(1, ratio));

Callers 1

getContextStatusMethod · 0.95

Calls 2

formatTokensMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected