This commit is contained in:
parent
501b249a7c
commit
8d8b704a73
|
|
@ -21,10 +21,12 @@ import { Button } from "../ui/button"
|
||||||
import { FilePreview } from "../ui/file-preview"
|
import { FilePreview } from "../ui/file-preview"
|
||||||
import { WithTooltip } from "../ui/with-tooltip"
|
import { WithTooltip } from "../ui/with-tooltip"
|
||||||
import { ChatRetrievalSettings } from "./chat-retrieval-settings"
|
import { ChatRetrievalSettings } from "./chat-retrieval-settings"
|
||||||
|
import { useTranslation } from "react-i18next"
|
||||||
|
|
||||||
interface ChatFilesDisplayProps {}
|
interface ChatFilesDisplayProps {}
|
||||||
|
|
||||||
export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
|
export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
useHotkey("f", () => setShowFilesDisplay(prev => !prev))
|
useHotkey("f", () => setShowFilesDisplay(prev => !prev))
|
||||||
useHotkey("e", () => setUseRetrieval(prev => !prev))
|
useHotkey("e", () => setUseRetrieval(prev => !prev))
|
||||||
|
|
||||||
|
|
@ -253,6 +255,7 @@ export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const RetrievalToggle = ({}) => {
|
const RetrievalToggle = ({}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
const { useRetrieval, setUseRetrieval } = useContext(ChatbotUIContext)
|
const { useRetrieval, setUseRetrieval } = useContext(ChatbotUIContext)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,14 @@ import {
|
||||||
import { Label } from "../ui/label"
|
import { Label } from "../ui/label"
|
||||||
import { Slider } from "../ui/slider"
|
import { Slider } from "../ui/slider"
|
||||||
import { WithTooltip } from "../ui/with-tooltip"
|
import { WithTooltip } from "../ui/with-tooltip"
|
||||||
|
import { useTranslation } from "react-i18next"
|
||||||
|
|
||||||
interface ChatRetrievalSettingsProps {}
|
interface ChatRetrievalSettingsProps {}
|
||||||
|
|
||||||
export const ChatRetrievalSettings: FC<ChatRetrievalSettingsProps> = ({}) => {
|
export const ChatRetrievalSettings: FC<ChatRetrievalSettingsProps> = ({}) => {
|
||||||
|
|
||||||
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const { sourceCount, setSourceCount } = useContext(ChatbotUIContext)
|
const { sourceCount, setSourceCount } = useContext(ChatbotUIContext)
|
||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(false)
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue