diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 92b881036..98592330d 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -2214,7 +2214,7 @@ CONFIG_METADATA_3 = { "provider_settings.coze_agent_runner_provider_id": { "description": "Coze Agent 执行器提供商 ID", "type": "string", - "_special": "select_agent_runner_provider", + "_special": "select_agent_runner_provider:coze", "condition": { "provider_settings.agent_runner_type": "coze", "provider_settings.enable": True, @@ -2223,7 +2223,7 @@ CONFIG_METADATA_3 = { "provider_settings.dify_agent_runner_provider_id": { "description": "Dify Agent 执行器提供商 ID", "type": "string", - "_special": "select_agent_runner_provider", + "_special": "select_agent_runner_provider:dify", "condition": { "provider_settings.agent_runner_type": "dify", "provider_settings.enable": True, @@ -2232,7 +2232,7 @@ CONFIG_METADATA_3 = { "provider_settings.dashscope_agent_runner_provider_id": { "description": "阿里云百炼应用 Agent 执行器提供商 ID", "type": "string", - "_special": "select_agent_runner_provider", + "_special": "select_agent_runner_provider:dashscope", "condition": { "provider_settings.agent_runner_type": "dashscope", "provider_settings.enable": True, diff --git a/dashboard/src/components/shared/AstrBotConfigV4.vue b/dashboard/src/components/shared/AstrBotConfigV4.vue index 57c7b36ee..e55f6f998 100644 --- a/dashboard/src/components/shared/AstrBotConfigV4.vue +++ b/dashboard/src/components/shared/AstrBotConfigV4.vue @@ -130,6 +130,25 @@ function hasVisibleItemsAfter(items, currentIndex) { return false } +function parseSpecialValue(value) { + if (!value || typeof value !== 'string') { + return { name: '', subtype: '' } + } + const [name, ...rest] = value.split(':') + return { + name, + subtype: rest.join(':') || '' + } +} + +function getSpecialName(value) { + return parseSpecialValue(value).name +} + +function getSpecialSubtype(value) { + return parseSpecialValue(value).subtype +} +