feat: Add OCR support to message formatting
This commit is contained in:
@@ -37,7 +37,9 @@ export const PlaygroundForm = ({ dropedFile }: Props) => {
|
||||
textareaRef,
|
||||
setSelectedQuickPrompt,
|
||||
selectedKnowledge,
|
||||
temporaryChat
|
||||
temporaryChat,
|
||||
useOCR,
|
||||
setUseOCR
|
||||
} = useMessageOption()
|
||||
|
||||
const isMobile = () => {
|
||||
@@ -375,6 +377,16 @@ export const PlaygroundForm = ({ dropedFile }: Props) => {
|
||||
{t("sendWhenEnter")}
|
||||
</Checkbox>
|
||||
)
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
label: (
|
||||
<Checkbox
|
||||
checked={useOCR}
|
||||
onChange={(e) => setUseOCR(e.target.checked)}>
|
||||
{t("useOCR")}
|
||||
</Checkbox>
|
||||
)
|
||||
}
|
||||
]
|
||||
}}>
|
||||
|
||||
@@ -73,6 +73,7 @@ export const PageAssistSelect: React.FC<SelectProps> = ({
|
||||
} catch (error) {
|
||||
console.error("Error scrolling to selected option:", error)
|
||||
}
|
||||
|
||||
}, [isOpen, value])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -131,7 +131,9 @@ export const SidepanelForm = ({ dropedFile }: Props) => {
|
||||
setWebSearch,
|
||||
selectedQuickPrompt,
|
||||
setSelectedQuickPrompt,
|
||||
speechToTextLanguage
|
||||
speechToTextLanguage,
|
||||
useOCR,
|
||||
setUseOCR
|
||||
} = useMessage()
|
||||
|
||||
React.useEffect(() => {
|
||||
@@ -414,6 +416,16 @@ export const SidepanelForm = ({ dropedFile }: Props) => {
|
||||
{t("common:chatWithCurrentPage")}
|
||||
</Checkbox>
|
||||
)
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
label: (
|
||||
<Checkbox
|
||||
checked={useOCR}
|
||||
onChange={(e) => setUseOCR(e.target.checked)}>
|
||||
{t("useOCR")}
|
||||
</Checkbox>
|
||||
)
|
||||
}
|
||||
]
|
||||
}}>
|
||||
|
||||
Reference in New Issue
Block a user