(a: TokenUsage, b: TokenUsage)
| 45 | * Sum two TokenUsage values. |
| 46 | */ |
| 47 | export function addUsage(a: TokenUsage, b: TokenUsage): TokenUsage { |
| 48 | return { |
| 49 | inputOther: a.inputOther + b.inputOther, |
| 50 | output: a.output + b.output, |
| 51 | inputCacheRead: a.inputCacheRead + b.inputCacheRead, |
| 52 | inputCacheCreation: a.inputCacheCreation + b.inputCacheCreation, |
| 53 | }; |
| 54 | } |
no outgoing calls
no test coverage detected