index.js
3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{
path: '/',
redirect: '/agent/master'
},
{
path: '/agents/:agentId?',
redirect: to => `/agent/${to.params.agentId || 'agent-creator'}`,
},
{
path: '/agent/:agentId/:convId?',
name: 'AgentChat',
component: () => import('@/views/AgentChat.vue'),
props: true,
},
{
// agentId 必填:`/:id/agents`(无 agentId)要落到下面的 CompanyDetail 去渲染团队 tab。
// 之前写成 :agentId? 时,这条路由会抢占 /:id/agents,导致导航栏「Team」永远打开
// AgentChat,CompanyDashboard 的团队 tab(含 Org Graph 区块)完全不可达。
path: '/:id/agents/:agentId/:convId?',
name: 'CompanyAgentChat',
component: () => import('@/views/AgentChat.vue'),
props: true,
},
{
path: '/company',
name: 'CompanyList',
component: () => import('@/views/CompanyDashboard.vue'),
},
{
path: '/:id/:tab(overview|agents|pipelines|goals|sop|okr|team|files|messages|skills|jobs|workspace)',
name: 'CompanyDetail',
component: () => import('@/views/CompanyDashboard.vue'),
props: true
},
{
// P3 · 图执行控制台(org graph + work graph + 节点详情)。
// 路径段 'graph-console' 不在上面 CompanyDetail 的 :tab 白名单里,两条路由不冲突。
path: '/:id/graph-console',
name: 'GraphConsole',
component: () => import('@/views/GraphConsole.vue'),
props: true,
},
{
path: '/okr',
name: 'OkrDashboard',
component: () => import('@/views/OkrDashboard.vue'),
},
// 新增独立页面
{
path: '/skills',
name: 'SkillsMarket',
component: () => import('@/views/SkillsMarket.vue'),
},
{
path: '/jobs',
name: 'JobsPanel',
component: () => import('@/views/JobsPanel.vue'),
},
{
path: '/tasks/:taskId?',
name: 'TaskTimeline',
component: () => import('@/views/TaskTimeline.vue'),
},
{
path: '/pipelines',
name: 'PipelineEditor',
component: () => import('@/views/PipelineEditor.vue'),
},
{
path: '/quota',
name: 'QuotaMonitor',
component: () => import('@/views/QuotaMonitor.vue'),
},
{
path: '/dream',
name: 'DreamConsole',
component: () => import('@/views/DreamConsole.vue'),
},
// P5 · DevLoop Projects 列表 + Dashboard + Ops
{
path: '/devloop',
name: 'DevLoopProjects',
component: () => import('@/views/DevLoopProjects.vue'),
},
{
path: '/devloop/:pid',
name: 'DevLoopDashboard',
component: () => import('@/views/DevLoopDashboard.vue'),
props: true,
},
{
path: '/devloop/:pid/ops/:tab(bugs|loops|changelog|progress)',
name: 'DevLoopOps',
component: () => import('@/views/DevLoopOps.vue'),
props: true,
},
{
path: '/devloop/:pid/new-requirement',
name: 'DevLoopNewRequirement',
component: () => import('@/views/DevLoopNewRequirement.vue'),
},
]
const router = createRouter({
history: createWebHistory(),
routes,
})
export default router