Files
orca/src/main/runtime/orca-runtime-report-pty-spawn-commit.ts
T
Neil 0b1a6007e0 feat(wsl-mover): a moved pane reopens in its last folder on the WSL host (D1b-6b) (#28885)
* feat(wsl-mover): a moved pane reopens in its last folder on the WSL host (D1b-6b)

* fix(wsl-mover): consume a restore hint only when its pane spawns, scope it to its worktree, retry failed installs (D1b-6b)
2026-10-14 16:53:05 -07:00

12 lines
299 B
TypeScript

/** An idempotent callback: the spawn-commit report and the stable-pane claim release run once. */
export function createIdempotentCallback(callback?: () => void): () => void {
let reported = false
return () => {
if (reported) {
return
}
reported = true
callback?.()
}
}