@bakapiano/ccsm 0.21.2 → 0.21.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakapiano/ccsm",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "description": "Claude Code Session Manager — Windows web UI to manage many concurrent claude sessions: live list, snapshot/restore, focus existing window, new session in an isolated workspace with repo clones",
5
5
  "license": "MIT",
6
6
  "main": "server.js",
@@ -380,7 +380,11 @@ export function TerminalView({ terminalId, cliType }) {
380
380
  };
381
381
  const doPaste = (text) => {
382
382
  if (!text) return;
383
- if (ws.readyState !== 1) return;
383
+ // Read the live socket — `ws` is scoped to connect() and reassigned on
384
+ // every reconnect, so referencing it here would be a ReferenceError
385
+ // (which silently killed Ctrl+V via onKey's .catch).
386
+ const ws = wsRef.current;
387
+ if (!ws || ws.readyState !== 1) return;
384
388
  // Normalize line endings to \r (CR / Enter). This mirrors VSCode's
385
389
  // terminal sendText path (terminalInstance.ts ~L1385):
386
390
  // text = text.replace(/\r?\n/g, '\r');
@@ -468,7 +472,8 @@ export function TerminalView({ terminalId, cliType }) {
468
472
  ev.preventDefault();
469
473
  ev.stopPropagation();
470
474
  ev.stopImmediatePropagation();
471
- if (ws.readyState === 1) {
475
+ const ws = wsRef.current;
476
+ if (ws && ws.readyState === 1) {
472
477
  ws.send(JSON.stringify({ type: 'input', data }));
473
478
  }
474
479
  };