File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,9 @@ export function getApiMetrics(messages: ClineMessage[]) {
7272 // kilocode_change start
7373 if ( message . type === "ask" && message . ask === "tool" && message . text ) {
7474 const fastApplyResult = safeJsonParse < ClineSayTool > ( message . text ) ?. fastApplyResult
75- if ( fastApplyResult ?. tokensIn ) {
76- result . totalTokensIn += fastApplyResult . tokensIn
77- }
78- if ( fastApplyResult ?. tokensOut ) {
79- result . totalTokensIn += fastApplyResult . tokensOut
80- }
81- if ( fastApplyResult ?. cost ) {
82- result . totalTokensIn += fastApplyResult . cost
83- }
75+ result . totalTokensIn += fastApplyResult ?. tokensIn ?? 0
76+ result . totalTokensOut += fastApplyResult ?. tokensOut ?? 0
77+ result . totalCost += fastApplyResult ?. cost ?? 0
8478 }
8579 // kilocode_change end
8680 }
You can’t perform that action at this time.
0 commit comments