- 设置页「模型池」区块:三角色指派下拉、条目表格(档位徽标/单价/启用/测试/编辑/删除)、
内联添加表单(模型列表探测 datalist,api_key 留空保留原值)
- 新增「🤖 智能体」页 /agent:任务输入 + 池模型选择、工具调用时间轴
(round/tool_call/tool_result/usage/final)、左侧工作区文件浏览与预览
- 指标页「按模型分账」卡片(v2.by_model 表格)
- 修复:SSE final 后 EventSource 自动重连回放导致的事件重复渲染(终态即关闭+回放拦截)
88 lines
1.8 KiB
Vue
88 lines
1.8 KiB
Vue
<template>
|
|
<div class="app">
|
|
<!-- 顶部导航栏 -->
|
|
<nav class="topbar">
|
|
<span class="brand">🤖 端云协同 LLM 系统</span>
|
|
<div class="nav-links">
|
|
<router-link to="/chat">💬 对话</router-link>
|
|
<router-link to="/collaboration">🔄 协作</router-link>
|
|
<router-link to="/agent">🤖 智能体</router-link>
|
|
<router-link to="/review">🔍 检验</router-link>
|
|
<router-link to="/metrics">📊 指标</router-link>
|
|
<router-link to="/settings">⚙️ 设置</router-link>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- 路由视图 -->
|
|
<router-view class="content" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
// App.vue — 根布局,导航栏 + 路由出口
|
|
</script>
|
|
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html, body, #app {
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
font-size: 14px;
|
|
color: #111;
|
|
background: #fff;
|
|
}
|
|
|
|
.app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
padding: 0 24px;
|
|
height: 52px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
background: #fff;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.brand {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #1e40af;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.nav-links {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.nav-links a {
|
|
padding: 6px 14px;
|
|
border-radius: 6px;
|
|
text-decoration: none;
|
|
color: #374151;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
transition: background 0.15s;
|
|
}
|
|
.nav-links a:hover { background: #f3f4f6; }
|
|
.nav-links a.router-link-active {
|
|
background: #eff6ff;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.content {
|
|
flex: 1;
|
|
overflow: hidden; /* 限制自己高度,不被子内容撑开 */
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
</style>
|