mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-03 14:10:32 +00:00
BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins + frontend extension around api calls
This commit is contained in:
parent
f94b7d742c
commit
d02dda3667
326 changed files with 1096 additions and 862 deletions
|
|
@ -1,21 +0,0 @@
|
|||
from python.helpers.api import ApiHandler, Request, Response
|
||||
from python.helpers import files, projects, settings
|
||||
|
||||
|
||||
class GetChatFilesPath(ApiHandler):
|
||||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
ctxid = input.get("ctxid", "")
|
||||
if not ctxid:
|
||||
raise Exception("No context id provided")
|
||||
context = self.use_context(ctxid)
|
||||
|
||||
project_name = projects.get_context_project_name(context)
|
||||
if project_name:
|
||||
folder = files.normalize_a0_path(projects.get_project_folder(project_name))
|
||||
else:
|
||||
folder = settings.get_settings()["workdir_path"]
|
||||
|
||||
return {
|
||||
"ok": True,
|
||||
"path": folder,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue