sillyspec 3.9.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/sillyspec-archive/SKILL.md +17 -0
- package/.claude/skills/sillyspec-auto/SKILL.md +78 -0
- package/.claude/skills/sillyspec-brainstorm/SKILL.md +17 -0
- package/{templates/commit.md → .claude/skills/sillyspec-commit/SKILL.md} +32 -47
- package/.claude/skills/sillyspec-continue/SKILL.md +45 -0
- package/.claude/skills/sillyspec-doctor/SKILL.md +27 -0
- package/.claude/skills/sillyspec-execute/SKILL.md +17 -0
- package/.claude/skills/sillyspec-explore/SKILL.md +105 -0
- package/.claude/skills/sillyspec-export/SKILL.md +53 -0
- package/.claude/skills/sillyspec-init/SKILL.md +170 -0
- package/.claude/skills/sillyspec-plan/SKILL.md +17 -0
- package/.claude/skills/sillyspec-propose/SKILL.md +17 -0
- package/.claude/skills/sillyspec-quick/SKILL.md +17 -0
- package/.claude/skills/sillyspec-resume/SKILL.md +111 -0
- package/.claude/skills/sillyspec-scan/SKILL.md +17 -0
- package/.claude/skills/sillyspec-state/SKILL.md +54 -0
- package/.claude/skills/sillyspec-status/SKILL.md +17 -0
- package/.claude/skills/sillyspec-verify/SKILL.md +17 -0
- package/.claude/skills/sillyspec-workspace/SKILL.md +149 -0
- package/README.md +19 -11
- package/SKILL.md +15 -10
- package/package.json +7 -9
- package/packages/dashboard/dist/assets/index-BcM2J-hv.css +1 -0
- package/packages/dashboard/dist/assets/index-DpLHK4jv.js +7446 -0
- package/packages/dashboard/dist/index.html +16 -16
- package/packages/dashboard/dist/prototype-dashboard.html +836 -0
- package/packages/dashboard/dist/prototype-overview.html +256 -0
- package/packages/dashboard/package-lock.json +226 -6
- package/packages/dashboard/package.json +8 -5
- package/packages/dashboard/public/logo.jpg +0 -0
- package/packages/dashboard/public/prototype-dashboard.html +836 -0
- package/packages/dashboard/public/prototype-overview.html +256 -0
- package/packages/dashboard/server/executor.js +1 -1
- package/packages/dashboard/server/index.js +341 -113
- package/packages/dashboard/server/parser.js +442 -30
- package/packages/dashboard/server/watcher.js +214 -134
- package/packages/dashboard/src/App.vue +475 -71
- package/packages/dashboard/src/components/ActionBar.vue +36 -43
- package/packages/dashboard/src/components/CommandPalette.vue +45 -66
- package/packages/dashboard/src/components/DetailPanel.vue +68 -53
- package/packages/dashboard/src/components/DocPreview.vue +257 -0
- package/packages/dashboard/src/components/DocTree.vue +114 -0
- package/packages/dashboard/src/components/HResizeHandle.vue +48 -0
- package/packages/dashboard/src/components/LogStream.vue +13 -33
- package/packages/dashboard/src/components/PipelineStage.vue +8 -8
- package/packages/dashboard/src/components/PipelineView.vue +99 -45
- package/packages/dashboard/src/components/ProjectCard.vue +187 -0
- package/packages/dashboard/src/components/ProjectList.vue +103 -45
- package/packages/dashboard/src/components/ProjectOverview.vue +152 -0
- package/packages/dashboard/src/components/StageBadge.vue +13 -13
- package/packages/dashboard/src/components/StepCard.vue +15 -15
- package/packages/dashboard/src/components/VResizeHandle.vue +61 -0
- package/packages/dashboard/src/components/detail/DocsDetail.vue +48 -0
- package/packages/dashboard/src/components/detail/GitDetail.vue +61 -0
- package/packages/dashboard/src/components/detail/TechDetail.vue +43 -0
- package/packages/dashboard/src/composables/useDashboard.js +48 -6
- package/packages/dashboard/src/composables/useKeyboard.js +6 -4
- package/packages/dashboard/src/composables/useLayout.js +131 -0
- package/packages/dashboard/src/main.js +4 -1
- package/packages/dashboard/src/style.css +17 -17
- package/src/index.js +141 -22
- package/src/init.js +93 -231
- package/src/migrate.js +117 -0
- package/src/progress.js +460 -0
- package/src/run.js +635 -0
- package/src/setup.js +2 -72
- package/src/stages/archive.js +54 -0
- package/src/stages/brainstorm.js +264 -0
- package/src/stages/doctor.js +303 -0
- package/src/stages/execute.js +287 -0
- package/src/stages/explore.js +34 -0
- package/src/stages/index.js +28 -0
- package/src/stages/plan.js +354 -0
- package/src/stages/propose.js +115 -0
- package/src/stages/quick.js +64 -0
- package/src/stages/scan.js +141 -0
- package/src/stages/status.js +65 -0
- package/src/stages/verify.js +135 -0
- package/.sillyspec/changes/dashboard/design.md +0 -219
- package/.sillyspec/plans/2026-04-05-dashboard.md +0 -737
- package/.sillyspec/specs/2026-04-05-dashboard-design.md +0 -206
- package/dist/steps/brainstorm/01-load-context.md +0 -30
- package/dist/steps/brainstorm/02-reuse-check.md +0 -6
- package/dist/steps/brainstorm/03-prototype-analysis.md +0 -11
- package/dist/steps/brainstorm/04-module-split.md +0 -23
- package/dist/steps/brainstorm/05-dialog-explore.md +0 -8
- package/dist/steps/brainstorm/06-propose-approaches.md +0 -3
- package/dist/steps/brainstorm/07-present-design.md +0 -3
- package/dist/steps/brainstorm/08-write-design.md +0 -21
- package/dist/steps/brainstorm/09-self-review.md +0 -15
- package/dist/steps/brainstorm/10-user-confirm.md +0 -3
- package/dist/steps/brainstorm/11-output-spec.md +0 -7
- package/dist/steps/brainstorm/manifest.yaml +0 -26
- package/dist/steps/execute/01-load-context.md +0 -41
- package/dist/steps/execute/02-scan-conventions.md +0 -47
- package/dist/steps/execute/03-skill-mcp.md +0 -19
- package/dist/steps/execute/04-assign-task.md +0 -22
- package/dist/steps/execute/04b-prompt-template.md +0 -54
- package/dist/steps/execute/05-write-test.md +0 -7
- package/dist/steps/execute/06-write-code.md +0 -8
- package/dist/steps/execute/07-run-test.md +0 -26
- package/dist/steps/execute/08-fix-issues.md +0 -28
- package/dist/steps/execute/09-next-task.md +0 -33
- package/dist/steps/execute/manifest.yaml +0 -28
- package/dist/steps/plan/01-load-context.md +0 -22
- package/dist/steps/plan/02-anchor-confirm.md +0 -1
- package/dist/steps/plan/03-expand-tasks.md +0 -33
- package/dist/steps/plan/04-mark-order.md +0 -15
- package/dist/steps/plan/05-e2e-planning.md +0 -17
- package/dist/steps/plan/06-self-check.md +0 -16
- package/dist/steps/plan/07-save.md +0 -1
- package/dist/steps/plan/manifest.yaml +0 -18
- package/dist/steps/scan/01-env-detect.md +0 -51
- package/dist/steps/scan/02-tech-stack.md +0 -16
- package/dist/steps/scan/03-conventions.md +0 -16
- package/dist/steps/scan/04-structure.md +0 -19
- package/dist/steps/scan/05-quality.md +0 -18
- package/dist/steps/scan/06-complete.md +0 -49
- package/dist/steps/scan/manifest.yaml +0 -16
- package/dist/steps/verify/01-load-specs.md +0 -28
- package/dist/steps/verify/02-check-tasks.md +0 -1
- package/dist/steps/verify/03-check-design.md +0 -6
- package/dist/steps/verify/04-run-tests.md +0 -7
- package/dist/steps/verify/05-e2e-tests.md +0 -27
- package/dist/steps/verify/05b-e2e-fix.md +0 -33
- package/dist/steps/verify/06-code-quality.md +0 -25
- package/dist/steps/verify/07-lint-check.md +0 -27
- package/dist/steps/verify/08-output-report.md +0 -14
- package/dist/steps/verify/manifest.yaml +0 -22
- package/docs/.vitepress/config.mts +0 -45
- package/docs/.vitepress/dist/404.html +0 -25
- package/docs/.vitepress/dist/assets/app.YytxICdd.js +0 -1
- package/docs/.vitepress/dist/assets/chunks/framework.Czhw_PXq.js +0 -19
- package/docs/.vitepress/dist/assets/chunks/theme.DusTRZQk.js +0 -1
- package/docs/.vitepress/dist/assets/index.md.C3VCvtQA.js +0 -1
- package/docs/.vitepress/dist/assets/index.md.C3VCvtQA.lean.js +0 -1
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/docs/.vitepress/dist/assets/sillyspec_commands.md.CXFFsj08.js +0 -15
- package/docs/.vitepress/dist/assets/sillyspec_commands.md.CXFFsj08.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_dashboard.md.BuPXHqjX.js +0 -4
- package/docs/.vitepress/dist/assets/sillyspec_dashboard.md.BuPXHqjX.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_file-io.md.Cz3x7llx.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_file-io.md.Cz3x7llx.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_getting-started.md.ClcvV8k3.js +0 -4
- package/docs/.vitepress/dist/assets/sillyspec_getting-started.md.ClcvV8k3.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_install.md.CKuR2tiT.js +0 -5
- package/docs/.vitepress/dist/assets/sillyspec_install.md.CKuR2tiT.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_lifecycle.md.DY293cR1.js +0 -28
- package/docs/.vitepress/dist/assets/sillyspec_lifecycle.md.DY293cR1.lean.js +0 -1
- package/docs/.vitepress/dist/assets/sillyspec_structure.md.sVYS4zPs.js +0 -30
- package/docs/.vitepress/dist/assets/sillyspec_structure.md.sVYS4zPs.lean.js +0 -1
- package/docs/.vitepress/dist/assets/style.DFTx90Kk.css +0 -1
- package/docs/.vitepress/dist/hashmap.json +0 -1
- package/docs/.vitepress/dist/index.html +0 -28
- package/docs/.vitepress/dist/sillyspec/commands.html +0 -42
- package/docs/.vitepress/dist/sillyspec/dashboard.html +0 -31
- package/docs/.vitepress/dist/sillyspec/file-io.html +0 -28
- package/docs/.vitepress/dist/sillyspec/getting-started.html +0 -31
- package/docs/.vitepress/dist/sillyspec/install.html +0 -32
- package/docs/.vitepress/dist/sillyspec/lifecycle.html +0 -55
- package/docs/.vitepress/dist/sillyspec/structure.html +0 -57
- package/docs/.vitepress/dist/vp-icons.css +0 -1
- package/docs/index.md +0 -34
- package/docs/sillyspec/commands.md +0 -218
- package/docs/sillyspec/dashboard.md +0 -51
- package/docs/sillyspec/file-io.md +0 -34
- package/docs/sillyspec/getting-started.md +0 -61
- package/docs/sillyspec/install.md +0 -51
- package/docs/sillyspec/lifecycle.md +0 -146
- package/docs/sillyspec/structure.md +0 -62
- package/packages/dashboard/dist/assets/index-Bh-GPjKY.css +0 -1
- package/packages/dashboard/dist/assets/index-CrCn5Gg6.js +0 -17
- package/src/step.js +0 -543
- package/templates/archive.md +0 -120
- package/templates/brainstorm.md +0 -170
- package/templates/continue.md +0 -32
- package/templates/execute.md +0 -304
- package/templates/explore.md +0 -59
- package/templates/export.md +0 -21
- package/templates/init.md +0 -61
- package/templates/plan.md +0 -146
- package/templates/quick.md +0 -135
- package/templates/scan-quick.md +0 -49
- package/templates/scan.md +0 -156
- package/templates/skills/playwright-e2e/SKILL.md +0 -340
- package/templates/status.md +0 -75
- package/templates/verify.md +0 -236
- package/templates/workspace-sync.md +0 -99
- package/templates/workspace.md +0 -70
- /package/{docs/.vitepress/dist/logo.jpg → logo.jpg} +0 -0
- /package/{docs/.vitepress → packages/dashboard}/dist/favicon.jpg +0 -0
- /package/{docs/public → packages/dashboard/dist}/logo.jpg +0 -0
- /package/{docs → packages/dashboard}/public/favicon.jpg +0 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-preview-shell">
|
|
3
|
+
<div v-if="!content && !loading" class="doc-empty">
|
|
4
|
+
<p>选择一个文档查看内容</p>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-else-if="loading" class="doc-empty">
|
|
7
|
+
<p>加载中...</p>
|
|
8
|
+
</div>
|
|
9
|
+
<template v-else>
|
|
10
|
+
<div class="doc-toolbar">
|
|
11
|
+
<div class="doc-title" :title="fileTitle">{{ fileTitle }}</div>
|
|
12
|
+
<n-button size="tiny" type="primary" @click="isModalOpen = true">弹窗阅读</n-button>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="doc-preview-scroll">
|
|
15
|
+
<div class="doc-preview" v-html="renderedContent"></div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<n-modal
|
|
20
|
+
v-model:show="isModalOpen"
|
|
21
|
+
preset="card"
|
|
22
|
+
:title="fileTitle"
|
|
23
|
+
style="width: min(920px, calc(100vw - 48px));"
|
|
24
|
+
>
|
|
25
|
+
<div class="doc-modal-body">
|
|
26
|
+
<div class="doc-preview doc-preview-large" v-html="renderedContent"></div>
|
|
27
|
+
</div>
|
|
28
|
+
</n-modal>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup>
|
|
33
|
+
import { computed, ref, watch } from 'vue'
|
|
34
|
+
import { marked } from 'marked'
|
|
35
|
+
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
content: { type: String, default: '' },
|
|
38
|
+
loading: { type: Boolean, default: false },
|
|
39
|
+
selectedFile: { type: Object, default: null }
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const isModalOpen = ref(false)
|
|
43
|
+
|
|
44
|
+
marked.setOptions({
|
|
45
|
+
breaks: true,
|
|
46
|
+
gfm: true
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
watch(() => props.selectedFile?.path, () => {
|
|
50
|
+
isModalOpen.value = false
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const fileTitle = computed(() => {
|
|
54
|
+
return props.selectedFile?.title || props.selectedFile?.name || '文档'
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const renderedContent = computed(() => {
|
|
58
|
+
if (!props.content) return ''
|
|
59
|
+
return marked.parse(props.content)
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style scoped>
|
|
64
|
+
.doc-preview-shell {
|
|
65
|
+
height: 100%;
|
|
66
|
+
min-height: 0;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
background: #FFFFFF;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.doc-empty {
|
|
73
|
+
height: 100%;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
padding: 24px;
|
|
78
|
+
text-align: center;
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
color: #636366;
|
|
81
|
+
font-family: 'JetBrains Mono', monospace;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.doc-toolbar {
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
gap: 12px;
|
|
90
|
+
padding: 10px 14px;
|
|
91
|
+
border-bottom: 1px solid #F0F0F3;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.doc-title {
|
|
95
|
+
min-width: 0;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
color: #1C1C1E;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.doc-preview-scroll {
|
|
105
|
+
flex: 1;
|
|
106
|
+
min-height: 0;
|
|
107
|
+
overflow: auto;
|
|
108
|
+
padding: 14px 16px 22px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.doc-modal-body {
|
|
112
|
+
max-height: min(72vh, 760px);
|
|
113
|
+
overflow: auto;
|
|
114
|
+
padding-right: 4px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.doc-preview {
|
|
118
|
+
font-size: 13px;
|
|
119
|
+
line-height: 1.7;
|
|
120
|
+
color: #374151;
|
|
121
|
+
overflow-wrap: anywhere;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.doc-preview-large {
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
line-height: 1.75;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.doc-preview :deep(h1) {
|
|
130
|
+
color: #D97706;
|
|
131
|
+
font-size: 18px;
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
margin: 0 0 16px;
|
|
134
|
+
border-bottom: 1px solid #E5E5EA;
|
|
135
|
+
padding-bottom: 8px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.doc-preview-large :deep(h1) {
|
|
139
|
+
font-size: 22px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.doc-preview :deep(h2) {
|
|
143
|
+
color: #1C1C1E;
|
|
144
|
+
font-size: 15px;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
margin: 20px 0 10px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.doc-preview-large :deep(h2) {
|
|
150
|
+
font-size: 17px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.doc-preview :deep(h3) {
|
|
154
|
+
color: #D97706;
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
margin: 16px 0 8px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.doc-preview :deep(p) {
|
|
161
|
+
margin: 8px 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.doc-preview :deep(strong) {
|
|
165
|
+
color: #1C1C1E;
|
|
166
|
+
font-weight: 600;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.doc-preview :deep(a) {
|
|
170
|
+
color: #D97706;
|
|
171
|
+
text-decoration: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.doc-preview :deep(a:hover) {
|
|
175
|
+
text-decoration: underline;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.doc-preview :deep(code) {
|
|
179
|
+
background: #E5E5EA;
|
|
180
|
+
color: #1C1C1E;
|
|
181
|
+
padding: 1px 5px;
|
|
182
|
+
border-radius: 3px;
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
font-family: 'JetBrains Mono', monospace;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.doc-preview :deep(pre) {
|
|
188
|
+
background: #1C1C1E;
|
|
189
|
+
color: #E5E5E7;
|
|
190
|
+
border: 1px solid #E5E5EA;
|
|
191
|
+
border-radius: 6px;
|
|
192
|
+
padding: 12px 16px;
|
|
193
|
+
overflow-x: auto;
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
margin: 8px 0;
|
|
196
|
+
line-height: 1.5;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.doc-preview :deep(pre code) {
|
|
200
|
+
background: none;
|
|
201
|
+
color: inherit;
|
|
202
|
+
padding: 0;
|
|
203
|
+
border-radius: 0;
|
|
204
|
+
font-size: inherit;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.doc-preview :deep(ul),
|
|
208
|
+
.doc-preview :deep(ol) {
|
|
209
|
+
padding-left: 20px;
|
|
210
|
+
margin: 8px 0;
|
|
211
|
+
color: #374151;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.doc-preview :deep(li) {
|
|
215
|
+
margin: 4px 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.doc-preview :deep(blockquote) {
|
|
219
|
+
border-left: 3px solid #D97706;
|
|
220
|
+
padding-left: 12px;
|
|
221
|
+
margin: 12px 0;
|
|
222
|
+
color: #636366;
|
|
223
|
+
font-style: italic;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.doc-preview :deep(table) {
|
|
227
|
+
width: 100%;
|
|
228
|
+
border-collapse: collapse;
|
|
229
|
+
margin: 12px 0;
|
|
230
|
+
font-size: 12px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.doc-preview :deep(thead th) {
|
|
234
|
+
background: #F0F0F3;
|
|
235
|
+
color: #1C1C1E;
|
|
236
|
+
font-weight: 600;
|
|
237
|
+
text-align: left;
|
|
238
|
+
padding: 8px 12px;
|
|
239
|
+
border: 1px solid #E5E5EA;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.doc-preview :deep(tbody td) {
|
|
243
|
+
padding: 6px 12px;
|
|
244
|
+
border: 1px solid #E5E5EA;
|
|
245
|
+
color: #374151;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.doc-preview :deep(tbody tr:hover) {
|
|
249
|
+
background: #F9FAFB;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.doc-preview :deep(hr) {
|
|
253
|
+
border: none;
|
|
254
|
+
border-top: 1px solid #E5E5EA;
|
|
255
|
+
margin: 16px 0;
|
|
256
|
+
}
|
|
257
|
+
</style>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-tree">
|
|
3
|
+
<div class="doc-tree-search">
|
|
4
|
+
<n-input
|
|
5
|
+
v-model:value="query"
|
|
6
|
+
size="small"
|
|
7
|
+
clearable
|
|
8
|
+
placeholder="搜索文档"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<n-empty v-if="groups.length === 0" description="暂无文档" style="margin: auto;" />
|
|
13
|
+
<n-empty v-else-if="treeData.length === 0" description="无匹配文档" style="margin: auto;" />
|
|
14
|
+
<n-tree
|
|
15
|
+
v-else
|
|
16
|
+
class="doc-tree-list"
|
|
17
|
+
:data="treeData"
|
|
18
|
+
:selected-keys="selectedKeys"
|
|
19
|
+
:default-expand-all="true"
|
|
20
|
+
selectable
|
|
21
|
+
block-line
|
|
22
|
+
@update:selected-keys="handleSelect"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed, ref } from 'vue'
|
|
29
|
+
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
groups: { type: Array, default: () => [] },
|
|
32
|
+
selectedFile: { type: Object, default: null }
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits(['select-file'])
|
|
36
|
+
const query = ref('')
|
|
37
|
+
|
|
38
|
+
const selectedKeys = computed(() => {
|
|
39
|
+
return props.selectedFile?.path ? [props.selectedFile.path] : []
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const groupIcons = {
|
|
43
|
+
design: '📋',
|
|
44
|
+
plan: '🧾',
|
|
45
|
+
archive: '📦',
|
|
46
|
+
changes: '⚙️',
|
|
47
|
+
scan: '🔍',
|
|
48
|
+
quicklog: '⚡'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const treeData = computed(() => {
|
|
52
|
+
const keyword = query.value.trim().toLowerCase()
|
|
53
|
+
|
|
54
|
+
return props.groups
|
|
55
|
+
.map(group => {
|
|
56
|
+
const groupLabel = group.project ? `${group.label} (${group.project})` : group.label
|
|
57
|
+
const groupMatched = !keyword || groupLabel.toLowerCase().includes(keyword)
|
|
58
|
+
const files = group.files.filter(file => {
|
|
59
|
+
if (groupMatched) return true
|
|
60
|
+
return `${file.title || ''} ${file.name || ''}`.toLowerCase().includes(keyword)
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
if (files.length === 0) return null
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
key: `group-${group.key}`,
|
|
67
|
+
label: groupLabel,
|
|
68
|
+
prefix: () => groupIcons[group.key] || '📄',
|
|
69
|
+
children: files.map(file => ({
|
|
70
|
+
key: file.path,
|
|
71
|
+
label: file.title || file.name,
|
|
72
|
+
prefix: () => '📄',
|
|
73
|
+
data: file
|
|
74
|
+
}))
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
.filter(Boolean)
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
function handleSelect(keys, option) {
|
|
81
|
+
if (option?.[0]?.data) {
|
|
82
|
+
emit('select-file', option[0].data)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<style scoped>
|
|
88
|
+
.doc-tree {
|
|
89
|
+
height: 100%;
|
|
90
|
+
min-height: 0;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
background: #FFFFFF;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.doc-tree-search {
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
padding: 10px 12px 8px;
|
|
99
|
+
border-bottom: 1px solid #F0F0F3;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.doc-tree-list {
|
|
103
|
+
flex: 1;
|
|
104
|
+
min-height: 0;
|
|
105
|
+
overflow: auto;
|
|
106
|
+
padding: 8px 12px 14px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.doc-tree-list :deep(.n-tree-node-content__text) {
|
|
110
|
+
white-space: normal;
|
|
111
|
+
line-height: 1.35;
|
|
112
|
+
overflow-wrap: anywhere;
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="h-resize-handle"
|
|
4
|
+
:class="{ 'dragging': isDragging }"
|
|
5
|
+
@mousedown="handleMouseDown"
|
|
6
|
+
></div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
isDragging: { type: Boolean, default: false },
|
|
12
|
+
colIndex: { type: Number, required: true }
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const emit = defineEmits(['drag-start', 'drag-end', 'resize'])
|
|
16
|
+
|
|
17
|
+
function handleMouseDown(e) {
|
|
18
|
+
e.preventDefault()
|
|
19
|
+
emit('drag-start', { type: 'horizontal', colIndex: props.colIndex, startX: e.clientX })
|
|
20
|
+
|
|
21
|
+
const onMove = (ev) => {
|
|
22
|
+
emit('resize', { deltaX: ev.clientX - e.clientX })
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const onUp = () => {
|
|
26
|
+
emit('drag-end')
|
|
27
|
+
window.removeEventListener('mousemove', onMove)
|
|
28
|
+
window.removeEventListener('mouseup', onUp)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
window.addEventListener('mousemove', onMove)
|
|
32
|
+
window.addEventListener('mouseup', onUp)
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
.h-resize-handle {
|
|
38
|
+
width: 4px;
|
|
39
|
+
background: #E5E7EB;
|
|
40
|
+
cursor: col-resize;
|
|
41
|
+
transition: background 0.2s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.h-resize-handle:hover,
|
|
45
|
+
.h-resize-handle.dragging {
|
|
46
|
+
background: #D97706;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -1,51 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex flex-col h-full" style="background: #
|
|
2
|
+
<div class="flex flex-col h-full" style="background: #F5F5F7;">
|
|
3
3
|
<!-- Header -->
|
|
4
|
-
<div class="px-3 py-2 flex items-center gap-2" style="border-bottom: 1px solid #
|
|
5
|
-
<input
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
style="background: #141416; border: 1px solid #1F1F22; color: #8B8B8E;"
|
|
11
|
-
/>
|
|
12
|
-
<button
|
|
13
|
-
@click="clearLogs"
|
|
14
|
-
class="px-2 py-1 text-[10px] rounded-sm transition-colors duration-100"
|
|
15
|
-
style="color: #525252; border: 1px solid #1F1F22;"
|
|
16
|
-
>
|
|
17
|
-
clear
|
|
18
|
-
</button>
|
|
19
|
-
<button
|
|
20
|
-
@click="toggleAutoScroll"
|
|
21
|
-
class="px-2 py-1 text-[10px] rounded-sm font-mono-log transition-colors duration-100"
|
|
22
|
-
:style="{
|
|
23
|
-
color: autoScroll ? '#FBBF24' : '#525252',
|
|
24
|
-
background: autoScroll ? 'rgba(251,191,36,0.08)' : 'transparent',
|
|
25
|
-
border: autoScroll ? '1px solid rgba(251,191,36,0.2)' : '1px solid #1F1F22'
|
|
26
|
-
}"
|
|
27
|
-
>
|
|
28
|
-
{{ autoScroll ? 'auto' : 'pause' }}
|
|
29
|
-
</button>
|
|
4
|
+
<div class="px-3 py-2 flex items-center gap-2" style="border-bottom: 1px solid #F0F0F3;">
|
|
5
|
+
<n-input v-model:value="searchQuery" size="tiny" placeholder="过滤日志..." clearable style="flex: 1;" />
|
|
6
|
+
<n-button size="tiny" @click="clearLogs">清空</n-button>
|
|
7
|
+
<n-button size="tiny" :type="autoScroll ? 'primary' : 'default'" @click="toggleAutoScroll">
|
|
8
|
+
{{ autoScroll ? '自动' : '暂停' }}
|
|
9
|
+
</n-button>
|
|
30
10
|
</div>
|
|
31
11
|
|
|
32
12
|
<!-- Log output -->
|
|
33
|
-
<div ref="logContainer" class="flex-1 overflow-y-auto px-2 py-1.5 font-mono-log text-[10px]" style="background: #
|
|
13
|
+
<div ref="logContainer" class="flex-1 overflow-y-auto px-2 py-1.5 font-mono-log text-[10px]" style="background: #F0F0F3;" @scroll="handleScroll">
|
|
34
14
|
<div v-if="filteredLogs.length === 0" class="flex items-center justify-center h-full">
|
|
35
|
-
<span class="font-mono-log" style="color: #
|
|
15
|
+
<span class="font-mono-log" style="color: #E5E5EA;">{{ logs.length === 0 ? '暂无日志' : '无匹配' }}</span>
|
|
36
16
|
</div>
|
|
37
17
|
<div v-else class="space-y-px">
|
|
38
18
|
<div v-for="log in filteredLogs" :key="log.id" class="px-1.5 py-px rounded-sm" :style="{ background: logBg(log.type) }">
|
|
39
|
-
<span style="color: #
|
|
19
|
+
<span style="color: #D1D1D6;" class="select-none">[{{ formatTime(log.timestamp) }}]</span>
|
|
40
20
|
<span :style="{ color: logColor(log.type) }">{{ escapeHtml(log.content) }}</span>
|
|
41
21
|
</div>
|
|
42
22
|
</div>
|
|
43
23
|
</div>
|
|
44
24
|
|
|
45
25
|
<!-- Footer -->
|
|
46
|
-
<div class="px-3 py-1 flex items-center justify-between text-[9px] font-mono-log" style="border-top: 1px solid #
|
|
26
|
+
<div class="px-3 py-1 flex items-center justify-between text-[9px] font-mono-log" style="border-top: 1px solid #F0F0F3; background: #F5F5F7; color: #D1D1D6;">
|
|
47
27
|
<span>{{ filteredLogs.length }}/{{ logs.length }}</span>
|
|
48
|
-
<span v-if="!autoScroll" style="color: #
|
|
28
|
+
<span v-if="!autoScroll" style="color: #EA580C;">已暂停</span>
|
|
49
29
|
</div>
|
|
50
30
|
</div>
|
|
51
31
|
</template>
|
|
@@ -69,7 +49,7 @@ const filteredLogs = computed(() => {
|
|
|
69
49
|
function formatTime(ts) { if (!ts) return ''; const d = new Date(ts); return d.toLocaleTimeString('zh-CN', { hour12: false }) }
|
|
70
50
|
function escapeHtml(t) { if (!t) return ''; return t.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>') }
|
|
71
51
|
function logBg(t) { return t === 'error' ? 'rgba(239,68,68,0.05)' : t === 'warn' ? 'rgba(251,146,60,0.05)' : 'transparent' }
|
|
72
|
-
function logColor(t) { return t === 'error' ? '#
|
|
52
|
+
function logColor(t) { return t === 'error' ? '#DC2626' : t === 'warn' ? '#EA580C' : t === 'debug' ? '#6B7280' : '#636366' }
|
|
73
53
|
function clearLogs() { emit('clear') }
|
|
74
54
|
function toggleAutoScroll() { autoScroll.value = !autoScroll.value; if (autoScroll.value) scrollToBottom() }
|
|
75
55
|
function handleScroll() {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<div class="flex items-center gap-2.5 mb-3">
|
|
17
17
|
<span
|
|
18
18
|
class="text-[12px] font-semibold font-[JetBrains_Mono,monospace] tracking-tight"
|
|
19
|
-
:style="{ color: isActive ? '#
|
|
19
|
+
:style="{ color: isActive ? '#D97706' : '#1C1C1E' }"
|
|
20
20
|
>
|
|
21
21
|
{{ title }}
|
|
22
22
|
</span>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<!-- Steps -->
|
|
27
27
|
<div class="space-y-1">
|
|
28
|
-
<div v-if="steps.length === 0" class="text-[11px] italic py-1" style="color: #
|
|
28
|
+
<div v-if="steps.length === 0" class="text-[11px] italic py-1" style="color: #6B7280;">
|
|
29
29
|
No steps yet
|
|
30
30
|
</div>
|
|
31
31
|
<StepCard
|
|
@@ -58,13 +58,13 @@ const props = defineProps({
|
|
|
58
58
|
const emit = defineEmits(['select-step'])
|
|
59
59
|
|
|
60
60
|
const nodeStyle = computed(() => {
|
|
61
|
-
if (props.isActive) return { background: '#
|
|
61
|
+
if (props.isActive) return { background: '#D97706', boxShadow: '0 0 8px rgba(251,191,36,0.4)' }
|
|
62
62
|
const colors = {
|
|
63
|
-
'completed': '#
|
|
64
|
-
'in-progress': '#
|
|
65
|
-
'blocked': '#
|
|
66
|
-
'failed': '#
|
|
67
|
-
'pending': '#
|
|
63
|
+
'completed': '#16A34A',
|
|
64
|
+
'in-progress': '#D97706',
|
|
65
|
+
'blocked': '#EA580C',
|
|
66
|
+
'failed': '#DC2626',
|
|
67
|
+
'pending': '#E5E5EA'
|
|
68
68
|
}
|
|
69
69
|
return { background: colors[props.status] || colors.pending }
|
|
70
70
|
})
|