@liguoshuai/pi-web-chat 2.17.8 → 2.18.13
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 +2 -2
- package/package.json +4 -4
- package/public/app.js +3 -9
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@liguoshuai/pi-web-chat)
|
|
4
4
|
[](LICENSE)
|
|
5
|
-
[](https://nodejs.org/)
|
|
6
6
|
|
|
7
7
|
一个 [pi](https://pi.dev) 编程代理的 Web 界面,风格参考 ChatGPT / Gemini ——
|
|
8
8
|
左侧历史会话侧边栏 + 右侧对话区 + 底部输入框。底层通过 pi 的 **RPC 模式**
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
## 🚀 快速开始
|
|
36
36
|
|
|
37
37
|
### 1. 环境准备
|
|
38
|
-
- **Node.js**: `>=
|
|
38
|
+
- **Node.js**: `>= 20.0.0`
|
|
39
39
|
- **操作系统**: Linux / macOS / WSL (Windows)
|
|
40
40
|
|
|
41
41
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liguoshuai/pi-web-chat",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.13",
|
|
4
4
|
"description": "A ChatGPT/Gemini-style web UI for the pi coding agent, powered by pi's RPC mode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">=20"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"express": "^4.21.2",
|
|
44
44
|
"ws": "^8.18.0",
|
|
45
|
-
"@liguoshuai/pi-chat-
|
|
46
|
-
"@liguoshuai/pi-chat-
|
|
45
|
+
"@liguoshuai/pi-chat-server": "2.18.13",
|
|
46
|
+
"@liguoshuai/pi-chat-protocol": "2.18.13"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "node --check server.js && node --check bin/pi-web-chat.js && node --check public/markdown.js && node --check public/app.js",
|
package/public/app.js
CHANGED
|
@@ -372,13 +372,7 @@ function startStreamingTimer() {
|
|
|
372
372
|
el.style.display = "";
|
|
373
373
|
}
|
|
374
374
|
});
|
|
375
|
-
|
|
376
|
-
liveTools.forEach((el) => {
|
|
377
|
-
if (el._startedAt) {
|
|
378
|
-
el.textContent = formatDuration(now - el._startedAt);
|
|
379
|
-
el.style.display = "";
|
|
380
|
-
}
|
|
381
|
-
});
|
|
375
|
+
|
|
382
376
|
// Live update for the thinking placeholder spinner label before first delta arrives
|
|
383
377
|
const placeholder = document.querySelector(".thinking-placeholder");
|
|
384
378
|
if (placeholder && state.turnStartedAt) {
|
|
@@ -393,7 +387,7 @@ function startStreamingTimer() {
|
|
|
393
387
|
}
|
|
394
388
|
}
|
|
395
389
|
}
|
|
396
|
-
},
|
|
390
|
+
}, 200);
|
|
397
391
|
}
|
|
398
392
|
|
|
399
393
|
function stopStreamingTimer() {
|
|
@@ -3144,7 +3138,7 @@ function submitPrompt() {
|
|
|
3144
3138
|
if (state.streamingWatchdog) clearTimeout(state.streamingWatchdog);
|
|
3145
3139
|
state.streamingWatchdog = setTimeout(() => {
|
|
3146
3140
|
if (state.streaming) {
|
|
3147
|
-
|
|
3141
|
+
showToast("生成超时(5 分钟无响应),已自动结束。");
|
|
3148
3142
|
finalizeStreamingMsg();
|
|
3149
3143
|
}
|
|
3150
3144
|
}, 5 * 60 * 1000);
|