pi-web-ui 0.69.0 → 0.70.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/dist/server/agent-service.js +13 -4
- package/dist/server/client-state.js +44 -17
- package/dist/server/dsh/dsh-agent-service.js +3 -0
- package/dist/server/index.js +1 -0
- package/dist/server/marker-service.js +19 -15
- package/dist/server/settings-service.js +1 -0
- package/dist/server/subagents.js +13 -6
- package/dist/server/terminals.js +12 -1
- package/dist/server/webui-context.js +9 -0
- package/package.json +1 -1
- package/themes/cyberpunk.css +88 -81
- package/themes/dazzle.css +88 -81
- package/themes/md-preview.css +105 -98
- package/themes/white.css +167 -160
- package/web/dist/assets/{TerminalPanel-Cj8zsjx-.js → TerminalPanel-UxgczH4c.js} +1 -1
- package/web/dist/assets/index-BH5QutUc.css +10 -0
- package/web/dist/assets/index-CaiIOwy7.js +335 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-DCOcsPFm.js +0 -334
- package/web/dist/assets/index-jH2Bb-0X.css +0 -10
package/themes/white.css
CHANGED
|
@@ -1,160 +1,167 @@
|
|
|
1
|
-
/* theme-name: 白色 */
|
|
2
|
-
/* theme-name-en: White */
|
|
3
|
-
:root {
|
|
4
|
-
color-scheme: light;
|
|
5
|
-
--bg: #ffffff;
|
|
6
|
-
--bg-elev: #ffffff;
|
|
7
|
-
--bg-elev2: #f6f8fa;
|
|
8
|
-
--border: #d0d7de;
|
|
9
|
-
--border-soft: #d8dee4;
|
|
10
|
-
--text: #1f2328;
|
|
11
|
-
--text-dim: #59636e;
|
|
12
|
-
--text-faint: #818b98;
|
|
13
|
-
--accent: #0969da;
|
|
14
|
-
--accent-soft: rgba(9, 105, 218, 0.1);
|
|
15
|
-
--green: #059669;
|
|
16
|
-
--green-soft: rgba(5, 150, 105, 0.12);
|
|
17
|
-
--red: #dc2626;
|
|
18
|
-
--red-soft: rgba(220, 38, 38, 0.1);
|
|
19
|
-
--amber: #d97706;
|
|
20
|
-
--term-bg: #ffffff;
|
|
21
|
-
--term-fg: #1f2328;
|
|
22
|
-
--term-cursor: #0969da;
|
|
23
|
-
--term-cursor-accent: #ffffff;
|
|
24
|
-
--term-selection: rgba(9, 105, 218, 0.32);
|
|
25
|
-
--term-black: #e8eaf0;
|
|
26
|
-
--term-red: #dc2626;
|
|
27
|
-
--term-green: #059669;
|
|
28
|
-
--term-yellow: #d97706;
|
|
29
|
-
--term-blue: #2563eb;
|
|
30
|
-
--term-magenta: #9333ea;
|
|
31
|
-
--term-cyan: #0e7490;
|
|
32
|
-
--term-white: #1f2328;
|
|
33
|
-
--term-bright-black: #8a91a3;
|
|
34
|
-
--term-bright-red: #dc2626;
|
|
35
|
-
--term-bright-green: #059669;
|
|
36
|
-
--term-bright-yellow: #d97706;
|
|
37
|
-
--term-bright-blue: #2563eb;
|
|
38
|
-
--term-bright-magenta: #9333ea;
|
|
39
|
-
--term-bright-cyan: #0e7490;
|
|
40
|
-
--term-bright-white: #000000;
|
|
41
|
-
--mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--code-
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--link
|
|
51
|
-
--link-
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--scroll-thumb
|
|
58
|
-
--
|
|
59
|
-
--notice-
|
|
60
|
-
--notice-
|
|
61
|
-
--notice-
|
|
62
|
-
--notice-
|
|
63
|
-
--notice-
|
|
64
|
-
--
|
|
65
|
-
--send-blue
|
|
66
|
-
--
|
|
67
|
-
--brand-grad-
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--glow-
|
|
74
|
-
--glow-
|
|
75
|
-
--glow-
|
|
76
|
-
--glow-
|
|
77
|
-
--glow-
|
|
78
|
-
--glow-
|
|
79
|
-
--glow-
|
|
80
|
-
--glow-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
.hljs
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.hljs-
|
|
98
|
-
.hljs-
|
|
99
|
-
.hljs-
|
|
100
|
-
.hljs-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
.hljs-
|
|
105
|
-
.hljs-
|
|
106
|
-
.hljs-
|
|
107
|
-
.hljs-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.hljs-
|
|
111
|
-
.hljs-
|
|
112
|
-
.hljs-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.hljs-
|
|
116
|
-
.hljs-
|
|
117
|
-
.hljs-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.hljs-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.hljs-
|
|
132
|
-
.hljs-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.hljs-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
.hljs-
|
|
143
|
-
color: #
|
|
144
|
-
}
|
|
145
|
-
.hljs-
|
|
146
|
-
color: #
|
|
147
|
-
font-
|
|
148
|
-
}
|
|
149
|
-
.hljs-
|
|
150
|
-
color: #
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
1
|
+
/* theme-name: 白色 */
|
|
2
|
+
/* theme-name-en: White */
|
|
3
|
+
:root {
|
|
4
|
+
color-scheme: light;
|
|
5
|
+
--bg: #ffffff;
|
|
6
|
+
--bg-elev: #ffffff;
|
|
7
|
+
--bg-elev2: #f6f8fa;
|
|
8
|
+
--border: #d0d7de;
|
|
9
|
+
--border-soft: #d8dee4;
|
|
10
|
+
--text: #1f2328;
|
|
11
|
+
--text-dim: #59636e;
|
|
12
|
+
--text-faint: #818b98;
|
|
13
|
+
--accent: #0969da;
|
|
14
|
+
--accent-soft: rgba(9, 105, 218, 0.1);
|
|
15
|
+
--green: #059669;
|
|
16
|
+
--green-soft: rgba(5, 150, 105, 0.12);
|
|
17
|
+
--red: #dc2626;
|
|
18
|
+
--red-soft: rgba(220, 38, 38, 0.1);
|
|
19
|
+
--amber: #d97706;
|
|
20
|
+
--term-bg: #ffffff;
|
|
21
|
+
--term-fg: #1f2328;
|
|
22
|
+
--term-cursor: #0969da;
|
|
23
|
+
--term-cursor-accent: #ffffff;
|
|
24
|
+
--term-selection: rgba(9, 105, 218, 0.32);
|
|
25
|
+
--term-black: #e8eaf0;
|
|
26
|
+
--term-red: #dc2626;
|
|
27
|
+
--term-green: #059669;
|
|
28
|
+
--term-yellow: #d97706;
|
|
29
|
+
--term-blue: #2563eb;
|
|
30
|
+
--term-magenta: #9333ea;
|
|
31
|
+
--term-cyan: #0e7490;
|
|
32
|
+
--term-white: #1f2328;
|
|
33
|
+
--term-bright-black: #8a91a3;
|
|
34
|
+
--term-bright-red: #dc2626;
|
|
35
|
+
--term-bright-green: #059669;
|
|
36
|
+
--term-bright-yellow: #d97706;
|
|
37
|
+
--term-bright-blue: #2563eb;
|
|
38
|
+
--term-bright-magenta: #9333ea;
|
|
39
|
+
--term-bright-cyan: #0e7490;
|
|
40
|
+
--term-bright-white: #000000;
|
|
41
|
+
--mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
|
|
42
|
+
--mermaid-font-size: 12px;
|
|
43
|
+
--tooltip-bg: #ffffff;
|
|
44
|
+
--code-bg: #f6f8fa;
|
|
45
|
+
--code-text: #1f2937;
|
|
46
|
+
--err-text: #dc2626;
|
|
47
|
+
--red-text: #dc2626;
|
|
48
|
+
--amber-text: #b45309;
|
|
49
|
+
--info-blue: #2563eb;
|
|
50
|
+
--link: #0969da;
|
|
51
|
+
--link-hover: #0550ae;
|
|
52
|
+
--link-soft: #0969da;
|
|
53
|
+
--md-strong: #111827;
|
|
54
|
+
--skill-blue: #2563eb;
|
|
55
|
+
--plugin-purple: #b58cff;
|
|
56
|
+
--auth-green: #059669;
|
|
57
|
+
--scroll-thumb: #c7ccd8;
|
|
58
|
+
--scroll-thumb-hover: #aab2c0;
|
|
59
|
+
--notice-err-bg: #eadadf;
|
|
60
|
+
--notice-warn-bg: #eae2dc;
|
|
61
|
+
--notice-info-bg: #d8e0f3;
|
|
62
|
+
--notice-err-border: #dc2626;
|
|
63
|
+
--notice-warn-border: #b45309;
|
|
64
|
+
--notice-info-border: #2563eb;
|
|
65
|
+
--send-blue: #0969da;
|
|
66
|
+
--send-blue-hover: #0550ae;
|
|
67
|
+
--brand-grad-a: #8b5cf6;
|
|
68
|
+
--brand-grad-b: #6366f1;
|
|
69
|
+
--on-amber: #1a1a1a;
|
|
70
|
+
--search-active-fg: #1a1d26;
|
|
71
|
+
--switch-knob: #ffffff;
|
|
72
|
+
--bg-elev3: rgba(0, 0, 0, 0.03);
|
|
73
|
+
--glow-015: rgba(0, 0, 0, 0.02);
|
|
74
|
+
--glow-025: rgba(0, 0, 0, 0.02);
|
|
75
|
+
--glow-03: rgba(0, 0, 0, 0.02);
|
|
76
|
+
--glow-04: rgba(0, 0, 0, 0.03);
|
|
77
|
+
--glow-05: rgba(0, 0, 0, 0.03);
|
|
78
|
+
--glow-12: rgba(0, 0, 0, 0.08);
|
|
79
|
+
--glow-18: rgba(0, 0, 0, 0.12);
|
|
80
|
+
--glow-22: rgba(0, 0, 0, 0.15);
|
|
81
|
+
--glow-38: rgba(0, 0, 0, 0.25);
|
|
82
|
+
--control-fg: #59636e;
|
|
83
|
+
--control-bg: #f6f8fa;
|
|
84
|
+
--control-border: #d0d7de;
|
|
85
|
+
--bg-image: none;
|
|
86
|
+
--bg-image-dim: 0.78;
|
|
87
|
+
--bg-image-blur: 0px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ---- syntax highlighting (overrides static github-dark import) ---- */
|
|
91
|
+
.hljs {
|
|
92
|
+
color: #1f2328;
|
|
93
|
+
background: #f6f8fa;
|
|
94
|
+
}
|
|
95
|
+
.hljs-doctag,
|
|
96
|
+
.hljs-keyword,
|
|
97
|
+
.hljs-meta .hljs-keyword,
|
|
98
|
+
.hljs-template-tag,
|
|
99
|
+
.hljs-template-variable,
|
|
100
|
+
.hljs-type,
|
|
101
|
+
.hljs-variable.language_ {
|
|
102
|
+
color: #cf222e;
|
|
103
|
+
}
|
|
104
|
+
.hljs-title,
|
|
105
|
+
.hljs-title.class_,
|
|
106
|
+
.hljs-title.class_.inherited__,
|
|
107
|
+
.hljs-title.function_ {
|
|
108
|
+
color: #8250df;
|
|
109
|
+
}
|
|
110
|
+
.hljs-attr,
|
|
111
|
+
.hljs-attribute,
|
|
112
|
+
.hljs-literal,
|
|
113
|
+
.hljs-meta,
|
|
114
|
+
.hljs-number,
|
|
115
|
+
.hljs-operator,
|
|
116
|
+
.hljs-variable,
|
|
117
|
+
.hljs-selector-attr,
|
|
118
|
+
.hljs-selector-class,
|
|
119
|
+
.hljs-selector-id {
|
|
120
|
+
color: #0550ae;
|
|
121
|
+
}
|
|
122
|
+
.hljs-regexp,
|
|
123
|
+
.hljs-string,
|
|
124
|
+
.hljs-meta .hljs-string {
|
|
125
|
+
color: #0a3069;
|
|
126
|
+
}
|
|
127
|
+
.hljs-built_in,
|
|
128
|
+
.hljs-symbol {
|
|
129
|
+
color: #953800;
|
|
130
|
+
}
|
|
131
|
+
.hljs-comment,
|
|
132
|
+
.hljs-code,
|
|
133
|
+
.hljs-formula {
|
|
134
|
+
color: #6e7781;
|
|
135
|
+
}
|
|
136
|
+
.hljs-name,
|
|
137
|
+
.hljs-quote,
|
|
138
|
+
.hljs-selector-tag,
|
|
139
|
+
.hljs-selector-pseudo {
|
|
140
|
+
color: #116329;
|
|
141
|
+
}
|
|
142
|
+
.hljs-subst {
|
|
143
|
+
color: #24292f;
|
|
144
|
+
}
|
|
145
|
+
.hljs-section {
|
|
146
|
+
color: #0550ae;
|
|
147
|
+
font-weight: 700;
|
|
148
|
+
}
|
|
149
|
+
.hljs-bullet {
|
|
150
|
+
color: #0550ae;
|
|
151
|
+
}
|
|
152
|
+
.hljs-emphasis {
|
|
153
|
+
color: #24292f;
|
|
154
|
+
font-style: italic;
|
|
155
|
+
}
|
|
156
|
+
.hljs-strong {
|
|
157
|
+
color: #24292f;
|
|
158
|
+
font-weight: 700;
|
|
159
|
+
}
|
|
160
|
+
.hljs-addition {
|
|
161
|
+
color: #116329;
|
|
162
|
+
background: #dafbe1;
|
|
163
|
+
}
|
|
164
|
+
.hljs-deletion {
|
|
165
|
+
color: #82071e;
|
|
166
|
+
background: #ffebe9;
|
|
167
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as l,j as n}from"./markdown-Cpo0pNcR.js";import{u as P,b as O,T as M,a as W,F as Y,c as z,d as Z,e as H,f as ee,g as ne,h as te,i as se,r as ae}from"./index-
|
|
1
|
+
import{a as l,j as n}from"./markdown-Cpo0pNcR.js";import{u as P,b as O,T as M,a as W,F as Y,c as z,d as Z,e as H,f as ee,g as ne,h as te,i as se,r as ae}from"./index-CaiIOwy7.js";import{D as re,o as ie}from"./xterm-B96xOxS9.js";import"./react-CtudoG1_.js";function le(t){let c=null;return{clean:t.replace(/\r?\n?\[pi-term-exit:(-?\d+)\]\r?\n?/g,(a,x)=>(c=Number(x),`\r
|
|
2
2
|
`)).replace(/\r?\n?\x1b\[90m\[(?:进程已退出,退出码 |Process exited with code )-?\d+\]\x1b\[0m\r?\n?/g,`\r
|
|
3
3
|
`),exitCode:c}}function ce({conversationId:t,terminalId:c,command:p,cwd:a,title:x,active:u,running:v,exitCode:j,send:h,register:C}){const T=l.useRef(null),y=l.useRef(null),{locale:o}=P(),N=l.useRef(o);N.current=o;const E=p?JSON.stringify(p):"";l.useEffect(()=>{const m=T.current;if(!m)return;const r=new re({theme:O(),fontFamily:'"SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace',fontSize:13,cursorBlink:!0,scrollback:8e3}),b=new ie;r.loadAddon(b),r.open(m),y.current={term:r,fit:b},u&&r.focus();const g=()=>{r.options.theme=O()};window.addEventListener(M,g),r.attachCustomKeyEventHandler(d=>{if(d.type!=="keydown")return!0;const S=d.key?.toLowerCase();if((d.ctrlKey||d.metaKey)&&S==="v")return!1;if(d.ctrlKey&&!d.shiftKey&&!d.altKey&&S==="c"&&r.hasSelection()){const D=r.textarea;return D&&(D.value=r.getSelection(),D.select()),!1}return!0});const _=C(t,c,{write:d=>r.write(le(d).clean),dispose:()=>r.dispose()}),$=()=>{try{b.fit(),h({type:"terminal_resize",terminalId:c,conversationId:t,cols:r.cols,rows:r.rows})}catch{}},B=requestAnimationFrame(()=>{try{b.fit()}catch{}h(p?{type:"run_command",terminalId:c,conversationId:t,command:p,cols:r.cols,rows:r.rows}:{type:"terminal_create",terminalId:c,title:x,locale:N.current,conversationId:t,cwd:a,cols:r.cols,rows:r.rows})}),R=r.onData(d=>{h({type:"terminal_input",terminalId:c,conversationId:t,data:d})});let k=null;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(()=>{m.offsetWidth>0&&m.offsetHeight>0&&$()}),k.observe(m)),()=>{cancelAnimationFrame(B),R.dispose(),window.removeEventListener(M,g),k?.disconnect(),_(),r.dispose(),y.current=null}},[t,c,E,h,C]),l.useEffect(()=>{if(!u)return;const m=requestAnimationFrame(()=>{const r=y.current;if(r){try{r.fit.fit(),h({type:"terminal_resize",terminalId:c,conversationId:t,cols:r.term.cols,rows:r.term.rows})}catch{}r.term.focus()}});return()=>cancelAnimationFrame(m)},[u]);const{t:F}=P(),f=l.useRef(void 0);return l.useEffect(()=>{if(v===f.current||(f.current=v,v!==!1))return;const m=y.current;m&&m.term.write(`\r
|
|
4
4
|
\x1B[90m${F("exitBanner",{code:j??""})}\x1B[0m\r
|