diff --git a/web/app/components/plugins/constants.ts b/web/app/components/plugins/constants.ts index c43a1ae946..40a3f0da83 100644 --- a/web/app/components/plugins/constants.ts +++ b/web/app/components/plugins/constants.ts @@ -1,4 +1,5 @@ export const tagKeys = [ + 'agent', 'search', 'image', 'videos', diff --git a/web/app/components/workflow/run/agent-log/agent-log-item.tsx b/web/app/components/workflow/run/agent-log/agent-log-item.tsx index 8403dd68dc..36b1d78bc6 100644 --- a/web/app/components/workflow/run/agent-log/agent-log-item.tsx +++ b/web/app/components/workflow/run/agent-log/agent-log-item.tsx @@ -27,7 +27,7 @@ const AgentLogItem = ({ const [expanded, setExpanded] = useState(false) return ( -
+
{ - const options = agentOrToolLogItemStack.slice(2) + const { t } = useTranslation() + const agentOrToolLogItemStackLength = agentOrToolLogItemStack.length + const first = agentOrToolLogItemStack[0] + const mid = agentOrToolLogItemStack.slice(1, -1) + const end = agentOrToolLogItemStack.at(-1) return ( -
+
/
- { - !!options.length && ( + agentOrToolLogItemStackLength > 1 + ? ( + + ) + : ( +
+ {t('workflow.nodes.agent.strategy.label')} +
+ ) + } + { + !!mid.length && ( <>
/
) } -
/
-
- Run Actions -
+ { + !!end && agentOrToolLogItemStackLength > 2 && ( + <> +
/
+
+ {end.label} +
+ + ) + }
) } diff --git a/web/app/components/workflow/run/agent-log/agent-log-trigger.tsx b/web/app/components/workflow/run/agent-log/agent-log-trigger.tsx index 987c3afc2a..589624f559 100644 --- a/web/app/components/workflow/run/agent-log/agent-log-trigger.tsx +++ b/web/app/components/workflow/run/agent-log/agent-log-trigger.tsx @@ -1,4 +1,5 @@ import { RiArrowRightLine } from '@remixicon/react' +import { useTranslation } from 'react-i18next' import type { AgentLogItemWithChildren, NodeTracing, @@ -12,12 +13,13 @@ const AgentLogTrigger = ({ nodeInfo, onShowAgentOrToolLog, }: AgentLogTriggerProps) => { + const { t } = useTranslation() const { agentLog } = nodeInfo return (
- Agent strategy + {t('workflow.nodes.agent.strategy.label')}
@@ -28,7 +30,7 @@ const AgentLogTrigger = ({ onShowAgentOrToolLog({ id: nodeInfo.id, children: agentLog || [] } as AgentLogItemWithChildren) }} > - Detail + {t('runLog.detail')}
diff --git a/web/app/components/workflow/run/agent-log/agent-result-panel.tsx b/web/app/components/workflow/run/agent-log/agent-result-panel.tsx index d02e69f8da..e2d2b24966 100644 --- a/web/app/components/workflow/run/agent-log/agent-result-panel.tsx +++ b/web/app/components/workflow/run/agent-log/agent-result-panel.tsx @@ -1,4 +1,5 @@ import { RiAlertFill } from '@remixicon/react' +import { useTranslation } from 'react-i18next' import AgentLogItem from './agent-log-item' import AgentLogNav from './agent-log-nav' import type { AgentLogItemWithChildren } from '@/types/workflow' @@ -13,17 +14,18 @@ const AgentResultPanel = ({ agentOrToolLogListMap, onShowAgentOrToolLog, }: AgentResultPanelProps) => { + const { t } = useTranslation() const top = agentOrToolLogItemStack[agentOrToolLogItemStack.length - 1] const list = agentOrToolLogListMap[top.id] return ( -
+
{ -
+
{ list.map(item => ( +
- There is circular invocation of tools/nodes in the current workflow. + {t('runLog.circularInvocationTip')}
) diff --git a/web/i18n/en-US/plugin-tags.ts b/web/i18n/en-US/plugin-tags.ts index e96f415053..d2177b2848 100644 --- a/web/i18n/en-US/plugin-tags.ts +++ b/web/i18n/en-US/plugin-tags.ts @@ -2,6 +2,7 @@ const translation = { allTags: 'All Tags', searchTags: 'Search Tags', tags: { + agent: 'Agent', search: 'Search', image: 'Image', videos: 'Videos', diff --git a/web/i18n/en-US/run-log.ts b/web/i18n/en-US/run-log.ts index 33fe5c1735..3c851f4548 100644 --- a/web/i18n/en-US/run-log.ts +++ b/web/i18n/en-US/run-log.ts @@ -24,6 +24,8 @@ const translation = { link: 'detail panel', tipRight: ' view it.', }, + actionLogs: 'Action Logs', + circularInvocationTip: 'There is circular invocation of tools/nodes in the current workflow.', } export default translation diff --git a/web/i18n/zh-Hans/plugin-tags.ts b/web/i18n/zh-Hans/plugin-tags.ts index 4c9b2c6370..c133992b38 100644 --- a/web/i18n/zh-Hans/plugin-tags.ts +++ b/web/i18n/zh-Hans/plugin-tags.ts @@ -2,6 +2,7 @@ const translation = { allTags: '所有标签', searchTags: '搜索标签', tags: { + agent: 'Agent', search: '搜索', image: '图片', videos: '视频', diff --git a/web/i18n/zh-Hans/run-log.ts b/web/i18n/zh-Hans/run-log.ts index 225874d827..dc93e9aeb0 100644 --- a/web/i18n/zh-Hans/run-log.ts +++ b/web/i18n/zh-Hans/run-log.ts @@ -24,6 +24,8 @@ const translation = { link: '详细信息面板', tipRight: '查看它。', }, + actionLogs: 'Action 日志', + circularInvocationTip: '当前工作流中存在工具/节点的循环调用。', } export default translation