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

Function fileHref

ui/src/lib/navigation.ts:133–140  ·  view source on GitHub ↗
(path, opts = {})

Source from the content-addressed store, hash-verified

131 },
132
133 fileHref(path, opts = {}) {
134 const params = new URLSearchParams();
135 // `src` before `hl` so the two file URLs a reader shares differ in their
136 // first character after the path, not somewhere in the middle.
137 if (opts.source) params.set('src', '1');
138 if (opts.line) params.set('hl', String(opts.line));
139 return `#/file/${encodePath(path)}${query(params)}`;
140 },
141
142 mapHref(opts = {}) {
143 const params = new URLSearchParams();

Callers 2

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

Calls 4

fileHrefMethod · 0.80
encodePathFunction · 0.70
queryFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected