Version: 0.7.9.dev.260326

后端:
1.把最后一块拼图:schedule_refine也搬迁到了agent2,此时agent已经完全解耦。但是它没融入新架构,Codex只尝试把它调整了一部分,回退了一些错误的更改,保持着现在的可运行状态。下次继续改。
2.agent目录先保留,直到refine彻底融入新架构。
3.改善Codex主导的新史山结构:node文件夹里面大量文件,转而改成了module.go+module_tool.go的双文件格局,极大提升架构整洁度和代码可读性。
前端:
1.新开了日历界面,正在保持往前推进。做了很多更改,感觉越来越好了。
This commit is contained in:
Losita
2026-03-26 00:38:17 +08:00
parent aa04bfb452
commit a243154e23
32 changed files with 11481 additions and 1239 deletions

View File

@@ -1,60 +1,71 @@
<script setup lang="ts">
import { computed } from 'vue'
import { ElMessage } from 'element-plus'
import { useRoute, useRouter } from 'vue-router'
import AssistantPanel from '@/components/dashboard/AssistantPanel.vue'
interface PageSwitchItem {
key: 'dashboard' | 'assistant'
interface SidebarItem {
key: 'home' | 'task' | 'calendar' | 'ai'
label: string
short: string
to: '/dashboard' | '/assistant'
to?: '/dashboard' | '/assistant' | '/schedule'
}
const router = useRouter()
const route = useRoute()
const switchItems: PageSwitchItem[] = [
{
key: 'dashboard',
label: '程',
short: '排',
to: '/dashboard',
},
{
key: 'assistant',
label: '对话',
short: 'AI',
to: '/assistant',
},
const sidebarItems: SidebarItem[] = [
{ key: 'home', label: '总览', short: '总', to: '/dashboard' },
{ key: 'task', label: '任务', short: '任' },
{ key: 'calendar', label: '程', short: '程', to: '/schedule' },
{ key: 'ai', label: '助手', short: 'AI', to: '/assistant' },
]
const activeSwitchKey = computed<PageSwitchItem['key']>(() =>
route.path.startsWith('/assistant') ? 'assistant' : 'dashboard',
)
function handlePageSwitch(targetPath: PageSwitchItem['to']) {
if (route.path !== targetPath) {
router.push(targetPath)
const activeSidebarKey = computed<SidebarItem['key']>(() => {
if (route.path.startsWith('/assistant')) {
return 'ai'
}
if (route.path.startsWith('/schedule')) {
return 'calendar'
}
return 'home'
})
function handleSidebarNavigate(item: SidebarItem) {
// 1. 和首页保持相同行为:已接通路由直接跳转,未接通入口给出明确提示。
// 2. 同路由不重复 push避免产生冗余导航记录。
// 3. 这样可保证两个页面的侧栏交互预期完全一致。
if (item.to) {
if (route.path !== item.to) {
void router.push(item.to)
}
return
}
ElMessage.info(`${item.label} 页面正在开发中`)
}
</script>
<template>
<main class="assistant-view">
<section class="assistant-view__layout">
<aside class="assistant-view__switch-rail glass-panel">
<button
v-for="item in switchItems"
:key="item.key"
type="button"
class="assistant-view__switch-item"
:class="{ 'assistant-view__switch-item--active': activeSwitchKey === item.key }"
@click="handlePageSwitch(item.to)"
>
<span>{{ item.short }}</span>
<small>{{ item.label }}</small>
</button>
<aside class="dashboard-sidebar">
<div class="dashboard-sidebar__brand">S</div>
<nav class="dashboard-sidebar__nav">
<button
v-for="item in sidebarItems"
:key="item.key"
type="button"
class="dashboard-sidebar__nav-item"
:class="{ 'dashboard-sidebar__nav-item--active': item.key === activeSidebarKey }"
@click="handleSidebarNavigate(item)"
>
<span>{{ item.short }}</span>
<small>{{ item.label }}</small>
</button>
</nav>
<button type="button" class="dashboard-sidebar__settings"></button>
</aside>
<AssistantPanel class="assistant-view__panel" view-mode="standalone" />
@@ -65,72 +76,114 @@ function handlePageSwitch(targetPath: PageSwitchItem['to']) {
<style scoped>
.assistant-view {
height: 100vh;
padding: 12px;
padding: 10px;
overflow: hidden;
background: linear-gradient(180deg, #f6f8fb 0%, #eef2f7 100%);
background: #f4f7fb;
}
.assistant-view__layout {
height: calc(100vh - 24px);
height: calc(100vh - 20px);
min-height: 0;
display: grid;
grid-template-columns: minmax(56px, 0.3fr) minmax(0, 6fr);
gap: 12px;
}
.assistant-view__switch-rail {
min-height: 0;
border-radius: 18px;
border: 1px solid rgba(15, 23, 42, 0.08);
background: linear-gradient(180deg, rgba(249, 250, 252, 0.95), rgba(243, 247, 252, 0.98));
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
padding: 14px 7px;
display: grid;
align-content: start;
grid-template-columns: 78px minmax(0, 1fr);
gap: 8px;
align-items: stretch;
}
.assistant-view__switch-item {
border: none;
border-radius: 12px;
background: transparent;
color: #6b7789;
padding: 10px 4px 9px;
cursor: pointer;
.dashboard-sidebar {
height: 100%;
border-radius: 26px;
background: linear-gradient(180deg, #165ca8 0%, #104d8f 100%);
padding: 16px 12px;
display: grid;
justify-items: center;
gap: 4px;
grid-template-rows: auto 1fr auto;
gap: 16px;
}
.assistant-view__switch-item span {
width: 32px;
height: 32px;
border-radius: 10px;
.dashboard-sidebar__brand,
.dashboard-sidebar__settings {
width: 50px;
height: 50px;
border: none;
border-radius: 16px;
background: rgba(255, 255, 255, 0.14);
color: #fff;
font-weight: 800;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
.dashboard-sidebar__nav {
display: grid;
gap: 12px;
align-content: start;
}
.dashboard-sidebar__nav-item {
width: 54px;
border: none;
border-radius: 16px;
background: transparent;
color: rgba(255, 255, 255, 0.74);
padding: 10px 8px;
display: grid;
justify-items: center;
gap: 5px;
cursor: pointer;
}
.dashboard-sidebar__nav-item span {
width: 32px;
height: 32px;
border-radius: 11px;
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.08);
font-weight: 700;
background: rgba(86, 101, 126, 0.1);
}
.assistant-view__switch-item small {
font-size: 11px;
line-height: 1;
.dashboard-sidebar__nav-item small {
font-size: 10px;
}
.assistant-view__switch-item--active {
color: #335fc2;
background: linear-gradient(180deg, rgba(88, 126, 224, 0.16), rgba(88, 126, 224, 0.08));
}
.assistant-view__switch-item--active span {
background: rgba(58, 95, 184, 0.2);
.dashboard-sidebar__nav-item--active {
background: rgba(255, 255, 255, 0.08);
color: #fff;
}
.assistant-view__panel {
min-width: 0;
min-height: 0;
height: 100%;
border-radius: 18px;
}
@media (max-width: 980px) {
.assistant-view__layout {
height: auto;
grid-template-columns: 1fr;
}
.dashboard-sidebar {
height: auto;
grid-template-columns: auto 1fr auto;
grid-template-rows: none;
align-items: center;
}
.dashboard-sidebar__nav {
grid-auto-flow: column;
justify-content: center;
}
}
@media (max-width: 720px) {
.assistant-view {
height: auto;
padding: 8px;
overflow: visible;
}
}
</style>