claude-opencode-viewer 2.6.27 → 2.6.28

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 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.6.27",
3
+ "version": "2.6.28",
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
@@ -53,9 +53,9 @@ async function getOrCreateCert() {
53
53
  return { key: pems.private, cert: pems.cert };
54
54
  }
55
55
 
56
- // OpenCode 数据库路径(支持环境变量覆盖,自动检测 /halo 环境)
57
- const OPENCODE_DB_PATH = process.env.OPENCODE_DB_PATH || join(
58
- existsSync('/halo') ? '/halo/.local/share' : (process.env.XDG_DATA_HOME || join(homedir(), '.local/share')),
56
+ // OpenCode 数据库路径(优先读 OPENCODE_DB 环境变量,兼容本地盘 DB 方案)
57
+ const OPENCODE_DB_PATH = process.env.OPENCODE_DB || process.env.OPENCODE_DB_PATH || join(
58
+ process.env.XDG_DATA_HOME || join(homedir(), '.local/share'),
59
59
  'opencode/opencode.db'
60
60
  );
61
61
 
@@ -222,10 +222,6 @@ async function spawnProcess(mode, sessionId = null) {
222
222
  }
223
223
 
224
224
  const spawnEnv = { ...process.env };
225
- // 如果 /halo 存在,将 opencode 数据持久化到 NAS
226
- if (mode === 'opencode' && existsSync('/halo')) {
227
- spawnEnv.XDG_DATA_HOME = '/halo/.local/share';
228
- }
229
225
 
230
226
  // 恢复会话时,使用会话记录的工作目录
231
227
  let spawnCwd = process.cwd();