thinkpool-pair 0.7.48 → 0.7.49

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/claude-session.mjs +11 -1
  2. package/package.json +1 -1
@@ -538,7 +538,17 @@ export function startClaudeSession({ cwd, model, resume, env, mode: initialMode
538
538
  },
539
539
  // Graceful interrupt (Esc / Stop) — stops the current turn but keeps the
540
540
  // session alive for the next one. ac.abort() is teardown only (end()).
541
- async abort() { try { await q?.interrupt?.() } catch { /* noop */ } },
541
+ async abort() {
542
+ try { await q?.interrupt?.() } catch { /* noop */ }
543
+ // interrupt() stops the turn but emits NO terminal message. Without one the
544
+ // struct event stream ends on a non-terminal event, so a page refresh replays
545
+ // it as still "thinking" (the client's optimistic stop is in-memory only and is
546
+ // lost on reload). Emit a terminal result so busy clears AND persists across
547
+ // refresh — the client persists on `result` and structWorkingFor() treats it as
548
+ // done. Guarded on turnActive so we don't double-emit if the SDK already
549
+ // surfaced a result for the interrupt. (2026-06-22)
550
+ if (turnActive) { turnActive = false; emit({ kind: 'result', subtype: 'aborted', sessionId }) }
551
+ },
542
552
  end() { closed = true; clearInterval(stallTimer); input.end(); try { ac.abort() } catch { /* noop */ } },
543
553
  get sessionId() { return sessionId },
544
554
  get mode() { return mode },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.48",
3
+ "version": "0.7.49",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {