(self, relative_path: str, depth: int = 2)
| 283 | self.path = path |
| 284 | |
| 285 | def _run(self, relative_path: str, depth: int = 2): |
| 286 | abs_path = os.path.join(self.path, relative_path) |
| 287 | try: |
| 288 | output = visualize_tree(abs_path, level=depth) |
| 289 | output = "The tree structure of " + relative_path + " is: \n" + output |
| 290 | except: |
| 291 | output = "Execution failed, please check the relative path again, likely the relative path lacks of prefix directory name. Using get_tree_structure on the parent directory such as '.' or 'something/' to get the list of files and directories to continue exploring." |
| 292 | return output |
| 293 | |
| 294 | class OpenFileArgs(BaseModel): |
| 295 | relative_file_path: str = Field(..., description="The relative path of the file you want to open") |
nothing calls this directly
no test coverage detected