From 07113dc4d2882912e1bc727420d9d53ebdec804e Mon Sep 17 00:00:00 2001 From: zhuoqinglian <1035449612@qq.com> Date: Wed, 18 Mar 2026 16:44:27 +0800 Subject: [PATCH] =?UTF-8?q?update:=20mobile=20=E6=92=AD=E6=94=BE=E5=A3=B0?= =?UTF-8?q?=E7=BA=B9=E5=BC=B9=E7=AA=97=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E5=88=87=E6=8D=A2=E8=A7=92=E8=89=B2=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A1=A8=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/manager-mobile/src/api/agent/agent.ts | 1 + main/manager-mobile/src/http/request/alova.ts | 2 +- main/manager-mobile/src/pages/agent/edit.vue | 45 ++++++++++++------- main/manager-mobile/src/pages/agent/tools.vue | 1 + .../src/pages/voiceprint/index.vue | 44 +++++++----------- 5 files changed, 47 insertions(+), 46 deletions(-) diff --git a/main/manager-mobile/src/api/agent/agent.ts b/main/manager-mobile/src/api/agent/agent.ts index 1b17f28a..32b72ad7 100644 --- a/main/manager-mobile/src/api/agent/agent.ts +++ b/main/manager-mobile/src/api/agent/agent.ts @@ -131,6 +131,7 @@ export function getMcpAddress(agentId: string) { meta: { ignoreAuth: false, toast: false, + isExposeError: true, }, }) } diff --git a/main/manager-mobile/src/http/request/alova.ts b/main/manager-mobile/src/http/request/alova.ts index a90e8de2..42243bc1 100644 --- a/main/manager-mobile/src/http/request/alova.ts +++ b/main/manager-mobile/src/http/request/alova.ts @@ -12,7 +12,7 @@ import { ContentTypeEnum, ResultEnum, ShowMessage } from './enum' // 语言映射, 用于设置 Accept-language 头 const langMap: Record = { zh_CN: 'zh-CN', - en: 'en', + en: 'en-US', zh_TW: 'zh-TW', de: 'de', vi: 'vi', diff --git a/main/manager-mobile/src/pages/agent/edit.vue b/main/manager-mobile/src/pages/agent/edit.vue index 1a01e051..93e715ca 100644 --- a/main/manager-mobile/src/pages/agent/edit.vue +++ b/main/manager-mobile/src/pages/agent/edit.vue @@ -426,15 +426,24 @@ function selectRoleTemplate(templateId: string) { selectedTemplateId.value = templateId const template = roleTemplates.value.find(t => t.id === templateId) if (template) { - formData.value.systemPrompt = template.systemPrompt - formData.value.vadModelId = template.vadModelId - formData.value.asrModelId = template.asrModelId - formData.value.llmModelId = template.llmModelId - formData.value.vllmModelId = template.vllmModelId - formData.value.intentModelId = template.intentModelId - formData.value.memModelId = template.memModelId - formData.value.ttsModelId = template.ttsModelId - formData.value.ttsVoiceId = template.ttsVoiceId + formData.value = { + ...formData.value, + systemPrompt: template.systemPrompt || formData.value.systemPrompt, + vadModelId: template.vadModelId || formData.value.vadModelId, + asrModelId: template.asrModelId || formData.value.asrModelId, + llmModelId: template.llmModelId || formData.value.llmModelId, + vllmModelId: template.vllmModelId || formData.value.vllmModelId, + intentModelId: template.intentModelId || formData.value.intentModelId, + memModelId: template.memModelId || formData.value.memModelId, + ttsModelId: template.ttsModelId || formData.value.ttsModelId, + ttsVoiceId: template.ttsVoiceId || formData.value.ttsVoiceId, + agentName: template.agentName || formData.value.agentName, + chatHistoryConf: template.chatHistoryConf || formData.value.chatHistoryConf, + summaryMemory: template.summaryMemory || formData.value.summaryMemory, + langCode: template.langCode || formData.value.langCode, + } + fetchAllLanguag(template.ttsModelId || formData.value.ttsModelId) + updateDisplayNames() } } @@ -1002,12 +1011,8 @@ onMounted(async () => { /> - - - - {{ t('agent.voiceprint') }} - - + + { class="flex items-center justify-between border-b border-[#f5f5f5] p-[32rpx] transition-all active:bg-[#f5f7fb]" @click="onPickerConfirm('voiceprint', voice.value, voice.name)" > - {{ voice.name }} + + {{ voice.name }} + { ::v-deep .wd-tag__close { color: #336cff !important; } +::v-deep .custom-popup { + .wd-popup { + padding: 20rpx !important; + background: transparent !important; + } +} diff --git a/main/manager-mobile/src/pages/agent/tools.vue b/main/manager-mobile/src/pages/agent/tools.vue index 45a845bb..ab0b595b 100644 --- a/main/manager-mobile/src/pages/agent/tools.vue +++ b/main/manager-mobile/src/pages/agent/tools.vue @@ -70,6 +70,7 @@ async function mergeFunctions() { uni.setStorageSync(`cachedMcpAddress_${agentId.value}`, address) } catch (error) { + mcpAddress.value = error console.error('获取MCP地址失败:', error) } diff --git a/main/manager-mobile/src/pages/voiceprint/index.vue b/main/manager-mobile/src/pages/voiceprint/index.vue index 43ef5230..e0917c98 100644 --- a/main/manager-mobile/src/pages/voiceprint/index.vue +++ b/main/manager-mobile/src/pages/voiceprint/index.vue @@ -451,20 +451,16 @@ defineExpose({ - - - {{ t('voiceprint.addSpeaker') }} - - - - + * {{ t('voiceprint.voiceVector') }} - + * {{ t('voiceprint.name') }} - + * {{ t('voiceprint.description') }}