Always display confidence chip on similarity searches (#14207)

This commit is contained in:
Josh Hawkins 2024-10-07 21:15:49 -05:00 committed by GitHub
parent 2541a345d0
commit 74efc94649
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 14 deletions

View File

@ -79,19 +79,12 @@ export default function SearchThumbnail({
<div className="flex"> <div className="flex">
<TooltipTrigger asChild> <TooltipTrigger asChild>
<div className="mx-3 pb-1 text-sm text-white"> <div className="mx-3 pb-1 text-sm text-white">
{ <Chip
<> className={`z-0 flex items-start justify-between space-x-1 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500`}
<Chip onClick={() => onClick(searchResult)}
className={`z-0 flex items-start justify-between space-x-1 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500`} >
onClick={() => onClick(searchResult)} {getIconForLabel(searchResult.label, "size-3 text-white")}
> </Chip>
{getIconForLabel(
searchResult.label,
"size-3 text-white",
)}
</Chip>
</>
}
</div> </div>
</TooltipTrigger> </TooltipTrigger>
</div> </div>

View File

@ -390,7 +390,8 @@ export default function SearchView({
findSimilar={() => setSimilaritySearch(value)} findSimilar={() => setSimilaritySearch(value)}
onClick={() => onSelectSearch(value, index)} onClick={() => onSelectSearch(value, index)}
/> />
{searchTerm && ( {(searchTerm ||
searchFilter?.search_type?.includes("similarity")) && (
<div className={cn("absolute right-2 top-2 z-40")}> <div className={cn("absolute right-2 top-2 z-40")}>
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger>