Skip to content

Commit bf371a6

Browse files
Feat : add LLM model indicator in prompt generator (#10187)
1 parent b28cf68 commit bf371a6

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

web/app/components/app/configuration/config/automatic/get-automatic-res.tsx

+21-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import { LoveMessage } from '@/app/components/base/icons/src/vender/features'
3333
// type
3434
import type { AutomaticRes } from '@/service/debug'
3535
import { Generator } from '@/app/components/base/icons/src/vender/other'
36+
import ModelIcon from '@/app/components/header/account-setting/model-provider-page/model-icon'
37+
import ModelName from '@/app/components/header/account-setting/model-provider-page/model-name'
38+
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
39+
import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'
3640

3741
export type IGetAutomaticResProps = {
3842
mode: AppType
@@ -68,7 +72,10 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
6872
onFinished,
6973
}) => {
7074
const { t } = useTranslation()
71-
75+
const {
76+
currentProvider,
77+
currentModel,
78+
} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.textGeneration)
7279
const tryList = [
7380
{
7481
icon: RiTerminalBoxLine,
@@ -191,6 +198,19 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
191198
<div className={`leading-[28px] text-lg font-bold ${s.textGradient}`}>{t('appDebug.generate.title')}</div>
192199
<div className='mt-1 text-[13px] font-normal text-gray-500'>{t('appDebug.generate.description')}</div>
193200
</div>
201+
<div className='flex items-center mb-8'>
202+
<ModelIcon
203+
className='shrink-0 mr-1.5 '
204+
provider={currentProvider}
205+
modelName={currentModel?.model}
206+
/>
207+
<ModelName
208+
className='grow'
209+
modelItem={currentModel!}
210+
showMode
211+
showFeatures
212+
/>
213+
</div>
194214
<div >
195215
<div className='flex items-center'>
196216
<div className='mr-3 shrink-0 leading-[18px] text-xs font-semibold text-gray-500 uppercase'>{t('appDebug.generate.tryIt')}</div>

0 commit comments

Comments
 (0)