MCPcopy Index your code
hub / github.com/codeaashu/claude-code / toLocation

Function toLocation

src/tools/LSPTool/LSPTool.ts:623–631  ·  view source on GitHub ↗

* Converts LocationLink to Location format for uniform handling

(item: Location | LocationLink)

Source from the content-addressed store, hash-verified

621 * Converts LocationLink to Location format for uniform handling
622 */
623function toLocation(item: Location | LocationLink): Location {
624 if (isLocationLink(item)) {
625 return {
626 uri: item.targetUri,
627 range: item.targetSelectionRange || item.targetRange,
628 }
629 }
630 return item
631}
632
633/**
634 * Formats LSP result based on operation type and extracts summary counts

Callers 1

callFunction · 0.85

Calls 1

isLocationLinkFunction · 0.70

Tested by

no test coverage detected