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

Function trailAuthor

src/ui-server/api/trails.ts:445–452  ·  view source on GitHub ↗
(projectRoot: string)

Source from the content-addressed store, hash-verified

443const cachedAuthors = new Map<string, string>();
444
445export function trailAuthor(projectRoot: string): string {
446 const key = authorCacheKey(projectRoot);
447 const cached = cachedAuthors.get(key);
448 if (cached !== undefined) return cached;
449 const author = gitUserName(projectRoot) ?? osUserName() ?? '';
450 cachedAuthors.set(key, author);
451 return author;
452}
453
454/** Test seam: forget the cached author. */
455export function resetTrailAuthor(): void {

Callers 2

ui-trails.test.tsFile · 0.90
saveTrailFunction · 0.85

Calls 5

authorCacheKeyFunction · 0.85
gitUserNameFunction · 0.85
osUserNameFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected