diff --git a/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx b/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx index c2890580a5..f9a2d5e003 100644 --- a/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx +++ b/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx @@ -106,6 +106,16 @@ const SettingBuiltInTool: FC = ({ return valid })() + const getType = (type: string) => { + if (type === 'number-input') + return t('tools.setBuiltInTools.number') + if (type === 'text-input') + return t('tools.setBuiltInTools.string') + if (type === 'file') + return t('tools.setBuiltInTools.file') + return type + } + const infoUI = (
{infoSchemas.length > 0 && ( @@ -114,7 +124,9 @@ const SettingBuiltInTool: FC = ({
{item.label[language]}
-
{item.type === 'number-input' ? t('tools.setBuiltInTools.number') : t('tools.setBuiltInTools.string')}
+
+ {getType(item.type)} +
{item.required && (
{t('tools.setBuiltInTools.required')}
)} diff --git a/web/app/components/plugins/plugin-detail-panel/action-list.tsx b/web/app/components/plugins/plugin-detail-panel/action-list.tsx index 2d440c2702..334587ce31 100644 --- a/web/app/components/plugins/plugin-detail-panel/action-list.tsx +++ b/web/app/components/plugins/plugin-detail-panel/action-list.tsx @@ -24,14 +24,16 @@ const ActionList = ({ }: Props) => { const { t } = useTranslation() const { isCurrentWorkspaceManager } = useAppContext() - const { data: provider } = useBuiltinProviderInfo(`${detail.plugin_id}/${detail.name}`) + const providerBriefInfo = detail.declaration.tool.identity + const providerKey = `${detail.plugin_id}/${providerBriefInfo.name}` + const { data: provider } = useBuiltinProviderInfo(providerKey) const invalidateProviderInfo = useInvalidateBuiltinProviderInfo() - const { data } = useBuiltinTools(`${detail.plugin_id}/${detail.name}`) + const { data } = useBuiltinTools(providerKey) const [showSettingAuth, setShowSettingAuth] = useState(false) const handleCredentialSettingUpdate = () => { - invalidateProviderInfo(`${detail.plugin_id}/${detail.name}`) + invalidateProviderInfo(providerKey) Toast.notify({ type: 'success', message: t('common.api.actionSuccess'), diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index b300b6b6e4..5de8a6d2df 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -3,9 +3,9 @@ import type { ToolCredential } from '@/app/components/tools/types' import type { Locale } from '@/i18n' export enum PluginType { - tool = 'tools', - model = 'models', - extension = 'endpoints', + tool = 'tool', + model = 'model', + extension = 'extension', } export enum PluginSource { diff --git a/web/app/styles/globals.css b/web/app/styles/globals.css index 8b74c07afd..9db035a28c 100644 --- a/web/app/styles/globals.css +++ b/web/app/styles/globals.css @@ -4,8 +4,8 @@ @import "../../themes/light.css"; @import "../../themes/dark.css"; -@import "../../themes/other-light.css"; -@import "../../themes/other-dark.css"; +@import "../../themes/manual-light.css"; +@import "../../themes/manual-dark.css"; html[data-changing-theme] * { transition: none !important; diff --git a/web/i18n/en-US/tools.ts b/web/i18n/en-US/tools.ts index 6bc11fdd2c..df1e7aaed7 100644 --- a/web/i18n/en-US/tools.ts +++ b/web/i18n/en-US/tools.ts @@ -129,6 +129,7 @@ const translation = { parameters: 'parameters', string: 'string', number: 'number', + file: 'file', required: 'Required', infoAndSetting: 'Info & Settings', }, diff --git a/web/i18n/zh-Hans/tools.ts b/web/i18n/zh-Hans/tools.ts index 1da5430c37..4599ece03f 100644 --- a/web/i18n/zh-Hans/tools.ts +++ b/web/i18n/zh-Hans/tools.ts @@ -129,6 +129,7 @@ const translation = { parameters: '参数', string: '字符串', number: '数字', + file: '文件', required: '必填', infoAndSetting: '信息和设置', }, diff --git a/web/themes/other-dark.css b/web/themes/manual-dark.css similarity index 100% rename from web/themes/other-dark.css rename to web/themes/manual-dark.css diff --git a/web/themes/other-light.css b/web/themes/manual-light.css similarity index 100% rename from web/themes/other-light.css rename to web/themes/manual-light.css