MCPcopy Index your code
hub / github.com/codeaashu/claude-code / deduplicateEdits

Function deduplicateEdits

src/services/api/claude.ts:3116–3125  ·  view source on GitHub ↗
(block: CachedMCEditsBlock)

Source from the content-addressed store, hash-verified

3114
3115 // Helper to deduplicate a cache_edits block against already-seen deletions
3116 const deduplicateEdits = (block: CachedMCEditsBlock): CachedMCEditsBlock => {
3117 const uniqueEdits = block.edits.filter(edit => {
3118 if (seenDeleteRefs.has(edit.cache_reference)) {
3119 return false
3120 }
3121 seenDeleteRefs.add(edit.cache_reference)
3122 return true
3123 })
3124 return { ...block, edits: uniqueEdits }
3125 }
3126
3127 // Re-insert all previously-pinned cache_edits at their original positions
3128 for (const pinned of pinnedEdits ?? []) {

Callers 1

addCacheBreakpointsFunction · 0.85

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected