diff --git a/web/src/components/input/InputWithTags.tsx b/web/src/components/input/InputWithTags.tsx index 1e241a8bc..c14056a79 100644 --- a/web/src/components/input/InputWithTags.tsx +++ b/web/src/components/input/InputWithTags.tsx @@ -7,7 +7,7 @@ import React, { } from "react"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; -import { LuX, LuFilter } from "react-icons/lu"; +import { LuX, LuFilter, LuImage } from "react-icons/lu"; import { SearchFilter, SearchSource } from "@/types/search"; type FilterType = keyof SearchFilter; @@ -442,7 +442,7 @@ export default function InputWithTags({ aria-expanded={showSuggestions} />
- {Object.keys(filters).length > 0 && ( + {(Object.keys(filters).length > 0 || isSimilaritySearch) && ( )} {(inputValue || Object.keys(filters).length > 0) && ( @@ -472,66 +476,67 @@ export default function InputWithTags({ {((showFilters && (Object.keys(filters).length > 0 || isSimilaritySearch)) || showSuggestions) && ( -
- {showFilters && Object.keys(filters).length > 0 && ( -
- {isSimilaritySearch && ( - - Similarity Search - - - )} - {Object.entries(filters).map(([filterType, filterValues]) => - Array.isArray(filterValues) ? ( - filterValues.map((value, index) => ( - - {filterType}:{value} - - - )) - ) : ( - - {filterType}: - {filterType === "before" || filterType === "after" - ? new Date(filterValues as number).toLocaleDateString() - : filterValues} +
+ {showFilters && + (Object.keys(filters).length > 0 || isSimilaritySearch) && ( +
+ {isSimilaritySearch && ( + + Similarity Search - ), - )} -
- )} + )} + {Object.entries(filters).map(([filterType, filterValues]) => + Array.isArray(filterValues) ? ( + filterValues.map((value, index) => ( + + {filterType}:{value} + + + )) + ) : ( + + {filterType}: + {filterType === "before" || filterType === "after" + ? new Date(filterValues as number).toLocaleDateString() + : filterValues} + + + ), + )} +
+ )} {showSuggestions && (