mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
Merge branch 'code-refactor' of https://github.com/pedramamini/Maestro into code-refactor
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
estimateContextUsage,
|
estimateContextUsage,
|
||||||
calculateContextTokens,
|
calculateContextTokens,
|
||||||
estimateAccumulatedGrowth,
|
estimateAccumulatedGrowth,
|
||||||
|
estimateAccumulatedGrowth,
|
||||||
DEFAULT_CONTEXT_WINDOWS,
|
DEFAULT_CONTEXT_WINDOWS,
|
||||||
} from '../../../renderer/utils/contextUsage';
|
} from '../../../renderer/utils/contextUsage';
|
||||||
import type { UsageStats } from '../../../shared/types';
|
import type { UsageStats } from '../../../shared/types';
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ export function calculateContextTokens(
|
|||||||
return (
|
return (
|
||||||
(stats.inputTokens || 0) + (stats.cacheCreationInputTokens || 0) + (stats.outputTokens || 0)
|
(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
|
// Claude models: total input = uncached + cache-hit + newly-cached
|
||||||
@@ -76,6 +79,8 @@ export function calculateContextTokens(
|
|||||||
return (
|
return (
|
||||||
(stats.inputTokens || 0) +
|
(stats.inputTokens || 0) +
|
||||||
(stats.cacheReadInputTokens || 0) +
|
(stats.cacheReadInputTokens || 0) +
|
||||||
|
(stats.cacheCreationInputTokens || 0)(stats.inputTokens || 0) +
|
||||||
|
(stats.cacheReadInputTokens || 0) +
|
||||||
(stats.cacheCreationInputTokens || 0)
|
(stats.cacheCreationInputTokens || 0)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user