Skip to content

Commit 9fb5ad3

Browse files
committed
more citation color changes:
1 parent 5efe6a8 commit 9fb5ad3

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

packages/web/src/app/globals.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
--chat-reference-selected-border: hsl(217, 91%, 60%);
105105

106106
--chat-citation: #3b83f640;
107-
--chat-citation-hover: hsl(217, 91%, 70%);
107+
--chat-citation-hover: hsl(217, 91%, 75%);
108+
--chat-citation-selected: hsl(217, 91%, 65%);
108109
--chat-citation-border: hsl(217, 91%, 60%);
109110

110111
--warning: #ca8a04;
@@ -195,7 +196,8 @@
195196
--chat-reference-selected-border: hsl(217, 91%, 60%);
196197

197198
--chat-citation: #1e3b8a87;
198-
--chat-citation-hover: hsl(217, 91%, 55%);
199+
--chat-citation-hover: hsl(217, 91%, 45%);
200+
--chat-citation-selected: hsl(217, 80%, 50%);
199201
--chat-citation-border: hsl(217, 91%, 60%);
200202

201203
--warning: #fde047;
@@ -274,6 +276,13 @@
274276
background-color: var(--chat-citation-hover) !important;
275277
}
276278

279+
/* Separate selected class for inline chat citations */
280+
.chat-citation--selected {
281+
background-color: var(--chat-citation-selected) !important;
282+
border-color: var(--chat-citation-border) !important;
283+
font-weight: 600;
284+
}
285+
277286
/* Chat citation styling for inline citations in chat responses */
278287
.bg-chat-citation {
279288
background-color: var(--chat-citation);

packages/web/src/features/chat/components/chatThread/chatThreadListItem.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,17 @@ export const ChatThreadListItem = forwardRef<HTMLDivElement, ChatThreadListItemP
235235
});
236236

237237
referenceElements.forEach(element => {
238-
element.classList.add('chat-reference--selected');
238+
// Check if it's an inline chat citation or code viewer element
239+
const isInlineCitation = element.classList.contains('bg-chat-citation');
240+
const selectedClass = isInlineCitation ? 'chat-citation--selected' : 'chat-reference--selected';
241+
element.classList.add(selectedClass);
239242
});
240243

241244
return () => {
242245
referenceElements.forEach(element => {
246+
// Remove both possible selected classes
243247
element.classList.remove('chat-reference--selected');
248+
element.classList.remove('chat-citation--selected');
244249
});
245250
};
246251
}, [selectedReference]);

0 commit comments

Comments
 (0)