chore: 更新前端依赖和侧边栏导航

- 添加必要的前端依赖
- 优化侧边栏交互
- 更新 AI-Core API 文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 15:43:07 +08:00
parent 49433f1681
commit 9ca267244d
6 changed files with 186 additions and 101 deletions

58
web/package-lock.json generated
View File

@@ -8,10 +8,15 @@
"name": "x-agent-dashboard",
"version": "0.0.1",
"dependencies": {
"@vue-office/docx": "^1.6.3",
"@vue-office/excel": "^1.7.14",
"echarts": "^6.0.0",
"element-plus": "^2.13.3",
"marked": "^17.0.4",
"papaparse": "^5.5.3",
"pinia": "^2.1.7",
"vue": "^3.4.21",
"vue-demi": "^0.14.10",
"vue-router": "^4.3.0"
},
"devDependencies": {
@@ -1026,6 +1031,40 @@
"vscode-uri": "^3.0.8"
}
},
"node_modules/@vue-office/docx": {
"version": "1.6.3",
"resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.3.tgz",
"integrity": "sha512-Cs+3CAaRBOWOiW4XAhTwwxJ0dy8cPIf6DqfNvYcD3YACiLwO4kuawLF2IAXxyijhbuOeoFsfvoVbOc16A/4bZA==",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
"@vue/composition-api": "^1.7.1",
"vue": "^2.0.0 || >=3.0.0",
"vue-demi": "^0.14.6"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vue-office/excel": {
"version": "1.7.14",
"resolved": "https://registry.npmmirror.com/@vue-office/excel/-/excel-1.7.14.tgz",
"integrity": "sha512-pVUgt+emDQUnW7q22CfnQ+jl43mM/7IFwYzOg7lwOwPEbiVB4K4qEQf+y/bc4xGXz75w1/e3Kz3G6wAafmFBFg==",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
"@vue/composition-api": "^1.7.1",
"vue": "^2.0.0 || >=3.0.0",
"vue-demi": "^0.14.6"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vue/compiler-core": {
"version": "3.5.29",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.29.tgz",
@@ -1862,6 +1901,18 @@
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/marked": {
"version": "17.0.4",
"resolved": "https://registry.npmmirror.com/marked/-/marked-17.0.4.tgz",
"integrity": "sha512-NOmVMM+KAokHMvjWmC5N/ZOvgmSWuqJB8FoYI019j4ogb/PeRMKoKIjReZ2w3376kkA8dSJIP8uD993Kxc0iRQ==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 20"
}
},
"node_modules/memoize-one": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
@@ -1988,6 +2039,12 @@
"node": ">= 6"
}
},
"node_modules/papaparse": {
"version": "5.5.3",
"resolved": "https://registry.npmmirror.com/papaparse/-/papaparse-5.5.3.tgz",
"integrity": "sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==",
"license": "MIT"
},
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -2701,6 +2758,7 @@
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"license": "MIT",
"peer": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"

View File

@@ -9,10 +9,15 @@
"preview": "vite preview"
},
"dependencies": {
"@vue-office/docx": "^1.6.3",
"@vue-office/excel": "^1.7.14",
"echarts": "^6.0.0",
"element-plus": "^2.13.3",
"marked": "^17.0.4",
"papaparse": "^5.5.3",
"pinia": "^2.1.7",
"vue": "^3.4.21",
"vue-demi": "^0.14.10",
"vue-router": "^4.3.0"
},
"devDependencies": {

View File

@@ -5,6 +5,7 @@ defineProps<{
description?: string
icon?: string
iconClass?: string
class?: string
}>()
const emit = defineEmits<{
@@ -18,7 +19,7 @@ const close = () => {
<template>
<Teleport to="body">
<div v-if="modelValue" class="dialog-overlay" @click.self="close">
<div v-if="modelValue" class="dialog-overlay" :class="$props.class" @click.self="close">
<div class="dialog-container">
<!-- 头部 -->
<div class="dialog-header">
@@ -61,7 +62,7 @@ const close = () => {
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
z-index: 2000;
}
.dialog-container {

View File

@@ -21,12 +21,15 @@ const mainMenu: MenuItem[] = [
{ name: 'Dashboard', icon: 'fa-gauge', path: '/dashboard' },
{ name: 'Agents', icon: 'fa-robot', badge: 3, path: '/agents' },
{ name: 'Team', icon: 'fa-users', path: '/team' },
{ name: 'Skills', icon: 'fa-wand-magic-sparkles', badge: 21, path: '/mcp' },
{ name: 'Tools', icon: 'fa-tools', badge: 13, path: '/model-apis' },
{ name: 'Database', icon: 'fa-database', path: '/database' },
{ name: 'Knowledge', icon: 'fa-brain', path: '/knowledge' },
]
const middleMenu: MenuItem[] = [
{ name: 'Skills', icon: 'fa-wand-magic-sparkles', badge: 21, path: '/mcp' },
{ name: 'Tools', icon: 'fa-tools', badge: 13, path: '/model-apis' },
]
const bottomMenu: MenuItem[] = [
{ name: 'Settings', icon: 'fa-gear', path: '/settings' },
]
@@ -117,6 +120,25 @@ const handleUserCommand = (command: string) => {
<!-- 分隔线 -->
<li class="my-4 border-t border-dark-500"></li>
<!-- Skills & Tools -->
<li v-for="item in middleMenu" :key="item.name">
<a
href="#"
class="flex items-center justify-between px-3 py-2.5 rounded-lg transition-colors text-sm"
:class="activeMenu === item.name ? 'bg-dark-600 text-white' : 'text-gray-400 hover:bg-dark-600 hover:text-white'"
@click="navigateTo(item)"
>
<div class="flex items-center gap-3">
<i :class="['fa-solid', item.icon, 'w-5', 'text-center']"></i>
<span>{{ item.name }}</span>
</div>
<span v-if="item.badge" class="bg-dark-500 text-xs px-2 py-0.5 rounded-full">{{ item.badge }}</span>
</a>
</li>
<!-- 分隔线 -->
<li class="my-4 border-t border-dark-500"></li>
<!-- Settings -->
<li v-for="item in bottomMenu" :key="item.name">
<a