Skip to content

Commit 06643dd

Browse files
authored
fix: make sure to unset warnings for reused reference content parts (microsoft#223539)
1 parent 5fe066f commit 06643dd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,13 @@ class CollapsibleListRenderer implements IListRenderer<IChatCollapsibleListItem,
312312
}
313313
}
314314

315-
if (data.options?.status?.kind === ChatResponseReferencePartStatusKind.Omitted || data.options?.status?.kind === ChatResponseReferencePartStatusKind.Partial) {
316-
for (const selector of ['.monaco-icon-suffix-container', '.monaco-icon-name-container']) {
317-
const element = templateData.label.element.querySelector(selector);
318-
if (element) {
315+
for (const selector of ['.monaco-icon-suffix-container', '.monaco-icon-name-container']) {
316+
const element = templateData.label.element.querySelector(selector);
317+
if (element) {
318+
if (data.options?.status?.kind === ChatResponseReferencePartStatusKind.Omitted || data.options?.status?.kind === ChatResponseReferencePartStatusKind.Partial) {
319319
element.classList.add('warning');
320+
} else {
321+
element.classList.remove('warning');
320322
}
321323
}
322324
}

0 commit comments

Comments
 (0)