feat(controller): Integrate py_get_definition for on-demand lookup

This commit is contained in:
2026-03-07 15:03:03 -05:00
parent 953e9e040c
commit c6f9dc886f
4 changed files with 62 additions and 24 deletions

View File

@@ -409,7 +409,7 @@ def py_get_definition(path: str, name: str) -> str:
start = cast(int, getattr(node, "lineno")) - 1
end = cast(int, getattr(node, "end_lineno"))
return "".join(lines[start:end])
return f"ERROR: could not find definition '{name}' in {path}"
return f"ERROR: definition '{name}' not found in {path}"
except Exception as e:
return f"ERROR retrieving definition '{name}' from '{path}': {e}"