Merge #81 into develop_web from feature/20251219_zy
fix(web): UI update * feature/20251219_zy: (1 commits) fix(web): UI update Signed-off-by: zhaoying <zhaoying@redbearai.com> Merged-by: zhaoying <zhaoying@redbearai.com> CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/81
This commit is contained in:
@@ -1376,6 +1376,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
innerSearchPlaceholder: 'Search tools...',
|
||||
customSearchPlaceholder: 'Search custom tools...',
|
||||
addService: 'Add MCP Service',
|
||||
editService: 'Edit MCP Service',
|
||||
addServiceSuccess: 'Service added successfully',
|
||||
server_url: 'Service URL',
|
||||
last_health_check: 'Last Connection',
|
||||
@@ -1555,7 +1556,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
model_voting: 'Model Voting',
|
||||
rag: 'Knowledge Retrieval (RAG)',
|
||||
classification: 'Smart Classification',
|
||||
parameter_extraction: 'Parameter Extraction',
|
||||
'parameter-extractor': 'Parameter Extraction',
|
||||
flowControl: 'Flow Control',
|
||||
condition: 'Conditional Branch',
|
||||
iteration: 'Iteration',
|
||||
|
||||
@@ -1485,6 +1485,7 @@ export const zh = {
|
||||
innerSearchPlaceholder: '搜索工具...',
|
||||
customSearchPlaceholder: '搜索自定义工具...',
|
||||
addService: '添加MCP服务',
|
||||
editService: '编辑MCP服务',
|
||||
addServiceSuccess: '服务添加成功',
|
||||
server_url: '服务地址',
|
||||
last_health_check: '最后连接',
|
||||
@@ -1666,13 +1667,13 @@ export const zh = {
|
||||
model_voting: '多模型投票',
|
||||
'knowledge-retrieval': '知识检索 (RAG)',
|
||||
classification: '智能分类',
|
||||
parameter_extraction: '参数提取',
|
||||
'parameter-extractor': '参数提取',
|
||||
flowControl: '流程控制',
|
||||
condition: '条件分支',
|
||||
'if-else': '条件分支',
|
||||
iteration: '迭代 (Iteration)',
|
||||
loop: '循环 (Loop)',
|
||||
parallel: '并行执行',
|
||||
aggregator: '聚合器',
|
||||
'var-aggregator': '变量聚合器',
|
||||
externalInteraction: '外部交互',
|
||||
http_request: 'HTTP请求',
|
||||
tools: '工具 (Tools)',
|
||||
@@ -1719,6 +1720,7 @@ export const zh = {
|
||||
editVariable: '编辑变量',
|
||||
variableType: '变量类型',
|
||||
variableName: '变量名称',
|
||||
invalidVariableName: '变量名只能以英文字母开头,包含英文字母、数字和下划线',
|
||||
description: '显示名称',
|
||||
default: '默认值',
|
||||
required: '必填',
|
||||
@@ -1734,6 +1736,49 @@ export const zh = {
|
||||
query: '查询变量',
|
||||
knowledge_retrieval: '知识库',
|
||||
recallConfig: '召回测试',
|
||||
},
|
||||
'parameter-extractor': {
|
||||
model_id: '模型',
|
||||
text: '输入变量',
|
||||
params: '提取参数',
|
||||
prompt: '指令',
|
||||
|
||||
addParam: '添加提取参数',
|
||||
editParam: '编辑提取参数',
|
||||
|
||||
name: '名称',
|
||||
invalidParamName: '提取参数名只能以英文字母开头,包含英文字母、数字和下划线',
|
||||
type: '类型',
|
||||
desc: '描述',
|
||||
required: '必填',
|
||||
|
||||
'string': 'String',
|
||||
'number': 'Number',
|
||||
'boolean': 'Boolean',
|
||||
'array[string]': 'Array[String]',
|
||||
'array[number]': 'Array[Number]',
|
||||
'array[boolean]': 'Array[Boolean]',
|
||||
'array[object]': 'Array[Object]',
|
||||
},
|
||||
'var-aggregator': {
|
||||
group: '聚合分组',
|
||||
invalidVariableName: '变量名只能以英文字母开头,包含英文字母、数字和下划线',
|
||||
addGroup: '添加分组',
|
||||
variable: '变量赋值'
|
||||
},
|
||||
'if-else': {
|
||||
"empty": '为空',
|
||||
"not_empty": '不为空',
|
||||
"contains": '包含',
|
||||
"not_contains": '不包含',
|
||||
"startwith": '开始是',
|
||||
"endwith": '结束是',
|
||||
"eq": '==',
|
||||
"ne": '!=',
|
||||
"lt": '<',
|
||||
"le": '<=',
|
||||
"gt": '>',
|
||||
"ge": '>='
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -86,11 +86,11 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ getS
|
||||
grid={{ gutter: 16, column: 2 }}
|
||||
dataSource={data}
|
||||
renderItem={(item) => (
|
||||
<List.Item key={item.id}>
|
||||
<List.Item key={item.id} className='rb:h-full!'>
|
||||
<RbCard
|
||||
className={clsx({
|
||||
'rb:h-85.5!': item.config_data.tool_class === 'DateTimeTool' || item.config_data.tool_class === 'JsonTool'
|
||||
})}
|
||||
// className={clsx({
|
||||
// 'rb:h-85.5!': item.config_data.tool_class === 'DateTimeTool' || item.config_data.tool_class === 'JsonTool'
|
||||
// })}
|
||||
// avatar={
|
||||
// <div className="rb:w-12 rb:h-12 rb:rounded-lg rb:mr-3.25 rb:bg-[#155eef] rb:flex rb:items-center rb:justify-center rb:text-[28px] rb:text-[#ffffff]">
|
||||
// {item.name[0]}
|
||||
|
||||
@@ -130,7 +130,7 @@ const Mcp: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ getSta
|
||||
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>
|
||||
{displayValue}
|
||||
<div className="rb:text-ellipsis rb:overflow-hidden rb:whitespace-nowrap rb:flex-1">{displayValue}</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -303,15 +303,20 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
|
||||
title: t('tool.requestHeaderName'),
|
||||
dataIndex: 'key',
|
||||
key: 'key',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: t('tool.requestHeaderValue'),
|
||||
dataIndex: 'value',
|
||||
key: 'value',
|
||||
render: (value) => {
|
||||
return <div className="rb:break-all">{value}</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: t('common.operation'),
|
||||
key: 'action',
|
||||
width: 80,
|
||||
render: (_, record, index: number) => (
|
||||
<Space size="middle">
|
||||
<Button
|
||||
@@ -329,6 +334,7 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
|
||||
]}
|
||||
initialData={requestHeaderList}
|
||||
emptySize={88}
|
||||
scroll={{ x: 'max-content' }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -109,10 +109,10 @@ const TimeToolModal = forwardRef<TimeToolModalRef>((_props, ref) => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (values?.formatType) {
|
||||
if (values?.formatType && data.id && activeTab === 'timeFormat') {
|
||||
handleChangeFormatType()
|
||||
}
|
||||
}, [values?.formatType])
|
||||
}, [values?.formatType, data.id, activeTab, timeZone])
|
||||
|
||||
// 暴露给父组件的方法
|
||||
useImperativeHandle(ref, () => ({
|
||||
@@ -190,7 +190,6 @@ const TimeToolModal = forwardRef<TimeToolModalRef>((_props, ref) => {
|
||||
<FormItem label={t('tool.chooseFormatType')} name="formatType">
|
||||
<Select
|
||||
options={formatList}
|
||||
onChange={handleChangeFormatType}
|
||||
/>
|
||||
</FormItem>
|
||||
<div className="rb:mt-3 rb:bg-[#F0F3F8] rb:px-3 rb:py-2.5 rb:rounded-md">
|
||||
|
||||
Reference in New Issue
Block a user