( sessionId: UUID, state: GoalState, fullPath?: string, )
| 2746 | * past compaction's tail-read window. |
| 2747 | */ |
| 2748 | export function saveGoal( |
| 2749 | sessionId: UUID, |
| 2750 | state: GoalState, |
| 2751 | fullPath?: string, |
| 2752 | ): void { |
| 2753 | const resolvedPath = fullPath ?? getTranscriptPathForSession(sessionId) |
| 2754 | appendEntryToFile(resolvedPath, { |
| 2755 | type: 'goal', |
| 2756 | sessionId, |
| 2757 | state, |
| 2758 | timestamp: new Date().toISOString(), |
| 2759 | }) |
| 2760 | if (sessionId === getSessionId()) { |
| 2761 | getProject().currentSessionGoal = state |
| 2762 | } |
| 2763 | } |
| 2764 | |
| 2765 | /** |
| 2766 | * Persist a "goal cleared" tombstone so a future --resume cannot |
nothing calls this directly
no test coverage detected