MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / formatContextUsage

Function formatContextUsage

packages/acp-adapter/src/session.ts:1489–1492  ·  view source on GitHub ↗
(contextUsage: number)

Source from the content-addressed store, hash-verified

1487// briefly exceed 1.0 when a turn overflows the budget; we still surface
1488// that as ">100%" rather than collapsing back into 0..1.
1489function formatContextUsage(contextUsage: number): string {
1490 if (!Number.isFinite(contextUsage) || contextUsage < 0) return '';
1491 return ` (${(contextUsage * 100).toFixed(1)}%)`;
1492}
1493
1494/**
1495 * Inspect the leading `ContentBlock` of an ACP prompt for a

Callers 2

formatStatusReportFunction · 0.85
formatUsageReportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected