mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 03:40:33 +08:00
fix: use translate assistant's content instead of select text (#10266)
use assistant.content instead of select text
This commit is contained in:
parent
3d6a82fb00
commit
0697c79daa
@ -138,8 +138,9 @@ const ActionTranslate: FC<Props> = ({ action, scrollToBottom }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assistantRef.current = getDefaultTranslateAssistant(translateLang, action.selectedText)
|
const assistant = getDefaultTranslateAssistant(translateLang, action.selectedText)
|
||||||
processMessages(assistantRef.current, topicRef.current, action.selectedText, setAskId, onStream, onFinish, onError)
|
assistantRef.current = assistant
|
||||||
|
processMessages(assistant, topicRef.current, assistant.content, setAskId, onStream, onFinish, onError)
|
||||||
}, [action, targetLanguage, alterLanguage, scrollToBottom])
|
}, [action, targetLanguage, alterLanguage, scrollToBottom])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user