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

Function getSemanticDiffScratchCwd

packages/shared/semantic-diff.ts:165–179  ·  view source on GitHub ↗
(dataDir = getPlannotatorDataDir())

Source from the content-addressed store, hash-verified

163}
164
165export function getSemanticDiffScratchCwd(dataDir = getPlannotatorDataDir()): string {
166 const primary = join(dataDir, "semantic-diff", "patch-only");
167 try {
168 mkdirSync(primary, { recursive: true });
169 return primary;
170 } catch {
171 const fallback = join(tmpdir(), "plannotator-semantic-diff");
172 try {
173 mkdirSync(fallback, { recursive: true });
174 return fallback;
175 } catch {
176 return tmpdir();
177 }
178 }
179}
180
181function isPathLike(value: string): boolean {
182 return value.includes("/") || value.includes("\\") || value.startsWith(".");

Callers 3

startReviewServerFunction · 0.90
runSemanticDiffFunction · 0.85
startReviewServerFunction · 0.85

Calls 1

getPlannotatorDataDirFunction · 0.90

Tested by

no test coverage detected