mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user