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.
- package/bridge.mjs +7 -1
- 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
|
-
|
|
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
|