MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getDraftGeneration

Function getDraftGeneration

packages/shared/draft.ts:69–75  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

67}
68
69export function getDraftGeneration(key: string): number | null {
70 const generations = [
71 readStoredDraftGeneration(key),
72 readTombstoneGeneration(key),
73 ].filter((value): value is number => value !== null);
74 return generations.length > 0 ? Math.max(...generations) : null;
75}
76
77function writeTombstoneGeneration(key: string, draftGeneration: number): void {
78 const filePath = tombstonePath(key);

Callers 11

draft.test.tsFile · 0.90
handleDraftLoadFunction · 0.90
installFetchShimFunction · 0.90
installFetchShimFunction · 0.90
AppFunction · 0.85
handleApproveFunction · 0.85
handleDenyFunction · 0.85
handleAnnotateFeedbackFunction · 0.85
deleteDraftFunction · 0.85
ReviewAppFunction · 0.85
handleDraftRequestFunction · 0.85

Calls 2

readTombstoneGenerationFunction · 0.85

Tested by 2

installFetchShimFunction · 0.72
installFetchShimFunction · 0.72