From 8d8b704a7369da1230098aa2ca56d4e93376867c Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 29 May 2025 23:54:27 +0800 Subject: [PATCH] . --- chatdesk-ui/components/chat/chat-files-display.tsx | 3 +++ chatdesk-ui/components/chat/chat-retrieval-settings.tsx | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/chatdesk-ui/components/chat/chat-files-display.tsx b/chatdesk-ui/components/chat/chat-files-display.tsx index af5efbd..3d5944a 100644 --- a/chatdesk-ui/components/chat/chat-files-display.tsx +++ b/chatdesk-ui/components/chat/chat-files-display.tsx @@ -21,10 +21,12 @@ import { Button } from "../ui/button" import { FilePreview } from "../ui/file-preview" import { WithTooltip } from "../ui/with-tooltip" import { ChatRetrievalSettings } from "./chat-retrieval-settings" +import { useTranslation } from "react-i18next" interface ChatFilesDisplayProps {} export const ChatFilesDisplay: FC = ({}) => { + const { t } = useTranslation() useHotkey("f", () => setShowFilesDisplay(prev => !prev)) useHotkey("e", () => setUseRetrieval(prev => !prev)) @@ -253,6 +255,7 @@ export const ChatFilesDisplay: FC = ({}) => { } const RetrievalToggle = ({}) => { + const { t } = useTranslation() const { useRetrieval, setUseRetrieval } = useContext(ChatbotUIContext) return ( diff --git a/chatdesk-ui/components/chat/chat-retrieval-settings.tsx b/chatdesk-ui/components/chat/chat-retrieval-settings.tsx index 18a661c..dac2287 100644 --- a/chatdesk-ui/components/chat/chat-retrieval-settings.tsx +++ b/chatdesk-ui/components/chat/chat-retrieval-settings.tsx @@ -11,10 +11,14 @@ import { import { Label } from "../ui/label" import { Slider } from "../ui/slider" import { WithTooltip } from "../ui/with-tooltip" +import { useTranslation } from "react-i18next" interface ChatRetrievalSettingsProps {} export const ChatRetrievalSettings: FC = ({}) => { + + const { t } = useTranslation() + const { sourceCount, setSourceCount } = useContext(ChatbotUIContext) const [isOpen, setIsOpen] = useState(false)