fix(web): Conversation add initialValue
This commit is contained in:
@@ -1374,7 +1374,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
auth: 'Authentication',
|
||||
requestHeader: 'Request Headers',
|
||||
config: 'Configuration',
|
||||
authType: 'Authentication Type',
|
||||
auth_type: 'Authentication Type',
|
||||
none: 'No Authentication',
|
||||
api_key: 'API Key',
|
||||
basic_auth: 'Basic Auth',
|
||||
|
||||
@@ -1337,6 +1337,8 @@ export const zh = {
|
||||
startANewConversation: '开始新对话',
|
||||
normalReply: '正常回复',
|
||||
quickReply: '快速回复',
|
||||
web_search: '联网搜索',
|
||||
memory: '记忆',
|
||||
},
|
||||
login: {
|
||||
title: '红熊记忆科学',
|
||||
@@ -1474,7 +1476,7 @@ export const zh = {
|
||||
auth: '认证',
|
||||
requestHeader: '请求头',
|
||||
config: '配置',
|
||||
authType: '认证方式',
|
||||
auth_Type: '认证方式',
|
||||
none: '无需认证',
|
||||
api_key: 'API Key',
|
||||
basic_auth: 'Basic Auth',
|
||||
|
||||
@@ -208,7 +208,7 @@ const Conversation: FC = () => {
|
||||
|
||||
return (
|
||||
<Flex className="rb:w-full rb:p-[-16px]!">
|
||||
<div className="rb:w-[345px] rb:h-screen rb:overflow-hidden rb:border-r rb:border-[#EAECEE] rb:p-3">
|
||||
<div className="rb:w-86.25 rb:h-screen rb:overflow-hidden rb:border-r rb:border-[#EAECEE] rb:p-3">
|
||||
<div className="rb:group rb:flex rb:items-center rb:justify-center rb:font-regular rb:cursor-pointer rb:mb-5 rb:border rb:border-[#DFE4ED] rb:hover:border-[#155EEF] rb:hover:text-[#155EEF] rb:rounded-lg rb:py-2.5"
|
||||
onClick={() => handleChangeHistory(null)}
|
||||
>
|
||||
@@ -250,7 +250,7 @@ const Conversation: FC = () => {
|
||||
</InfiniteScroll>
|
||||
</div>
|
||||
}
|
||||
<img src={BgImg} className="rb:absolute rb:bottom-0 rb:left-0 rb:w-[345px]" />
|
||||
<img src={BgImg} className="rb:absolute rb:bottom-0 rb:left-0 rb:w-86.25" />
|
||||
</div>
|
||||
|
||||
<div className="rb:relative rb:h-screen rb:px-4 rb:flex-[1_1_auto]">
|
||||
@@ -264,7 +264,7 @@ const Conversation: FC = () => {
|
||||
onSend={handleSend}
|
||||
labelFormat={(item) => dayjs(item.created_at).locale('en').format('MMMM D, YYYY [at] h:mm A')}
|
||||
>
|
||||
<Form form={form}>
|
||||
<Form form={form} initialValues={{ memory: false, web_search: false}}>
|
||||
<Flex gap={8}>
|
||||
<Form.Item name="web_search" valuePropName="checked" className="rb:mb-0!">
|
||||
<ButtonCheckbox
|
||||
|
||||
@@ -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