MCPcopy Index your code
hub / github.com/codeaashu/claude-code / addToTotalCostState

Function addToTotalCostState

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

Source from the content-addressed store, hash-verified

555}
556
557export function addToTotalCostState(
558 cost: number,
559 modelUsage: ModelUsage,
560 model: string,
561): void {
562 STATE.modelUsage[model] = modelUsage
563 STATE.totalCostUSD += cost
564}
565
566export function getTotalCostUSD(): number {
567 return STATE.totalCostUSD

Callers 1

addToTotalSessionCostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected