MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / onCostCalculated

Function onCostCalculated

packages/agent-runtime/src/run-agent-step.ts:263–267  ·  view source on GitHub ↗
(credits: number)

Source from the content-addressed store, hash-verified

261 let stepCreditsUsed = 0
262
263 const onCostCalculated = async (credits: number) => {
264 stepCreditsUsed += credits
265 agentState.creditsUsed += credits
266 agentState.directCreditsUsed += credits
267 }
268
269 const iterationNum = agentState.messageHistory.length
270 const systemTokens = countTokensJson(system)

Callers 1

executeToolCallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected