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

Function removeTrail

src/ui-server/api/trails.ts:376–387  ·  view source on GitHub ↗
(
  cg: CodeGraph,
  projectRoot: string,
  id: string,
  options: TrailsOptions
)

Source from the content-addressed store, hash-verified

374}
375
376export function removeTrail(
377 cg: CodeGraph,
378 projectRoot: string,
379 id: string,
380 options: TrailsOptions
381): WireTrails {
382 if (options.readOnly) throw readOnlyRefusal(options.readOnlyReason);
383 if (!deleteStoredTrail(projectRoot, id)) {
384 throw notFound(`There is no saved trail called "${id}".`);
385 }
386 return { ...buildTrails(cg, projectRoot, options), deleted: id };
387}
388
389function readOnlyRefusal(reason: string | null): ApiError {
390 return new ApiError(

Callers 1

dispatchWriteFunction · 0.90

Calls 4

deleteStoredTrailFunction · 0.90
notFoundFunction · 0.90
readOnlyRefusalFunction · 0.85
buildTrailsFunction · 0.85

Tested by

no test coverage detected