Merge pull request #841 from SuanmoSuanyangTechnology/feature/tool_zy
feat(web): add OpenClawTool
This commit is contained in:
@@ -2113,6 +2113,19 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
return_text_position_enable: 'Return Text Position Info',
|
||||
return_text_position_enable_desc: 'Whether to return coordinate positions of recognized text',
|
||||
|
||||
OpenClawTool_desc: 'OpenClaw Remote Agent',
|
||||
OpenClawTool_features: 'OpenClaw Remote Agent — 3D Printing and Device Management',
|
||||
OpenClawTool_config_desc: 'Configure OpenClaw Gateway connection. Server URL and API Key are required.',
|
||||
OpenClawTool_server_url_desc: 'OpenClaw Gateway server URL, e.g. http://xxx.xxx.xxx.xx:xxx',
|
||||
OpenClawTool_api_key_desc: 'OpenClaw API Key, created in OpenClaw admin console',
|
||||
OpenClawTool_agent_id_desc: 'Target Agent ID, defaults to main, usually no need to change',
|
||||
OpenClawTool_enable: 'Enable OpenClaw',
|
||||
agent_id: 'Agent ID',
|
||||
'3dPrinting': '3D Printing',
|
||||
deviceManagement: 'Device Management',
|
||||
multimodalInteraction: 'Multimodal Interaction',
|
||||
remoteAgent: 'Remote Agent',
|
||||
|
||||
addCustom: 'Add Custom Tool',
|
||||
editCustom: 'Edit Custom Tool',
|
||||
schema: 'Schema',
|
||||
|
||||
@@ -2109,6 +2109,21 @@ export const zh = {
|
||||
return_text_position_enable: '返回文本位置信息',
|
||||
return_text_position_enable_desc: '是否返回识别文字的坐标位置',
|
||||
|
||||
OpenClawTool_desc: 'OpenClaw远程Agent',
|
||||
OpenClawTool_features: 'OpenClaw远程Agent —3D打印控制、设备管理等',
|
||||
OpenClawTool_config_desc: '配置OpenClaw Gateway连接信息,需要提供服务地址和API Key。',
|
||||
OpenClawTool_server_url_desc: 'OpenClaw Gateway 服务地址,如 http://xxx.xxx.xxx.xx:xxx',
|
||||
OpenClawTool_api_key_desc: 'OpenClaw API Key,在 OpenClaw 管理后台创建',
|
||||
OpenClawTool_agent_id_desc: '目标 Agent ID,默认为 main,通常无需修改',
|
||||
OpenClawTool_enable: '启用 OpenClaw',
|
||||
agent_id: 'Agent ID',
|
||||
'3dPrinting': '3D 打印',
|
||||
deviceManagement: '设备管理',
|
||||
multimodalInteraction: '多模态交互',
|
||||
remoteAgent: '远程 Agent',
|
||||
|
||||
|
||||
|
||||
addCustom: '添加自定义工具',
|
||||
editCustom: '编辑自定义工具',
|
||||
schema: 'Schema',
|
||||
|
||||
@@ -101,13 +101,13 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s
|
||||
<Flex gap={8} wrap align="center" className="rb:mt-2! rb:mb-4!">
|
||||
<Flex gap={6}>
|
||||
{InnerConfigData[item.config_data.tool_class].features?.slice(0, 2).map((type, i) => (
|
||||
<div key={i} className="rb:bg-[#F6F6F6] rb:rounded-md rb:py-px rb:px-1 rb:text-[12px] rb:leading-4.5">{type}</div>
|
||||
<div key={i} className="rb:bg-[#F6F6F6] rb:rounded-md rb:py-px rb:px-1 rb:text-[12px] rb:leading-4.5">{t(`tool.${type}`)}</div>
|
||||
))}
|
||||
</Flex>
|
||||
{InnerConfigData[item.config_data.tool_class].features.length > 2 && (
|
||||
<Tooltip
|
||||
title={<Flex wrap gap={6}>{InnerConfigData[item.config_data.tool_class].features?.slice(2, InnerConfigData[item.config_data.tool_class].features.length).map((type, i) => (
|
||||
<div key={i} className="rb:bg-[#F6F6F6] rb:rounded-md rb:py-px rb:px-1 rb:text-[12px] rb:leading-4.5 rb:text-[#171719]">{type}</div>
|
||||
<div key={i} className="rb:bg-[#F6F6F6] rb:rounded-md rb:py-px rb:px-1 rb:text-[12px] rb:leading-4.5 rb:text-[#171719]">{t(`tool.${type}`)}</div>
|
||||
))}</Flex>}
|
||||
color="white"
|
||||
placement="bottom"
|
||||
@@ -135,7 +135,7 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s
|
||||
{InnerConfigData[item.config_data.tool_class].eg}
|
||||
</Col>
|
||||
: <Col span={24}>
|
||||
<div className="rb:text-[#5B6167] rb:mb-1">{t('configStatus')}</div>
|
||||
<div className="rb:text-[#5B6167] rb:mb-1">{t('tool.configStatus')}</div>
|
||||
{t(`tool.${item.status}_desc`)}
|
||||
</Col>
|
||||
}
|
||||
|
||||
@@ -186,5 +186,43 @@ export const InnerConfigData: Record<string, InnerConfigItem> = {
|
||||
'multilingualSupport',
|
||||
'highPrecisionRecognition'
|
||||
],
|
||||
},
|
||||
OpenClawTool: {
|
||||
link: 'https://openclaw.ai/',
|
||||
config: {
|
||||
server_url: {
|
||||
name: ['config', 'parameters', 'server_url'],
|
||||
type: 'input',
|
||||
desc: 'OpenClawTool_server_url_desc',
|
||||
rules: [
|
||||
{ required: true, message: 'common.pleaseEnter' }
|
||||
]
|
||||
},
|
||||
api_key: {
|
||||
name: ['config', 'parameters', 'api_key'],
|
||||
type: 'input',
|
||||
desc: 'OpenClawTool_api_key_desc',
|
||||
rules: [
|
||||
{ required: true, message: 'common.pleaseEnter' }
|
||||
]
|
||||
},
|
||||
agent_id: {
|
||||
name: ['config', 'parameters', 'agent_id'],
|
||||
type: 'input',
|
||||
desc: 'OpenClawTool_agent_id_desc',
|
||||
defaultValue: 'main',
|
||||
},
|
||||
OpenClawTool_enable: {
|
||||
name: ['config', 'is_enabled'],
|
||||
type: 'checkbox',
|
||||
defaultValue: true,
|
||||
},
|
||||
},
|
||||
features: [
|
||||
'3dPrinting',
|
||||
'deviceManagement',
|
||||
'multimodalInteraction',
|
||||
'remoteAgent'
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user