@liguoshuai/pi-web-chat 2.0.0 → 2.1.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/docs/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.1.0] - 2026-08-30
11
+
12
+ ### Fixed & Improved
13
+ - **移动端流式打字与思考过程实时渲染修复 (Mobile Streaming & Thinking Render Fix)**:
14
+ - 在 `@liguoshuai/pi-chat-protocol`、Android 和 HarmonyOS 原生客户端中完善了 `assistantMessageEvent` 结构解析,修复了移动端在 AI 回复生成期间无法接收 `text_delta` 与 `thinking_delta` 流式打字效果的问题。
15
+ - **移动端历史会话转录加载修复 (Mobile Session History Restore)**:
16
+ - 在 Android (`ApiService`) 与 HarmonyOS (`HttpService`) 中新增了 `/api/session?file=...` 接口调用,在切换会话时自动还原历史聊天气泡。
17
+ - **Web 端 401 鉴权重连修复 (Web Re-Auth Fix)**:
18
+ - 修复了 `app.js` 中弹窗输入 Token 后调用未定义 `initWebSocket` 导致 `ReferenceError` 的异常,改为正确调用 `connectWs`。
19
+ - **服务端网关 RPC ID 保持与进程管理增强 (Gateway RPC ID & Lifecycle Improvements)**:
20
+ - 修复了网关转发指令时丢失客户端 `id` 的问题,确保 RPC 请求响应精确关联。
21
+ - 增强了 IPv6 Localhost 跨域兼容性支持与死连接自动清理。
22
+ - 补充了 `@liguoshuai/pi-chat-protocol` 中的 `createSetThinkingLevelMessage` 与 `createCycleThinkingLevelMessage` 辅助方法。
23
+
24
+ ---
25
+
10
26
  ## [2.0.0] - 2026-08-30
11
27
 
12
28
  ### Major Architecture Refactoring (Monorepo & Multi-Client Ecosystem)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liguoshuai/pi-web-chat",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
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",
@@ -40,8 +40,8 @@
40
40
  "node": ">=18"
41
41
  },
42
42
  "dependencies": {
43
- "@liguoshuai/pi-chat-protocol": "2.0.0",
44
- "@liguoshuai/pi-chat-server": "2.0.0",
43
+ "@liguoshuai/pi-chat-protocol": "2.1.0",
44
+ "@liguoshuai/pi-chat-server": "2.1.0",
45
45
  "express": "^4.21.2",
46
46
  "ws": "^8.18.0"
47
47
  },
package/public/app.js CHANGED
@@ -1655,7 +1655,7 @@ function connectWs(opts = {}) {
1655
1655
  const entered = prompt("Pi Gateway 开启了访问鉴权,请输入访问 Token:");
1656
1656
  if (entered) {
1657
1657
  localStorage.setItem("pi_auth_token", entered.trim());
1658
- initWebSocket({ explicitNewSession: false, isReconnect: true });
1658
+ connectWs({ explicitNewSession: false, isReconnect: true });
1659
1659
  }
1660
1660
  return;
1661
1661
  }