feat: add chinese vue workbench shell
This commit is contained in:
55
web/src/App.vue
Normal file
55
web/src/App.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import ProjectView from './views/ProjectView.vue'
|
||||
import WorkflowView from './views/WorkflowView.vue'
|
||||
import AgentView from './views/AgentView.vue'
|
||||
import DraftsView from './views/DraftsView.vue'
|
||||
import SettingsView from './views/SettingsView.vue'
|
||||
import StatusBadge from './components/StatusBadge.vue'
|
||||
import { connection } from './data'
|
||||
|
||||
const tabs = [
|
||||
{ id: 'projects', label: '项目视图', component: ProjectView },
|
||||
{ id: 'workflow', label: '工作流视图', component: WorkflowView },
|
||||
{ id: 'agents', label: '智能体视图', component: AgentView },
|
||||
{ id: 'drafts', label: '草稿', component: DraftsView },
|
||||
{ id: 'settings', label: '设置', component: SettingsView },
|
||||
]
|
||||
|
||||
const activeTab = ref('projects')
|
||||
const activeComponent = computed(() => tabs.find((tab) => tab.id === activeTab.value)?.component ?? ProjectView)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-shell">
|
||||
<header class="workspace-header">
|
||||
<div>
|
||||
<p class="eyebrow">本地只读工作台</p>
|
||||
<h1>Codex 智能体管理台</h1>
|
||||
<p class="lede">中文前端壳已就位,真实 API 接入将在 Phase 5 进行。</p>
|
||||
</div>
|
||||
<div class="connection-card" aria-label="连接状态">
|
||||
<StatusBadge label="未连接" status="unknown" confidence="low" source="local_sample" />
|
||||
<strong>{{ connection.label }}</strong>
|
||||
<span>{{ connection.detail }}</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<nav class="tab-bar" aria-label="主导航">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.id"
|
||||
class="tab-button"
|
||||
:class="{ active: activeTab === tab.id }"
|
||||
type="button"
|
||||
@click="activeTab = tab.id"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<main class="workspace-main">
|
||||
<component :is="activeComponent" />
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
18
web/src/components/HandoffTimeline.vue
Normal file
18
web/src/components/HandoffTimeline.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
items: { type: Array, default: () => [] },
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ol class="handoff-timeline">
|
||||
<li v-for="item in items" :key="`${item.from}-${item.to}-${item.summary}`">
|
||||
<div class="timeline-marker" aria-hidden="true"></div>
|
||||
<div>
|
||||
<p class="timeline-title">{{ item.from }} → {{ item.to }}</p>
|
||||
<p>{{ item.summary }}</p>
|
||||
<span>{{ item.time }} · 来源 {{ item.source }} · 置信度 {{ item.confidence }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</template>
|
||||
16
web/src/components/StatusBadge.vue
Normal file
16
web/src/components/StatusBadge.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
label: { type: String, required: true },
|
||||
status: { type: String, default: 'unknown' },
|
||||
confidence: { type: String, default: 'low' },
|
||||
source: { type: String, default: 'local_sample' },
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="status-badge" :data-status="status">
|
||||
<span class="status-dot" aria-hidden="true"></span>
|
||||
<span>{{ label }}</span>
|
||||
<small>{{ source }} / {{ confidence }}</small>
|
||||
</span>
|
||||
</template>
|
||||
17
web/src/components/WorkflowGraph.vue
Normal file
17
web/src/components/WorkflowGraph.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
edges: { type: Array, default: () => [] },
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="graph-list" aria-label="工作流交接图">
|
||||
<article v-for="edge in edges" :key="`${edge.parent}-${edge.child}`" class="graph-edge">
|
||||
<div class="graph-node">{{ edge.parent }}</div>
|
||||
<div class="graph-link" aria-hidden="true"></div>
|
||||
<div class="graph-node child">{{ edge.child }}</div>
|
||||
<p>{{ edge.status }}</p>
|
||||
<small>来源 {{ edge.source }} · 置信度 {{ edge.confidence }}</small>
|
||||
</article>
|
||||
</div>
|
||||
</template>
|
||||
20
web/src/components/WritebackSteps.vue
Normal file
20
web/src/components/WritebackSteps.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
activeSteps: { type: Array, default: () => [] },
|
||||
})
|
||||
|
||||
const steps = ['草稿', '已校验', '已备份', '已写回']
|
||||
|
||||
function isActive(step) {
|
||||
return props.activeSteps.includes(step)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ol class="writeback-steps" aria-label="写回步骤">
|
||||
<li v-for="step in steps" :key="step" :class="{ active: isActive(step) }">
|
||||
<span aria-hidden="true"></span>
|
||||
{{ step }}
|
||||
</li>
|
||||
</ol>
|
||||
</template>
|
||||
163
web/src/data.js
Normal file
163
web/src/data.js
Normal file
@@ -0,0 +1,163 @@
|
||||
export const connection = {
|
||||
label: '等待连接后端 API',
|
||||
detail: 'Phase 4 仅展示只读工作台外壳;以下内容均为本地示例数据。',
|
||||
source: 'local_sample',
|
||||
confidence: 'low',
|
||||
}
|
||||
|
||||
export const projects = [
|
||||
{
|
||||
id: 'manager',
|
||||
name: 'codex-agent-manager',
|
||||
path: '/Users/yoilun/Code/codex-agent-manager',
|
||||
status: 'recent',
|
||||
statusZh: '最近活跃',
|
||||
trust: 'trusted',
|
||||
activeAgents: 2,
|
||||
uncertain: true,
|
||||
drafts: 1,
|
||||
lastActivity: '示例:18:42',
|
||||
source: '示例数据',
|
||||
confidence: 'low',
|
||||
},
|
||||
{
|
||||
id: 'codex-home',
|
||||
name: '.codex 本机配置',
|
||||
path: '/Users/yoilun/.codex',
|
||||
status: 'unknown',
|
||||
statusZh: '未知',
|
||||
trust: 'local',
|
||||
activeAgents: 0,
|
||||
uncertain: true,
|
||||
drafts: 0,
|
||||
lastActivity: '等待 API',
|
||||
source: '未连接',
|
||||
confidence: 'low',
|
||||
},
|
||||
{
|
||||
id: 'example',
|
||||
name: '示例项目',
|
||||
path: '/Users/yoilun/Code/example',
|
||||
status: 'idle',
|
||||
statusZh: '空闲',
|
||||
trust: '示例',
|
||||
activeAgents: 0,
|
||||
uncertain: false,
|
||||
drafts: 0,
|
||||
lastActivity: '示例:昨天',
|
||||
source: '示例数据',
|
||||
confidence: 'low',
|
||||
},
|
||||
]
|
||||
|
||||
export const agentMatrix = [
|
||||
{
|
||||
id: 'lead',
|
||||
name: '主智能体',
|
||||
role: '规划与监管',
|
||||
status: 'recent',
|
||||
statusZh: '最近活跃',
|
||||
goal: 'Phase 4 前端工作台',
|
||||
process: '等待进程表',
|
||||
source: 'local_sample',
|
||||
confidence: 'low',
|
||||
lastActivity: '示例:18:42',
|
||||
},
|
||||
{
|
||||
id: 'frontend',
|
||||
name: '前端实现智能体',
|
||||
role: 'Vue 只读界面',
|
||||
status: 'running',
|
||||
statusZh: '运行中',
|
||||
goal: '搭建中文工作台',
|
||||
process: '等待 API 连接',
|
||||
source: 'local_sample',
|
||||
confidence: 'low',
|
||||
lastActivity: '示例:刚刚',
|
||||
},
|
||||
{
|
||||
id: 'reviewer',
|
||||
name: '审查智能体',
|
||||
role: '范围与质量审查',
|
||||
status: 'unknown',
|
||||
statusZh: '未知',
|
||||
goal: '等待阶段 5 数据',
|
||||
process: '未连接',
|
||||
source: 'api_missing',
|
||||
confidence: 'low',
|
||||
lastActivity: '等待连接',
|
||||
},
|
||||
]
|
||||
|
||||
export const workflow = {
|
||||
phases: [
|
||||
{ name: 'Phase 0-3', status: 'complete', label: '已完成', gate: 'Go 后端只读模型', evidence: 'task_plan.md / progress.md', confidence: 'medium' },
|
||||
{ name: 'Phase 4', status: 'running', label: '进行中', gate: '中文只读前端工作台', evidence: '本地示例视图', confidence: 'low' },
|
||||
{ name: 'Phase 5', status: 'pending', label: '未开始', gate: '连接只读 API', evidence: '等待后续阶段', confidence: 'low' },
|
||||
{ name: 'Phase 6', status: 'pending', label: '未开始', gate: '草稿校验与写回', evidence: '当前禁用写回', confidence: 'low' },
|
||||
],
|
||||
handoffs: [
|
||||
{ from: '主智能体', to: '前端实现智能体', summary: '派发 Phase 4:构建只读工作台外壳', time: '示例:18:45', source: 'local_sample', confidence: 'low' },
|
||||
{ from: '前端实现智能体', to: '审查智能体', summary: '等待构建和界面验证证据', time: '等待连接', source: 'pending_api', confidence: 'low' },
|
||||
{ from: '审查智能体', to: '主智能体', summary: '阶段 5 才接入真实 API 和错误态', time: '计划中', source: 'task_plan.md', confidence: 'medium' },
|
||||
],
|
||||
edges: [
|
||||
{ parent: '主线程', child: '前端实现', status: '示例运行', source: 'local_sample', confidence: 'low' },
|
||||
{ parent: '前端实现', child: '界面审查', status: '等待', source: 'pending_api', confidence: 'low' },
|
||||
{ parent: '界面审查', child: '修复回路', status: '未开始', source: 'task_plan.md', confidence: 'medium' },
|
||||
],
|
||||
}
|
||||
|
||||
export const agents = [
|
||||
{
|
||||
id: 'frontend-developer',
|
||||
file: '~/.codex/agents/frontend-developer.toml',
|
||||
name: '前端开发者',
|
||||
description: '实现现代 Web 应用、响应式界面和无障碍体验。',
|
||||
role: 'Vue / Vite / CSS / 可访问性',
|
||||
status: '示例草稿',
|
||||
source: 'local_sample',
|
||||
confidence: 'low',
|
||||
toml: '[agent]\nname = "前端开发者"\ndescription = "实现现代 Web 应用"\nmode = "readonly-preview"',
|
||||
},
|
||||
{
|
||||
id: 'code-reviewer',
|
||||
file: '~/.codex/agents/code-reviewer.toml',
|
||||
name: '代码审查员',
|
||||
description: '优先发现行为回归、安全边界和遗漏测试。',
|
||||
role: '审查 / 风险 / 验证',
|
||||
status: '等待读取',
|
||||
source: 'api_missing',
|
||||
confidence: 'low',
|
||||
toml: '# 等待 Phase 5 从 /api/agents 读取真实 TOML',
|
||||
},
|
||||
]
|
||||
|
||||
export const drafts = [
|
||||
{
|
||||
file: '~/.codex/agents/frontend-developer.toml',
|
||||
changedFields: ['描述', '角色设定'],
|
||||
validation: '示例:未校验',
|
||||
backup: '等待 Phase 6',
|
||||
source: 'local_sample',
|
||||
confidence: 'low',
|
||||
steps: ['草稿'],
|
||||
},
|
||||
{
|
||||
file: '~/.codex/agents/code-reviewer.toml',
|
||||
changedFields: [],
|
||||
validation: '无草稿',
|
||||
backup: '无',
|
||||
source: 'api_missing',
|
||||
confidence: 'low',
|
||||
steps: [],
|
||||
},
|
||||
]
|
||||
|
||||
export const settings = [
|
||||
{ name: 'Codex home', value: '/Users/yoilun/.codex', detail: '阶段 5 后由后端配置返回', enabled: true },
|
||||
{ name: 'SQLite 状态读取', value: '只读 mode=ro&immutable=1', detail: '当前界面未连接 API', enabled: true },
|
||||
{ name: '本机进程辅助判断', value: '等待后端聚合', detail: '只显示来源与置信度,不伪装确定状态', enabled: true },
|
||||
{ name: '写回能力', value: 'Phase 6 才启用', detail: '当前没有保存、写入或批量写回按钮', enabled: false },
|
||||
{ name: '敏感文件黑名单', value: 'auth.json', detail: '前端只展示规则摘要,不读取内容', enabled: true },
|
||||
]
|
||||
5
web/src/main.js
Normal file
5
web/src/main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import './styles.css'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
814
web/src/styles.css
Normal file
814
web/src/styles.css
Normal file
@@ -0,0 +1,814 @@
|
||||
:root {
|
||||
--paper: #f3efe7;
|
||||
--paper-strong: #e8dfd1;
|
||||
--panel: #fffdf8;
|
||||
--panel-muted: #f8f4ec;
|
||||
--ink: #27312d;
|
||||
--muted: #6f746c;
|
||||
--line: #ded6ca;
|
||||
--green: #2f5d50;
|
||||
--green-soft: #e4eee9;
|
||||
--terracotta: #bd6b42;
|
||||
--terracotta-soft: #f5e1d4;
|
||||
--amber: #c49a3a;
|
||||
--blue: #5e718f;
|
||||
--shadow: 0 18px 45px rgba(62, 52, 39, 0.08);
|
||||
color: var(--ink);
|
||||
background: var(--paper);
|
||||
font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
|
||||
font-size: 16px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(47, 93, 80, 0.04) 1px, transparent 1px),
|
||||
linear-gradient(rgba(47, 93, 80, 0.04) 1px, transparent 1px),
|
||||
var(--paper);
|
||||
background-size: 28px 28px;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea {
|
||||
font: inherit;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
width: min(1440px, 100%);
|
||||
margin: 0 auto;
|
||||
padding: 28px;
|
||||
}
|
||||
|
||||
.workspace-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 340px;
|
||||
gap: 24px;
|
||||
align-items: end;
|
||||
min-height: 160px;
|
||||
}
|
||||
|
||||
.workspace-header h1 {
|
||||
margin: 6px 0 10px;
|
||||
font-size: clamp(2.2rem, 4vw, 4.8rem);
|
||||
line-height: 0.96;
|
||||
font-weight: 700;
|
||||
color: var(--green);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0;
|
||||
color: var(--terracotta);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.lede {
|
||||
max-width: 720px;
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 1.08rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.connection-card,
|
||||
.panel {
|
||||
background: color-mix(in srgb, var(--panel) 92%, white);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.connection-card {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.connection-card span:last-child {
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.tab-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin: 24px 0;
|
||||
padding: 10px;
|
||||
overflow-x: auto;
|
||||
background: rgba(243, 239, 231, 0.88);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.tab-button {
|
||||
flex: 0 0 auto;
|
||||
padding: 10px 16px;
|
||||
color: var(--green);
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.tab-button.active {
|
||||
color: var(--panel);
|
||||
background: var(--green);
|
||||
border-color: var(--green);
|
||||
}
|
||||
|
||||
.workspace-main {
|
||||
min-height: 620px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.panel-heading {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.panel-heading.horizontal {
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: start;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.panel h2,
|
||||
.panel h3 {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.panel h2 {
|
||||
font-size: 1.28rem;
|
||||
}
|
||||
|
||||
.panel h3 {
|
||||
font-size: 0.98rem;
|
||||
}
|
||||
|
||||
.project-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 280px minmax(0, 1fr) 310px;
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.project-list,
|
||||
.detail-panel {
|
||||
position: sticky;
|
||||
top: 92px;
|
||||
}
|
||||
|
||||
.project-item,
|
||||
.draft-card,
|
||||
.setting-row,
|
||||
.graph-edge,
|
||||
.agent-list-item {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--panel-muted);
|
||||
}
|
||||
|
||||
.project-item {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
padding: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.project-item.selected {
|
||||
border-color: color-mix(in srgb, var(--green) 52%, var(--line));
|
||||
box-shadow: inset 4px 0 0 var(--green);
|
||||
}
|
||||
|
||||
.project-item strong,
|
||||
.agent-list-item strong,
|
||||
.draft-card strong,
|
||||
.setting-row strong {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.project-item span,
|
||||
.agent-list-item span,
|
||||
.agent-list-item small,
|
||||
.draft-card p,
|
||||
.setting-row p,
|
||||
.detail-block p,
|
||||
.empty-state p,
|
||||
.phase-list p,
|
||||
.handoff-timeline p,
|
||||
.graph-edge p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
line-height: 1.58;
|
||||
}
|
||||
|
||||
.project-item span,
|
||||
.agent-list-item small {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.project-item dl,
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.project-item dt,
|
||||
.detail-grid span {
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.project-item dd,
|
||||
.detail-grid strong {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.matrix-panel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.matrix-table {
|
||||
overflow-x: auto;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.matrix-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1fr) minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr);
|
||||
min-width: 920px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.matrix-row:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.matrix-row.head {
|
||||
color: var(--muted);
|
||||
background: var(--paper-strong);
|
||||
font-size: 0.86rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.matrix-row > span {
|
||||
min-width: 0;
|
||||
padding: 14px;
|
||||
border-left: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.matrix-row > span:first-child {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.matrix-row small {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
padding: 6px 8px;
|
||||
color: var(--green);
|
||||
background: var(--green-soft);
|
||||
border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
|
||||
border-radius: 999px;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.status-badge small {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
flex: 0 0 auto;
|
||||
border-radius: 50%;
|
||||
background: var(--green);
|
||||
}
|
||||
|
||||
.status-badge[data-status="unknown"],
|
||||
.status-badge[data-status="pending"] {
|
||||
color: var(--blue);
|
||||
background: #edf1f5;
|
||||
border-color: #cbd6df;
|
||||
}
|
||||
|
||||
.status-badge[data-status="unknown"] .status-dot,
|
||||
.status-badge[data-status="pending"] .status-dot {
|
||||
background: var(--blue);
|
||||
}
|
||||
|
||||
.status-badge[data-status="idle"] {
|
||||
color: var(--muted);
|
||||
background: #efebe2;
|
||||
}
|
||||
|
||||
.status-badge[data-status="complete"] {
|
||||
color: var(--green);
|
||||
background: var(--green-soft);
|
||||
}
|
||||
|
||||
.status-badge[data-status="recent"],
|
||||
.status-badge[data-status="running"] {
|
||||
color: var(--terracotta);
|
||||
background: var(--terracotta-soft);
|
||||
border-color: #e0b69f;
|
||||
}
|
||||
|
||||
.status-badge[data-status="recent"] .status-dot,
|
||||
.status-badge[data-status="running"] .status-dot {
|
||||
background: var(--terracotta);
|
||||
}
|
||||
|
||||
.read-only-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 32px;
|
||||
padding: 6px 10px;
|
||||
color: var(--terracotta);
|
||||
background: var(--terracotta-soft);
|
||||
border: 1px solid #e7c2ad;
|
||||
border-radius: 999px;
|
||||
font-size: 0.84rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
padding: 14px 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
align-items: center;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
margin-top: 18px;
|
||||
padding: 18px;
|
||||
background: #f7f0e6;
|
||||
border: 1px dashed #cdbfae;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.empty-state.compact {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.workflow-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.phase-panel,
|
||||
.graph-panel {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.supervision-panel {
|
||||
grid-column: 2;
|
||||
grid-row: 1 / span 2;
|
||||
position: sticky;
|
||||
top: 92px;
|
||||
}
|
||||
|
||||
.phase-list,
|
||||
.handoff-timeline,
|
||||
.writeback-steps,
|
||||
.safety-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.phase-list li {
|
||||
display: grid;
|
||||
grid-template-columns: 18px minmax(0, 1fr) auto;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
padding: 14px 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.phase-list li:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.phase-dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--blue);
|
||||
}
|
||||
|
||||
.phase-list li[data-status="complete"] .phase-dot {
|
||||
background: var(--green);
|
||||
}
|
||||
|
||||
.phase-list li[data-status="running"] .phase-dot {
|
||||
background: var(--terracotta);
|
||||
}
|
||||
|
||||
.phase-list span,
|
||||
.handoff-timeline span,
|
||||
.graph-edge small {
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.handoff-timeline li {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 22px minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
|
||||
.handoff-timeline li:not(:last-child)::before {
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 16px;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
content: "";
|
||||
background: var(--line);
|
||||
}
|
||||
|
||||
.timeline-marker {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin-top: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--panel);
|
||||
border: 3px solid var(--terracotta);
|
||||
}
|
||||
|
||||
.timeline-title {
|
||||
color: var(--ink) !important;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.graph-list {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.graph-edge {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(120px, 1fr) 52px minmax(120px, 1fr);
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.graph-edge p,
|
||||
.graph-edge small {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.graph-node {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-height: 42px;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
color: var(--green);
|
||||
background: var(--green-soft);
|
||||
border: 1px solid #c8dbd2;
|
||||
border-radius: 8px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.graph-node.child {
|
||||
color: var(--terracotta);
|
||||
background: var(--terracotta-soft);
|
||||
border-color: #e5bda6;
|
||||
}
|
||||
|
||||
.graph-link {
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg, var(--green), var(--terracotta));
|
||||
}
|
||||
|
||||
.agent-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 330px minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.agent-list {
|
||||
position: sticky;
|
||||
top: 92px;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.search-box span,
|
||||
.form-grid span {
|
||||
color: var(--muted);
|
||||
font-size: 0.84rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.search-box input,
|
||||
.form-grid input,
|
||||
.form-grid textarea {
|
||||
width: 100%;
|
||||
padding: 11px 12px;
|
||||
color: var(--ink);
|
||||
background: var(--panel-muted);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.agent-list-item {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
gap: 4px;
|
||||
margin-bottom: 10px;
|
||||
padding: 14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.agent-list-item.selected {
|
||||
border-color: var(--green);
|
||||
background: var(--green-soft);
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.form-grid label {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.form-grid .wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.form-grid textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.subtabs {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin: 18px 0 12px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.subtabs span {
|
||||
flex: 0 0 auto;
|
||||
padding: 8px 12px;
|
||||
color: var(--muted);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.subtabs .active {
|
||||
color: var(--panel);
|
||||
background: var(--green);
|
||||
border-color: var(--green);
|
||||
}
|
||||
|
||||
.readonly-code {
|
||||
overflow: auto;
|
||||
padding: 16px;
|
||||
color: #25322d;
|
||||
background: #ebe4d8;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.readonly-code pre {
|
||||
margin: 0;
|
||||
font-family: "SFMono-Regular", Consolas, monospace;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.drafts-layout,
|
||||
.settings-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 340px;
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.draft-list,
|
||||
.settings-list {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.draft-card {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.draft-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.writeback-steps {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.writeback-steps li {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
|
||||
.writeback-steps span {
|
||||
height: 6px;
|
||||
border-radius: 999px;
|
||||
background: var(--line);
|
||||
}
|
||||
|
||||
.writeback-steps li.active {
|
||||
color: var(--terracotta);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.writeback-steps li.active span {
|
||||
background: var(--terracotta);
|
||||
}
|
||||
|
||||
.setting-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(150px, auto) 44px;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.setting-row > span {
|
||||
color: var(--green);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.setting-row i {
|
||||
width: 42px;
|
||||
height: 24px;
|
||||
background: var(--green-soft);
|
||||
border: 1px solid #c4d8d0;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.setting-row i::after {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: 2px 0 0 19px;
|
||||
content: "";
|
||||
background: var(--green);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.setting-row i.off {
|
||||
background: #ece7de;
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.setting-row i.off::after {
|
||||
margin-left: 2px;
|
||||
background: var(--muted);
|
||||
}
|
||||
|
||||
.safety-list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.safety-list li {
|
||||
padding-left: 14px;
|
||||
border-left: 3px solid var(--terracotta);
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@media (max-width: 1120px) {
|
||||
.workspace-header,
|
||||
.project-layout,
|
||||
.workflow-layout,
|
||||
.agent-layout,
|
||||
.drafts-layout,
|
||||
.settings-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.project-list,
|
||||
.detail-panel,
|
||||
.supervision-panel,
|
||||
.agent-list {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.phase-panel,
|
||||
.graph-panel,
|
||||
.supervision-panel {
|
||||
grid-column: auto;
|
||||
grid-row: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.app-shell {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.workspace-header {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.panel-heading.horizontal,
|
||||
.draft-header,
|
||||
.setting-row,
|
||||
.form-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.graph-edge {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.graph-link {
|
||||
width: 2px;
|
||||
height: 28px;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.writeback-steps {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
80
web/src/views/AgentView.vue
Normal file
80
web/src/views/AgentView.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import StatusBadge from '../components/StatusBadge.vue'
|
||||
import { agents } from '../data'
|
||||
|
||||
const selectedId = ref(agents[0]?.id)
|
||||
const selectedAgent = computed(() => agents.find((agent) => agent.id === selectedId.value) ?? agents[0])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="agent-layout">
|
||||
<aside class="panel agent-list" aria-label="智能体列表">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">智能体</p>
|
||||
<h2>只读定义列表</h2>
|
||||
</div>
|
||||
<label class="search-box">
|
||||
<span>搜索</span>
|
||||
<input value="示例过滤:前端 / 审查" readonly aria-label="智能体搜索占位" />
|
||||
</label>
|
||||
<button
|
||||
v-for="agent in agents"
|
||||
:key="agent.id"
|
||||
class="agent-list-item"
|
||||
:class="{ selected: agent.id === selectedId }"
|
||||
type="button"
|
||||
@click="selectedId = agent.id"
|
||||
>
|
||||
<strong>{{ agent.name }}</strong>
|
||||
<span>{{ agent.description }}</span>
|
||||
<small>{{ agent.file }}</small>
|
||||
</button>
|
||||
</aside>
|
||||
|
||||
<section class="panel editor-panel" aria-label="智能体只读编辑区">
|
||||
<div class="panel-heading horizontal">
|
||||
<div>
|
||||
<p class="eyebrow">只读编辑区</p>
|
||||
<h2>{{ selectedAgent.name }}</h2>
|
||||
</div>
|
||||
<StatusBadge :label="selectedAgent.status" status="unknown" :source="selectedAgent.source" :confidence="selectedAgent.confidence" />
|
||||
</div>
|
||||
|
||||
<div class="form-grid" aria-label="智能体字段预览">
|
||||
<label>
|
||||
<span>名称</span>
|
||||
<input :value="selectedAgent.name" readonly />
|
||||
</label>
|
||||
<label>
|
||||
<span>文件路径</span>
|
||||
<input :value="selectedAgent.file" readonly />
|
||||
</label>
|
||||
<label class="wide">
|
||||
<span>描述</span>
|
||||
<textarea :value="selectedAgent.description" readonly rows="3"></textarea>
|
||||
</label>
|
||||
<label class="wide">
|
||||
<span>角色设定</span>
|
||||
<textarea :value="selectedAgent.role" readonly rows="4"></textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="subtabs" aria-label="智能体信息子标签">
|
||||
<span class="active">预览</span>
|
||||
<span>TOML</span>
|
||||
<span>差异</span>
|
||||
<span>备份</span>
|
||||
</div>
|
||||
|
||||
<div class="readonly-code">
|
||||
<pre>{{ selectedAgent.toml }}</pre>
|
||||
</div>
|
||||
|
||||
<div class="empty-state compact">
|
||||
<strong>当前阶段没有保存入口</strong>
|
||||
<p>这里模拟编辑工作区的阅读体验;真实草稿、校验、diff 和写回会在 Phase 6 实现。</p>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
48
web/src/views/DraftsView.vue
Normal file
48
web/src/views/DraftsView.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<script setup>
|
||||
import StatusBadge from '../components/StatusBadge.vue'
|
||||
import WritebackSteps from '../components/WritebackSteps.vue'
|
||||
import { drafts } from '../data'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="drafts-layout">
|
||||
<div class="panel">
|
||||
<div class="panel-heading horizontal">
|
||||
<div>
|
||||
<p class="eyebrow">草稿</p>
|
||||
<h2>未写回变更</h2>
|
||||
</div>
|
||||
<span class="read-only-chip">写回未启用</span>
|
||||
</div>
|
||||
|
||||
<div class="draft-list">
|
||||
<article v-for="draft in drafts" :key="draft.file" class="draft-card">
|
||||
<div class="draft-header">
|
||||
<div>
|
||||
<strong>{{ draft.file }}</strong>
|
||||
<p>变更字段:{{ draft.changedFields.length ? draft.changedFields.join('、') : '无' }}</p>
|
||||
</div>
|
||||
<StatusBadge :label="draft.validation" status="unknown" :source="draft.source" :confidence="draft.confidence" />
|
||||
</div>
|
||||
<WritebackSteps :active-steps="draft.steps" />
|
||||
<dl class="detail-grid">
|
||||
<span>TOML 校验</span><strong>{{ draft.validation }}</strong>
|
||||
<span>最近备份</span><strong>{{ draft.backup }}</strong>
|
||||
<span>来源</span><strong>{{ draft.source }} / {{ draft.confidence }}</strong>
|
||||
</dl>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="panel draft-side">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">空状态</p>
|
||||
<h2>等待 Phase 6 写回流程</h2>
|
||||
</div>
|
||||
<div class="empty-state">
|
||||
<strong>没有真实草稿队列</strong>
|
||||
<p>Phase 4 只展示步骤结构:草稿、已校验、已备份、已写回。当前不会创建、放弃或写回任何文件。</p>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
</template>
|
||||
90
web/src/views/ProjectView.vue
Normal file
90
web/src/views/ProjectView.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<script setup>
|
||||
import StatusBadge from '../components/StatusBadge.vue'
|
||||
import { agentMatrix, projects } from '../data'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="project-layout">
|
||||
<aside class="panel project-list" aria-label="项目列表">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">项目</p>
|
||||
<h2>等待连接的项目清单</h2>
|
||||
</div>
|
||||
<article v-for="project in projects" :key="project.id" class="project-item" :class="{ selected: project.id === 'manager' }">
|
||||
<div>
|
||||
<strong>{{ project.name }}</strong>
|
||||
<span>{{ project.path }}</span>
|
||||
</div>
|
||||
<StatusBadge :label="project.statusZh" :status="project.status" :source="project.source" :confidence="project.confidence" />
|
||||
<dl>
|
||||
<div>
|
||||
<dt>运行中</dt>
|
||||
<dd>{{ project.activeAgents }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>草稿</dt>
|
||||
<dd>{{ project.drafts }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</article>
|
||||
</aside>
|
||||
|
||||
<section class="panel matrix-panel" aria-label="项目状态矩阵">
|
||||
<div class="panel-heading horizontal">
|
||||
<div>
|
||||
<p class="eyebrow">状态矩阵</p>
|
||||
<h2>智能体运行状态</h2>
|
||||
</div>
|
||||
<span class="read-only-chip">只读 · 示例数据</span>
|
||||
</div>
|
||||
|
||||
<div class="matrix-table" role="table" aria-label="智能体状态矩阵">
|
||||
<div class="matrix-row head" role="row">
|
||||
<span role="columnheader">智能体</span>
|
||||
<span role="columnheader">状态</span>
|
||||
<span role="columnheader">目标</span>
|
||||
<span role="columnheader">进程</span>
|
||||
<span role="columnheader">最近活动</span>
|
||||
</div>
|
||||
<div v-for="agent in agentMatrix" :key="agent.id" class="matrix-row" role="row">
|
||||
<span role="cell">
|
||||
<strong>{{ agent.name }}</strong>
|
||||
<small>{{ agent.role }}</small>
|
||||
</span>
|
||||
<span role="cell">
|
||||
<StatusBadge :label="agent.statusZh" :status="agent.status" :source="agent.source" :confidence="agent.confidence" />
|
||||
</span>
|
||||
<span role="cell">{{ agent.goal }}</span>
|
||||
<span role="cell">{{ agent.process }}</span>
|
||||
<span role="cell">{{ agent.lastActivity }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="empty-state compact">
|
||||
<strong>真实运行线程尚未接入</strong>
|
||||
<p>Phase 5 会从 `/api/runtime/threads` 与 `/api/workflow/events` 填充这里;当前不会轮询或写入任何数据。</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<aside class="panel detail-panel" aria-label="详情面板">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">详情</p>
|
||||
<h2>前端实现智能体</h2>
|
||||
</div>
|
||||
<StatusBadge label="运行中" status="running" source="local_sample" confidence="low" />
|
||||
<div class="detail-block">
|
||||
<h3>角色摘要</h3>
|
||||
<p>负责 Vue 3 + Vite 只读工作台、中文界面、移动响应式布局和空数据状态。</p>
|
||||
</div>
|
||||
<div class="detail-block">
|
||||
<h3>证据说明</h3>
|
||||
<p>当前为静态示例,不代表真实 Codex 运行状态。来源和置信度已明确标出,避免伪装真实数据。</p>
|
||||
</div>
|
||||
<div class="detail-grid">
|
||||
<span>备份</span><strong>阶段 6 启用</strong>
|
||||
<span>草稿</span><strong>1 个示例</strong>
|
||||
<span>API</span><strong>等待连接</strong>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
</template>
|
||||
42
web/src/views/SettingsView.vue
Normal file
42
web/src/views/SettingsView.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<script setup>
|
||||
import StatusBadge from '../components/StatusBadge.vue'
|
||||
import { settings } from '../data'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="settings-layout">
|
||||
<div class="panel">
|
||||
<div class="panel-heading horizontal">
|
||||
<div>
|
||||
<p class="eyebrow">设置</p>
|
||||
<h2>只读配置摘要</h2>
|
||||
</div>
|
||||
<StatusBadge label="等待 API" status="unknown" source="local_sample" confidence="low" />
|
||||
</div>
|
||||
|
||||
<div class="settings-list">
|
||||
<article v-for="item in settings" :key="item.name" class="setting-row">
|
||||
<div>
|
||||
<strong>{{ item.name }}</strong>
|
||||
<p>{{ item.detail }}</p>
|
||||
</div>
|
||||
<span>{{ item.value }}</span>
|
||||
<i :class="{ off: !item.enabled }" aria-hidden="true"></i>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="panel">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">安全边界</p>
|
||||
<h2>本阶段不会写回</h2>
|
||||
</div>
|
||||
<ul class="safety-list">
|
||||
<li>不读取或展示 `.codex/auth.json`。</li>
|
||||
<li>不写入 Codex SQLite。</li>
|
||||
<li>不保存 agent TOML。</li>
|
||||
<li>所有真实数据等待 Phase 5 只读 API。</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</template>
|
||||
65
web/src/views/WorkflowView.vue
Normal file
65
web/src/views/WorkflowView.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<script setup>
|
||||
import HandoffTimeline from '../components/HandoffTimeline.vue'
|
||||
import StatusBadge from '../components/StatusBadge.vue'
|
||||
import WorkflowGraph from '../components/WorkflowGraph.vue'
|
||||
import { workflow } from '../data'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="workflow-layout">
|
||||
<div class="panel phase-panel">
|
||||
<div class="panel-heading horizontal">
|
||||
<div>
|
||||
<p class="eyebrow">阶段</p>
|
||||
<h2>工作流阶段与门禁</h2>
|
||||
</div>
|
||||
<span class="read-only-chip">动态模型占位</span>
|
||||
</div>
|
||||
<ol class="phase-list">
|
||||
<li v-for="phase in workflow.phases" :key="phase.name" :data-status="phase.status">
|
||||
<div class="phase-dot" aria-hidden="true"></div>
|
||||
<div>
|
||||
<strong>{{ phase.name }}</strong>
|
||||
<p>{{ phase.gate }}</p>
|
||||
<span>证据 {{ phase.evidence }} · 置信度 {{ phase.confidence }}</span>
|
||||
</div>
|
||||
<StatusBadge :label="phase.label" :status="phase.status" :source="phase.evidence" :confidence="phase.confidence" />
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">交接</p>
|
||||
<h2>智能体交接流</h2>
|
||||
</div>
|
||||
<HandoffTimeline :items="workflow.handoffs" />
|
||||
</div>
|
||||
|
||||
<div class="panel graph-panel">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">关系图</p>
|
||||
<h2>主线程与子线程</h2>
|
||||
</div>
|
||||
<WorkflowGraph :edges="workflow.edges" />
|
||||
</div>
|
||||
|
||||
<aside class="panel supervision-panel">
|
||||
<div class="panel-heading">
|
||||
<p class="eyebrow">监管</p>
|
||||
<h2>主 agent 监管状态</h2>
|
||||
</div>
|
||||
<StatusBadge label="最近活跃" status="recent" source="local_sample" confidence="low" />
|
||||
<dl class="detail-grid">
|
||||
<span>当前门禁</span><strong>Phase 4 构建通过</strong>
|
||||
<span>计划文件</span><strong>已存在</strong>
|
||||
<span>审查循环</span><strong>等待验证</strong>
|
||||
<span>写回能力</span><strong>未启用</strong>
|
||||
</dl>
|
||||
<div class="empty-state">
|
||||
<strong>没有真实工作流事件</strong>
|
||||
<p>连接 API 后,这里会展示从 SQLite 和计划文件推断出的事件流、交接边和阶段状态。</p>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
</template>
|
||||
Reference in New Issue
Block a user