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

Function addUsage

packages/kosong/src/usage.ts:47–54  ·  view source on GitHub ↗
(a: TokenUsage, b: TokenUsage)

Source from the content-addressed store, hash-verified

45 * Sum two TokenUsage values.
46 */
47export function addUsage(a: TokenUsage, b: TokenUsage): TokenUsage {
48 return {
49 inputOther: a.inputOther + b.inputOther,
50 output: a.output + b.output,
51 inputCacheRead: a.inputCacheRead + b.inputCacheRead,
52 inputCacheCreation: a.inputCacheCreation + b.inputCacheCreation,
53 };
54}

Callers 4

usage.test.tsFile · 0.90
recordStepUsageFunction · 0.90
recordMethod · 0.90
totalUsageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected