import { Command } from "cmdk" import { useTranslate } from "@workspace/i18n" import { Button } from "@workspace/ui/components/button" import { ScrollArea } from "@workspace/ui/components/scroll-area" import { cn } from "@workspace/ui/lib/utils" import { HistoryIcon, Trash2Icon, XIcon } from "@workspace/ui/components/icon" import { searchMessages } from "./messages" export interface SearchHistoryProps { className?: string items: readonly string[] onSelect: (keyword: string) => void onRemove: (keyword: string) => void onClear: () => void } export function SearchHistory({ className, items, onClear, onRemove, onSelect, }: SearchHistoryProps) { const t = useTranslate() return (