claude-opencode-viewer 2.6.52 → 2.6.54

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/bin/cov.js CHANGED
@@ -88,6 +88,7 @@ const serverArgs = [SERVER_PATH, String(port)];
88
88
  if (args.includes('--pc')) serverArgs.push('--pc');
89
89
  if (args.includes('--https')) serverArgs.push('--https');
90
90
  if (args.includes('--json')) serverArgs.push('--json');
91
+ if (args.includes('--shell')) serverArgs.push('--shell');
91
92
  const server = spawn(process.execPath, serverArgs, {
92
93
  stdio: 'inherit',
93
94
  cwd: process.cwd(),
package/index-pc.html CHANGED
@@ -956,6 +956,7 @@
956
956
  <div id="mode-switcher">
957
957
  <span id="mode-label"></span>
958
958
  <select id="mode-select">
959
+ <option value="" disabled selected hidden>--</option>
959
960
  <option value="opencode">OpenCode</option>
960
961
  <option value="claude">Claude</option>
961
962
  <option value="shell">Shell</option>
@@ -1132,6 +1133,8 @@
1132
1133
  cursorBlink: !isMobile,
1133
1134
  fontSize: fontSize,
1134
1135
  fontFamily: 'Menlo, Monaco, "Courier New", monospace',
1136
+ lineHeight: 1.15,
1137
+ letterSpacing: 0,
1135
1138
  theme: {
1136
1139
  background: '#0a0a0a',
1137
1140
  foreground: '#d4d4d4',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.6.52",
3
+ "version": "2.6.54",
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
@@ -19,6 +19,7 @@ const IS_PC = process.argv.includes('--pc');
19
19
  const PORT = parseInt(process.argv[2]) || 7008;
20
20
  const USE_HTTPS = process.argv.includes('--https');
21
21
  const JSON_OUTPUT = process.argv.includes('--json');
22
+ const INIT_SHELL = IS_PC || process.argv.includes('--shell');
22
23
  const LOG = JSON_OUTPUT ? console.log.bind(console) : () => {};
23
24
 
24
25
  // 自签名证书生成(使用 selfsigned 库,不依赖 openssl)
@@ -1521,10 +1522,19 @@ function startServer() {
1521
1522
  // 清理上次 cov 崩溃残留的孤儿进程
1522
1523
  cleanupOrphanProcesses();
1523
1524
 
1524
-
1525
- // 延迟启动:等待 PC 客户端发送 init 消息后再 spawn 进程
1526
- // 移动端客户端连接时自动启动 claude(见 WS 连接处理)
1527
- LOG('[startup] 等待客户端连接并选择会话...');
1525
+ if (INIT_SHELL) {
1526
+ // --shell 模式:启动时直接进入 shell,跳过启动对话框
1527
+ currentMode = 'shell';
1528
+ try {
1529
+ await spawnProcess('shell');
1530
+ LOG('[startup] Shell 已启动');
1531
+ } catch (e) {
1532
+ LOG('[startup] Shell 启动失败:', e.message);
1533
+ }
1534
+ } else {
1535
+ // 延迟启动:等待 PC 客户端发送 init 消息后再 spawn 进程
1536
+ LOG('[startup] 等待客户端连接并选择会话...');
1537
+ }
1528
1538
 
1529
1539
  });
1530
1540