code review followup for compress command (#1097)

Followup to https://github.com/google-gemini/gemini-cli/pull/986
This commit is contained in:
Jacob MacDonald
2025-06-17 08:44:54 -07:00
committed by GitHub
parent c3971754bf
commit e59c872b3d
7 changed files with 39 additions and 18 deletions

View File

@@ -475,9 +475,11 @@ export class GeminiClient {
await cg.countTokens({ model: this.model, contents: newHistory })
).totalTokens;
return {
originalTokenCount,
newTokenCount,
};
return originalTokenCount && newTokenCount
? {
originalTokenCount,
newTokenCount,
}
: null;
}
}