chore: Optimize operations in Q&A mode (#9274)

Co-authored-by: billsyli <billsyli@tencent.com>
This commit is contained in:
我有一把妖刀
2024-10-14 13:32:13 +08:00
committed by GitHub
parent 7a405b86c9
commit 5ee7e03c1b
3 changed files with 33 additions and 17 deletions

View File

@@ -9,16 +9,19 @@ import { languages } from '@/i18n/language'
export type ILanguageSelectProps = {
currentLanguage: string
onSelect: (language: string) => void
disabled?: boolean
}
const LanguageSelect: FC<ILanguageSelectProps> = ({
currentLanguage,
onSelect,
disabled,
}) => {
return (
<Popover
manualClose
trigger='click'
disabled={disabled}
htmlContent={
<div className='w-full py-1'>
{languages.filter(language => language.supported).map(({ prompt_name, name }) => (