pi-web-ui 0.63.1 → 0.63.2
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/LICENSE +21 -21
- package/README.md +504 -504
- package/README.zh-CN.md +427 -427
- package/bin/pi-web-ui.mjs +1809 -1809
- package/deploy/com.xingshuyin.pi-web-ui.plist +48 -48
- package/deploy/nginx-subpath.conf +88 -88
- package/deploy/pi-web-ui-task.xml +54 -54
- package/deploy/pi-web-ui.service +31 -31
- package/dist/server/agent-service.js +8 -8
- package/dist/server/attachments.js +3 -3
- package/dist/server/dsh/runtime/cordis.yml +1 -1
- package/dist/server/dsh/runtime/goal-rpc.mjs +645 -645
- package/dist/server/dsh/runtime/launcher.mjs +164 -164
- package/dist/server/dsh/runtime/override.patch.yml +71 -71
- package/dist/server/dsh/runtime/runtime-root.mjs +86 -86
- package/dist/server/terminals.js +4 -4
- package/dist/server/themes.js +24 -5
- package/dist/server/vision-bridge.js +9 -9
- package/extensions/webui.ts +190 -190
- package/package.json +1 -1
- package/themes/cyberpunk.css +81 -80
- package/themes/dazzle.css +81 -80
- package/themes/md-preview.css +98 -97
- package/themes/white.css +160 -159
- package/web/dist/assets/{TerminalPanel-DwutHqgi.js → TerminalPanel-BK0SyRCf.js} +1 -1
- package/web/dist/assets/{index-CJoS1bmZ.js → index-BPbGqUpD.js} +3 -3
- package/web/dist/favicon.svg +8 -8
- package/web/dist/index.html +14 -14
- package/web/public/favicon.svg +8 -8
package/themes/white.css
CHANGED
|
@@ -1,159 +1,160 @@
|
|
|
1
|
-
/* theme-name: 白色 */
|
|
2
|
-
:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
--bg
|
|
6
|
-
--bg-
|
|
7
|
-
--
|
|
8
|
-
--border
|
|
9
|
-
--
|
|
10
|
-
--text
|
|
11
|
-
--text-
|
|
12
|
-
--
|
|
13
|
-
--accent
|
|
14
|
-
--
|
|
15
|
-
--green
|
|
16
|
-
--
|
|
17
|
-
--red
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--term-
|
|
21
|
-
--term-
|
|
22
|
-
--term-cursor
|
|
23
|
-
--term-
|
|
24
|
-
--term-
|
|
25
|
-
--term-
|
|
26
|
-
--term-
|
|
27
|
-
--term-
|
|
28
|
-
--term-
|
|
29
|
-
--term-
|
|
30
|
-
--term-
|
|
31
|
-
--term-
|
|
32
|
-
--term-
|
|
33
|
-
--term-bright-
|
|
34
|
-
--term-bright-
|
|
35
|
-
--term-bright-
|
|
36
|
-
--term-bright-
|
|
37
|
-
--term-bright-
|
|
38
|
-
--term-bright-
|
|
39
|
-
--term-bright-
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--code-
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--link
|
|
50
|
-
--link-
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--scroll-thumb
|
|
57
|
-
--
|
|
58
|
-
--notice-
|
|
59
|
-
--notice-
|
|
60
|
-
--notice-
|
|
61
|
-
--notice-
|
|
62
|
-
--notice-
|
|
63
|
-
--
|
|
64
|
-
--send-blue
|
|
65
|
-
--
|
|
66
|
-
--brand-grad-
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--glow-
|
|
73
|
-
--glow-
|
|
74
|
-
--glow-
|
|
75
|
-
--glow-
|
|
76
|
-
--glow-
|
|
77
|
-
--glow-
|
|
78
|
-
--glow-
|
|
79
|
-
--glow-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.hljs-
|
|
89
|
-
.hljs-
|
|
90
|
-
.hljs-
|
|
91
|
-
.hljs-template-
|
|
92
|
-
.hljs-
|
|
93
|
-
.hljs-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.hljs-title
|
|
98
|
-
.hljs-title.class_
|
|
99
|
-
.hljs-title.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.hljs-
|
|
104
|
-
.hljs-
|
|
105
|
-
.hljs-
|
|
106
|
-
.hljs-
|
|
107
|
-
.hljs-
|
|
108
|
-
.hljs-
|
|
109
|
-
.hljs-
|
|
110
|
-
.hljs-selector-
|
|
111
|
-
.hljs-selector-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.hljs-
|
|
116
|
-
.hljs-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
.hljs-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.hljs-
|
|
125
|
-
.hljs-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.hljs-
|
|
130
|
-
.hljs-
|
|
131
|
-
.hljs-selector-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
+
--tooltip-bg: #ffffff;
|
|
43
|
+
--code-bg: #f6f8fa;
|
|
44
|
+
--code-text: #1f2937;
|
|
45
|
+
--err-text: #dc2626;
|
|
46
|
+
--red-text: #dc2626;
|
|
47
|
+
--amber-text: #b45309;
|
|
48
|
+
--info-blue: #2563eb;
|
|
49
|
+
--link: #0969da;
|
|
50
|
+
--link-hover: #0550ae;
|
|
51
|
+
--link-soft: #0969da;
|
|
52
|
+
--md-strong: #111827;
|
|
53
|
+
--skill-blue: #2563eb;
|
|
54
|
+
--plugin-purple: #b58cff;
|
|
55
|
+
--auth-green: #059669;
|
|
56
|
+
--scroll-thumb: #c7ccd8;
|
|
57
|
+
--scroll-thumb-hover: #aab2c0;
|
|
58
|
+
--notice-err-bg: #eadadf;
|
|
59
|
+
--notice-warn-bg: #eae2dc;
|
|
60
|
+
--notice-info-bg: #d8e0f3;
|
|
61
|
+
--notice-err-border: #dc2626;
|
|
62
|
+
--notice-warn-border: #b45309;
|
|
63
|
+
--notice-info-border: #2563eb;
|
|
64
|
+
--send-blue: #0969da;
|
|
65
|
+
--send-blue-hover: #0550ae;
|
|
66
|
+
--brand-grad-a: #8b5cf6;
|
|
67
|
+
--brand-grad-b: #6366f1;
|
|
68
|
+
--on-amber: #1a1a1a;
|
|
69
|
+
--search-active-fg: #1a1d26;
|
|
70
|
+
--switch-knob: #ffffff;
|
|
71
|
+
--bg-elev3: rgba(0, 0, 0, 0.03);
|
|
72
|
+
--glow-015: rgba(0, 0, 0, 0.02);
|
|
73
|
+
--glow-025: rgba(0, 0, 0, 0.02);
|
|
74
|
+
--glow-03: rgba(0, 0, 0, 0.02);
|
|
75
|
+
--glow-04: rgba(0, 0, 0, 0.03);
|
|
76
|
+
--glow-05: rgba(0, 0, 0, 0.03);
|
|
77
|
+
--glow-12: rgba(0, 0, 0, 0.08);
|
|
78
|
+
--glow-18: rgba(0, 0, 0, 0.12);
|
|
79
|
+
--glow-22: rgba(0, 0, 0, 0.15);
|
|
80
|
+
--glow-38: rgba(0, 0, 0, 0.25);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ---- syntax highlighting (overrides static github-dark import) ---- */
|
|
84
|
+
.hljs {
|
|
85
|
+
color: #1f2328;
|
|
86
|
+
background: #f6f8fa;
|
|
87
|
+
}
|
|
88
|
+
.hljs-doctag,
|
|
89
|
+
.hljs-keyword,
|
|
90
|
+
.hljs-meta .hljs-keyword,
|
|
91
|
+
.hljs-template-tag,
|
|
92
|
+
.hljs-template-variable,
|
|
93
|
+
.hljs-type,
|
|
94
|
+
.hljs-variable.language_ {
|
|
95
|
+
color: #cf222e;
|
|
96
|
+
}
|
|
97
|
+
.hljs-title,
|
|
98
|
+
.hljs-title.class_,
|
|
99
|
+
.hljs-title.class_.inherited__,
|
|
100
|
+
.hljs-title.function_ {
|
|
101
|
+
color: #8250df;
|
|
102
|
+
}
|
|
103
|
+
.hljs-attr,
|
|
104
|
+
.hljs-attribute,
|
|
105
|
+
.hljs-literal,
|
|
106
|
+
.hljs-meta,
|
|
107
|
+
.hljs-number,
|
|
108
|
+
.hljs-operator,
|
|
109
|
+
.hljs-variable,
|
|
110
|
+
.hljs-selector-attr,
|
|
111
|
+
.hljs-selector-class,
|
|
112
|
+
.hljs-selector-id {
|
|
113
|
+
color: #0550ae;
|
|
114
|
+
}
|
|
115
|
+
.hljs-regexp,
|
|
116
|
+
.hljs-string,
|
|
117
|
+
.hljs-meta .hljs-string {
|
|
118
|
+
color: #0a3069;
|
|
119
|
+
}
|
|
120
|
+
.hljs-built_in,
|
|
121
|
+
.hljs-symbol {
|
|
122
|
+
color: #953800;
|
|
123
|
+
}
|
|
124
|
+
.hljs-comment,
|
|
125
|
+
.hljs-code,
|
|
126
|
+
.hljs-formula {
|
|
127
|
+
color: #6e7781;
|
|
128
|
+
}
|
|
129
|
+
.hljs-name,
|
|
130
|
+
.hljs-quote,
|
|
131
|
+
.hljs-selector-tag,
|
|
132
|
+
.hljs-selector-pseudo {
|
|
133
|
+
color: #116329;
|
|
134
|
+
}
|
|
135
|
+
.hljs-subst {
|
|
136
|
+
color: #24292f;
|
|
137
|
+
}
|
|
138
|
+
.hljs-section {
|
|
139
|
+
color: #0550ae;
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
}
|
|
142
|
+
.hljs-bullet {
|
|
143
|
+
color: #0550ae;
|
|
144
|
+
}
|
|
145
|
+
.hljs-emphasis {
|
|
146
|
+
color: #24292f;
|
|
147
|
+
font-style: italic;
|
|
148
|
+
}
|
|
149
|
+
.hljs-strong {
|
|
150
|
+
color: #24292f;
|
|
151
|
+
font-weight: 700;
|
|
152
|
+
}
|
|
153
|
+
.hljs-addition {
|
|
154
|
+
color: #116329;
|
|
155
|
+
background: #dafbe1;
|
|
156
|
+
}
|
|
157
|
+
.hljs-deletion {
|
|
158
|
+
color: #82071e;
|
|
159
|
+
background: #ffebe9;
|
|
160
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,j as s}from"./markdown-DRBrS2Nf.js";import{u as L,b as I,T as K,a as J,F as X,c as B,d as Q,e as U,f as V,g as W,h as Y,i as Z,r as ee}from"./index-
|
|
1
|
+
import{a as c,j as s}from"./markdown-DRBrS2Nf.js";import{u as L,b as I,T as K,a as J,F as X,c as B,d as Q,e as U,f as V,g as W,h as Y,i as Z,r as ee}from"./index-BPbGqUpD.js";import{D as se,o as ne}from"./xterm-D1D2FVe3.js";import"./react-C9ovnpIm.js";function te({conversationId:n,terminalId:r,command:x,cwd:t,title:w,active:u,send:h,register:j}){const T=c.useRef(null),v=c.useRef(null),{locale:b}=L(),g=c.useRef(b);g.current=b;const o=x?JSON.stringify(x):"";return c.useEffect(()=>{const m=T.current;if(!m)return;const a=new se({theme:I(),fontFamily:'"SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace',fontSize:13,cursorBlink:!0,scrollback:8e3}),y=new ne;a.loadAddon(y),a.open(m),v.current={term:a,fit:y},u&&a.focus();const p=()=>{a.options.theme=I()};window.addEventListener(K,p),a.attachCustomKeyEventHandler(d=>{var R;if(d.type!=="keydown")return!0;const F=(R=d.key)==null?void 0:R.toLowerCase();if((d.ctrlKey||d.metaKey)&&F==="v")return!1;if(d.ctrlKey&&!d.shiftKey&&!d.altKey&&F==="c"&&a.hasSelection()){const C=a.textarea;return C&&(C.value=a.getSelection(),C.select()),!1}return!0});const k=j(n,r,{write:d=>a.write(d),dispose:()=>a.dispose()}),_=()=>{try{y.fit(),h({type:"terminal_resize",terminalId:r,conversationId:n,cols:a.cols,rows:a.rows})}catch{}},S=requestAnimationFrame(()=>{try{y.fit()}catch{}h(x?{type:"run_command",terminalId:r,conversationId:n,command:x,cols:a.cols,rows:a.rows}:{type:"terminal_create",terminalId:r,title:w,locale:g.current,conversationId:n,cwd:t,cols:a.cols,rows:a.rows})}),E=a.onData(d=>{h({type:"terminal_input",terminalId:r,conversationId:n,data:d})});let N=null;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(()=>{m.offsetWidth>0&&m.offsetHeight>0&&_()}),N.observe(m)),()=>{cancelAnimationFrame(S),E.dispose(),window.removeEventListener(K,p),N==null||N.disconnect(),k(),a.dispose(),v.current=null}},[n,r,o,h,j]),c.useEffect(()=>{if(!u)return;const m=requestAnimationFrame(()=>{const a=v.current;if(a){try{a.fit.fit(),h({type:"terminal_resize",terminalId:r,conversationId:n,cols:a.term.cols,rows:a.term.rows})}catch{}a.term.focus()}});return()=>cancelAnimationFrame(m)},[u]),s.jsx("div",{ref:T,className:`term-xterm ${u?"":"hidden"}`})}const O={name:"",command:"",cwd:"${pwd}"};function re({chat:n,send:r,terminal:x}){const t=J(),[w,u]=c.useState(null),[h,j]=c.useState(!1),[T,v]=c.useState(!1),[b,g]=c.useState(null),[o,m]=c.useState(O),[a,y]=c.useState(null),p=c.useRef(null),[k,_]=c.useState(!0);c.useEffect(()=>{n.terminals.length===0?u(null):n.terminals.some(e=>e.id===w)||u(n.terminals[n.terminals.length-1].id)},[n.terminals,w]),c.useEffect(()=>{n.terminalActiveId&&(u(n.terminalActiveId),j(!1))},[n.terminalActiveId]),c.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const S=n.terminals.filter(e=>!e.agentBash),E=n.terminals.filter(e=>e.agentBash),N=e=>{var f;if(!n.ready)return;const l=ee(),i=n.activeConversationId||((f=n.state)==null?void 0:f.conversationId)||"";x.create({...e,id:l,conversationId:i,cols:e.cols??80,rows:e.rows??24,running:!0,exitCode:null}),u(l),j(!1)},d=()=>{var e;return N({title:t("terminalTitle",{n:S.length+1}),cwd:((e=n.state)==null?void 0:e.cwd)??""})},F=e=>{var f;const l=e.name||e.command,i=n.terminals.find(D=>D.title===l);if(i){x.restart(i.id),u(i.id),r({type:"run_command",terminalId:i.id,conversationId:i.conversationId,command:e,cols:80,rows:24});return}N({title:l,cwd:((f=n.state)==null?void 0:f.cwd)??"",command:e})},R=e=>{const l=n.terminals.find(i=>i.id===e);if(l&&r({type:"terminal_kill",terminalId:e,conversationId:l.conversationId}),x.close(e),w===e){const i=n.terminals.filter(f=>f.id!==e);u(i.length>0?i[i.length-1].id:null)}},C=e=>s.jsxs("div",{className:`term-tab ${e.id===w?"active":""}`,children:[s.jsxs("button",{type:"button",className:"term-tab-main",title:`${e.cwd}${e.command?`
|
|
2
2
|
> ${e.command.command}`:""}`,onClick:()=>{u(e.id),j(!1)},children:[s.jsx("span",{className:`term-tab-dot ${e.running?"run":"exit"}`}),s.jsxs("span",{className:"term-tab-title",children:[e.title,!e.running&&s.jsx("span",{className:"term-tab-exit",children:t("exited",{code:e.exitCode===null?"":` ${e.exitCode}`})})]})]}),s.jsx("button",{type:"button",className:"term-tab-close",title:t("closeTerminal"),onClick:()=>R(e.id),children:s.jsx(Z,{})})]},e.id),M=()=>{v(!0),g(null),m(O)},z=e=>{const l=n.commands[e];l&&(v(!1),g(e),m({name:l.name,command:l.command,cwd:l.cwd??""}))},A=()=>{v(!1),g(null)},$=()=>{const e=o.name.trim(),l=o.command.trim();if(!e||!l)return;const i=o.cwd.trim(),f={name:e,command:l,cwd:i||void 0},D=T?[...n.commands,f]:b!==null?n.commands.map((q,G)=>G===b?f:q):n.commands;r({type:"save_commands",commands:D}),A()},H=e=>{if(a===e){const l=n.commands.filter((i,f)=>f!==e);r({type:"save_commands",commands:l}),y(null),p.current&&clearTimeout(p.current)}else y(e),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>y(null),2500)},P=T||b!==null;return s.jsxs("div",{className:"terminal-view",children:[s.jsxs("aside",{className:`term-side term-commands ${h?"open":""}`,children:[s.jsxs("div",{className:"panel-header",children:[s.jsx("span",{className:"panel-title",children:t("commands")}),s.jsxs("div",{className:"panel-header-actions",children:[s.jsx("button",{type:"button",className:"panel-refresh",title:t("rerun"),onClick:()=>r({type:"list_commands"}),children:s.jsx(X,{})}),s.jsx("button",{type:"button",className:"panel-new",title:t("newCommand"),onClick:M,children:s.jsx(B,{})})]})]}),s.jsx("div",{className:"panel-body",children:P?s.jsxs("div",{className:"cmd-form",children:[s.jsx("label",{htmlFor:"cmd-name",children:t("name")}),s.jsx("input",{id:"cmd-name",className:"cmd-input",value:o.name,placeholder:t("exampleName"),autoFocus:!0,onChange:e=>m({...o,name:e.target.value})}),s.jsx("label",{htmlFor:"cmd-command",children:t("command")}),s.jsx("input",{id:"cmd-command",className:"cmd-input",value:o.command,placeholder:t("exampleCommand"),onChange:e=>m({...o,command:e.target.value}),onKeyDown:e=>{e.key==="Enter"&&!e.nativeEvent.isComposing&&$()}}),s.jsxs("label",{htmlFor:"cmd-cwd",children:[t("directory")," ",s.jsx("span",{className:"cmd-hint",children:t("cwdHint")})]}),s.jsx("input",{id:"cmd-cwd",className:"cmd-input",value:o.cwd,placeholder:"${pwd}",onChange:e=>m({...o,cwd:e.target.value}),onKeyDown:e=>{e.key==="Enter"&&!e.nativeEvent.isComposing&&$()}}),s.jsxs("div",{className:"cmd-form-actions",children:[s.jsx("button",{type:"button",className:"btn",onClick:A,children:t("cancel")}),s.jsx("button",{type:"button",className:"btn primary",disabled:!o.name.trim()||!o.command.trim(),onClick:$,children:t("save")})]})]}):s.jsxs(s.Fragment,{children:[n.commands.length===0&&s.jsx("div",{className:"panel-empty",children:t("noCommands")}),n.commands.map((e,l)=>s.jsxs("div",{className:"cmd-item",children:[s.jsx("button",{type:"button",className:"cmd-run",title:t("clickToRun"),onClick:()=>F(e),children:s.jsx(Q,{})}),s.jsxs("button",{type:"button",className:"cmd-main",title:t("clickToRun"),onClick:()=>F(e),children:[s.jsx("span",{className:"cmd-name",children:e.name}),s.jsx("span",{className:"cmd-command",children:e.command}),e.cwd&&s.jsx("span",{className:"cmd-cwd",children:e.cwd})]}),s.jsx("button",{type:"button",className:"cmd-act",title:t("edit"),onClick:()=>z(l),children:s.jsx(U,{})}),s.jsx("button",{type:"button",className:`cmd-act del ${a===l?"confirm":""}`,title:t("delete"),onClick:()=>H(l),children:a===l?t("confirmQ"):s.jsx(V,{})})]},l))]})}),s.jsxs("div",{className:"term-tabs-block",children:[s.jsxs("div",{className:"panel-header",children:[s.jsx("span",{className:"panel-title",children:t("terminal")}),s.jsx("button",{type:"button",className:"panel-new",title:t("newTerminal"),onClick:d,children:s.jsx(B,{})})]}),s.jsxs("div",{className:"panel-body",children:[n.terminals.length===0&&s.jsx("div",{className:"panel-empty",children:t("noTerminal")}),S.map(C),E.length>0&&s.jsxs("div",{className:"term-folder",children:[s.jsxs("button",{type:"button",className:`term-folder-header ${k?"open":""}`,title:t("aiBashGroup"),onClick:()=>_(e=>!e),children:[s.jsx("span",{className:"term-folder-caret",children:k?"▾":"▸"}),s.jsx("span",{className:"term-folder-title",children:t("aiBashGroup")}),s.jsx("span",{className:"term-folder-count",children:E.length})]}),k&&s.jsx("div",{className:"term-folder-body",children:E.map(C)})]})]})]})]}),s.jsxs("div",{className:"term-main",children:[h&&s.jsx("div",{className:"drawer-backdrop",onClick:()=>j(!1)}),s.jsx("button",{type:"button",className:"term-side-toggle",title:t("commands"),onClick:()=>j(e=>!e),children:s.jsx(W,{})}),n.terminals.length===0?s.jsxs("div",{className:"term-empty",children:[s.jsx(Y,{className:"term-empty-icon"}),s.jsx("div",{className:"term-empty-title",children:t("builtinTerminal")}),s.jsx("div",{className:"term-empty-sub",children:t("termEmptySub")})]}):n.terminals.map(e=>s.jsx(te,{conversationId:e.conversationId,terminalId:e.id,command:e.command,cwd:e.cwd,title:e.title,active:e.id===w,send:r,register:x.register},`${e.conversationId}:${e.id}`))]})]})}export{re as TerminalPanel};
|