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

Function copyUsage

packages/agent-core/src/agent/usage/index.ts:8–10  ·  view source on GitHub ↗
(usage: TokenUsage)

Source from the content-addressed store, hash-verified

6export type UsageRecordScope = 'session' | 'turn';
7
8function copyUsage(usage: TokenUsage): TokenUsage {
9 return { ...usage };
10}
11
12export class UsageRecorder {
13 private readonly byModel: Record<string, TokenUsage> = {};

Callers 4

recordMethod · 0.85
dataMethod · 0.85
byModelSnapshotMethod · 0.85
totalUsageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected