diff --git a/main/xiaozhi-mobile-admin/src/api/chat-history/chat-history.ts b/main/xiaozhi-mobile-admin/src/api/chat-history/chat-history.ts
index 8d6e396b..89c3f1ef 100644
--- a/main/xiaozhi-mobile-admin/src/api/chat-history/chat-history.ts
+++ b/main/xiaozhi-mobile-admin/src/api/chat-history/chat-history.ts
@@ -17,6 +17,9 @@ export function getChatSessions(agentId: string, params: GetSessionsParams) {
ignoreAuth: false,
toast: false,
},
+ cacheFor: {
+ expire: 0,
+ },
})
}
diff --git a/main/xiaozhi-mobile-admin/src/components/custom-tabs/index.vue b/main/xiaozhi-mobile-admin/src/components/custom-tabs/index.vue
new file mode 100644
index 00000000..f5ef0705
--- /dev/null
+++ b/main/xiaozhi-mobile-admin/src/components/custom-tabs/index.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
diff --git a/main/xiaozhi-mobile-admin/src/http/request/alova.ts b/main/xiaozhi-mobile-admin/src/http/request/alova.ts
index d970a4c3..288e2542 100644
--- a/main/xiaozhi-mobile-admin/src/http/request/alova.ts
+++ b/main/xiaozhi-mobile-admin/src/http/request/alova.ts
@@ -4,6 +4,7 @@ import AdapterUniapp from '@alova/adapter-uniapp'
import { createAlova } from 'alova'
import { createServerTokenAuthentication } from 'alova/client'
import VueHook from 'alova/vue'
+import { getEnvBaseUrl } from '@/utils'
import { toast } from '@/utils/toast'
import { ContentTypeEnum, ResultEnum, ShowMessage } from './enum'
@@ -35,7 +36,7 @@ const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthenticati
* alova 请求实例
*/
const alovaInstance = createAlova({
- baseURL: import.meta.env.VITE_SERVER_BASEURL,
+ baseURL: getEnvBaseUrl(),
...AdapterUniapp(),
timeout: 5000,
statesHook: VueHook,
diff --git a/main/xiaozhi-mobile-admin/src/layouts/fg-tabbar/tabbarList.ts b/main/xiaozhi-mobile-admin/src/layouts/fg-tabbar/tabbarList.ts
index 69fbfec0..5273136c 100644
--- a/main/xiaozhi-mobile-admin/src/layouts/fg-tabbar/tabbarList.ts
+++ b/main/xiaozhi-mobile-admin/src/layouts/fg-tabbar/tabbarList.ts
@@ -37,42 +37,21 @@ export const tabbarList: FgTabBarItem[] = [
iconType: 'uiLib',
},
{
- iconPath: 'static/tabbar/device.png',
- selectedIconPath: 'static/tabbar/device_activate.png',
- pagePath: 'pages/device/index',
- text: '设备管理',
- icon: 'i-carbon-laptop',
- // 注意 unocss 的图标需要在 页面上引入一下,或者配置到 unocss.config.ts 的 safelist 中
+ iconPath: 'static/tabbar/network.png',
+ selectedIconPath: 'static/tabbar/network_activate.png',
+ pagePath: 'pages/device-config/index',
+ text: '配网',
+ icon: 'i-carbon-network-3',
iconType: 'uiLib',
},
{
- iconPath: 'static/tabbar/microphone.png',
- selectedIconPath: 'static/tabbar/microphone_activate.png',
- pagePath: 'pages/voiceprint/index',
- text: '声纹识别',
- icon: 'i-carbon-microphone-filled',
+ iconPath: 'static/tabbar/system.png',
+ selectedIconPath: 'static/tabbar/system_activate.png',
+ pagePath: 'pages/settings/index',
+ text: '系统',
+ icon: 'i-carbon-settings',
iconType: 'uiLib',
},
- {
- iconPath: 'static/tabbar/chat.png',
- selectedIconPath: 'static/tabbar/chat_activate.png',
- pagePath: 'pages/chat-history/index',
- text: '聊天记录',
- icon: 'i-carbon-chat-bot',
- iconType: 'uiLib',
- },
- // {
- // pagePath: 'pages/my/index',
- // text: '我的',
- // icon: '/static/logo.svg',
- // iconType: 'local',
- // },
- // {
- // pagePath: 'pages/mine/index',
- // text: '我的',
- // icon: 'iconfont icon-my',
- // iconType: 'iconfont',
- // },
]
// NATIVE_TABBAR(1) 和 CUSTOM_TABBAR_WITH_CACHE(2) 时,需要tabbar缓存
diff --git a/main/xiaozhi-mobile-admin/src/pages/agent/edit.vue b/main/xiaozhi-mobile-admin/src/pages/agent/edit.vue
index 45d3eb3f..36809fa6 100644
--- a/main/xiaozhi-mobile-admin/src/pages/agent/edit.vue
+++ b/main/xiaozhi-mobile-admin/src/pages/agent/edit.vue
@@ -1,81 +1,24 @@
-
-{
- "layout": "default",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "编辑"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 基础信息
+
+
-
-
-
-
-
- 基础信息
+
+
+
+
+ 助手昵称
-
-
-
-
-
-
- 助手昵称
-
-
-
-
-
-
- 角色模式
-
-
-
- {{ template.agentName }}
-
-
-
-
-
-
- 角色介绍
-
-
-
- {{ (formData.systemPrompt || '').length }}/2000
-
-
-
-
-
-
-
- 模型配置
-
-
-
-
-
-
-
-
- 语音活动检测
-
-
- {{ displayNames.vad }}
-
-
-
-
-
-
- 语音识别
-
-
- {{ displayNames.asr }}
-
-
-
-
-
-
- 大语言模型
-
-
- {{ displayNames.llm }}
-
-
-
-
-
-
- 视觉大模型
-
-
- {{ displayNames.vllm }}
-
-
-
-
-
-
- 意图识别
-
-
- {{ displayNames.intent }}
-
-
-
-
-
-
- 记忆
-
-
- {{ displayNames.memory }}
-
-
-
-
-
-
-
-
-
- 语音设置
-
-
-
-
-
-
-
-
- 语音合成
-
-
- {{ displayNames.tts }}
-
-
-
-
-
-
- 角色音色
-
-
- {{ displayNames.voiceprint }}
-
-
-
-
-
-
- 插件
-
-
- 编辑功能
-
-
-
-
-
-
-
-
- 历史记忆
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ saving ? '保存中...' : '保存' }}
-
-
+
+
+
+ 角色模式
+
+
+
+ {{ template.agentName }}
+
+
+
+
+
+
+ 角色介绍
+
+
+
+ {{ (formData.systemPrompt || '').length }}/2000
+
+
+
+
+
+
+
+ 模型配置
+
+
+
+
+
+
+
+
+ 语音活动检测
+
+
+ {{ displayNames.vad }}
+
+
+
+
+
+
+ 语音识别
+
+
+ {{ displayNames.asr }}
+
+
+
+
+
+
+ 大语言模型
+
+
+ {{ displayNames.llm }}
+
+
+
+
+
+
+ 视觉大模型
+
+
+ {{ displayNames.vllm }}
+
+
+
+
+
+
+ 意图识别
+
+
+ {{ displayNames.intent }}
+
+
+
+
+
+
+ 记忆
+
+
+ {{ displayNames.memory }}
+
+
+
+
+
+
+
+
+
+ 语音设置
+
+
+
+
+
+
+
+
+ 语音合成
+
+
+ {{ displayNames.tts }}
+
+
+
+
+
+
+ 角色音色
+
+
+ {{ displayNames.voiceprint }}
+
+
+
+
+
+
+ 插件
+
+
+ 编辑功能
+
+
+
+
+
+
+
+
+ 历史记忆
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ saving ? '保存中...' : '保存' }}
+
+
{
@close="onPickerCancel('voiceprint')"
@select="({ item }) => onPickerConfirm('voiceprint', item.value, item.name)"
/>
-
-
-
-
\ No newline at end of file
+
diff --git a/main/xiaozhi-mobile-admin/src/pages/agent/index.vue b/main/xiaozhi-mobile-admin/src/pages/agent/index.vue
new file mode 100644
index 00000000..9e81b663
--- /dev/null
+++ b/main/xiaozhi-mobile-admin/src/pages/agent/index.vue
@@ -0,0 +1,214 @@
+
+{
+ "layout": "default",
+ "style": {
+ "navigationBarTitleText": "智能体",
+ "navigationStyle": "custom"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main/xiaozhi-mobile-admin/src/pages/agent/tools.vue b/main/xiaozhi-mobile-admin/src/pages/agent/tools.vue
index 63e2deb9..88ca36fc 100644
--- a/main/xiaozhi-mobile-admin/src/pages/agent/tools.vue
+++ b/main/xiaozhi-mobile-admin/src/pages/agent/tools.vue
@@ -261,7 +261,7 @@ onMounted(async () => {
@@ -453,12 +453,12 @@ onMounted(async () => {
-
+
{{ field.label }}
@@ -472,7 +472,7 @@ onMounted(async () => {
{
-
+
每行输入一个项目
-
+
+
+
+
{
v-model="showChatHistoryDialog" :actions="chatHistoryActions" title="选择声纹向量"
@select="selectAudioId"
/>
-
-
-
-