twenty / prompts /agent.system.main.tips.py
Leon4gr45's picture
Upload folder using huggingface_hub (part 7)
f4b0f7d verified
Raw History Blame Contribute Delete
880 Bytes
from helpers.files import VariablesPlugin
from helpers import settings
from helpers import projects
from helpers import runtime
from helpers import files
from typing import Any
class WorkdirPath(VariablesPlugin):
def get_variables(
self, file: str, backup_dirs: list[str] | None = None, **kwargs
) -> dict[str, Any]:
# agent = kwargs.get("_agent")
# if agent and getattr(agent, "context", None):
# project_name = projects.get_context_project_name(agent.context)
# if project_name:
# folder = projects.get_project_folder(project_name)
# if runtime.is_development():
# folder = files.normalize_a0_path(folder)
# return {"workdir_path": folder}
set = settings.get_settings_for_prompt()
return {"workdir_path": set["workdir_path"]}