(state)
| 902 | await fs.writeFile(path.join(checkpointDir, `${prefix}.patch`), `${diff.stdout}\n${staged.stdout}`) |
| 903 | if (job.gitCheckpoint) { |
| 904 | await runProcess("git", ["add", "-A"], directory, 120_000) |
| 905 | await runProcess("git", ["commit", "-m", `chore: opencode loop checkpoint ${timestamp}`], directory, 120_000) |
| 906 | } |
| 907 | await toast(client, `Loop checkpoint saved: ${prefix}`, "success") |
| 908 | } |
| 909 | |
| 910 | function updateSessionStatusFromEvent(event) { |
| 911 | const sessionID = event?.properties?.sessionID |
| 912 | if (typeof sessionID !== "string") return undefined |
| 913 | if (event?.type === "session.idle") { |
no test coverage detected