fix: address latest PR review feedback

This commit is contained in:
2026-03-19 20:06:52 -07:00
parent 9ad3ccfa38
commit 1227706ac9
11 changed files with 306 additions and 33 deletions

View File

@@ -291,6 +291,12 @@ export function parseCliPrograms(
if (normalizedAction && (statsBackground || statsStop)) {
throw new Error('Stats background and stop flags cannot be combined with stats actions.');
}
if (
normalizedAction !== 'cleanup' &&
(options.vocab === true || options.lifetime === true)
) {
throw new Error('Stats --vocab and --lifetime flags require the cleanup action.');
}
if (normalizedAction === 'cleanup') {
statsCleanup = true;
statsCleanupLifetime = options.lifetime === true;