Open History to see the last commit
1import * as Base64Url from "effect/encoding/Base64Url";
2import { CheckpointRef, type ThreadId } from "@t3tools/contracts";
3
4const CHECKPOINT_REFS_PREFIX = "refs/t3/checkpoints";
5
6export function checkpointRefForThreadTurn(threadId: ThreadId, turnCount: number): CheckpointRef {
7 return CheckpointRef.make(
8 `${CHECKPOINT_REFS_PREFIX}/${Base64Url.encode(threadId)}/turn/${turnCount}`,
9 );
10}