This commit is contained in:
hailin 2025-05-29 23:54:27 +08:00
parent 501b249a7c
commit 8d8b704a73
2 changed files with 7 additions and 0 deletions

View File

@ -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<ChatFilesDisplayProps> = ({}) => {
const { t } = useTranslation()
useHotkey("f", () => setShowFilesDisplay(prev => !prev))
useHotkey("e", () => setUseRetrieval(prev => !prev))
@ -253,6 +255,7 @@ export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
}
const RetrievalToggle = ({}) => {
const { t } = useTranslation()
const { useRetrieval, setUseRetrieval } = useContext(ChatbotUIContext)
return (

View File

@ -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<ChatRetrievalSettingsProps> = ({}) => {
const { t } = useTranslation()
const { sourceCount, setSourceCount } = useContext(ChatbotUIContext)
const [isOpen, setIsOpen] = useState(false)