claude-opencode-viewer 2.1.9 → 2.2.1

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 (3) hide show
  1. package/index.html +3 -3
  2. package/package.json +1 -1
  3. package/server.js +0 -1
package/index.html CHANGED
@@ -475,7 +475,7 @@
475
475
  var value = inputField.value;
476
476
  if (value) {
477
477
  console.log('[input enter] sending:', value);
478
- ws.send(JSON.stringify({ type: 'input', data: value + '\r' }));
478
+ ws.send(JSON.stringify({ type: 'input', data: value + '\r\n' }));
479
479
  inputField.value = '';
480
480
  }
481
481
  e.preventDefault();
@@ -541,7 +541,7 @@
541
541
  // 焦点在输入框且有内容:只发送输入框内容,不额外发送 \r
542
542
  var value = inputField.value;
543
543
  console.log('[enter] from input:', value);
544
- ws.send(JSON.stringify({ type: 'input', data: value + '\r' }));
544
+ ws.send(JSON.stringify({ type: 'input', data: value + '\r\n' }));
545
545
  inputField.value = '';
546
546
  inputField.blur();
547
547
  } else if (isInputFocused && inputField) {
@@ -550,7 +550,7 @@
550
550
  } else {
551
551
  // 焦点在终端:直接发送回车
552
552
  console.log('[enter] sending \\r to terminal');
553
- ws.send(JSON.stringify({ type: 'input', data: '\r' }));
553
+ ws.send(JSON.stringify({ type: 'input', data: '\r\n' }));
554
554
  }
555
555
  return;
556
556
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-opencode-viewer",
3
- "version": "2.1.9",
3
+ "version": "2.2.1",
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
@@ -20,7 +20,6 @@ let ptyModule = null;
20
20
  let claudeProcess = null;
21
21
  let opencodeProcess = null;
22
22
  let currentProcess = null;
23
- let currentMode = 'claude';
24
23
  let outputBuffer = '';
25
24
  const dataListeners = [];
26
25
  const exitListeners = [];