diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/agent-model-trigger.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/agent-model-trigger.tsx index 068be5bbf3..be56b95a95 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/agent-model-trigger.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/agent-model-trigger.tsx @@ -83,7 +83,7 @@ const AgentModelTrigger: FC = ({ // pass } } - if (providerName && !modelProvider) { + if (providerName) { const parts = providerName.split('/') const org = parts[0] const name = parts[1] @@ -101,7 +101,7 @@ const AgentModelTrigger: FC = ({ setIsPluginChecked(true) } })() - }, [providerName, modelProvider, modelId, currentProvider]) + }, [providerName, modelId, currentProvider]) if (modelId && !isPluginChecked) return null diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx index d5bda7caf6..9f3543a475 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx @@ -1,5 +1,7 @@ import Tooltip from '@/app/components/base/tooltip' import Link from 'next/link' +import { SwitchPluginVersion } from '@/app/components/workflow/nodes/_base/components/switch-plugin-version' +import { useInstalledPluginList } from '@/service/use-plugins' import { RiErrorWarningFill } from '@remixicon/react' type StatusIndicatorsProps = { @@ -12,9 +14,10 @@ type StatusIndicatorsProps = { } const StatusIndicators = ({ needsConfiguration, modelProvider, inModelList, disabled, pluginInfo, t }: StatusIndicatorsProps) => { + const { data: pluginList } = useInstalledPluginList() const renderTooltipContent = (title: string, description?: string, linkText?: string, linkHref?: string) => { return ( -
+
e.stopPropagation()}>
{title}
{description && (
@@ -36,25 +39,44 @@ const StatusIndicators = ({ needsConfiguration, modelProvider, inModelList, disa
) } + // const installedPluginUniqueIdentifier = pluginList?.plugins.find(plugin => plugin.name === pluginInfo.name)?.plugin_unique_identifier return ( <> {/* plugin installed and model is in model list but disabled */} {/* plugin installed from github/local and model is not in model list */} {!needsConfiguration && modelProvider && disabled && ( - - - + <> + {inModelList ? ( + + + + ) : !pluginInfo ? ( + + + + ) : ( + plugin.name === pluginInfo.name)?.plugin_unique_identifier ?? ''} + /> + )} + )} {!modelProvider && !pluginInfo && ( = (props) => { } const { t } = useTranslation() return -
+
e.stopPropagation()}> {isShowUpdateModal && pluginDetail && +
{ - 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/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index b25a1b4915..8e8d1ea9d9 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -725,6 +725,7 @@ const translation = { modelNotSupport: { title: 'Unsupported Model', desc: 'The installed plugin version does not provide this model.', + descForVersionSwitch: 'The installed plugin version does not provide this model. Click to switch version.', }, configureModel: 'Configure Model', notAuthorized: 'Not Authorized', 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 diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 4cbd5246bf..8992770fb8 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -725,6 +725,7 @@ const translation = { modelNotSupport: { title: '不支持的模型', desc: '已安装的插件版本不提供此模型。', + descForVersionSwitch: '已安装的插件版本不提供此模型。点击切换版本。', }, model: '模型', toolbox: '工具箱',