claude-opencode-viewer 2.6.33 → 2.6.35

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/package.json +1 -1
  2. package/server.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.6.33",
3
+ "version": "2.6.35",
4
4
  "description": "A unified terminal viewer for Claude Code and OpenCode with seamless switching",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -650,9 +650,9 @@ const requestHandler = async (req, res) => {
650
650
  status: line.substring(0, 2).trim(),
651
651
  file: line.substring(3),
652
652
  })).filter(c => !/^core-/.test(c.file));
653
- res.end(JSON.stringify({ changes }));
653
+ res.end(JSON.stringify({ changes, cwd: gitCwd }));
654
654
  } catch {
655
- res.end(JSON.stringify({ changes: [] }));
655
+ res.end(JSON.stringify({ changes: [], cwd: process.env.PROJECT_DIR || process.cwd() }));
656
656
  }
657
657
  return;
658
658
  }
@@ -1254,7 +1254,7 @@ wssInst.on('connection', (ws, req) => {
1254
1254
  });
1255
1255
 
1256
1256
  // WebSocket 心跳保活,防止中间网络设备断开空闲连接
1257
- const HEARTBEAT_INTERVAL = 15000;
1257
+ const HEARTBEAT_INTERVAL = 5000;
1258
1258
  const heartbeat = setInterval(() => {
1259
1259
  wssInst.clients.forEach((ws) => {
1260
1260
  if (ws.isAlive === false) return ws.terminate();