diff --git a/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts b/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts index ce9dac13642..fa6cbe6ed8d 100644 --- a/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts +++ b/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts @@ -289,14 +289,6 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer part.kind !== 'markdownContent' || part.content.value.trim().length > 0); - const thinkingStyle = this.configService.getValue('chat.agent.thinkingStyle'); const collapsedToolsMode = this.configService.getValue('chat.agent.thinking.collapsedTools'); - if (collapsedToolsMode !== CollapsedToolsDisplayMode.Off) { - const hasActiveThinking = !!this.getLastThinkingPart(templateData.renderedParts); - if (hasActiveThinking) { - return lastPart?.kind !== 'thinking' && lastPart?.kind !== 'toolInvocation' && lastPart?.kind !== 'prepareToolInvocation' && lastPart?.kind !== 'textEditGroup' && lastPart?.kind !== 'notebookEditGroup'; + if (collapsedToolsMode === CollapsedToolsDisplayMode.Always || (collapsedToolsMode === CollapsedToolsDisplayMode.WithThinking && this.getLastThinkingPart(templateData.renderedParts))) { + if (!lastPart || lastPart.kind === 'thinking' || lastPart.kind === 'toolInvocation' || lastPart.kind === 'prepareToolInvocation' || lastPart.kind === 'textEditGroup' || lastPart.kind === 'notebookEditGroup') { + return false; } } if ( !lastPart || - lastPart.kind === 'references' || (lastPart.kind === 'thinking' && thinkingStyle !== ThinkingDisplayMode.FixedScrolling) || + lastPart.kind === 'references' || ((lastPart.kind === 'toolInvocation' || lastPart.kind === 'toolInvocationSerialized') && (IChatToolInvocation.isComplete(lastPart) || lastPart.presentation === 'hidden')) || ((lastPart.kind === 'textEditGroup' || lastPart.kind === 'notebookEditGroup') && lastPart.done && !partsToRender.some(part => part.kind === 'toolInvocation' && !IChatToolInvocation.isComplete(part))) || (lastPart.kind === 'progressTask' && lastPart.deferred.isSettled) ||