mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 20:20:42 +00:00
v0.8.1 release
This commit is contained in:
parent
66dd4dab10
commit
c161529e90
44 changed files with 1004 additions and 552 deletions
|
|
@ -9,11 +9,18 @@ class GetWorkDirFiles(ApiHandler):
|
|||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
current_path = request.args.get("path", "")
|
||||
if current_path == "$WORK_DIR":
|
||||
if runtime.is_development():
|
||||
current_path = "work_dir"
|
||||
else:
|
||||
current_path = "root"
|
||||
browser = FileBrowser()
|
||||
result = browser.get_files(current_path)
|
||||
# if runtime.is_development():
|
||||
# current_path = "work_dir"
|
||||
# else:
|
||||
# current_path = "root"
|
||||
current_path = "root"
|
||||
|
||||
# browser = FileBrowser()
|
||||
# result = browser.get_files(current_path)
|
||||
result = await runtime.call_development_function(get_files, current_path)
|
||||
|
||||
return {"data": result}
|
||||
|
||||
async def get_files(path):
|
||||
browser = FileBrowser()
|
||||
return browser.get_files(path)
|
||||
Loading…
Add table
Add a link
Reference in a new issue