MCPcopy Create free account
hub / github.com/MigoXLab/coderio / promptCheckpointChoice

Function promptCheckpointChoice

src/utils/checkpoint.ts:39–48  ·  view source on GitHub ↗
(checkpointer: SqliteSaver, threadId: string)

Source from the content-addressed store, hash-verified

37 * Returns true if user wants to resume, false if start fresh, undefined if no checkpoint exists
38 */
39export async function promptCheckpointChoice(checkpointer: SqliteSaver, threadId: string): Promise<boolean | undefined> {
40 const hasCheckpoint = await checkpointExists(checkpointer, threadId);
41
42 if (!hasCheckpoint) {
43 return undefined;
44 }
45
46 const choice = await promptUserChoice();
47 return choice === 'resume';
48}
49
50/**
51 * Clear checkpoint for the given thread_id (exported for external use)

Callers 1

design2codeFunction · 0.90

Calls 2

promptUserChoiceFunction · 0.90
checkpointExistsFunction · 0.85

Tested by

no test coverage detected