@wendongfly/myhi 1.0.77 → 1.0.78

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.
Files changed (2) hide show
  1. package/dist/chat.html +3 -2
  2. package/package.json +1 -1
package/dist/chat.html CHANGED
@@ -976,8 +976,9 @@
976
976
  }
977
977
  }
978
978
 
979
- socket.on('connect', () => { showOverlay('正在加入会话...'); socket.emit('join', SESSION_ID); });
980
- socket.on('connect_error', (err) => { showOverlay('连接失败: ' + err.message, true); });
979
+ let _reconnectFails = 0;
980
+ socket.on('connect', () => { _reconnectFails = 0; showOverlay('正在加入会话...'); socket.emit('join', SESSION_ID); });
981
+ socket.on('connect_error', () => { _reconnectFails++; showOverlay(_reconnectFails >= 5 ? '连接失败,请检查网络' : `正在重连... (${_reconnectFails})`, _reconnectFails >= 10); });
981
982
  socket.on('disconnect', () => { showOverlay('已断开连接,正在重连...'); });
982
983
 
983
984
  socket.on('joined', (session) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.0.77",
3
+ "version": "1.0.78",
4
4
  "description": "Web-based terminal sharing with chat UI — control your terminal from phone via LAN/Tailscale",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",