thinkpool-pair 0.7.21 → 0.7.22

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/bridge.mjs +7 -1
  2. package/package.json +1 -1
package/bridge.mjs CHANGED
@@ -837,7 +837,13 @@ channel
837
837
  if (wantStructured(startCmd)) {
838
838
  const all = loadAll(room).filter((r) => r.log?.length || r.sessionId)
839
839
  if (all.length) for (const rec of all) openStructured({ id: rec.id, resume: canResume(rec) ? rec.sessionId : undefined, log: rec.log, commands: rec.commands, mode: rec.mode })
840
- else openStructured({ id: randomUUID() })
840
+ // Fresh open: ONLY for an explicit `-- <claude>` share. In account mode
841
+ // (autoAgent set, no attachedCmd) the web's `?new=1` flow opens the first
842
+ // terminal; opening one here too raced it into TWO terminals — each a
843
+ // fresh random id, so openStructured's id-dedup couldn't catch it. The
844
+ // saved-session restore above still runs unconditionally, so a bridge
845
+ // restart resumes backgrounded sessions regardless of this guard.
846
+ else if (attachedCmd) openStructured({ id: randomUUID() })
841
847
  }
842
848
  else {
843
849
  // Reuse the prior auto-opened PTY id across restarts so a reconnecting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.21",
3
+ "version": "0.7.22",
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": {