π OpenHands: AI-Driven Development
Path in observation (#1216)
Engel Nystfe3d4b129d64
diff --git a/opendevin/action/fileop.py b/opendevin/action/fileop.pyindex 1530789ea3..ace8b89fd7 100644--- a/opendevin/action/fileop.py+++ b/opendevin/action/fileop.py@@ -36,10 +36,10 @@ class FileReadAction(ExecutableAction):action: str = ActionType.READasync def run(self, controller) -> FileReadObservation:- path = resolve_path(self.path)+ whole_path = resolve_path(self.path)self.start = max(self.start, 0)try:- with open(path, 'r', encoding='utf-8') as file:+ with open(whole_path, 'r', encoding='utf-8') as file:if self.end == -1:if self.start == 0:code_view = file.read()@@ -56,7 +56,7 @@ class FileReadAction(ExecutableAction):code_view = ''.join(code_slice)except FileNotFoundError:raise FileNotFoundError(f'File not found: {self.path}')- return FileReadObservation(path=path, content=code_view)+ return FileReadObservation(path=self.path, content=code_view)@propertydef message(self) -> str: