MCPcopy Create free account
hub / github.com/anomalyco/opencode / withPath

Function withPath

packages/app/src/context/file.tsx:243–245  ·  view source on GitHub ↗
(input: string, action: (file: string) => unknown)

Source from the content-addressed store, hash-verified

241 }
242
243 function withPath(input: string, action: (file: string) => unknown) {
244 return action(path.normalize(input))
245 }
246 const scrollTop = (input: string) => withPath(input, (file) => view().scrollTop(file))
247 const scrollLeft = (input: string) => withPath(input, (file) => view().scrollLeft(file))
248 const selectedLines = (input: string) => withPath(input, (file) => view().selectedLines(file))

Callers 6

scrollTopFunction · 0.85
scrollLeftFunction · 0.85
selectedLinesFunction · 0.85
setScrollTopFunction · 0.85
setScrollLeftFunction · 0.85
setSelectedLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected