| 1 | from helpers.files import VariablesPlugin |
| 2 | from helpers import settings |
| 3 | from helpers import projects |
| 4 | from helpers import runtime |
| 5 | from helpers import files |
| 6 | from typing import Any |
| 7 | |
| 8 | class WorkdirPath(VariablesPlugin): |
| 9 | def get_variables( |
| 10 | self, file: str, backup_dirs: list[str] | None = None, **kwargs |
| 11 | ) -> dict[str, Any]: |
| 12 | |
| 13 | # agent = kwargs.get("_agent") |
| 14 | # if agent and getattr(agent, "context", None): |
| 15 | # project_name = projects.get_context_project_name(agent.context) |
| 16 | # if project_name: |
| 17 | # folder = projects.get_project_folder(project_name) |
| 18 | # if runtime.is_development(): |
| 19 | # folder = files.normalize_a0_path(folder) |
| 20 | # return {"workdir_path": folder} |
| 21 | |
| 22 | set = settings.get_settings_for_prompt() |
| 23 | return {"workdir_path": set["workdir_path"]} |
| 24 |