MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / parseOnDrift

Function parseOnDrift

src/ui-server/api/source.ts:332–340  ·  view source on GitHub ↗
(query: URLSearchParams)

Source from the content-addressed store, hash-verified

330 'match them. The next sync picks it up.';
331
332export function parseOnDrift(query: URLSearchParams): OnDrift {
333 const raw = query.get('ondrift');
334 if (raw === null || raw === '' || raw === 'omit') return 'omit';
335 if (raw === 'current') return 'current';
336 throw badRequest(
337 `Parameter "ondrift" must be "omit" or "current" (got "${raw}").`,
338 'Omit it to leave a drifted file unsliced; "current" serves the bytes on disk instead.'
339 );
340}
341
342export async function buildSource(
343 cg: CodeGraph,

Callers 1

buildSourceFunction · 0.85

Calls 2

badRequestFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected