MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / line_span

Function line_span

graph-ui/agents/hooks/atlas-trace.py:85–98  ·  view source on GitHub ↗

Use an explicit requested source range, never infer it after an edit. PostToolUse runs after mutation. Searching old_string could locate a different, unchanged occurrence and falsely attribute that line to the observed edit.

(file_path, args)

Source from the content-addressed store, hash-verified

83
84
85def line_span(file_path, args):
86 """Use an explicit requested source range, never infer it after an edit.
87
88 PostToolUse runs after mutation. Searching old_string could locate a different,
89 unchanged occurrence and falsely attribute that line to the observed edit.
90 """
91 offset = args.get('offset')
92 limit = args.get('limit')
93 if isinstance(offset, int) and not isinstance(offset, bool) and offset > 0:
94 if isinstance(limit, int) and not isinstance(limit, bool) and limit > 0:
95 return [offset, offset + limit - 1]
96 return [offset, offset]
97
98 return None
99
100
101def daemon_origin(value):

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected