Download prompts/agent.system.main.tips.py from Leon4gr45/twenty: direct link, hf CLI and curl.
- Browser
- Download file 880 Bytes
-
https://huggingface.co/spaces/Leon4gr45/twenty/resolve/main/prompts/agent.system.main.tips.py
- Command line
-
hf download hf://spaces/Leon4gr45/twenty/prompts/agent.system.main.tips.py
-
curl -L -o agent.system.main.tips.py https://huggingface.co/spaces/Leon4gr45/twenty/resolve/main/prompts/agent.system.main.tips.py
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"]} | |