Merge branch 'code-refactor' of https://github.com/pedramamini/Maestro into code-refactor

This commit is contained in:
Raza Rauf
2026-02-04 03:24:31 +05:00
2 changed files with 6 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import {
estimateContextUsage,
calculateContextTokens,
estimateAccumulatedGrowth,
estimateAccumulatedGrowth,
DEFAULT_CONTEXT_WINDOWS,
} from '../../../renderer/utils/contextUsage';
import type { UsageStats } from '../../../shared/types';

View File

@@ -69,6 +69,9 @@ export function calculateContextTokens(
return (
(stats.inputTokens || 0) + (stats.cacheCreationInputTokens || 0) + (stats.outputTokens || 0)
);
return (
(stats.inputTokens || 0) + (stats.cacheCreationInputTokens || 0) + (stats.outputTokens || 0)
);
}
// Claude models: total input = uncached + cache-hit + newly-cached
@@ -76,6 +79,8 @@ export function calculateContextTokens(
return (
(stats.inputTokens || 0) +
(stats.cacheReadInputTokens || 0) +
(stats.cacheCreationInputTokens || 0)(stats.inputTokens || 0) +
(stats.cacheReadInputTokens || 0) +
(stats.cacheCreationInputTokens || 0)
);
}