Commit f9e8934
fix: use actualTokens (API-reported) when uploading, matching extension display
The extension shows actualTokens > 0 ? actualTokens : estimatedTokens
(calculateDetailedStats line 1558). The sync service was only reading
cachedData.tokens (text-estimated ~20M) instead of cachedData.actualTokens
(API-reported ~1.2B), causing a ~57x undercounting on the server dashboard.
Apply the same preference: prefer actualTokens when available, fall back to
text-estimated tokens for files without API usage data.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0a4c482 commit f9e8934
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
515 | | - | |
516 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
| |||
0 commit comments