fix(ui): Track last prompt token count in processStream (#8650)

This commit is contained in:
Sandy Tao
2025-09-18 11:46:56 -07:00
committed by GitHub
parent da14875c6a
commit 2fd86c1904
8 changed files with 72 additions and 24 deletions
+3
View File
@@ -49,6 +49,7 @@ import {
import type { IdeContext, File } from '../ide/types.js';
import { handleFallback } from '../fallback/handler.js';
import type { RoutingContext } from '../routing/routingStrategy.js';
import { uiTelemetryService } from '../telemetry/uiTelemetry.js';
export function isThinkingSupported(model: string) {
return model.startsWith('gemini-2.5') || model === DEFAULT_GEMINI_MODEL_AUTO;
@@ -772,6 +773,8 @@ export class GeminiClient {
};
}
uiTelemetryService.setLastPromptTokenCount(newTokenCount);
logChatCompression(
this.config,
makeChatCompressionEvent({