Skip to content

Commit 20a51fa

Browse files
committed
made patches storage dir absolute
1 parent b3cec0a commit 20a51fa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

codetide/agents/tide/agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def pass_custom_logger_fn(self)->Self:
6262
def approve(self):
6363
self._has_patch = False
6464
if os.path.exists(self.patch_path):
65-
changed_paths = process_patch(self.patch_path, open_file, write_file, remove_file, file_exists)
65+
changed_paths = process_patch(self.patch_path, open_file, write_file, remove_file, file_exists, root_path=self.tide.rootpath)
6666
self.changed_paths.extend(changed_paths)
6767

6868
previous_response = self.history[-1]
@@ -81,10 +81,10 @@ def reject(self, feedback :str):
8181

8282
@property
8383
def patch_path(self)->Path:
84-
if not os.path.exists(DEFAULT_STORAGE_PATH):
85-
os.makedirs(DEFAULT_STORAGE_PATH, exist_ok=True)
84+
if not os.path.exists(self.tide.rootpath / DEFAULT_STORAGE_PATH):
85+
os.makedirs(self.tide.rootpath / DEFAULT_STORAGE_PATH, exist_ok=True)
8686

87-
return DEFAULT_STORAGE_PATH / f"{self.session_id}.bash"
87+
return self.tide.rootpath / DEFAULT_STORAGE_PATH / f"{self.session_id}.bash"
8888

8989
@staticmethod
9090
def trim_messages(messages, tokenizer_fn, max_tokens :Optional[int]=None):

0 commit comments

Comments
 (0)