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

Function copyOverlayToMain

src/services/PromptSuggestion/speculation.ts:99–117  ·  view source on GitHub ↗
(
  overlayPath: string,
  writtenPaths: Set<string>,
  cwd: string,
)

Source from the content-addressed store, hash-verified

97}
98
99async function copyOverlayToMain(
100 overlayPath: string,
101 writtenPaths: Set<string>,
102 cwd: string,
103): Promise<boolean> {
104 let allCopied = true
105 for (const rel of writtenPaths) {
106 const src = join(overlayPath, rel)
107 const dest = join(cwd, rel)
108 try {
109 await mkdir(dirname(dest), { recursive: true })
110 await copyFile(src, dest)
111 } catch {
112 allCopied = false
113 logForDebugging(`[Speculation] Failed to copy ${rel} to main`)
114 }
115 }
116 return allCopied
117}
118
119export type ActiveSpeculationState = Extract<
120 SpeculationState,

Callers 1

acceptSpeculationFunction · 0.85

Calls 2

mkdirFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected