MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / addToTotalCostState

Function addToTotalCostState

src/bootstrap/state.ts:551–558  ·  view source on GitHub ↗
(
  cost: number,
  modelUsage: ModelUsage,
  model: string,
)

Source from the content-addressed store, hash-verified

549}
550
551export function addToTotalCostState(
552 cost: number,
553 modelUsage: ModelUsage,
554 model: string,
555): void {
556 STATE.modelUsage[model] = modelUsage
557 STATE.totalCostUSD += cost
558}
559
560export function getTotalCostUSD(): number {
561 return STATE.totalCostUSD

Callers 1

addToTotalSessionCostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected