Skip to content

Commit

Permalink
fix: make sure to unset warnings for reused reference content parts (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceerhl authored Jul 24, 2024
1 parent 5fe066f commit 06643dd
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,13 @@ class CollapsibleListRenderer implements IListRenderer<IChatCollapsibleListItem,
}
}

if (data.options?.status?.kind === ChatResponseReferencePartStatusKind.Omitted || data.options?.status?.kind === ChatResponseReferencePartStatusKind.Partial) {
for (const selector of ['.monaco-icon-suffix-container', '.monaco-icon-name-container']) {
const element = templateData.label.element.querySelector(selector);
if (element) {
for (const selector of ['.monaco-icon-suffix-container', '.monaco-icon-name-container']) {
const element = templateData.label.element.querySelector(selector);
if (element) {
if (data.options?.status?.kind === ChatResponseReferencePartStatusKind.Omitted || data.options?.status?.kind === ChatResponseReferencePartStatusKind.Partial) {
element.classList.add('warning');
} else {
element.classList.remove('warning');
}
}
}
Expand Down

0 comments on commit 06643dd

Please sign in to comment.