mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
bug(ux): update context percentage when /clear command is run (#4162)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
This commit is contained in:
@@ -133,6 +133,14 @@ export class UiTelemetryService extends EventEmitter {
|
||||
return this.#lastPromptTokenCount;
|
||||
}
|
||||
|
||||
resetLastPromptTokenCount(): void {
|
||||
this.#lastPromptTokenCount = 0;
|
||||
this.emit('update', {
|
||||
metrics: this.#metrics,
|
||||
lastPromptTokenCount: this.#lastPromptTokenCount,
|
||||
});
|
||||
}
|
||||
|
||||
private getOrCreateModelMetrics(modelName: string): ModelMetrics {
|
||||
if (!this.#metrics.models[modelName]) {
|
||||
this.#metrics.models[modelName] = createInitialModelMetrics();
|
||||
|
||||
Reference in New Issue
Block a user