pi-web-ui 0.73.0 → 0.74.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/CHANGELOG.md +15 -2
- package/README.md +568 -562
- package/README.zh-CN.md +19 -13
- package/package.json +1 -1
- package/themes/cyberpunk.css +3 -0
- package/themes/dazzle.css +3 -0
- package/themes/md-preview.css +3 -0
- package/themes/transparent.css +32 -2
- package/themes/white.css +3 -0
- package/web/dist/assets/{TerminalPanel-Bz-58xBx.js → TerminalPanel-DgR_8K2X.js} +1 -1
- package/web/dist/assets/index-BplWuHvM.js +335 -0
- package/web/dist/assets/index-CbshsMO6.css +10 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-DB1SxjbK.js +0 -335
- package/web/dist/assets/index-Dqbw78CU.css +0 -10
package/README.zh-CN.md
CHANGED
|
@@ -101,19 +101,25 @@
|
|
|
101
101
|
|
|
102
102
|
## 界面截图
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
104
|
+

|
|
105
|
+
|
|
106
|
+
*对话 + 提示词模板*
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
*运行轨迹时间线(run-trace 插件)*
|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
*设置面板*
|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
*内置终端*
|
|
119
|
+
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
*Git 源代码管理面板*
|
|
117
123
|
|
|
118
124
|
## 安装
|
|
119
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.74.0",
|
|
4
4
|
"description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
package/themes/cyberpunk.css
CHANGED
package/themes/dazzle.css
CHANGED
package/themes/md-preview.css
CHANGED
package/themes/transparent.css
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 全透后 hover/浮动反馈不能依赖容器色(已是 0%),本文件尾段把这些实色
|
|
13
13
|
* hover 统一改成 25% 半透底(折叠摘要、展开条、折叠键、复制键、滚到底按钮);
|
|
14
|
-
* 强调色 hover(accent-soft
|
|
14
|
+
* 强调色 hover(accent-soft)与大部分语义按钮(发送/杀进程)不受影响;
|
|
15
|
+
* 例外是 bash 工具卡的「停止」键(.toolcall-kill):红底红字在全透下是一块脏红,
|
|
16
|
+
* 改成描边式(透明底 + 半透红描边 + 亮红字)。
|
|
15
17
|
* 下拉弹窗(声音/语言/主题/模型/思考强度等 .dd-menu)保持实色
|
|
16
18
|
* (--menu-bg: var(--bg-elev2)),密集列表不随界面透图。
|
|
17
19
|
* 配壁纸用最佳;不配壁纸时界面直接透出 --bg 纯色(= 默认暗色,无差别)。
|
|
@@ -59,12 +61,25 @@
|
|
|
59
61
|
控件 / 输入框 / 消息区)直接变 transparent;终端 --term-bg 上面已设
|
|
60
62
|
transparent。想留一点点玻璃感就把这里提到 10~15%。---- */
|
|
61
63
|
--wallpaper-panel-alpha: 0%;
|
|
64
|
+
/* 工具参数 / 工具输出 / 终端行(.toolcall-args pre / .toolcall-output pre /
|
|
65
|
+
.termline):全透下这三处无容器色(--chip-bg = 0%),实色边框与外凸的
|
|
66
|
+
内边距只会把文字推出对齐线并横向切断壁纸,这里一并去掉。
|
|
67
|
+
markdown 围栏代码块 .codeblock pre 仍保留边框与内边距。 */
|
|
68
|
+
--code-border: transparent;
|
|
69
|
+
--code-pad: 0;
|
|
62
70
|
/* 下拉弹窗(声音/语言/主题/模型/思考强度):实色底保密集列表可读 */
|
|
63
71
|
--menu-bg: var(--bg-elev2);
|
|
64
72
|
/* 压暗加重:全透后没有容器色兜底,文字只靠压暗保可读 */
|
|
65
73
|
--bg-image-dim: 0.85;
|
|
66
74
|
}
|
|
67
75
|
|
|
76
|
+
/* 全透:工具卡内部不再保留重复的终端图标。无容器色兜底时(--chip-bg = 0%),绿色
|
|
77
|
+
终端图标只剩视觉噪音(卡头已有工具图标)。卡片内边距仍走 --card-body-pad
|
|
78
|
+
(与思考块 .thinking-body 同值),文字左缘与思考块对齐。 */
|
|
79
|
+
.termline-icon {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
68
83
|
/* hover / 浮动静置反馈:0% 容器色下这些实色 hover 必消失,统一给 25% 半透
|
|
69
84
|
底(仍透图、可辨反馈)。强调色 hover(accent-soft)与语义按钮不受影响;
|
|
70
85
|
下拉弹窗已在实色菜单内,其 hover 保留 styles.css 默认实色。 */
|
|
@@ -75,4 +90,19 @@
|
|
|
75
90
|
.empty-templates-reset:hover,
|
|
76
91
|
.scroll-bottom {
|
|
77
92
|
background: color-mix(in srgb, var(--bg-elev) 25%, transparent);
|
|
78
|
-
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* bash 工具卡的「停止」键:全透下不做实底。容器色为 0% 时,--red-soft 底 +
|
|
96
|
+
实红描边在壁纸上是一块洗不干净的脏红,改成「透明底 + 半透红描边 + 亮红字」——
|
|
97
|
+
与卡片里其他描边元素同一种克制感;hover 才落一层 78% 半透红(仍透图,
|
|
98
|
+
不成为实色块)。 */
|
|
99
|
+
.toolcall-kill {
|
|
100
|
+
background: transparent;
|
|
101
|
+
border-color: color-mix(in srgb, var(--red) 55%, transparent);
|
|
102
|
+
color: color-mix(in srgb, var(--red) 88%, #fff);
|
|
103
|
+
}
|
|
104
|
+
.toolcall-kill:hover {
|
|
105
|
+
background: color-mix(in srgb, var(--red) 78%, transparent);
|
|
106
|
+
border-color: var(--red);
|
|
107
|
+
color: #fff;
|
|
108
|
+
}
|
package/themes/white.css
CHANGED
|
@@ -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-BplWuHvM.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
|