MCPcopy Create free account
hub / github.com/freecodexyz/free-code / writeCacheBreakDiff

Function writeCacheBreakDiff

src/services/api/promptCacheBreakDetection.ts:708–727  ·  view source on GitHub ↗
(
  prevContent: string,
  newContent: string,
)

Source from the content-addressed store, hash-verified

706}
707
708async function writeCacheBreakDiff(
709 prevContent: string,
710 newContent: string,
711): Promise<string | undefined> {
712 try {
713 const diffPath = getCacheBreakDiffPath()
714 await mkdir(getClaudeTempDir(), { recursive: true })
715 const patch = createPatch(
716 'prompt-state',
717 prevContent,
718 newContent,
719 'before',
720 'after',
721 )
722 await writeFile(diffPath, patch)
723 return diffPath
724 } catch {
725 return undefined
726 }
727}

Callers 1

Calls 2

getCacheBreakDiffPathFunction · 0.85
mkdirFunction · 0.85

Tested by

no test coverage detected