(state: ContinuousLearningState)
| 115 | } |
| 116 | |
| 117 | function saveState(state: ContinuousLearningState): void { |
| 118 | const directory = dirname(STATE_PATH); |
| 119 | if (!existsSync(directory)) { |
| 120 | mkdirSync(directory, { recursive: true }); |
| 121 | } |
| 122 | writeFileSync(STATE_PATH, `${JSON.stringify(state, null, 2)}\n`, "utf-8"); |
| 123 | } |
| 124 | |
| 125 | function getTranscriptMtimeMs(transcriptPath: string | null | undefined): number | null { |
| 126 | if (!transcriptPath) { |