fix(web): Conversation add initialValue
This commit is contained in:
@@ -103,9 +103,14 @@ const Custom: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ get
|
||||
key={key}
|
||||
className="rb:flex rb:gap-4 rb:justify-start rb:text-[#5B6167] rb:text-[14px] rb:leading-5 rb:mb-3"
|
||||
>
|
||||
<div className="rb:whitespace-nowrap rb:w-27.5">{t(`tool.${key}`)}</div>
|
||||
<div className="rb:whitespace-nowrap rb:w-32">{t(`tool.${key}`)}</div>
|
||||
<div className='rb:flex-1 rb:text-ellipsis rb:overflow-hidden rb:whitespace-nowrap rb:flex-inline rb:text-left rb:py-px rb:rounded rb:font-medium'>
|
||||
{key === 'created_at' && item[key] ? dayjs(item[key]).format('YYYY-MM-DD HH:mm:ss') : (item.config_data as any)?.[key] || '-'}
|
||||
{key === 'created_at' && item[key]
|
||||
? dayjs(item[key]).format('YYYY-MM-DD HH:mm:ss')
|
||||
: key === 'auth_type'
|
||||
? t(`tool.${(item.config_data as any)?.[key]}`)
|
||||
: (item.config_data as any)?.[key] || '-'
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -136,8 +136,15 @@ const CustomToolModal = forwardRef<CustomToolModalRef, CustomToolModalProps>(({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Form.Item
|
||||
name="name"
|
||||
label={t('tool.name')}
|
||||
rules={[{ required: true, message: t('common.pleaseEnter') }]}
|
||||
>
|
||||
<Input placeholder={t('common.pleaseEnter')} />
|
||||
</Form.Item>
|
||||
{/* 名称和图标 */}
|
||||
<Form.Item label={t('tool.nameAndIcon')} required>
|
||||
{/* <Form.Item label={t('tool.nameAndIcon')} required>
|
||||
<Row gutter={8}>
|
||||
<Col span={16}>
|
||||
<Form.Item
|
||||
@@ -152,7 +159,7 @@ const CustomToolModal = forwardRef<CustomToolModalRef, CustomToolModalProps>(({
|
||||
<Button>icon</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
<Form.Item
|
||||
name={['config', 'schema_content']}
|
||||
label={t('tool.schema')}
|
||||
@@ -200,7 +207,7 @@ const CustomToolModal = forwardRef<CustomToolModalRef, CustomToolModalProps>(({
|
||||
{/* 认证方式 */}
|
||||
<FormItem
|
||||
name={['config', 'auth_type']}
|
||||
label={t('tool.authType')}
|
||||
label={t('tool.auth_type')}
|
||||
>
|
||||
<Select
|
||||
placeholder={t('common.pleaseSelect')}
|
||||
|
||||
@@ -219,7 +219,7 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
|
||||
{/* 认证方式 */}
|
||||
<FormItem
|
||||
name={['config', 'connection_config', 'auth_type']}
|
||||
label={t('tool.authType')}
|
||||
label={t('tool.auth_type')}
|
||||
hidden={activeTab !== 'auth'}
|
||||
>
|
||||
<Select
|
||||
|
||||
Reference in New Issue
Block a user