feat: optimize i18n implementation for better localization (#2062)

* feat: optimize i18n implementation for better localization

* delete i18n-ally-custom-framework.yml

* update common key
This commit is contained in:
jingyang
2024-07-16 17:56:27 +08:00
committed by GitHub
parent 1e4ffc2481
commit fc96bb99cc
206 changed files with 1360 additions and 1277 deletions

View File

@@ -75,7 +75,7 @@ const AIChatSettingsModal = ({
onClose={onClose}
title={
<>
{t('core.ai.AI settings')}
{t('common:core.ai.AI settings')}
{feConfigs?.docUrl && (
<Link
href={getDocPath('/docs/course/ai_settings/')}
@@ -85,7 +85,7 @@ const AIChatSettingsModal = ({
fontWeight={'normal'}
fontSize={'md'}
>
{t('common.Read intro')}
{t('common:common.Read intro')}
</Link>
)}
</>
@@ -95,7 +95,7 @@ const AIChatSettingsModal = ({
<ModalBody overflowY={'auto'}>
<Flex alignItems={'center'}>
<Box {...LabelStyles} mr={2}>
{t('core.ai.Model')}
{t('common:core.ai.Model')}
</Box>
<Box flex={'1 0 0'}>
<AIModelSelector
@@ -112,7 +112,7 @@ const AIChatSettingsModal = ({
{feConfigs && (
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.ai.Ai point price')}
{t('common:core.ai.Ai point price')}
</Box>
<Box flex={1} ml={'10px'}>
{t('support.wallet.Ai point every thousand tokens', {
@@ -123,7 +123,7 @@ const AIChatSettingsModal = ({
)}
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.ai.Max context')}
{t('common:core.ai.Max context')}
</Box>
<Box flex={1} ml={'10px'}>
{selectedModel?.maxContext || 4096}Tokens
@@ -131,8 +131,8 @@ const AIChatSettingsModal = ({
</Flex>
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.ai.Support tool')}
<QuestionTip ml={1} label={t('core.module.template.AI support tool tip')} />
{t('common:core.ai.Support tool')}
<QuestionTip ml={1} label={t('common:core.module.template.AI support tool tip')} />
</Box>
<Box flex={1} ml={'10px'}>
{selectedModel?.toolChoice || selectedModel?.functionCall ? '支持' : '不支持'}
@@ -140,13 +140,13 @@ const AIChatSettingsModal = ({
</Flex>
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.app.Temperature')}
{t('common:core.app.Temperature')}
</Box>
<Box flex={1} ml={'10px'}>
<MySlider
markList={[
{ label: t('core.app.deterministic'), value: 0 },
{ label: t('core.app.Random'), value: 10 }
{ label: t('common:core.app.deterministic'), value: 0 },
{ label: t('common:core.app.Random'), value: 10 }
]}
width={'95%'}
min={0}
@@ -161,7 +161,7 @@ const AIChatSettingsModal = ({
</Flex>
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.app.Max tokens')}
{t('common:core.app.Max tokens')}
</Box>
<Box flex={1} ml={'10px'}>
<MySlider
@@ -184,7 +184,7 @@ const AIChatSettingsModal = ({
{showMaxHistoriesSlider && (
<Flex mt={8}>
<Box {...LabelStyles} mr={2}>
{t('core.app.Max histories')}
{t('common:core.app.Max histories')}
</Box>
<Box flex={1} ml={'10px'}>
<MySlider
@@ -207,10 +207,10 @@ const AIChatSettingsModal = ({
{showResponseAnswerText && (
<Flex mt={8} alignItems={'center'}>
<Box {...LabelStyles}>
{t('core.app.Ai response')}
{t('common:core.app.Ai response')}
<QuestionTip
ml={1}
label={t('core.module.template.AI response switch tip')}
label={t('common:core.module.template.AI response switch tip')}
></QuestionTip>
</Box>
<Box flex={1} ml={'10px'}>
@@ -228,10 +228,10 @@ const AIChatSettingsModal = ({
</ModalBody>
<ModalFooter>
<Button variant={'whiteBase'} onClick={onClose}>
{t('common.Close')}
{t('common:common.Close')}
</Button>
<Button ml={4} onClick={handleSubmit(onSuccess)}>
{t('common.Confirm')}
{t('common:common.Confirm')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -55,7 +55,7 @@ const SettingLLMModel = ({ llmModelType = LLMModelTypeEnum.all, defaultData, onC
})}
position={'relative'}
>
<MyTooltip label={t('core.app.Setting ai property')}>
<MyTooltip label={t('common:core.app.Setting ai property')}>
<Button
w={'100%'}
justifyContent={'flex-start'}

View File

@@ -123,7 +123,7 @@ const DatasetParamsModal = ({
isOpen={true}
onClose={onClose}
iconSrc="/imgs/modal/params.svg"
title={t('core.dataset.search.Dataset Search Params')}
title={t('common:core.dataset.search.Dataset Search Params')}
w={['90vw', '550px']}
>
<ModalBody flex={'auto'} overflow={'auto'}>
@@ -132,16 +132,16 @@ const DatasetParamsModal = ({
list={[
{
icon: 'modal/setting',
label: t('core.dataset.search.search mode'),
label: t('common:core.dataset.search.search mode'),
value: SearchSettingTabEnum.searchMode
},
{
icon: 'support/outlink/apikeyFill',
label: t('core.dataset.search.Filter'),
label: t('common:core.dataset.search.Filter'),
value: SearchSettingTabEnum.limit
},
{
label: t('core.module.template.Query extension'),
label: t('common:core.module.template.Query extension'),
value: SearchSettingTabEnum.queryExtension,
icon: '/imgs/workflow/cfr.svg'
}
@@ -182,7 +182,7 @@ const DatasetParamsModal = ({
if (!showReRank) {
return toast({
status: 'warning',
title: t('core.ai.Not deploy rerank model')
title: t('common:core.ai.Not deploy rerank model')
});
}
if (
@@ -191,7 +191,7 @@ const DatasetParamsModal = ({
) {
return toast({
status: 'warning',
title: t('support.team.limit.No permission rerank')
title: t('common:support.team.limit.No permission rerank')
});
}
setValue('usingReRank', !getValues('usingReRank'));
@@ -200,9 +200,9 @@ const DatasetParamsModal = ({
>
<MyIcon name="core/dataset/rerank" w={'18px'} mr={'14px'} />
<Box pr={2} color={'myGray.800'} flex={'1 0 0'}>
<Box fontSize={'sm'}>{t('core.dataset.search.ReRank')}</Box>
<Box fontSize={'sm'}>{t('common:core.dataset.search.ReRank')}</Box>
<Box fontSize={'xs'} color={'myGray.500'}>
{t('core.dataset.search.ReRank desc')}
{t('common:core.dataset.search.ReRank desc')}
</Box>
</Box>
<Box position={'relative'} w={'18px'} h={'18px'}>
@@ -218,10 +218,10 @@ const DatasetParamsModal = ({
{limit !== undefined && (
<Box display={['block', 'flex']}>
<Flex flex={'0 0 120px'} mb={[8, 0]}>
<FormLabel>{t('core.dataset.search.Max Tokens')}</FormLabel>
<FormLabel>{t('common:core.dataset.search.Max Tokens')}</FormLabel>
<QuestionTip
ml={1}
label={t('core.dataset.search.Max Tokens Tips')}
label={t('common:core.dataset.search.Max Tokens Tips')}
></QuestionTip>
</Flex>
<Box flex={1} mx={4}>
@@ -244,10 +244,10 @@ const DatasetParamsModal = ({
)}
<Box display={['block', 'flex']} mt={10}>
<Flex flex={'0 0 120px'} mb={[8, 0]}>
<FormLabel>{t('core.dataset.search.Min Similarity')}</FormLabel>
<FormLabel>{t('common:core.dataset.search.Min Similarity')}</FormLabel>
<QuestionTip
ml={1}
label={t('core.dataset.search.Min Similarity Tips')}
label={t('common:core.dataset.search.Min Similarity Tips')}
></QuestionTip>
</Flex>
<Box flex={1} mx={4}>
@@ -267,7 +267,9 @@ const DatasetParamsModal = ({
}}
/>
) : (
<Box color={'myGray.500'}>{t('core.dataset.search.No support similarity')}</Box>
<Box color={'myGray.500'}>
{t('common:core.dataset.search.No support similarity')}
</Box>
)}
</Box>
</Box>
@@ -276,16 +278,18 @@ const DatasetParamsModal = ({
{currentTabType === SearchSettingTabEnum.queryExtension && (
<Box>
<Box transform={'translateY(-5px)'} fontSize={'xs'} color={'myGray.500'}>
{t('core.dataset.Query extension intro')}
{t('common:core.dataset.Query extension intro')}
</Box>
<Flex mt={3} alignItems={'center'}>
<FormLabel flex={'1 0 0'}>{t('core.dataset.search.Using query extension')}</FormLabel>
<FormLabel flex={'1 0 0'}>
{t('common:core.dataset.search.Using query extension')}
</FormLabel>
<Switch {...register('datasetSearchUsingExtensionQuery')} />
</Flex>
{datasetSearchUsingCfrForm === true && (
<>
<Flex mt={4} alignItems={'center'}>
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('core.ai.Model')}</FormLabel>
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('common:core.ai.Model')}</FormLabel>
<Box flex={['1 0 0', '0 0 300px']}>
<SelectAiModel
width={'100%'}
@@ -299,17 +303,19 @@ const DatasetParamsModal = ({
</Flex>
<Box mt={3}>
<Flex alignItems={'center'}>
<FormLabel>{t('core.app.edit.Query extension background prompt')}</FormLabel>
<FormLabel>
{t('common:core.app.edit.Query extension background prompt')}
</FormLabel>
<QuestionTip
ml={1}
label={t('core.app.edit.Query extension background tip')}
label={t('common:core.app.edit.Query extension background tip')}
></QuestionTip>
</Flex>
<Box mt={1}>
<PromptEditor
h={200}
showOpenModal={false}
placeholder={t('core.module.QueryExtension.placeholder')}
placeholder={t('common:core.module.QueryExtension.placeholder')}
value={cfbBgDesc}
onChange={(e) => {
setValue('datasetSearchExtensionBg', e);
@@ -324,7 +330,7 @@ const DatasetParamsModal = ({
</ModalBody>
<ModalFooter>
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
{t('common.Close')}
{t('common:common.Close')}
</Button>
<Button
onClick={() => {
@@ -332,7 +338,7 @@ const DatasetParamsModal = ({
handleSubmit(onSuccess)();
}}
>
{t('common.Done')}
{t('common:common.Done')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -61,7 +61,7 @@ export const DatasetSelectModal = ({
isOpen={isOpen}
paths={paths}
setParentId={setParentId}
tips={t('dataset.Select Dataset Tips')}
tips={t('common:dataset.Select Dataset Tips')}
onClose={onClose}
>
<Flex h={'100%'} flexDirection={'column'} flex={'1 0 0'}>
@@ -124,8 +124,8 @@ export const DatasetSelectModal = ({
key={item._id}
label={
item.type === DatasetTypeEnum.folder
? t('dataset.Select Folder')
: t('dataset.Select Dataset')
? t('common:dataset.Select Folder')
: t('common:dataset.Select Dataset')
}
>
<Card
@@ -148,7 +148,7 @@ export const DatasetSelectModal = ({
if (vectorModel && vectorModel !== item.vectorModel.model) {
return toast({
status: 'warning',
title: t('dataset.Select Dataset Tips')
title: t('common:dataset.Select Dataset Tips')
});
}
setSelectedDatasets((state) => [...state, { datasetId: item._id }]);
@@ -170,7 +170,7 @@ export const DatasetSelectModal = ({
</Flex>
<Flex justifyContent={'flex-end'} alignItems={'center'} fontSize={'sm'}>
{item.type === DatasetTypeEnum.folder ? (
<Box color={'myGray.500'}>{t('Folder')}</Box>
<Box color={'myGray.500'}>{t('common:Folder')}</Box>
) : (
<>
<MyIcon mr={1} name="kbTest" w={'12px'} />
@@ -184,7 +184,9 @@ export const DatasetSelectModal = ({
})()
)}
</Grid>
{filterDatasets.unSelected.length === 0 && <EmptyTip text={t('common.folder.empty')} />}
{filterDatasets.unSelected.length === 0 && (
<EmptyTip text={t('common:common.folder.empty')} />
)}
</ModalBody>
<ModalFooter>
@@ -199,7 +201,7 @@ export const DatasetSelectModal = ({
onChange(filterDatasets);
}}
>
{t('common.Done')}
{t('common:common.Done')}
</Button>
</ModalFooter>

View File

@@ -77,9 +77,9 @@ const InputGuideConfig = ({
const formLabel = useMemo(() => {
if (!isOpenQuestionGuide) {
return t('core.app.whisper.Close');
return t('common:core.app.whisper.Close');
}
return t('core.app.whisper.Open');
return t('common:core.app.whisper.Open');
}, [t, isOpenQuestionGuide]);
return (
@@ -110,7 +110,7 @@ const InputGuideConfig = ({
>
<ModalBody px={[5, 16]} py={[4, 8]}>
<Flex justifyContent={'space-between'} alignItems={'center'}>
<FormLabel>{t('Is open')}</FormLabel>
<FormLabel>{t('common:Is open')}</FormLabel>
<Switch
isChecked={isOpenQuestionGuide}
onChange={(e) => {
@@ -231,7 +231,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
} else {
toast({
status: 'success',
title: t('common.Add Success')
title: t('common:common.Add Success')
});
}
fetchData(1);
@@ -241,7 +241,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
onSuccess() {
setNewData(undefined);
},
errorToast: t('error.Create failed')
errorToast: t('common:error.Create failed')
}
);

View File

@@ -11,7 +11,7 @@ const QGSwitch = (props: SwitchProps) => {
return (
<Flex alignItems={'center'}>
<MyIcon name={'core/chat/QGFill'} mr={2} w={'20px'} />
<FormLabel>{t('core.app.Question Guide')}</FormLabel>
<FormLabel>{t('common:core.app.Question Guide')}</FormLabel>
<ChatFunctionTip type={'nextQuestion'} />
<Box flex={1} />
<Switch {...props} />

View File

@@ -213,7 +213,7 @@ const ScheduledTriggerConfig = ({
// cron config to show label
const formatLabel = useMemo(() => {
if (!isOpenSchedule) {
return t('common.Not open');
return t('common:common.Not open');
}
if (cronField[0] === 'month') {
@@ -239,7 +239,7 @@ const ScheduledTriggerConfig = ({
});
}
return t('common.Not open');
return t('common:common.Not open');
}, [cronField, isOpenSchedule, t]);
useEffect(() => {
@@ -254,10 +254,10 @@ const ScheduledTriggerConfig = ({
<Flex alignItems={'center'}>
<MyIcon name={'core/app/schedulePlan'} w={'20px'} />
<HStack ml={2} flex={1} spacing={1}>
<FormLabel>{t('core.app.Interval timer run')}</FormLabel>
<QuestionTip label={t('core.app.Interval timer tip')} />
<FormLabel>{t('common:core.app.Interval timer run')}</FormLabel>
<QuestionTip label={t('common:core.app.Interval timer tip')} />
</HStack>
<MyTooltip label={t('core.app.Config schedule plan')}>
<MyTooltip label={t('common:core.app.Config schedule plan')}>
<Button
variant={'transparentBase'}
iconSpacing={1}
@@ -274,12 +274,15 @@ const ScheduledTriggerConfig = ({
isOpen={isOpen}
onClose={onClose}
iconSrc={'core/app/schedulePlan'}
title={t('core.app.Interval timer config')}
title={t('common:core.app.Interval timer config')}
overflow={'unset'}
>
<ModalBody>
<Flex justifyContent={'space-between'} alignItems={'center'}>
<FormLabel flex={'0 0 80px'}> {t('core.app.schedule.Open schedule')}</FormLabel>
<FormLabel flex={'0 0 80px'}>
{' '}
{t('common:core.app.schedule.Open schedule')}
</FormLabel>
<Switch
isChecked={isOpenSchedule}
onChange={(e) => {
@@ -318,12 +321,12 @@ const ScheduledTriggerConfig = ({
</Box>
</Flex>
<Box mt={5}>
<FormLabel mb={1}>{t('core.app.schedule.Default prompt')}</FormLabel>
<FormLabel mb={1}>{t('common:core.app.schedule.Default prompt')}</FormLabel>
<Textarea
value={defaultPrompt}
rows={8}
bg={'myGray.50'}
placeholder={t('core.app.schedule.Default prompt placeholder')}
placeholder={t('common:core.app.schedule.Default prompt placeholder')}
onChange={(e) => {
onUpdate({ defaultPrompt: e.target.value });
}}

View File

@@ -27,8 +27,8 @@ const TTSSelect = ({
const list = useMemo(
() => [
{ label: t('core.app.tts.Close'), value: TTSTypeEnum.none },
{ label: t('core.app.tts.Web'), value: TTSTypeEnum.web },
{ label: t('common:core.app.tts.Close'), value: TTSTypeEnum.none },
{ label: t('common:core.app.tts.Web'), value: TTSTypeEnum.web },
...audioSpeechModelList.map((item) => item?.voices || []).flat()
],
[audioSpeechModelList, t]
@@ -44,7 +44,7 @@ const TTSSelect = ({
return value.voice;
}, [value]);
const formLabel = useMemo(
() => list.find((item) => item.value === formatValue)?.label || t('common.UnKnow'),
() => list.find((item) => item.value === formatValue)?.label || t('common:common.UnKnow'),
[formatValue, list, t]
);
@@ -82,10 +82,10 @@ const TTSSelect = ({
return (
<Flex alignItems={'center'}>
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
<FormLabel>{t('core.app.TTS')}</FormLabel>
<FormLabel>{t('common:core.app.TTS')}</FormLabel>
<ChatFunctionTip type={'tts'} />
<Box flex={1} />
<MyTooltip label={t('core.app.Select TTS')}>
<MyTooltip label={t('common:core.app.Select TTS')}>
<Button
variant={'transparentBase'}
iconSpacing={1}
@@ -100,7 +100,7 @@ const TTSSelect = ({
title={
<>
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
{t('core.app.TTS')}
{t('common:core.app.TTS')}
</>
}
isOpen={isOpen}
@@ -109,11 +109,11 @@ const TTSSelect = ({
>
<ModalBody px={[5, 16]} py={[4, 8]}>
<Flex justifyContent={'space-between'} alignItems={'center'}>
<FormLabel>{t('core.app.tts.Speech model')}</FormLabel>
<FormLabel>{t('common:core.app.tts.Speech model')}</FormLabel>
<MySelect w={'220px'} value={formatValue} list={list} onchange={onclickChange} />
</Flex>
<Flex mt={8} justifyContent={'space-between'}>
<FormLabel>{t('core.app.tts.Speech speed')}</FormLabel>
<FormLabel>{t('common:core.app.tts.Speech speed')}</FormLabel>
<MySlider
markList={[
{ label: '0.3', value: 0.3 },
@@ -145,7 +145,7 @@ const TTSSelect = ({
leftIcon={<MyIcon name={'core/chat/stopSpeech'} w={'16px'} />}
onClick={cancelAudio}
>
{t('core.chat.tts.Stop Speech')}
{t('common:core.chat.tts.Stop Speech')}
</Button>
</Flex>
) : (
@@ -154,11 +154,11 @@ const TTSSelect = ({
leftIcon={<MyIcon name={'core/app/headphones'} w={'16px'} />}
onClick={() => {
playAudioByText({
text: t('core.app.tts.Test Listen Text')
text: t('common:core.app.tts.Test Listen Text')
});
}}
>
{t('core.app.tts.Test Listen')}
{t('common:core.app.tts.Test Listen')}
</Button>
)}
</Flex>

View File

@@ -25,26 +25,26 @@ const ChatFunctionTip = ({ type }: { type: `${FnTypeEnum}` }) => {
},
[FnTypeEnum.nextQuestion]: {
icon: '/imgs/app/nextQuestion-icon.svg',
title: t('core.app.Question Guide'),
desc: t('core.app.Question Guide Tip'),
title: t('common:core.app.Question Guide'),
desc: t('common:core.app.Question Guide Tip'),
imgUrl: '/imgs/app/nextQuestion.svg'
},
[FnTypeEnum.tts]: {
icon: '/imgs/app/tts-icon.svg',
title: t('core.app.TTS'),
desc: t('core.app.TTS Tip'),
title: t('common:core.app.TTS'),
desc: t('common:core.app.TTS Tip'),
imgUrl: '/imgs/app/tts.svg'
},
[FnTypeEnum.variable]: {
icon: '/imgs/app/variable-icon.svg',
title: t('core.module.Variable'),
desc: t('core.app.tip.variableTip'),
title: t('common:core.module.Variable'),
desc: t('common:core.app.tip.variableTip'),
imgUrl: '/imgs/app/variable.svg'
},
[FnTypeEnum.welcome]: {
icon: '/imgs/app/welcome-icon.svg',
title: t('core.app.Welcome Text'),
desc: t('core.app.tip.welcomeTextTip'),
title: t('common:core.app.Welcome Text'),
desc: t('common:core.app.tip.welcomeTextTip'),
imgUrl: '/imgs/app/welcome.svg'
}
});

View File

@@ -97,7 +97,7 @@ const VariableEdit = ({
<Flex alignItems={'center'}>
<MyIcon name={'core/app/simpleMode/variable'} w={'20px'} />
<FormLabel ml={2} fontWeight={'medium'}>
{t('core.module.Variable')}
{t('common:core.module.Variable')}
</FormLabel>
<ChatFunctionTip type={'variable'} />
<Box flex={1} />
@@ -112,7 +112,7 @@ const VariableEdit = ({
onOpenEdit();
}}
>
{t('common.Add New')}
{t('common:common.Add New')}
</Button>
</Flex>
{formatVariables.length > 0 && (
@@ -127,9 +127,9 @@ const VariableEdit = ({
w={'18px !important'}
p={0}
/>
<Th fontSize={'mini'}>{t('core.module.variable.variable name')}</Th>
<Th fontSize={'mini'}>{t('core.module.variable.key')}</Th>
<Th fontSize={'mini'}>{t('common.Require Input')}</Th>
<Th fontSize={'mini'}>{t('common:core.module.variable.variable name')}</Th>
<Th fontSize={'mini'}>{t('common:core.module.variable.key')}</Th>
<Th fontSize={'mini'}>{t('common:common.Require Input')}</Th>
<Th fontSize={'mini'} borderRadius={'none !important'}></Th>
</Tr>
</Thead>
@@ -171,7 +171,7 @@ const VariableEdit = ({
)}
<MyModal
iconSrc="core/app/simpleMode/variable"
title={t('core.module.Variable Setting')}
title={t('common:core.module.Variable Setting')}
isOpen={isOpenEdit}
onClose={onCloseEdit}
maxW={['90vw', '500px']}
@@ -179,29 +179,29 @@ const VariableEdit = ({
<ModalBody>
{variableType !== VariableInputEnum.custom && (
<Flex alignItems={'center'}>
<FormLabel w={'70px'}>{t('common.Require Input')}</FormLabel>
<FormLabel w={'70px'}>{t('common:common.Require Input')}</FormLabel>
<Switch {...registerEdit('variable.required')} />
</Flex>
)}
<Flex mt={5} alignItems={'center'}>
<FormLabel w={'80px'}>{t('core.module.variable.variable name')}</FormLabel>
<FormLabel w={'80px'}>{t('common:core.module.variable.variable name')}</FormLabel>
<Input
{...registerEdit('variable.label', {
required: t('core.module.variable.variable name is required')
required: t('common:core.module.variable.variable name is required')
})}
/>
</Flex>
<Flex mt={5} alignItems={'center'}>
<FormLabel w={'80px'}>{t('core.module.variable.key')}</FormLabel>
<FormLabel w={'80px'}>{t('common:core.module.variable.key')}</FormLabel>
<Input
{...registerEdit('variable.key', {
required: t('core.module.variable.key is required')
required: t('common:core.module.variable.key is required')
})}
/>
</Flex>
<FormLabel mt={5} mb={2}>
{t('core.workflow.Variable.Variable type')}
{t('common:core.workflow.Variable.Variable type')}
</FormLabel>
<MyRadio
gridGap={4}
@@ -226,7 +226,7 @@ const VariableEdit = ({
{variableType === VariableInputEnum.input && (
<>
<FormLabel mt={5} mb={2}>
{t('core.module.variable.text max length')}
{t('common:core.module.variable.text max length')}
</FormLabel>
<Box>
<NumberInput max={500} min={1} step={1} position={'relative'}>
@@ -250,7 +250,7 @@ const VariableEdit = ({
{variableType === VariableInputEnum.select && (
<>
<Box mt={5} mb={2}>
{t('core.module.variable.variable options')}
{t('common:core.module.variable.variable options')}
</Box>
<Box>
{selectEnums.map((item, i) => (
@@ -258,7 +258,9 @@ const VariableEdit = ({
<FormControl>
<Input
{...registerEdit(`variable.enums.${i}.value`, {
required: t('core.module.variable.variable option is value is required')
required: t(
'common:core.module.variable.variable option is value is required'
)
})}
/>
</FormControl>
@@ -285,7 +287,7 @@ const VariableEdit = ({
bg={'myGray.100 !important'}
onClick={() => appendEnums({ value: '' })}
>
{t('core.module.variable add option')}
{t('common:core.module.variable add option')}
</Button>
</>
)}
@@ -293,7 +295,7 @@ const VariableEdit = ({
<ModalFooter>
<Button variant={'whiteBase'} mr={3} onClick={onCloseEdit}>
{t('common.Close')}
{t('common:common.Close')}
</Button>
<Button
onClick={handleSubmitEdit(({ variable }) => {
@@ -303,7 +305,7 @@ const VariableEdit = ({
if (enums.length === 0) {
toast({
status: 'warning',
title: t('core.module.variable.variable option is required')
title: t('common:core.module.variable.variable option is required')
});
return;
}
@@ -323,7 +325,9 @@ const VariableEdit = ({
onCloseEdit();
})}
>
{getValuesEdit('variable.id') ? t('common.Confirm Update') : t('common.Add New')}
{getValuesEdit('variable.id')
? t('common:common.Confirm Update')
: t('common:common.Add New')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -13,7 +13,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
<>
<Flex alignItems={'center'}>
<MyIcon name={'core/app/simpleMode/chat'} w={'20px'} />
<FormLabel ml={2}>{t('core.app.Welcome Text')}</FormLabel>
<FormLabel ml={2}>{t('common:core.app.Welcome Text')}</FormLabel>
<ChatFunctionTip type={'welcome'} />
</Flex>
<MyTextarea
@@ -21,7 +21,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
bg={'myWhite.400'}
rows={6}
fontSize={'sm'}
placeholder={t('core.app.tip.welcomeTextTip')}
placeholder={t('common:core.app.tip.welcomeTextTip')}
{...props}
/>
</>

View File

@@ -26,17 +26,17 @@ const WhisperConfig = ({
const formLabel = useMemo(() => {
if (!isOpenWhisper) {
return t('core.app.whisper.Close');
return t('common:core.app.whisper.Close');
}
return t('core.app.whisper.Open');
return t('common:core.app.whisper.Open');
}, [t, isOpenWhisper]);
return (
<Flex alignItems={'center'}>
<MyIcon name={'core/app/simpleMode/whisper'} mr={2} w={'20px'} />
<FormLabel>{t('core.app.Whisper')}</FormLabel>
<FormLabel>{t('common:core.app.Whisper')}</FormLabel>
<Box flex={1} />
<MyTooltip label={t('core.app.Config whisper')}>
<MyTooltip label={t('common:core.app.Config whisper')}>
<Button
variant={'transparentBase'}
iconSpacing={1}
@@ -48,14 +48,14 @@ const WhisperConfig = ({
</Button>
</MyTooltip>
<MyModal
title={t('core.app.Whisper config')}
title={t('common:core.app.Whisper config')}
iconSrc="core/app/simpleMode/whisper"
isOpen={isOpen}
onClose={onClose}
>
<ModalBody px={[5, 16]} py={[4, 8]}>
<Flex justifyContent={'space-between'} alignItems={'center'}>
<FormLabel>{t('core.app.whisper.Switch')}</FormLabel>
<FormLabel>{t('common:core.app.whisper.Switch')}</FormLabel>
<Switch
isChecked={isOpenWhisper}
onChange={(e) => {
@@ -68,8 +68,8 @@ const WhisperConfig = ({
</Flex>
{isOpenWhisper && (
<Flex mt={8} alignItems={'center'}>
<FormLabel>{t('core.app.whisper.Auto send')}</FormLabel>
<QuestionTip label={t('core.app.whisper.Auto send tip')} />
<FormLabel>{t('common:core.app.whisper.Auto send')}</FormLabel>
<QuestionTip label={t('common:core.app.whisper.Auto send tip')} />
<Box flex={'1 0 0'} />
<Switch
isChecked={value.autoSend}
@@ -85,8 +85,8 @@ const WhisperConfig = ({
{isOpenWhisper && isAutoSend && (
<>
<Flex mt={8} alignItems={'center'}>
<FormLabel>{t('core.app.whisper.Auto tts response')}</FormLabel>
<QuestionTip label={t('core.app.whisper.Auto tts response tip')} />
<FormLabel>{t('common:core.app.whisper.Auto tts response')}</FormLabel>
<QuestionTip label={t('common:core.app.whisper.Auto tts response tip')} />
<Box flex={'1 0 0'} />
<Switch
isChecked={value.autoTTSResponse}
@@ -100,7 +100,7 @@ const WhisperConfig = ({
</Flex>
{!isOpenAudio && (
<Box mt={1} color={'myGray.600'} fontSize={'sm'}>
{t('core.app.whisper.Not tts tip')}
{t('common:core.app.whisper.Not tts tip')}
</Box>
)}
</>

View File

@@ -95,7 +95,7 @@ const ChatInput = ({
}
}
},
errorToast: t('common.Upload File Failed')
errorToast: t('common:common.Upload File Failed')
});
const onSelectFile = useCallback(
async (files: File[]) => {
@@ -257,7 +257,7 @@ const ChatInput = ({
visibility={isSpeaking && isTransCription ? 'visible' : 'hidden'}
>
<Spinner size={'sm'} mr={4} />
{t('core.chat.Converting to text')}
{t('common:core.chat.Converting to text')}
</Flex>
{/* file preview */}
@@ -336,7 +336,7 @@ const ChatInput = ({
onOpenSelectFile();
}}
>
<MyTooltip label={t('core.chat.Select Image')}>
<MyTooltip label={t('common:core.chat.Select Image')}>
<MyIcon name={'core/chat/fileSelect'} w={'18px'} color={'myGray.600'} />
</MyTooltip>
<File onSelect={onSelectFile} />
@@ -353,7 +353,9 @@ const ChatInput = ({
_focusVisible={{
border: 'none'
}}
placeholder={isSpeaking ? t('core.chat.Speaking') : t('core.chat.Type a message')}
placeholder={
isSpeaking ? t('common:core.chat.Speaking') : t('common:core.chat.Type a message')
}
resize={'none'}
rows={1}
height={'22px'}
@@ -430,7 +432,7 @@ const ChatInput = ({
}}
/>
{isSpeaking && (
<MyTooltip label={t('core.chat.Cancel Speak')}>
<MyTooltip label={t('common:core.chat.Cancel Speak')}>
<Flex
mr={2}
alignItems={'center'}
@@ -451,7 +453,11 @@ const ChatInput = ({
</Flex>
</MyTooltip>
)}
<MyTooltip label={isSpeaking ? t('core.chat.Finish Speak') : t('core.chat.Record')}>
<MyTooltip
label={
isSpeaking ? t('common:core.chat.Finish Speak') : t('common:core.chat.Record')
}
>
<Flex
mr={2}
alignItems={'center'}
@@ -513,7 +519,7 @@ const ChatInput = ({
color={'gray.500'}
/>
) : (
<MyTooltip label={t('core.chat.Send Message')}>
<MyTooltip label={t('common:core.chat.Send Message')}>
<MyIcon
name={'core/chat/sendFill'}
width={['18px', '20px']}

View File

@@ -94,7 +94,7 @@ export default function InputGuideBox({
<Box fontSize={'sm'} flex={'1 0 0'}>
<HighlightText rawText={item} matchText={text} />
</Box>
<MyTooltip label={t('core.chat.markdown.Send Question')}>
<MyTooltip label={t('common:core.chat.markdown.Send Question')}>
<MyIcon
className="send-icon"
display={'none'}

View File

@@ -79,7 +79,7 @@ const ChatController = ({
}
})}
>
<MyTooltip label={t('common.Copy')}>
<MyTooltip label={t('common:common.Copy')}>
<MyIcon
{...controlIconStyle}
name={'copy'}
@@ -90,7 +90,7 @@ const ChatController = ({
{!!onDelete && !isChatting && (
<>
{onRetry && (
<MyTooltip label={t('core.chat.retry')}>
<MyTooltip label={t('common:core.chat.retry')}>
<MyIcon
{...controlIconStyle}
name={'common/retryLight'}
@@ -99,7 +99,7 @@ const ChatController = ({
/>
</MyTooltip>
)}
<MyTooltip label={t('common.Delete')}>
<MyTooltip label={t('common:common.Delete')}>
<MyIcon
{...controlIconStyle}
name={'delete'}
@@ -116,7 +116,7 @@ const ChatController = ({
if (isPlayingChat && audioPlaying) {
return (
<Flex alignItems={'center'}>
<MyTooltip label={t('core.chat.tts.Stop Speech')}>
<MyTooltip label={t('common:core.chat.tts.Stop Speech')}>
<MyIcon
{...controlIconStyle}
borderRight={'none'}
@@ -136,13 +136,13 @@ const ChatController = ({
}
if (isPlayingChat && audioLoading) {
return (
<MyTooltip label={t('common.Loading')}>
<MyTooltip label={t('common:common.Loading')}>
<MyIcon {...controlIconStyle} name={'common/loading'} />
</MyTooltip>
);
}
return (
<MyTooltip label={t('core.app.TTS start')}>
<MyTooltip label={t('common:core.app.TTS start')}>
<MyIcon
{...controlIconStyle}
name={'common/voiceLight'}
@@ -171,7 +171,7 @@ const ChatController = ({
);
})()}
{!!onMark && (
<MyTooltip label={t('core.chat.Mark')}>
<MyTooltip label={t('common:core.chat.Mark')}>
<MyIcon
{...controlIconStyle}
name={'core/app/markLight'}
@@ -183,7 +183,7 @@ const ChatController = ({
{chat.obj === ChatRoleEnum.AI && (
<>
{!!onCloseUserLike && chat.userGoodFeedback && (
<MyTooltip label={t('core.chat.feedback.Close User Like')}>
<MyTooltip label={t('common:core.chat.feedback.Close User Like')}>
<MyIcon
{...controlIconStyle}
color={'white'}
@@ -195,7 +195,7 @@ const ChatController = ({
</MyTooltip>
)}
{!!onReadUserDislike && chat.userBadFeedback && (
<MyTooltip label={t('core.chat.feedback.Read User dislike')}>
<MyTooltip label={t('common:core.chat.feedback.Read User dislike')}>
<MyIcon
{...controlIconStyle}
color={'white'}

View File

@@ -31,7 +31,7 @@ const FeedbackModal = ({
const { mutate, isLoading } = useRequest({
mutationFn: async () => {
const val = ref.current?.value || t('core.chat.feedback.No Content');
const val = ref.current?.value || t('common:core.chat.feedback.No Content');
return updateChatUserFeedback({
appId,
chatId,
@@ -44,10 +44,10 @@ const FeedbackModal = ({
});
},
onSuccess() {
onSuccess(ref.current?.value || t('core.chat.feedback.No Content'));
onSuccess(ref.current?.value || t('common:core.chat.feedback.No Content'));
},
successToast: t('core.chat.Feedback Success'),
errorToast: t('core.chat.Feedback Failed')
successToast: t('common:core.chat.Feedback Success'),
errorToast: t('common:core.chat.Feedback Failed')
});
return (
@@ -55,17 +55,17 @@ const FeedbackModal = ({
isOpen={true}
onClose={onClose}
iconSrc="/imgs/modal/badAnswer.svg"
title={t('core.chat.Feedback Modal')}
title={t('common:core.chat.Feedback Modal')}
>
<ModalBody>
<Textarea ref={ref} rows={10} placeholder={t('core.chat.Feedback Modal Tip')} />
<Textarea ref={ref} rows={10} placeholder={t('common:core.chat.Feedback Modal Tip')} />
</ModalBody>
<ModalFooter>
<Button variant={'whiteBase'} mr={2} onClick={onClose}>
{t('common.Close')}
{t('common:common.Close')}
</Button>
<Button isLoading={isLoading} onClick={mutate}>
{t('core.chat.Feedback Submit')}
{t('common:core.chat.Feedback Submit')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -51,7 +51,7 @@ const QuoteModal = ({
<>{t('core.chat.Quote Amount', { amount: rawSearch.length })}</>
)}
<Box fontSize={'xs'} color={'myGray.500'} fontWeight={'normal'}>
{t('core.chat.quote.Quote Tip')}
{t('common:core.chat.quote.Quote Tip')}
</Box>
</Box>
}

View File

@@ -19,12 +19,12 @@ const ReadFeedbackModal = ({
isOpen={true}
onClose={onClose}
iconSrc="/imgs/modal/readFeedback.svg"
title={t('core.chat.Feedback Modal')}
title={t('common:core.chat.Feedback Modal')}
>
<ModalBody>{content}</ModalBody>
<ModalFooter>
<Button mr={2} onClick={onCloseFeedback}>
{t('core.chat.feedback.Feedback Close')}
{t('common:core.chat.feedback.Feedback Close')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -102,10 +102,10 @@ const ResponseTags = ({
<>
{sourceList.length > 0 && (
<>
<ChatBoxDivider icon="core/chat/quoteFill" text={t('core.chat.Quote')} />
<ChatBoxDivider icon="core/chat/quoteFill" text={t('common:core.chat.Quote')} />
<Flex alignItems={'center'} flexWrap={'wrap'} gap={2}>
{sourceList.map((item) => (
<MyTooltip key={item.collectionId} label={t('core.chat.quote.Read Quote')}>
<MyTooltip key={item.collectionId} label={t('common:core.chat.quote.Read Quote')}>
<Flex
alignItems={'center'}
fontSize={'xs'}
@@ -186,14 +186,14 @@ const ResponseTags = ({
</MyTag>
</MyTooltip>
)}
<MyTooltip label={t('core.chat.response.Read complete response tips')}>
<MyTooltip label={t('common:core.chat.response.Read complete response tips')}>
<MyTag
colorSchema="gray"
type="borderSolid"
cursor={'pointer'}
onClick={onOpenWholeModal}
>
{t('core.chat.response.Read complete response')}
{t('common:core.chat.response.Read complete response')}
</MyTag>
</MyTooltip>
</Flex>

View File

@@ -45,7 +45,7 @@ const SelectMarkCollection = ({
onClose={onClose}
setParentId={setParentId}
isLoading={isFetching}
tips={t('core.chat.Select dataset Desc')}
tips={t('common:core.chat.Select dataset Desc')}
>
<ModalBody flex={'1 0 0'} overflowY={'auto'}>
<Grid
@@ -100,7 +100,7 @@ const SelectMarkCollection = ({
<SelectCollections
datasetId={adminMarkData.datasetId}
type={'collection'}
title={t('dataset.collections.Select One Collection To Store')}
title={t('common:dataset.collections.Select One Collection To Store')}
onClose={onClose}
onChange={({ collectionIds }) => {
setAdminMarkData({
@@ -120,7 +120,7 @@ const SelectMarkCollection = ({
});
}}
>
{t('common.Last Step')}
{t('common:common.Last Step')}
</Button>
</ModalFooter>
}

View File

@@ -104,7 +104,7 @@ const VariableInput = ({
chatForm.setValue('chatStarted', true);
})}
>
{t('core.chat.Start Chat')}
{t('common:core.chat.Start Chat')}
</Button>
)}
</Card>

View File

@@ -814,7 +814,7 @@ const ChatBox = (
return {
status: chatContent.status || 'loading',
name: t(chatContent.moduleName || '') || t('common.Loading')
name: t(chatContent.moduleName || '') || t('common:common.Loading')
};
}, [chatHistories, isChatting, t]);
@@ -935,11 +935,13 @@ const ChatBox = (
<Box>
<ChatBoxDivider
icon={'core/app/customFeedback'}
text={t('core.app.feedback.Custom feedback')}
text={t('common:core.app.feedback.Custom feedback')}
/>
{item.customFeedbacks.map((text, i) => (
<Box key={`${text}${i}`}>
<MyTooltip label={t('core.app.feedback.close custom feedback')}>
<MyTooltip
label={t('common:core.app.feedback.close custom feedback')}
>
<Checkbox onChange={onCloseCustomFeedback(item, i)}>
{text}
</Checkbox>
@@ -953,7 +955,7 @@ const ChatBox = (
<Box fontSize={'sm'}>
<ChatBoxDivider
icon="core/app/markLight"
text={t('core.chat.Admin Mark Content')}
text={t('common:core.chat.Admin Mark Content')}
/>
<Box whiteSpace={'pre-wrap'}>
<Box color={'black'}>{item.adminFeedback.q}</Box>

View File

@@ -58,7 +58,7 @@ const RenderInput = () => {
handleSubmit(onSubmit)();
}}
>
{histories.length > 0 ? t('common.Restart') : t('common.Run')}
{histories.length > 0 ? t('common:common.Restart') : t('common:common.Run')}
</Button>
</Flex>
)}

View File

@@ -96,7 +96,7 @@ const WholeResponseModal = ({
iconSrc="/imgs/modal/wholeRecord.svg"
title={
<Flex alignItems={'center'}>
{t('core.chat.response.Complete Response')}
{t('common:core.chat.response.Complete Response')}
<QuestionTip ml={2} label={'从左往右,为各个模块的响应顺序'}></QuestionTip>
</Flex>
}
@@ -175,27 +175,33 @@ export const ResponseBox = React.memo(function ResponseBox({
})}
>
<>
<Row label={t('core.chat.response.module name')} value={t(activeModule.moduleName)} />
<Row
label={t('common:core.chat.response.module name')}
value={t(activeModule.moduleName)}
/>
{activeModule?.totalPoints !== undefined && (
<Row
label={t('support.wallet.usage.Total points')}
label={t('common:support.wallet.usage.Total points')}
value={formatNumber(activeModule.totalPoints)}
/>
)}
<Row
label={t('core.chat.response.module time')}
label={t('common:core.chat.response.module time')}
value={`${activeModule?.runningTime || 0}s`}
/>
<Row label={t('core.chat.response.module model')} value={activeModule?.model} />
<Row label={t('core.chat.response.module tokens')} value={`${activeModule?.tokens}`} />
<Row label={t('common:core.chat.response.module model')} value={activeModule?.model} />
<Row
label={t('core.chat.response.Tool call tokens')}
label={t('common:core.chat.response.module tokens')}
value={`${activeModule?.tokens}`}
/>
<Row
label={t('common:core.chat.response.Tool call tokens')}
value={`${activeModule?.toolCallTokens}`}
/>
<Row label={t('core.chat.response.module query')} value={activeModule?.query} />
<Row label={t('common:core.chat.response.module query')} value={activeModule?.query} />
<Row
label={t('core.chat.response.context total length')}
label={t('common:core.chat.response.context total length')}
value={activeModule?.contextTotalLen}
/>
<Row label={workflowT('response.Error')} value={activeModule?.error} />
@@ -204,12 +210,15 @@ export const ResponseBox = React.memo(function ResponseBox({
{/* ai chat */}
<>
<Row
label={t('core.chat.response.module temperature')}
label={t('common:core.chat.response.module temperature')}
value={activeModule?.temperature}
/>
<Row label={t('core.chat.response.module maxToken')} value={activeModule?.maxToken} />
<Row
label={t('core.chat.response.module historyPreview')}
label={t('common:core.chat.response.module maxToken')}
value={activeModule?.maxToken}
/>
<Row
label={t('common:core.chat.response.module historyPreview')}
rawDom={
activeModule.historyPreview ? (
<Box px={3} py={2} border={theme.borders.base} borderRadius={'md'}>
@@ -239,31 +248,31 @@ export const ResponseBox = React.memo(function ResponseBox({
<>
{activeModule?.searchMode && (
<Row
label={t('core.dataset.search.search mode')}
label={t('common:core.dataset.search.search mode')}
// @ts-ignore
value={t(DatasetSearchModeMap[activeModule.searchMode]?.title)}
/>
)}
<Row
label={t('core.chat.response.module similarity')}
label={t('common:core.chat.response.module similarity')}
value={activeModule?.similarity}
/>
<Row label={t('core.chat.response.module limit')} value={activeModule?.limit} />
<Row label={t('common:core.chat.response.module limit')} value={activeModule?.limit} />
<Row
label={t('core.chat.response.search using reRank')}
label={t('common:core.chat.response.search using reRank')}
value={`${activeModule?.searchUsingReRank}`}
/>
<Row
label={t('core.chat.response.Extension model')}
label={t('common:core.chat.response.Extension model')}
value={activeModule?.extensionModel}
/>
<Row
label={t('support.wallet.usage.Extension result')}
label={t('common:support.wallet.usage.Extension result')}
value={`${activeModule?.extensionResult}`}
/>
{activeModule.quoteList && activeModule.quoteList.length > 0 && (
<Row
label={t('core.chat.response.module quoteList')}
label={t('common:core.chat.response.module quoteList')}
rawDom={<QuoteList showDetail={showDetail} rawSearch={activeModule.quoteList} />}
/>
)}
@@ -271,9 +280,12 @@ export const ResponseBox = React.memo(function ResponseBox({
{/* classify question */}
<>
<Row label={t('core.chat.response.module cq result')} value={activeModule?.cqResult} />
<Row
label={t('core.chat.response.module cq')}
label={t('common:core.chat.response.module cq result')}
value={activeModule?.cqResult}
/>
<Row
label={t('common:core.chat.response.module cq')}
value={(() => {
if (!activeModule?.cqList) return '';
return activeModule.cqList.map((item) => `* ${item.value}`).join('\n');
@@ -284,7 +296,7 @@ export const ResponseBox = React.memo(function ResponseBox({
{/* if-else */}
<>
<Row
label={t('core.chat.response.module if else Result')}
label={t('common:core.chat.response.module if else Result')}
value={activeModule?.ifElseResult}
/>
</>
@@ -292,11 +304,11 @@ export const ResponseBox = React.memo(function ResponseBox({
{/* extract */}
<>
<Row
label={t('core.chat.response.module extract description')}
label={t('common:core.chat.response.module extract description')}
value={activeModule?.extractDescription}
/>
<Row
label={t('core.chat.response.module extract result')}
label={t('common:core.chat.response.module extract result')}
value={activeModule?.extractResult}
/>
</>
@@ -307,17 +319,20 @@ export const ResponseBox = React.memo(function ResponseBox({
<Row label={'Params'} value={activeModule?.params} />
<Row label={'Body'} value={activeModule?.body} />
<Row
label={t('core.chat.response.module http result')}
label={t('common:core.chat.response.module http result')}
value={activeModule?.httpResult}
/>
</>
{/* plugin */}
<>
<Row label={t('core.chat.response.plugin output')} value={activeModule?.pluginOutput} />
<Row
label={t('common:core.chat.response.plugin output')}
value={activeModule?.pluginOutput}
/>
{activeModule?.pluginDetail && activeModule?.pluginDetail.length > 0 && (
<Row
label={t('core.chat.response.Plugin response detail')}
label={t('common:core.chat.response.Plugin response detail')}
rawDom={
<ResponseBox response={activeModule.pluginDetail} showDetail={showDetail} />
}
@@ -326,12 +341,15 @@ export const ResponseBox = React.memo(function ResponseBox({
</>
{/* text output */}
<Row label={t('core.chat.response.text output')} value={activeModule?.textOutput} />
<Row
label={t('common:core.chat.response.text output')}
value={activeModule?.textOutput}
/>
{/* tool call */}
{activeModule?.toolDetail && activeModule?.toolDetail.length > 0 && (
<Row
label={t('core.chat.response.Tool call response detail')}
label={t('common:core.chat.response.Tool call response detail')}
rawDom={<ResponseBox response={activeModule.toolDetail} showDetail={showDetail} />}
/>
)}

View File

@@ -209,7 +209,7 @@ const QuoteItem = ({
color={'myGray.500'}
fontSize={'xs'}
>
<MyTooltip label={t('core.dataset.Quote Length')}>
<MyTooltip label={t('common:core.dataset.Quote Length')}>
<Flex alignItems={'center'}>
<MyIcon name="common/text/t" w={'14px'} mr={1} color={'myGray.500'} />
{quoteItem.q.length + (quoteItem.a?.length || 0)}
@@ -225,7 +225,7 @@ const QuoteItem = ({
/>
<Box flex={1} />
{quoteItem.id && (
<MyTooltip label={t('core.dataset.data.Edit')}>
<MyTooltip label={t('common:core.dataset.data.Edit')}>
<Box
className="hover-data"
visibility={'hidden'}
@@ -261,7 +261,7 @@ const QuoteItem = ({
color={'primary.500'}
href={`/dataset/detail?datasetId=${quoteItem.datasetId}&currentTab=dataCard&collectionId=${quoteItem.collectionId}`}
>
{t('core.dataset.Go Dataset')}
{t('common:core.dataset.Go Dataset')}
<MyIcon name={'common/rightArrowLight'} w={'10px'} />
</Link>
)}

View File

@@ -54,7 +54,7 @@ const RawSourceBox = ({
className={props.className ?? 'textEllipsis'}
wordBreak={'break-all'}
>
{sourceName || t('common.UnKnow Source')}
{sourceName || t('common:common.UnKnow Source')}
</Box>
</Box>
</MyTooltip>

View File

@@ -49,13 +49,13 @@ const SearchParamsTip = ({
<Table fontSize={'xs'} overflow={'overlay'}>
<Thead>
<Tr bg={'transparent !important'}>
<Th fontSize={'mini'}>{t('core.dataset.search.search mode')}</Th>
<Th fontSize={'mini'}>{t('core.dataset.search.Max Tokens')}</Th>
<Th fontSize={'mini'}>{t('core.dataset.search.Min Similarity')}</Th>
{hasReRankModel && <Th fontSize={'mini'}>{t('core.dataset.search.ReRank')}</Th>}
<Th fontSize={'mini'}>{t('core.module.template.Query extension')}</Th>
<Th fontSize={'mini'}>{t('common:core.dataset.search.search mode')}</Th>
<Th fontSize={'mini'}>{t('common:core.dataset.search.Max Tokens')}</Th>
<Th fontSize={'mini'}>{t('common:core.dataset.search.Min Similarity')}</Th>
{hasReRankModel && <Th fontSize={'mini'}>{t('common:core.dataset.search.ReRank')}</Th>}
<Th fontSize={'mini'}>{t('common:core.module.template.Query extension')}</Th>
{hasEmptyResponseMode && (
<Th fontSize={'mini'}>{t('core.dataset.search.Empty result response')}</Th>
<Th fontSize={'mini'}>{t('common:core.dataset.search.Empty result response')}</Th>
)}
</Tr>
</Thead>
@@ -75,7 +75,7 @@ const SearchParamsTip = ({
{limit}
</Td>
<Td pt={0} pb={2}>
{hasSimilarityMode ? similarity : t('core.dataset.search.Nonsupport')}
{hasSimilarityMode ? similarity : t('common:core.dataset.search.Nonsupport')}
</Td>
{hasReRankModel && (
<Td pt={0} pb={2}>

View File

@@ -41,7 +41,7 @@ const DatasetSelectContainer = ({
parentId: path.parentId,
parentName: path.parentName
}))}
FirstPathDom={t('core.chat.Select dataset')}
FirstPathDom={t('common:core.chat.Select dataset')}
onClick={(e) => {
setParentId(e);
}}