diff --git a/web/app/components/workflow/nodes/agent/node.tsx b/web/app/components/workflow/nodes/agent/node.tsx index 448bb1f58b..ea51cbb0ff 100644 --- a/web/app/components/workflow/nodes/agent/node.tsx +++ b/web/app/components/workflow/nodes/agent/node.tsx @@ -13,7 +13,13 @@ const AgentNode: FC> = (props) => { const { t } = useTranslation() return
{inputs.agent_strategy_name - ? + ? {inputs.agent_strategy_name} : } @@ -40,8 +46,18 @@ const AgentNode: FC> = (props) => { }>
- - + +
diff --git a/web/app/components/workflow/nodes/agent/panel.tsx b/web/app/components/workflow/nodes/agent/panel.tsx index 277c745fe1..3c9c10d9ae 100644 --- a/web/app/components/workflow/nodes/agent/panel.tsx +++ b/web/app/components/workflow/nodes/agent/panel.tsx @@ -4,8 +4,9 @@ import type { AgentNodeType } from './types' import Field from '../_base/components/field' import { InputNumber } from '@/app/components/base/input-number' import Slider from '@/app/components/base/slider' -import useNodeCrud from '../_base/hooks/use-node-crud' import { AgentStrategy } from '../_base/components/agent-strategy' +import useConfig from './use-config' +import { useTranslation } from 'react-i18next' const mockSchema = [ { @@ -260,7 +261,8 @@ const mockSchema = [ ] as const const AgentPanel: FC> = (props) => { - const { inputs, setInputs } = useNodeCrud(props.id, props.data) + const { inputs, setInputs } = useConfig(props.id, props.data) + const { t } = useTranslation() const [iter, setIter] = [inputs.max_iterations, (value: number) => { setInputs({ ...inputs, @@ -268,7 +270,7 @@ const AgentPanel: FC> = (props) => { }) }] return
- + > = (props) => { })} /> - + - +
{ return { readOnly, inputs, + setInputs, handleVarListChange, handleAddVariable, } diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index e24d8eee45..64339e8c03 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -700,6 +700,7 @@ const translation = { agent: { strategy: { label: 'Agentic Strategy', + shortLabel: 'Strategy', configureTip: 'Please configure agentic strategy.', configureTipDesc: 'After configuring the agentic strategy, this node will automatically load the remaining configurations. The strategy will affect the mechanism of multi-step tool reasoning. ', selectTip: 'Select agentic strategy', @@ -715,6 +716,12 @@ const translation = { model: 'model', toolbox: 'toolbox', strategyNotSet: 'Agentic strategy Not Set', + tools: 'Tools', + maxIterations: 'Max Iterations', + modelNotInstallTooltip: 'This model is not installed', + toolNotInstallTooltip: '{{tool}} is not installed', + toolNotAuthorizedTooltip: '{{tool}} Not Authorized', + strategyNotInstallTooltip: '{{strategy}} is not installed', }, }, tracing: { diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 7f2ecc994d..731b27e9c2 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -700,6 +700,7 @@ const translation = { agent: { strategy: { label: 'Agent 策略', + shortLabel: '策略', configureTip: '请配置 Agent 策略。', configureTipDesc: '配置完成后,此节点将自动加载剩余配置。策略将影响多步工具推理的机制。', selectTip: '选择 Agent 策略', @@ -715,6 +716,12 @@ const translation = { model: '模型', toolbox: '工具箱', strategyNotSet: '代理策略未设置', + tools: '工具', + maxIterations: '最大迭代次数', + modelNotInstallTooltip: '此模型未安装', + toolNotInstallTooltip: '{{tool}} 未安装', + toolNotAuthorizedTooltip: '{{tool}} 未授权', + strategyNotInstallTooltip: '{{strategy}} 未安装', }, }, tracing: {