From 3a2e1f8a558e2cf5be379b26f7bbbf675781d358 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 9 Dec 2024 18:53:45 -0800 Subject: [PATCH] improved display - no odd cutoffs --- .../chat_search/sources/SourceCard.tsx | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/web/src/components/chat_search/sources/SourceCard.tsx b/web/src/components/chat_search/sources/SourceCard.tsx index cc4437b6c81..1c888228a83 100644 --- a/web/src/components/chat_search/sources/SourceCard.tsx +++ b/web/src/components/chat_search/sources/SourceCard.tsx @@ -57,29 +57,27 @@ export function SeeMoreBlock({ onClick={toggleDocumentSelection} className={` ${documentSelectionToggled ? "border-border-100 border" : ""} - cursor-pointer w-[150px] rounded-sm flex-none transition-all duration-500 hover:bg-background-125 bg-text-100 px-3 py-2.5 + cursor-pointer rounded-sm flex-none transition-all duration-500 hover:bg-background-125 bg-text-100 px-3 py-2.5 `} > -
-

+

+

{documentSelectionToggled ? "Hide sources" : "See context"}

-
- {uniqueSources.map((sourceType, ind) => ( -
-
- -
+
+ {uniqueSources.slice(0, 3).map((sourceType, ind) => ( +
+
))} + {uniqueSources.length > 3 && ( + + +{uniqueSources.length - 3} + + )}
-
-
+
See more