MCPcopy Create free account
hub / github.com/github/gh-aw / parseTokenCount

Function parseTokenCount

actions/setup/js/parse_copilot_log.cjs:236–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 const USAGE_LINES_RE = /^(?:Total usage est:|API time spent:|Total session time:|Total code changes:|Changes\s+[+-]?\d|Duration\s+\d|Tokens\s+[↑↓])/;
235
236 const parseTokenCount = s => {
237 const n = parseFloat(s);
238 return s.endsWith("k") ? Math.round(n * 1000) : n;
239 };
240
241 const lines = logContent.split("\n").filter(line => !INFRA_LINE_RE.test(line));
242

Callers 1

parsePrettyPrintFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected