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

Function navigate

ui/src/lib/navigation.ts:187–199  ·  view source on GitHub ↗
(href, opts = {})

Source from the content-addressed store, hash-verified

185 },
186
187 navigate(href, opts = {}) {
188 const target = href.startsWith('#') ? href : `#${href}`;
189 if (opts.replace) {
190 history.replaceState(history.state, '', target);
191 onHashWritten();
192 return;
193 }
194 if (location.hash === target) return;
195 location.hash = target;
196 // hashchange fires asynchronously; the sync is idempotent, so calling it
197 // now keeps a navigate() immediately followed by a read consistent.
198 onHashWritten();
199 },
200
201 back() {
202 history.back();

Callers 2

walkToFunction · 0.90
openEntryTargetFunction · 0.90

Calls 2

onHashWrittenFunction · 0.85
navigateMethod · 0.80

Tested by

no test coverage detected