MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / _run

Method _run

src/hyperagent/tools/nav_tools.py:285–292  ·  view source on GitHub ↗
(self, relative_path: str, depth: int = 2)

Source from the content-addressed store, hash-verified

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
294class OpenFileArgs(BaseModel):
295 relative_file_path: str = Field(..., description="The relative path of the file you want to open")

Callers

nothing calls this directly

Calls 1

visualize_treeFunction · 0.90

Tested by

no test coverage detected