AI coding workspace
Source-map segment lookup
A line number alone does not identify the original instruction. MapAperture is a Windows coding client for examining source-map consumers with an AI conversation and reviewing how generated positions are resolved.
● ● ●MapAperture●
A concrete starting point · Source-map segment lookup ×
def locate(segments, column):
candidates = [s for s in segments if s[0] <= column]
if not candidates:
return None
return max(candidates, key=lambda s: s[0])[1]✳Find the source mapping at a generated column using segments from that generated line only.
✓ ChangesReview before applying ↗
Illustrative workspace
- Connection
- Base URL, credentials and a reachable server.
- Project
- Check a column before the first segment and an explicitly unmapped segment, returning no location instead of borrowing a mapping from another line.
- Review before applying
- Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
A concrete starting point
def locate(segments, column):
candidates = [s for s in segments if s[0] <= column]
if not candidates:
return None
return max(candidates, key=lambda s: s[0])[1]