MCPcopy Create free account
hub / github.com/codeaashu/claude-code / combineUsage

Function combineUsage

src/utils/permissions/yoloClassifier.ts:633–641  ·  view source on GitHub ↗

* Combine usage from two classifier stages into a single total.

(a: ClassifierUsage, b: ClassifierUsage)

Source from the content-addressed store, hash-verified

631 * Combine usage from two classifier stages into a single total.
632 */
633function combineUsage(a: ClassifierUsage, b: ClassifierUsage): ClassifierUsage {
634 return {
635 inputTokens: a.inputTokens + b.inputTokens,
636 outputTokens: a.outputTokens + b.outputTokens,
637 cacheReadInputTokens: a.cacheReadInputTokens + b.cacheReadInputTokens,
638 cacheCreationInputTokens:
639 a.cacheCreationInputTokens + b.cacheCreationInputTokens,
640 }
641}
642
643/**
644 * Replace the tool_use output format instruction with XML format.

Callers 1

classifyYoloActionXmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected