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

Function symbolHref

ui/src/lib/navigation.ts:123–131  ·  view source on GitHub ↗
(id, opts = {})

Source from the content-addressed store, hash-verified

121/** The `codegraph ui` address space: the hash is the route. */
122export const hashNavigation: NavigationDriver = {
123 symbolHref(id, opts = {}) {
124 const params = new URLSearchParams();
125 if (opts.trail) params.set('t', opts.trail);
126 if (opts.line) params.set('hl', String(opts.line));
127 // No id: the tab itself. `#/s` rather than `#/s/` so the segment filter
128 // cannot read an empty id back out of it.
129 if (!id) return `#/s${query(params)}`;
130 return `#/s/${encodePath(id)}${query(params)}`;
131 },
132
133 fileHref(path, opts = {}) {
134 const params = new URLSearchParams();

Callers 2

walkToFunction · 0.90
ui-package.test.tsFile · 0.85

Calls 4

symbolHrefMethod · 0.80
queryFunction · 0.70
encodePathFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected