fix thinking flickering and scrolling (#278233)

* fix thinking flickering and scrolling

* remove unused stuffs

* Update src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove unused localize

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Justin Chen
2025-11-18 18:12:45 -08:00
committed by GitHub
parent afd78ddc45
commit 04265b17f2
2 changed files with 6 additions and 3 deletions

View File

@@ -90,7 +90,6 @@ export class ChatThinkingContentPart extends ChatCollapsibleContentPart implemen
this.currentTitle = this.defaultTitle;
if (this._collapseButton) {
this._collapseButton.icon = ThemeIcon.modify(Codicon.loading, 'spin');
this._collapseButton.label = localize('chat.thinking.fixed.progress', 'Thinking...');
}
// override for codicon chevron in the collapsible part
@@ -105,6 +104,9 @@ export class ChatThinkingContentPart extends ChatCollapsibleContentPart implemen
}
}));
}
const label = (this.lastExtractedTitle ?? '') + (this.hasMultipleItems ? '...' : '');
this.setTitle(label);
}
// @TODO: @justschen Convert to template for each setting?
@@ -215,7 +217,7 @@ export class ChatThinkingContentPart extends ChatCollapsibleContentPart implemen
}
this.lastExtractedTitle = extractedTitle;
const label = localize('chat.thinking.progress.withHeader', '{0}{1}', this.lastExtractedTitle, this.hasMultipleItems ? '...' : '');
const label = (this.lastExtractedTitle ?? '') + (this.hasMultipleItems ? '...' : '');
this.setTitle(label);
this.currentTitle = label;

View File

@@ -1061,7 +1061,8 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
} else {
alreadyRenderedPart.domNode.remove();
}
} else if (newPart.domNode) {
} else if (newPart.domNode && !newPart.domNode.parentElement) {
// Only append if not already attached somewhere else (e.g. inside a thinking wrapper)
templateData.value.appendChild(newPart.domNode);
}