diff --git a/src/vs/workbench/contrib/chat/common/chatViewModel.ts b/src/vs/workbench/contrib/chat/common/chatViewModel.ts index 88d973ecc41d1..063bd4b0a7f5e 100644 --- a/src/vs/workbench/contrib/chat/common/chatViewModel.ts +++ b/src/vs/workbench/contrib/chat/common/chatViewModel.ts @@ -588,9 +588,13 @@ export class ChatResponseViewModel extends Disposable implements IChatResponseVi const now = Date.now(); const wordCount = countWords(_model.entireResponse.getMarkdown()); - if (wordCount > 0 && wordCount === this._contentUpdateTimings.lastWordCount) { + if (wordCount === this._contentUpdateTimings.lastWordCount) { this.trace('onDidChange', `Update- no new words`); } else { + if (this._contentUpdateTimings.lastWordCount === 0) { + this._contentUpdateTimings.lastUpdateTime = now; + } + const timeDiff = Math.min(now - this._contentUpdateTimings.lastUpdateTime, 1000); const newTotalTime = Math.max(this._contentUpdateTimings.totalTime + timeDiff, 250); const impliedWordLoadRate = wordCount / (newTotalTime / 1000);