@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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@liguoshuai/pi-web-chat.svg)](https://www.npmjs.com/package/@liguoshuai/pi-web-chat)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
- [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-brightgreen.svg)](https://nodejs.org/)
5
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-brightgreen.svg)](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**: `>= 18.0.0`
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.17.8",
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": ">=18"
40
+ "node": ">=20"
41
41
  },
42
42
  "dependencies": {
43
43
  "express": "^4.21.2",
44
44
  "ws": "^8.18.0",
45
- "@liguoshuai/pi-chat-protocol": "2.17.8",
46
- "@liguoshuai/pi-chat-server": "2.17.8"
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
- const liveTools = document.querySelectorAll(".tool-duration.live");
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
- }, 100);
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
- toast("生成超时(5 分钟无响应),已自动结束。", "warn");
3141
+ showToast("生成超时(5 分钟无响应),已自动结束。");
3148
3142
  finalizeStreamingMsg();
3149
3143
  }
3150
3144
  }, 5 * 60 * 1000);