zen-gitsync 2.13.10 → 2.13.11
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/README.md +32 -5
- package/package.json +2 -1
- package/scripts/README_COLOR_CONVERTER.md +196 -196
- package/scripts/README_FONTSIZE_CONVERTER.md +278 -278
- package/scripts/README_SPACING_CONVERTER.md +126 -126
- package/scripts/README_STYLE_VARS.md +180 -180
- package/scripts/dev-ping.cjs +61 -0
- package/src/ui/public/assets/EditorView-CdNgAtwl.js +0 -0
- package/src/ui/public/assets/SourceMapView-DsL2l02A.js +3 -0
- package/src/ui/public/assets/WorkbenchView-D0eGFIZx.js +6 -0
- package/src/ui/public/assets/WorkbenchView-DCGi3Ef1.css +1 -0
- package/src/ui/public/assets/__vite-optional-peer-dep_katex_markstream-vue-Bg9-FXxr.js +1 -0
- package/src/ui/public/assets/__vite-optional-peer-dep_mermaid_markstream-vue-cPZl55sA.js +1 -0
- package/src/ui/public/assets/__vite-optional-peer-dep_stream-markdown_markstream-vue-Dhgp-lRL.js +1 -0
- package/src/ui/public/assets/__vite-optional-peer-dep_stream-monaco_markstream-vue-Cr1d6De7.js +1 -0
- package/src/ui/public/assets/{_plugin-vue_export-helper-rin5I4Hu.js → _plugin-vue_export-helper-CNd9lWx2.js} +3 -3
- package/src/ui/public/assets/d2_markstream-vue-xMoF3M5G.js +1 -0
- package/src/ui/public/assets/index-CrcxldZ2.css +1 -0
- package/src/ui/public/assets/index-DvRkCEGg.js +66 -0
- package/src/ui/public/assets/mhchem_markstream-vue-tp86PqxG.js +1 -0
- package/src/ui/public/assets/vendor-CgFFAa1w.js +1508 -0
- package/src/ui/public/assets/{vendor-Bq2rS2vY.css → vendor-irUC_mD1.css} +1 -1
- package/src/ui/public/favicon.svg +75 -75
- package/src/ui/public/index.html +22 -22
- package/src/ui/public/logo.svg +74 -74
- package/src/ui/server/routes/npm.js +11 -0
- package/src/ui/server/routes/workbench.js +29 -0
- package/src/ui/public/assets/EditorView-B4g8XOLB.js +0 -0
- package/src/ui/public/assets/SourceMapView-BVfD3VYO.js +0 -3
- package/src/ui/public/assets/WorkbenchView-Cx2p-WGc.js +0 -6
- package/src/ui/public/assets/WorkbenchView-_Z4j_RIa.css +0 -1
- package/src/ui/public/assets/index-8cDK0aD_.js +0 -66
- package/src/ui/public/assets/index-CmMxt1ti.css +0 -1
- package/src/ui/public/assets/vendor-C30huq-U.js +0 -1350
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<defs>
|
|
3
|
-
<radialGradient id="bgGrad" cx="38%" cy="32%" r="70%">
|
|
4
|
-
<stop offset="0%" stop-color="#1e1b4b"/>
|
|
5
|
-
<stop offset="100%" stop-color="#0d0b1e"/>
|
|
6
|
-
</radialGradient>
|
|
7
|
-
<linearGradient id="mainGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
8
|
-
<stop offset="0%" stop-color="#c4b5fd"/>
|
|
9
|
-
<stop offset="100%" stop-color="#7c3aed"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
<linearGradient id="featGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
12
|
-
<stop offset="0%" stop-color="#7dd3fc"/>
|
|
13
|
-
<stop offset="100%" stop-color="#0284c7"/>
|
|
14
|
-
</linearGradient>
|
|
15
|
-
<filter id="glow" x="-40%" y="-40%" width="180%" height="180%">
|
|
16
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="2.5" result="blur"/>
|
|
17
|
-
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
18
|
-
</filter>
|
|
19
|
-
<filter id="softGlow" x="-20%" y="-20%" width="140%" height="140%">
|
|
20
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="1.5" result="blur"/>
|
|
21
|
-
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
-
</filter>
|
|
23
|
-
</defs>
|
|
24
|
-
|
|
25
|
-
<!-- 背景圆 -->
|
|
26
|
-
<circle cx="100" cy="100" r="96" fill="url(#bgGrad)"/>
|
|
27
|
-
|
|
28
|
-
<!-- 同步外弧(上半,代表 sync 循环) -->
|
|
29
|
-
<path d="M 100,20 A 80,80 0 1,1 36,153"
|
|
30
|
-
stroke="rgba(167,139,250,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
31
|
-
<!-- 同步外弧(下半) -->
|
|
32
|
-
<path d="M 36,153 A 80,80 0 0,1 164,153"
|
|
33
|
-
stroke="rgba(56,189,248,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
34
|
-
<!-- 同步箭头(上) -->
|
|
35
|
-
<path d="M 91,17 L 100,20 L 96,29"
|
|
36
|
-
stroke="rgba(167,139,250,0.55)" stroke-width="2.5" fill="none"
|
|
37
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
-
<!-- 同步箭头(下) -->
|
|
39
|
-
<path d="M 163,145 L 164,154 L 155,151"
|
|
40
|
-
stroke="rgba(56,189,248,0.55)" stroke-width="2.5" fill="none"
|
|
41
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
-
|
|
43
|
-
<!-- 主分支竖线 -->
|
|
44
|
-
<line x1="76" y1="44" x2="76" y2="156"
|
|
45
|
-
stroke="url(#mainGrad)" stroke-width="5.5" stroke-linecap="round"
|
|
46
|
-
filter="url(#softGlow)"/>
|
|
47
|
-
|
|
48
|
-
<!-- 特性分支曲线(分出) -->
|
|
49
|
-
<path d="M 76,80 C 98,80 130,96 130,120 L 130,140"
|
|
50
|
-
stroke="url(#featGrad)" stroke-width="4.5" fill="none"
|
|
51
|
-
stroke-linecap="round" filter="url(#softGlow)"/>
|
|
52
|
-
<!-- 特性分支合并回主分支 -->
|
|
53
|
-
<path d="M 130,140 C 130,156 105,159 76,155"
|
|
54
|
-
stroke="url(#featGrad)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
55
|
-
|
|
56
|
-
<!-- 主分支节点 -->
|
|
57
|
-
<circle cx="76" cy="48" r="11" fill="#13103a" stroke="#c4b5fd" stroke-width="3" filter="url(#glow)"/>
|
|
58
|
-
<circle cx="76" cy="48" r="5" fill="#ddd6fe"/>
|
|
59
|
-
|
|
60
|
-
<circle cx="76" cy="84" r="11" fill="#13103a" stroke="#a78bfa" stroke-width="3"/>
|
|
61
|
-
<circle cx="76" cy="84" r="5" fill="#c4b5fd"/>
|
|
62
|
-
|
|
63
|
-
<circle cx="76" cy="120" r="11" fill="#13103a" stroke="#8b5cf6" stroke-width="3"/>
|
|
64
|
-
<circle cx="76" cy="120" r="5" fill="#a78bfa"/>
|
|
65
|
-
|
|
66
|
-
<circle cx="76" cy="155" r="11" fill="#13103a" stroke="#7c3aed" stroke-width="3" filter="url(#glow)"/>
|
|
67
|
-
<circle cx="76" cy="155" r="5" fill="#8b5cf6"/>
|
|
68
|
-
|
|
69
|
-
<!-- 特性分支节点 -->
|
|
70
|
-
<circle cx="130" cy="115" r="11" fill="#13103a" stroke="#38bdf8" stroke-width="3" filter="url(#glow)"/>
|
|
71
|
-
<circle cx="130" cy="115" r="5" fill="#7dd3fc"/>
|
|
72
|
-
|
|
73
|
-
<circle cx="130" cy="143" r="11" fill="#13103a" stroke="#0ea5e9" stroke-width="3" filter="url(#glow)"/>
|
|
74
|
-
<circle cx="130" cy="143" r="5" fill="#38bdf8"/>
|
|
75
|
-
</svg>
|
|
1
|
+
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<defs>
|
|
3
|
+
<radialGradient id="bgGrad" cx="38%" cy="32%" r="70%">
|
|
4
|
+
<stop offset="0%" stop-color="#1e1b4b"/>
|
|
5
|
+
<stop offset="100%" stop-color="#0d0b1e"/>
|
|
6
|
+
</radialGradient>
|
|
7
|
+
<linearGradient id="mainGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
8
|
+
<stop offset="0%" stop-color="#c4b5fd"/>
|
|
9
|
+
<stop offset="100%" stop-color="#7c3aed"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="featGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
12
|
+
<stop offset="0%" stop-color="#7dd3fc"/>
|
|
13
|
+
<stop offset="100%" stop-color="#0284c7"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<filter id="glow" x="-40%" y="-40%" width="180%" height="180%">
|
|
16
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="2.5" result="blur"/>
|
|
17
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
18
|
+
</filter>
|
|
19
|
+
<filter id="softGlow" x="-20%" y="-20%" width="140%" height="140%">
|
|
20
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="1.5" result="blur"/>
|
|
21
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
+
</filter>
|
|
23
|
+
</defs>
|
|
24
|
+
|
|
25
|
+
<!-- 背景圆 -->
|
|
26
|
+
<circle cx="100" cy="100" r="96" fill="url(#bgGrad)"/>
|
|
27
|
+
|
|
28
|
+
<!-- 同步外弧(上半,代表 sync 循环) -->
|
|
29
|
+
<path d="M 100,20 A 80,80 0 1,1 36,153"
|
|
30
|
+
stroke="rgba(167,139,250,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
31
|
+
<!-- 同步外弧(下半) -->
|
|
32
|
+
<path d="M 36,153 A 80,80 0 0,1 164,153"
|
|
33
|
+
stroke="rgba(56,189,248,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
34
|
+
<!-- 同步箭头(上) -->
|
|
35
|
+
<path d="M 91,17 L 100,20 L 96,29"
|
|
36
|
+
stroke="rgba(167,139,250,0.55)" stroke-width="2.5" fill="none"
|
|
37
|
+
stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
+
<!-- 同步箭头(下) -->
|
|
39
|
+
<path d="M 163,145 L 164,154 L 155,151"
|
|
40
|
+
stroke="rgba(56,189,248,0.55)" stroke-width="2.5" fill="none"
|
|
41
|
+
stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
+
|
|
43
|
+
<!-- 主分支竖线 -->
|
|
44
|
+
<line x1="76" y1="44" x2="76" y2="156"
|
|
45
|
+
stroke="url(#mainGrad)" stroke-width="5.5" stroke-linecap="round"
|
|
46
|
+
filter="url(#softGlow)"/>
|
|
47
|
+
|
|
48
|
+
<!-- 特性分支曲线(分出) -->
|
|
49
|
+
<path d="M 76,80 C 98,80 130,96 130,120 L 130,140"
|
|
50
|
+
stroke="url(#featGrad)" stroke-width="4.5" fill="none"
|
|
51
|
+
stroke-linecap="round" filter="url(#softGlow)"/>
|
|
52
|
+
<!-- 特性分支合并回主分支 -->
|
|
53
|
+
<path d="M 130,140 C 130,156 105,159 76,155"
|
|
54
|
+
stroke="url(#featGrad)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
55
|
+
|
|
56
|
+
<!-- 主分支节点 -->
|
|
57
|
+
<circle cx="76" cy="48" r="11" fill="#13103a" stroke="#c4b5fd" stroke-width="3" filter="url(#glow)"/>
|
|
58
|
+
<circle cx="76" cy="48" r="5" fill="#ddd6fe"/>
|
|
59
|
+
|
|
60
|
+
<circle cx="76" cy="84" r="11" fill="#13103a" stroke="#a78bfa" stroke-width="3"/>
|
|
61
|
+
<circle cx="76" cy="84" r="5" fill="#c4b5fd"/>
|
|
62
|
+
|
|
63
|
+
<circle cx="76" cy="120" r="11" fill="#13103a" stroke="#8b5cf6" stroke-width="3"/>
|
|
64
|
+
<circle cx="76" cy="120" r="5" fill="#a78bfa"/>
|
|
65
|
+
|
|
66
|
+
<circle cx="76" cy="155" r="11" fill="#13103a" stroke="#7c3aed" stroke-width="3" filter="url(#glow)"/>
|
|
67
|
+
<circle cx="76" cy="155" r="5" fill="#8b5cf6"/>
|
|
68
|
+
|
|
69
|
+
<!-- 特性分支节点 -->
|
|
70
|
+
<circle cx="130" cy="115" r="11" fill="#13103a" stroke="#38bdf8" stroke-width="3" filter="url(#glow)"/>
|
|
71
|
+
<circle cx="130" cy="115" r="5" fill="#7dd3fc"/>
|
|
72
|
+
|
|
73
|
+
<circle cx="130" cy="143" r="11" fill="#13103a" stroke="#0ea5e9" stroke-width="3" filter="url(#glow)"/>
|
|
74
|
+
<circle cx="130" cy="143" r="5" fill="#38bdf8"/>
|
|
75
|
+
</svg>
|
package/src/ui/public/index.html
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN" translate="no">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="google" content="notranslate" />
|
|
6
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
-
<title>Zen GitSync</title>
|
|
9
|
-
<!-- Premium fonts: Plus Jakarta Sans (UI) + JetBrains Mono (code) -->
|
|
10
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
-
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN" translate="no">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="google" content="notranslate" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<title>Zen GitSync</title>
|
|
9
|
+
<!-- Premium fonts: Plus Jakarta Sans (UI) + JetBrains Mono (code) -->
|
|
10
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
+
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DvRkCEGg.js"></script>
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-CMxvf4Kt.js">
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/vendor-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
19
|
-
</head>
|
|
20
|
-
<body>
|
|
21
|
-
<div id="app"></div>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-CgFFAa1w.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-CNd9lWx2.js">
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/vendor-irUC_mD1.css">
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CrcxldZ2.css">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="app"></div>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
package/src/ui/public/logo.svg
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<defs>
|
|
3
|
-
<radialGradient id="bgGrad" cx="38%" cy="32%" r="70%">
|
|
4
|
-
<stop offset="0%" stop-color="#1e1b4b"/>
|
|
5
|
-
<stop offset="100%" stop-color="#0d0b1e"/>
|
|
6
|
-
</radialGradient>
|
|
7
|
-
<linearGradient id="mainGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
8
|
-
<stop offset="0%" stop-color="#c4b5fd"/>
|
|
9
|
-
<stop offset="100%" stop-color="#7c3aed"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
<linearGradient id="featGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
12
|
-
<stop offset="0%" stop-color="#7dd3fc"/>
|
|
13
|
-
<stop offset="100%" stop-color="#0284c7"/>
|
|
14
|
-
</linearGradient>
|
|
15
|
-
<filter id="glow" x="-40%" y="-40%" width="180%" height="180%">
|
|
16
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="2.5" result="blur"/>
|
|
17
|
-
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
18
|
-
</filter>
|
|
19
|
-
<filter id="softGlow" x="-20%" y="-20%" width="140%" height="140%">
|
|
20
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="1.5" result="blur"/>
|
|
21
|
-
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
-
</filter>
|
|
23
|
-
</defs>
|
|
24
|
-
|
|
25
|
-
<!-- 背景�?-->
|
|
26
|
-
<circle cx="100" cy="100" r="96" fill="url(#bgGrad)"/>
|
|
27
|
-
|
|
28
|
-
<!-- 同步外弧(上半,代表 sync 循环�?-->
|
|
29
|
-
<path d="M 100,20 A 80,80 0 1,1 36,153"
|
|
30
|
-
stroke="rgba(167,139,250,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
31
|
-
<!-- 同步外弧(下半) -->
|
|
32
|
-
<path d="M 36,153 A 80,80 0 0,1 164,153"
|
|
33
|
-
stroke="rgba(56,189,248,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
34
|
-
<!-- 同步箭头(上�?-->
|
|
35
|
-
<path d="M 91,17 L 100,20 L 96,29"
|
|
36
|
-
stroke="rgba(167,139,250,0.55)" stroke-width="2.5" fill="none"
|
|
37
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
-
<!-- 同步箭头(下�?-->
|
|
39
|
-
<path d="M 163,145 L 164,154 L 155,151"
|
|
40
|
-
stroke="rgba(56,189,248,0.55)" stroke-width="2.5" fill="none"
|
|
41
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
-
|
|
43
|
-
<!-- 主分支竖�?-->
|
|
44
|
-
<line x1="76" y1="44" x2="76" y2="156"
|
|
45
|
-
stroke="url(#mainGrad)" stroke-width="5.5" stroke-linecap="round"
|
|
46
|
-
filter="url(#softGlow)"/>
|
|
47
|
-
|
|
48
|
-
<!-- 特性分支曲线(分出�?-->
|
|
49
|
-
<path d="M 76,80 C 98,80 130,96 130,120 L 130,140"
|
|
50
|
-
stroke="url(#featGrad)" stroke-width="4.5" fill="none"
|
|
51
|
-
stroke-linecap="round" filter="url(#softGlow)"/>
|
|
52
|
-
<!-- 特性分支合并回主分�?-->
|
|
53
|
-
<path d="M 130,140 C 130,156 105,159 76,155"
|
|
54
|
-
stroke="url(#featGrad)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
55
|
-
|
|
56
|
-
<!-- 主分支节�?-->
|
|
57
|
-
<circle cx="76" cy="48" r="11" fill="#13103a" stroke="#c4b5fd" stroke-width="3" filter="url(#glow)"/>
|
|
58
|
-
<circle cx="76" cy="48" r="5" fill="#ddd6fe"/>
|
|
59
|
-
|
|
60
|
-
<circle cx="76" cy="84" r="11" fill="#13103a" stroke="#a78bfa" stroke-width="3"/>
|
|
61
|
-
<circle cx="76" cy="84" r="5" fill="#c4b5fd"/>
|
|
62
|
-
|
|
63
|
-
<circle cx="76" cy="120" r="11" fill="#13103a" stroke="#8b5cf6" stroke-width="3"/>
|
|
64
|
-
<circle cx="76" cy="120" r="5" fill="#a78bfa"/>
|
|
65
|
-
|
|
66
|
-
<circle cx="76" cy="155" r="11" fill="#13103a" stroke="#7c3aed" stroke-width="3" filter="url(#glow)"/>
|
|
67
|
-
<circle cx="76" cy="155" r="5" fill="#8b5cf6"/>
|
|
68
|
-
|
|
69
|
-
<!-- 特性分支节�?-->
|
|
70
|
-
<circle cx="130" cy="115" r="11" fill="#13103a" stroke="#38bdf8" stroke-width="3" filter="url(#glow)"/>
|
|
71
|
-
<circle cx="130" cy="115" r="5" fill="#7dd3fc"/>
|
|
72
|
-
|
|
73
|
-
<circle cx="130" cy="143" r="11" fill="#13103a" stroke="#0ea5e9" stroke-width="3" filter="url(#glow)"/>
|
|
74
|
-
<circle cx="130" cy="143" r="5" fill="#38bdf8"/>
|
|
1
|
+
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<defs>
|
|
3
|
+
<radialGradient id="bgGrad" cx="38%" cy="32%" r="70%">
|
|
4
|
+
<stop offset="0%" stop-color="#1e1b4b"/>
|
|
5
|
+
<stop offset="100%" stop-color="#0d0b1e"/>
|
|
6
|
+
</radialGradient>
|
|
7
|
+
<linearGradient id="mainGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
8
|
+
<stop offset="0%" stop-color="#c4b5fd"/>
|
|
9
|
+
<stop offset="100%" stop-color="#7c3aed"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="featGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
12
|
+
<stop offset="0%" stop-color="#7dd3fc"/>
|
|
13
|
+
<stop offset="100%" stop-color="#0284c7"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<filter id="glow" x="-40%" y="-40%" width="180%" height="180%">
|
|
16
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="2.5" result="blur"/>
|
|
17
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
18
|
+
</filter>
|
|
19
|
+
<filter id="softGlow" x="-20%" y="-20%" width="140%" height="140%">
|
|
20
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="1.5" result="blur"/>
|
|
21
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
+
</filter>
|
|
23
|
+
</defs>
|
|
24
|
+
|
|
25
|
+
<!-- 背景�?-->
|
|
26
|
+
<circle cx="100" cy="100" r="96" fill="url(#bgGrad)"/>
|
|
27
|
+
|
|
28
|
+
<!-- 同步外弧(上半,代表 sync 循环�?-->
|
|
29
|
+
<path d="M 100,20 A 80,80 0 1,1 36,153"
|
|
30
|
+
stroke="rgba(167,139,250,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
31
|
+
<!-- 同步外弧(下半) -->
|
|
32
|
+
<path d="M 36,153 A 80,80 0 0,1 164,153"
|
|
33
|
+
stroke="rgba(56,189,248,0.18)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
34
|
+
<!-- 同步箭头(上�?-->
|
|
35
|
+
<path d="M 91,17 L 100,20 L 96,29"
|
|
36
|
+
stroke="rgba(167,139,250,0.55)" stroke-width="2.5" fill="none"
|
|
37
|
+
stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
+
<!-- 同步箭头(下�?-->
|
|
39
|
+
<path d="M 163,145 L 164,154 L 155,151"
|
|
40
|
+
stroke="rgba(56,189,248,0.55)" stroke-width="2.5" fill="none"
|
|
41
|
+
stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
+
|
|
43
|
+
<!-- 主分支竖�?-->
|
|
44
|
+
<line x1="76" y1="44" x2="76" y2="156"
|
|
45
|
+
stroke="url(#mainGrad)" stroke-width="5.5" stroke-linecap="round"
|
|
46
|
+
filter="url(#softGlow)"/>
|
|
47
|
+
|
|
48
|
+
<!-- 特性分支曲线(分出�?-->
|
|
49
|
+
<path d="M 76,80 C 98,80 130,96 130,120 L 130,140"
|
|
50
|
+
stroke="url(#featGrad)" stroke-width="4.5" fill="none"
|
|
51
|
+
stroke-linecap="round" filter="url(#softGlow)"/>
|
|
52
|
+
<!-- 特性分支合并回主分�?-->
|
|
53
|
+
<path d="M 130,140 C 130,156 105,159 76,155"
|
|
54
|
+
stroke="url(#featGrad)" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
55
|
+
|
|
56
|
+
<!-- 主分支节�?-->
|
|
57
|
+
<circle cx="76" cy="48" r="11" fill="#13103a" stroke="#c4b5fd" stroke-width="3" filter="url(#glow)"/>
|
|
58
|
+
<circle cx="76" cy="48" r="5" fill="#ddd6fe"/>
|
|
59
|
+
|
|
60
|
+
<circle cx="76" cy="84" r="11" fill="#13103a" stroke="#a78bfa" stroke-width="3"/>
|
|
61
|
+
<circle cx="76" cy="84" r="5" fill="#c4b5fd"/>
|
|
62
|
+
|
|
63
|
+
<circle cx="76" cy="120" r="11" fill="#13103a" stroke="#8b5cf6" stroke-width="3"/>
|
|
64
|
+
<circle cx="76" cy="120" r="5" fill="#a78bfa"/>
|
|
65
|
+
|
|
66
|
+
<circle cx="76" cy="155" r="11" fill="#13103a" stroke="#7c3aed" stroke-width="3" filter="url(#glow)"/>
|
|
67
|
+
<circle cx="76" cy="155" r="5" fill="#8b5cf6"/>
|
|
68
|
+
|
|
69
|
+
<!-- 特性分支节�?-->
|
|
70
|
+
<circle cx="130" cy="115" r="11" fill="#13103a" stroke="#38bdf8" stroke-width="3" filter="url(#glow)"/>
|
|
71
|
+
<circle cx="130" cy="115" r="5" fill="#7dd3fc"/>
|
|
72
|
+
|
|
73
|
+
<circle cx="130" cy="143" r="11" fill="#13103a" stroke="#0ea5e9" stroke-width="3" filter="url(#glow)"/>
|
|
74
|
+
<circle cx="130" cy="143" r="5" fill="#38bdf8"/>
|
|
75
75
|
</svg>
|
|
@@ -191,6 +191,17 @@ export function registerNpmRoutes({
|
|
|
191
191
|
})
|
|
192
192
|
|
|
193
193
|
|
|
194
|
+
// POST /api/app-restart - 优雅退出当前 Node 进程,由外层 launcher/desktop 自动拉起
|
|
195
|
+
app.post('/api/app-restart', (_req, res) => {
|
|
196
|
+
res.json({ success: true, message: '正在重启服务…' })
|
|
197
|
+
// 给响应一点时间落到客户端再退出
|
|
198
|
+
setTimeout(() => {
|
|
199
|
+
console.log('[app-restart] 收到重启指令,退出当前进程')
|
|
200
|
+
process.exit(0)
|
|
201
|
+
}, 300)
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
|
|
194
205
|
// 读取 package.json 文件内容
|
|
195
206
|
app.post('/api/read-package-json', express.json(), async (req, res) => {
|
|
196
207
|
try {
|
|
@@ -2114,6 +2114,35 @@ ${desc ? `描述:${desc}` : '描述:(无)'}${attachmentBlock}${templateB
|
|
|
2114
2114
|
}
|
|
2115
2115
|
})
|
|
2116
2116
|
|
|
2117
|
+
// DELETE /api/workbench/jobs/by-task/:taskId
|
|
2118
|
+
// 重新执行任务前清空该 task 下的所有旧 job(内存 + 文件双写)。
|
|
2119
|
+
// 不清活跃的 running/pending,避免误杀正在跑的实例;前端启动新 run 时
|
|
2120
|
+
// 应确认旧任务已结束,或在活跃态时拒绝调用本接口。
|
|
2121
|
+
app.delete('/api/workbench/jobs/by-task/:taskId', async (req, res) => {
|
|
2122
|
+
try {
|
|
2123
|
+
const taskId = req.params.taskId
|
|
2124
|
+
if (!taskId) return res.status(400).json({ success: false, error: '缺少 taskId' })
|
|
2125
|
+
const ids = []
|
|
2126
|
+
for (const j of jobs.values()) {
|
|
2127
|
+
if (j.taskId !== taskId) continue
|
|
2128
|
+
if (j.status === 'running' || j.status === 'pending') continue
|
|
2129
|
+
jobs.delete(j.id)
|
|
2130
|
+
ids.push(j.id)
|
|
2131
|
+
}
|
|
2132
|
+
const data = await readJson(JOBS_FILE, { version: 1, jobs: [] })
|
|
2133
|
+
if (data && Array.isArray(data.jobs)) {
|
|
2134
|
+
const before = data.jobs.length
|
|
2135
|
+
data.jobs = data.jobs.filter(j => !(j.taskId === taskId && !ids.includes(j.id)))
|
|
2136
|
+
const removed = before - data.jobs.length
|
|
2137
|
+
if (removed > 0) await writeJson(JOBS_FILE, data)
|
|
2138
|
+
return res.json({ success: true, removed: ids.length + removed, ids })
|
|
2139
|
+
}
|
|
2140
|
+
res.json({ success: true, removed: ids.length, ids })
|
|
2141
|
+
} catch (err) {
|
|
2142
|
+
res.status(500).json({ success: false, error: '按 task 清空失败: ' + (err.message || String(err)) })
|
|
2143
|
+
}
|
|
2144
|
+
})
|
|
2145
|
+
|
|
2117
2146
|
// GET /api/workbench/jobs/:id
|
|
2118
2147
|
app.get('/api/workbench/jobs/:id', async (req, res) => {
|
|
2119
2148
|
try {
|
|
Binary file
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{An as t,Bn as n,Gn as r,Ln as i,Mn as a,P as o,Pn as s,Qn as c,Rn as l,Un as ee,Vn as u,Wn as d,Xn as f,Zn as te,_ as ne,_t as re,c as p,cr as m,d as h,dr as g,er as _,f as ie,fr as ae,g as oe,gr as v,h as se,hr as y,jn as b,m as ce,mr as x,nr as S,or as le,p as ue,pr as C,qn as de,sr as w,t as fe,v as pe,y as me}from"./vendor-C30huq-U.js";import{n as T,t as E}from"./_plugin-vue_export-helper-rin5I4Hu.js";import{i as he,o as ge}from"./index-8cDK0aD_.js";var _e=e(h(),1),ve={class:`source-map-view`},ye={class:`sm-toolbar`},be={class:`sm-toolbar-left`},xe={class:`sm-title`},Se={class:`sm-toolbar-center`},Ce=[`placeholder`,`disabled`],we=[`disabled`],Te={class:`sm-toolbar-right`},Ee={class:`sm-body`},De={class:`sm-panel-header sm-panel-header--tabs`},Oe={key:0,class:`sm-badge`},ke={class:`sm-panel-body sm-file-tree`},Ae=[`onClick`],je={key:1,class:`sm-tree-arrow-spacer`},Me={key:2,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},Ne=[`xlink:href`],Pe={key:3,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},Fe=[`xlink:href`],Ie=[`title`],Le={key:1,class:`sm-tree-empty`},Re={class:`sm-panel-body sm-outline-body`},ze={class:`sm-badge`,style:{"margin-left":`auto`}},Be=[`onClick`],Ve=[`title`],He={key:0,class:`sm-outline-desc`},Ue={key:1,class:`sm-tree-empty`},We={class:`sm-panel sm-panel-graph`},Ge={key:0,class:`sm-project-info`},Ke={class:`sm-lang-badge`},qe={class:`sm-summary-text`},Je={class:`sm-graph-container`},Ye={class:`sm-layout-btn-wrap`},Xe=[`disabled`],Ze=[`title`],Qe={class:`sm-fn-label`},$e={key:0,class:`sm-fn-desc`},et={key:0,class:`sm-graph-empty`},tt={viewBox:`0 0 24 24`,width:`48`,height:`48`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,style:{opacity:`0.3`}},nt={key:1,class:`sm-graph-loading`},rt={class:`sm-log-header`},it={key:0,class:`sm-log-indicator`},at={class:`sm-log-body`,ref:`logBodyRef`},ot={key:0,class:`sm-empty`},st={class:`sm-panel-header`},ct={key:0,class:`sm-badge sm-badge-amber`},lt={key:0,class:`sm-node-detail`},ut={class:`sm-node-name`},dt={class:`sm-node-file`},ft={key:0},pt={key:0,class:`sm-node-desc`},mt={class:`sm-panel-body sm-source-body`},ht={key:0,class:`sm-source-overlay`},gt={key:1,class:`sm-source-overlay sm-source-placeholder`},D=E(de({__name:`SourceMapView`,setup(e){let h=g(document.documentElement.getAttribute(`data-theme`)===`dark`?`dark`:`light`);function de(){h.value=document.documentElement.getAttribute(`data-theme`)===`dark`?`dark`:`light`}let E=null,D=ge(),O=g(D.currentDirectory||``),k=g(`idle`),A=g([]),_t=0,j=g(null),M=g(null),N=g(`files`),P=g(``),F=g(``),I=g(!1),L=g([]),R=g(new Set),z=g({files:!0,graph:!0,source:!0}),B=g(!1),V=g(220),H=g(360),U=g(140),W=null,G=0,vt=0,K=0;function q(e,t){W=e,G=t.clientX,vt=t.clientY,K=e===`files`?V.value:e===`source`?H.value:U.value,document.addEventListener(`mousemove`,yt),document.addEventListener(`mouseup`,J),t.preventDefault()}function yt(e){W&&(W===`files`?V.value=Math.max(120,Math.min(480,K+e.clientX-G)):W===`source`?H.value=Math.max(200,Math.min(700,K+G-e.clientX)):U.value=Math.max(60,Math.min(500,K+vt-e.clientY)))}function J(){W=null,document.removeEventListener(`mousemove`,yt),document.removeEventListener(`mouseup`,J)}let Y=g(null),X=ae(null),{fitView:bt,setNodes:xt,setEdges:St,getNodes:Ct,getEdges:wt,updateNodeInternals:Tt}=me(),Z=i(()=>k.value===`scanning`||k.value===`analyzing`),Et=i(()=>h.value===`dark`?`#334155`:`#cbd5e1`),Q=i(()=>j.value?.nodes.find(e=>e.id===M.value)??null),Dt=i(()=>{if(!j.value)return[];let e=new Map;for(let t of j.value.nodes){let n=t.subsystem??`__default__`;if(!e.has(n)){let r=j.value.subsystems?.find(e=>e.name===n);e.set(n,{displayName:r?.displayName||t.subsystem||T(`@SRCMAP:默认`),color:t.subsystemColor||kt[0],nodes:[]})}e.get(n).nodes.push(t)}return[...e.entries()].map(([,e])=>e)});function $(e,t=`info`){A.value.push({id:++_t,message:e,type:t,timestamp:Date.now()}),A.value.length>200&&A.value.splice(0,A.value.length-200)}function Ot(e){let t={name:``,path:``,kind:`dir`,children:[],childMap:new Map};for(let n of e){let e=n.trim().split(`/`).filter(Boolean),r=t,i=``;for(let t=0;t<e.length;t++){let n=e[t];i=i?`${i}/${n}`:n;let a=t===e.length-1,o=r.childMap.get(n);o||(o={name:n,path:i,kind:a?`file`:`dir`,children:[],childMap:new Map},r.childMap.set(n,o),r.children.push(o)),r=o}}let n=e=>{e.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`dir`?-1:1),e.forEach(e=>{e.kind===`dir`&&n(e.children)})};return n(t.children),t.children}let kt=[`#f59e0b`,`#3b82f6`,`#10b981`,`#8b5cf6`];function At(e){return e.subsystemColor?e.subsystemColor:e.subsystemIndex===void 0?e.importance===`high`?`#f59e0b`:e.importance===`low`?`#94a3b8`:`#3b82f6`:kt[e.subsystemIndex%kt.length]}function jt(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`javascript`,vue:`html`,svelte:`html`,html:`html`,py:`python`,java:`java`,go:`go`,rs:`rust`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,c:`c`,h:`c`,hpp:`cpp`,cs:`csharp`,rb:`ruby`,php:`php`,swift:`swift`,kt:`kotlin`,sh:`shell`,bash:`shell`,json:`json`,yaml:`yaml`,yml:`yaml`,md:`markdown`,css:`css`,scss:`scss`,less:`less`,sql:`sql`}[e.split(`.`).pop()?.toLowerCase()||``]||`plaintext`}function Mt(){!Y.value||X.value||(X.value=p.create(Y.value,{value:``,language:`plaintext`,theme:h.value===`dark`?`vs-dark`:`vs`,readOnly:!0,fontSize:12,lineHeight:19,fontFamily:`'JetBrains Mono', 'Fira Code', Consolas, monospace`,minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:`off`,padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6}}))}le(h,e=>{X.value&&p.setTheme(e===`dark`?`vs-dark`:`vs`)});function Nt(e,t){let n={};t.forEach(e=>{n[e.source]||(n[e.source]=[]),n[e.source].push(e.target)});let r=new Map;e.forEach(e=>{let t=e.subsystem??`__default`;r.has(t)||r.set(t,[]),r.get(t).push(e)});let i=[],a=0;for(let[,e]of r){let t=new Set(e.map(e=>e.id)),r={},o=e.length?[e[0].id]:[];for(o[0]&&(r[o[0]]=0);o.length;){let e=o.shift();(n[e]||[]).filter(e=>t.has(e)).forEach(t=>{r[t]===void 0&&(r[t]=(r[e]??0)+1,o.push(t))})}let s={};e.forEach(e=>{let t=r[e.id]??0;s[t]=(s[t]||0)+1});let c={};e.forEach(e=>{let t=r[e.id]??0;c[t]=(c[t]??-1)+1;let n=c[t],o=s[t]??1,l=a*600+n*220-(o-1)*220/2,ee=t*110,u=At(e);i.push({id:e.id,type:`default`,position:{x:l,y:ee},label:e.label,class:`sm-fn-node`,data:{...e,_accentColor:u},style:{"--node-accent":u}})}),a++}return{flowNodes:i,flowEdges:t.map((e,t)=>({id:`e_${t}_${e.source}_${e.target}`,source:e.source,target:e.target,type:`smoothstep`,animated:!1,class:`sm-fn-edge`,markerEnd:{type:se.ArrowClosed}}))}}async function Pt(){let e=Ct.value,t=wt.value;if(e.length!==0){B.value=!0;try{await f(),await new Promise(e=>requestAnimationFrame(()=>e())),Tt(e.map(e=>e.id)),await new Promise(e=>requestAnimationFrame(()=>e()));let n=new Map;e.forEach(e=>{let t=e.data?.subsystem??`__default__`;n.has(t)||n.set(t,[]),n.get(t).push(e)});let r=new Map,i=0;for(let[,e]of n){let n=new _e.default.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:`TB`,nodesep:55,ranksep:75,marginx:40,marginy:40});let a=new Set(e.map(e=>e.id));e.forEach(e=>{let t=190,r=e.data?.description?68:48,i=document.querySelector(`.vue-flow__node[data-id="${e.id}"]`);i&&i.offsetWidth>0&&(t=i.offsetWidth,r=i.offsetHeight),n.setNode(e.id,{width:t,height:r})}),t.forEach(e=>{a.has(e.source)&&a.has(e.target)&&n.setEdge(e.source,e.target)}),_e.default.layout(n);let o=0;e.forEach(e=>{let t=n.node(e.id);t&&(r.set(e.id,{x:i+t.x-t.width/2,y:t.y-t.height/2}),o=Math.max(o,t.x+t.width/2))}),i+=o+120}xt(e.map(e=>({...e,position:r.get(e.id)??e.position}))),await f(),bt({padding:.18})}finally{B.value=!1}}}async function Ft(){if(!O.value.trim()){o.warning(T(`@SRCMAP:请先输入项目路径`));return}if(!Z.value){A.value=[],j.value=null,M.value=null,P.value=``,F.value=``,xt([]),St([]),k.value=`scanning`,$(T(`@SRCMAP:开始分析项目...`),`info`);try{let e=await fetch(`/api/code-analysis/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:O.value})});if(!e.ok){let t=await e.json().catch(()=>({error:`请求失败`}));throw Error(t.error||`HTTP ${e.status}`)}let t=e.body.getReader(),n=new TextDecoder,r=``;k.value=`analyzing`;let i=``,a=[];for(;;){let{done:e,value:o}=await t.read();if(e)break;r+=n.decode(o,{stream:!0});let s=r.split(`
|
|
2
|
-
`);r=s.pop()??``;for(let e of s)if(e.startsWith(`event:`))i=e.slice(6).trim(),a=[];else if(e.startsWith(`data:`))a.push(e.slice(5).trim());else if(e===``){if(i&&a.length){let e=a.join(``);try{let t=JSON.parse(e);It(i,t)}catch{}}i=``,a=[]}}}catch(e){$(`${T(`@SRCMAP:分析失败`)}: ${e.message}`,`error`),k.value=`error`}}}function It(e,t){if(e===`log`)$(t.message,t.type||`info`);else if(e===`files`)L.value=Ot(t.files||[]),L.value.forEach(e=>{e.kind===`dir`&&R.value.add(e.path)});else if(e===`result`){j.value={language:t.language||``,entryFile:t.entryFile||``,entryFunction:t.entryFunction||``,nodes:Array.isArray(t.nodes)?t.nodes:[],edges:Array.isArray(t.edges)?t.edges:[],techStack:Array.isArray(t.techStack)?t.techStack:[],summary:t.summary||``,allFiles:Array.isArray(t.allFiles)?t.allFiles:[],codeFiles:Array.isArray(t.codeFiles)?t.codeFiles:[],subsystems:Array.isArray(t.subsystems)?t.subsystems:void 0};let{flowNodes:e,flowEdges:n}=Nt(j.value.nodes,j.value.edges);xt(e),St(n),f(()=>Pt())}else e===`done`&&(t.error?($(`${T(`@SRCMAP:分析失败`)}: ${t.error}`,`error`),k.value=`error`):k.value=`done`)}async function Lt(e){if(!(!e||I.value)&&F.value!==e){I.value=!0,F.value=e,P.value=``;try{let t=await(await fetch(`/api/code-analysis/file-content?path=${encodeURIComponent(O.value)}&file=${encodeURIComponent(e)}`)).json();if(t.error)throw Error(t.error);P.value=t.content||``}catch(e){P.value=`// ${T(`@SRCMAP:加载失败`)}: ${e.message}`}finally{I.value=!1}}}function Rt(e){let t=e.node.data;M.value=t.id,t.file&&Lt(t.file)}function zt(e){R.value.has(e)?R.value.delete(e):R.value.add(e)}let Bt=i(()=>{let e=[];function t(n,r){for(let i of n){let n=R.value.has(i.path);e.push({name:i.name,path:i.path,kind:i.kind,depth:r,expanded:n}),i.kind===`dir`&&n&&t(i.children,r+1)}}return t(L.value,0),e});return le(()=>D.currentDirectory,e=>{e&&!O.value&&(O.value=e)}),le([P,F],([e,t])=>{let n=X.value;if(!n)return;let r=jt(t||``),i=n.getModel(),a=p.createModel(e||``,r);n.setModel(a),i?.dispose(),n.setScrollPosition({scrollTop:0,scrollLeft:0})}),c(()=>{Mt(),!O.value&&D.currentDirectory&&(O.value=D.currentDirectory),E=new MutationObserver(()=>de()),E.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}),te(()=>{X.value?.getModel()?.dispose(),X.value?.dispose(),J(),E?.disconnect(),E=null}),(e,i)=>{let o=re;return _(),u(`div`,ve,[l(`div`,ye,[l(`div`,be,[i[9]||=l(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,class:`sm-icon-map`},[l(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`}),l(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`}),l(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`})],-1),l(`span`,xe,v(C(T)(`@SRCMAP:源码地图`)),1)]),l(`div`,Se,[m(l(`input`,{"onUpdate:modelValue":i[0]||=e=>O.value=e,class:`sm-path-input`,placeholder:C(T)(`@SRCMAP:输入项目目录路径`),disabled:Z.value,onKeydown:a(Ft,[`enter`])},null,40,Ce),[[t,O.value]]),l(`button`,{class:`sm-btn sm-btn-primary`,disabled:Z.value,onClick:Ft},[Z.value?(_(),u(s,{key:0},[i[10]||=l(`span`,{class:`sm-spinner`},null,-1),d(` `+v(C(T)(`@SRCMAP:分析中...`)),1)],64)):(_(),u(s,{key:1},[d(v(k.value===`done`?C(T)(`@SRCMAP:重新分析`):C(T)(`@SRCMAP:开始分析`)),1)],64))],8,we)]),l(`div`,Te,[r(o,{content:C(T)(`@SRCMAP:文件列表`),placement:`bottom`},{default:w(()=>[l(`button`,{class:x([`sm-panel-btn`,{active:z.value.files}]),onClick:i[1]||=e=>z.value.files=!z.value.files},[...i[11]||=[l(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1)]],2)]),_:1},8,[`content`]),r(o,{content:C(T)(`@SRCMAP:调用图`),placement:`bottom`},{default:w(()=>[l(`button`,{class:x([`sm-panel-btn`,{active:z.value.graph}]),onClick:i[2]||=e=>z.value.graph=!z.value.graph},[...i[12]||=[l(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`circle`,{cx:`12`,cy:`12`,r:`3`}),l(`circle`,{cx:`3`,cy:`6`,r:`2`}),l(`circle`,{cx:`21`,cy:`6`,r:`2`}),l(`circle`,{cx:`3`,cy:`18`,r:`2`}),l(`circle`,{cx:`21`,cy:`18`,r:`2`}),l(`line`,{x1:`5`,y1:`6`,x2:`9`,y2:`11`}),l(`line`,{x1:`19`,y1:`6`,x2:`15`,y2:`11`}),l(`line`,{x1:`5`,y1:`18`,x2:`9`,y2:`13`}),l(`line`,{x1:`19`,y1:`18`,x2:`15`,y2:`13`})],-1)]],2)]),_:1},8,[`content`]),r(o,{content:C(T)(`@SRCMAP:源码面板`),placement:`bottom`},{default:w(()=>[l(`button`,{class:x([`sm-panel-btn`,{active:z.value.source}]),onClick:i[3]||=e=>z.value.source=!z.value.source},[...i[13]||=[l(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`polyline`,{points:`16 18 22 12 16 6`}),l(`polyline`,{points:`8 6 2 12 8 18`})],-1)]],2)]),_:1},8,[`content`])])]),l(`div`,Ee,[m(l(`div`,{class:`sm-panel sm-panel-files`,style:y({width:V.value+`px`})},[l(`div`,De,[l(`button`,{class:x([`sm-tab-btn`,{active:N.value===`files`}]),onClick:i[4]||=e=>N.value=`files`},[i[14]||=l(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1),d(` `+v(C(T)(`@SRCMAP:文件列表`))+` `,1),j.value?(_(),u(`span`,Oe,v(j.value.allFiles.length),1)):n(``,!0)],2),l(`button`,{class:x([`sm-tab-btn`,{active:N.value===`outline`}]),onClick:i[5]||=e=>N.value=`outline`},[i[15]||=ee(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-71d3569e><line x1="8" y1="6" x2="21" y2="6" data-v-71d3569e></line><line x1="8" y1="12" x2="21" y2="12" data-v-71d3569e></line><line x1="8" y1="18" x2="21" y2="18" data-v-71d3569e></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-71d3569e></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-71d3569e></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-71d3569e></line></svg>`,1),d(` `+v(C(T)(`@SRCMAP:大纲`)),1)],2)]),m(l(`div`,ke,[Bt.value.length>0?(_(!0),u(s,{key:0},S(Bt.value,e=>(_(),u(`div`,{key:e.path,class:x([`sm-tree-node`,{"sm-tree-node--dir":e.kind===`dir`,"sm-tree-node--active":e.kind===`file`&&F.value===e.path}]),style:y({paddingLeft:10+e.depth*14+`px`}),onClick:t=>e.kind===`dir`?zt(e.path):Lt(e.path)},[e.kind===`dir`?(_(),u(`span`,{key:0,class:x([`sm-tree-arrow`,{expanded:e.expanded}])},[...i[16]||=[l(`svg`,{viewBox:`0 0 24 24`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[l(`polyline`,{points:`9 18 15 12 9 6`})],-1)]],2)):(_(),u(`span`,je)),e.kind===`dir`?(_(),u(`svg`,Me,[l(`use`,{"xlink:href":`#${C(he)(e.name)||`icon-folder`}`},null,8,Ne)])):(_(),u(`svg`,Pe,[l(`use`,{"xlink:href":`#${C(he)(e.name)}`},null,8,Fe)])),l(`span`,{class:`sm-tree-name`,title:e.path},v(e.name),9,Ie)],14,Ae))),128)):(_(),u(`div`,Le,v(C(T)(`@SRCMAP:暂无文件,请先开始分析`)),1))],512),[[b,N.value===`files`]]),m(l(`div`,Re,[Dt.value.length>0?(_(!0),u(s,{key:0},S(Dt.value,e=>(_(),u(`div`,{key:e.displayName,class:`sm-outline-group`},[l(`div`,{class:`sm-outline-group-header`,style:y({color:e.color})},[i[17]||=l(`svg`,{viewBox:`0 0 24 24`,width:`8`,height:`8`,fill:`currentColor`},[l(`circle`,{cx:`12`,cy:`12`,r:`6`})],-1),d(` `+v(e.displayName)+` `,1),l(`span`,ze,v(e.nodes.length),1)],4),(_(!0),u(s,null,S(e.nodes,t=>(_(),u(`div`,{key:t.id,class:x([`sm-outline-node`,{"sm-outline-node--active":M.value===t.id}]),onClick:e=>{M.value=t.id,t.file&&Lt(t.file)}},[l(`span`,{class:`sm-outline-dot`,style:y({background:e.color})},null,4),l(`span`,{class:`sm-outline-label`,title:t.file||t.label},v(t.label),9,Ve),t.description?(_(),u(`span`,He,v(t.description.length>18?t.description.slice(0,18)+`…`:t.description),1)):n(``,!0)],10,Be))),128))]))),128)):(_(),u(`div`,Ue,v(C(T)(`@SRCMAP:暂无分析结果`)),1))],512),[[b,N.value===`outline`]])],4),[[b,z.value.files]]),m(l(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:i[6]||=e=>q(`files`,e)},null,544),[[b,z.value.files&&z.value.graph]]),m(l(`div`,We,[j.value?(_(),u(`div`,Ge,[l(`span`,Ke,v(j.value.language),1),j.value.subsystems&&j.value.subsystems.length>1?(_(!0),u(s,{key:0},S(j.value.subsystems,e=>(_(),u(`span`,{key:e.name,class:`sm-subsystem-tag`,style:y({borderColor:e.color,color:e.color})},`● `+v(e.displayName||e.name),5))),128)):(_(!0),u(s,{key:1},S(j.value.techStack.slice(0,4),e=>(_(),u(`span`,{key:e,class:`sm-tech-tag`},v(e),1))),128)),l(`span`,qe,v(j.value.summary),1)])):n(``,!0),l(`div`,Je,[l(`div`,Ye,[l(`button`,{class:`sm-layout-btn`,disabled:B.value||!j.value,onClick:Pt},[i[18]||=ee(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-71d3569e><rect x="3" y="3" width="7" height="7" rx="1" data-v-71d3569e></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-71d3569e></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-71d3569e></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-71d3569e></rect></svg>`,1),d(` `+v(B.value?C(T)(`@SRCMAP:布局中...`):C(T)(`@SRCMAP:优化布局`)),1)],8,Xe)]),r(C(ne),{class:`sm-vue-flow`,"default-viewport":{zoom:1},"min-zoom":.2,"max-zoom":4,"fit-view-on-init":``,onNodeClick:Rt},{"node-default":w(({data:e,label:t})=>[r(C(pe),{type:`target`,position:C(oe).Top},null,8,[`position`]),l(`div`,{class:`sm-fn-inner`,title:`${t}${e?.description?`
|
|
3
|
-
`+e.description:``}`},[l(`div`,Qe,v(t),1),e?.description?(_(),u(`div`,$e,v(e.description.length>22?e.description.slice(0,22)+`…`:e.description),1)):n(``,!0)],8,Ze),r(C(pe),{type:`source`,position:C(oe).Bottom},null,8,[`position`])]),default:w(()=>[r(C(ce),{variant:C(ue).Dots,gap:20,size:1,"pattern-color":Et.value},null,8,[`variant`,`pattern-color`]),r(C(ie)),r(C(fe),{"node-color":`#3b82f6`,"mask-color":h.value===`dark`?`rgba(0,0,0,0.55)`:`rgba(15,23,42,0.06)`},null,8,[`mask-color`])]),_:1}),!j.value&&!Z.value?(_(),u(`div`,et,[(_(),u(`svg`,tt,[...i[19]||=[l(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`},null,-1),l(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`},null,-1),l(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`},null,-1)]])),l(`p`,null,v(C(T)(`@SRCMAP:输入项目路径后点击开始分析`)),1)])):n(``,!0),Z.value&&!j.value?(_(),u(`div`,nt,[i[20]||=l(`span`,{class:`sm-spinner sm-spinner-lg`},null,-1),l(`p`,null,v(C(T)(`@SRCMAP:AI 正在分析项目结构...`)),1)])):n(``,!0)]),l(`div`,{class:`sm-resizer sm-resizer-h`,onMousedown:i[7]||=e=>q(`log`,e)},null,32),l(`div`,{class:`sm-log-panel`,style:y({height:U.value+`px`})},[l(`div`,rt,[i[21]||=l(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`polyline`,{points:`4 17 10 11 4 5`}),l(`line`,{x1:`12`,y1:`19`,x2:`20`,y2:`19`})],-1),d(` `+v(C(T)(`@SRCMAP:Agent 日志`))+` `,1),Z.value?(_(),u(`span`,it)):n(``,!0)]),l(`div`,at,[(_(!0),u(s,null,S(A.value.slice(-50),e=>(_(),u(`div`,{key:e.id,class:x([`sm-log-entry`,`sm-log-entry--${e.type}`])},v(e.message),3))),128)),A.value.length===0?(_(),u(`div`,ot,v(C(T)(`@SRCMAP:等待开始分析`)),1)):n(``,!0)],512)],4)],512),[[b,z.value.graph]]),m(l(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:i[8]||=e=>q(`source`,e)},null,544),[[b,z.value.graph&&z.value.source]]),m(l(`div`,{class:`sm-panel sm-panel-source`,style:y({width:H.value+`px`})},[l(`div`,st,[i[22]||=l(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[l(`polyline`,{points:`16 18 22 12 16 6`}),l(`polyline`,{points:`8 6 2 12 8 18`})],-1),d(` `+v(F.value||C(T)(`@SRCMAP:源码面板`))+` `,1),Q.value?(_(),u(`span`,ct,v(Q.value.label),1)):n(``,!0)]),Q.value?(_(),u(`div`,lt,[l(`div`,ut,v(Q.value.label),1),l(`div`,dt,[d(v(Q.value.file),1),Q.value.line?(_(),u(`span`,ft,` :`+v(Q.value.line),1)):n(``,!0)]),Q.value.description?(_(),u(`div`,pt,v(Q.value.description),1)):n(``,!0)])):n(``,!0),l(`div`,mt,[I.value?(_(),u(`div`,ht,[...i[23]||=[l(`span`,{class:`sm-spinner`},null,-1)]])):n(``,!0),!I.value&&!P.value?(_(),u(`div`,gt,v(C(T)(`@SRCMAP:点击调用图中的节点查看源码`)),1)):n(``,!0),l(`div`,{ref_key:`monacoContainerRef`,ref:Y,class:`sm-monaco-container`},null,512)])],4),[[b,z.value.source]])])])}}}),[[`__scopeId`,`data-v-71d3569e`]]);export{D as default};
|