Skip to content

Commit 6905765

Browse files
authored
small thinking fixes on rendering (microsoft#264084)
1 parent c8b90c5 commit 6905765

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatListRenderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,14 +1166,14 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
11661166

11671167
private renderChatContentPart(content: IChatRendererContent, templateData: IChatListItemTemplate, context: IChatContentPartRenderContext): IChatContentPart | undefined {
11681168
try {
1169-
const shouldPin = ((content.kind === 'thinking' && content.value) || this.shouldPinPart(content, isResponseVM(context.element) ? context.element : undefined));
1169+
const shouldPin = ((content.kind === 'thinking' && (Array.isArray(content.value) ? content.value.length > 0 : content.value)) || this.shouldPinPart(content, isResponseVM(context.element) ? context.element : undefined));
11701170

11711171
if (!shouldPin && content.kind !== 'working' && isResponseVM(context.element) && !this._finishedThinking && this.hasAnyValidThinkingTokens(context.element)) {
11721172
this._finishedThinking = true;
11731173
if (this._currentlyPinnedPart && !this._currentlyPinnedPart.hasCustomTitle()) {
11741174
this._currentlyPinnedPart.updateTitle(localize('chat.pinned.thinking.header.done', "Thought for a few seconds..."));
11751175
}
1176-
this._currentlyPinnedPart?.hidePreview();
1176+
this._currentlyPinnedPart?.hidePreview(true);
11771177
}
11781178

11791179
if (shouldPin && this.configService.getValue<string>(ChatConfiguration.ThinkingStyle) !== 'none') {

0 commit comments

Comments
 (0)