MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / markNavigation

Function markNavigation

e2e/src/timeline.ts:52–57  ·  view source on GitHub ↗
(runDir: string, url: string)

Source from the content-addressed store, hash-verified

50
51/** Record a main-frame navigation (deduped against the previous URL). */
52export const markNavigation = (runDir: string, url: string): void => {
53 const timeline = read(runDir);
54 const nav = timeline.nav ?? [];
55 if (nav.at(-1)?.url === url) return;
56 write(runDir, { ...timeline, nav: [...nav, { at: Date.now(), url }] });
57};
58
59export const readTimeline = (runDir: string): Timeline | null =>
60 existsSync(fileFor(runDir)) ? read(runDir) : null;

Callers 1

makeBrowserSurfaceFunction · 0.90

Calls 2

readFunction · 0.85
writeFunction · 0.70

Tested by

no test coverage detected