Files
agent-zero/api/chat_files_path_get.py
Jan Tomášek 188cff2073 Move optional runtimes into persistent gVisor plugin sandboxes
Move tunnel, browser, document, speech and integration runtimes into plugin-owned
sandboxes with lazy dependencies and instance-scoped lifecycle management.
Reuse Tuxee display assets and the sandbox image's Python/Node runtimes, enable
automatic Desktop login, and show elapsed time for each browser launch.

Slim the outer image, use offline ONNX embeddings, and calculate sandbox storage
only on demand. Include regression coverage and updated runtime documentation.
Exclude local handoff notes and temporary verification artifacts from publication.
2026-11-08 21:43:22 +01:00

22 lines
726 B
Python

from helpers.api import ApiHandler, Request, Response
from 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 = projects.get_project_folder(project_name)
else:
folder = settings.get_settings()["workdir_path"]
return {
"ok": True,
"path": files.fix_dev_path(folder) if folder else folder,
}