from __future__ import annotations from pathlib import Path APP_DIR = Path(__file__).resolve().parent DATA_DIR = APP_DIR / "data" PROMPTS_DIR = DATA_DIR / "prompts" STATIC_DIR = APP_DIR / "static" def read_text(path: Path, default: str = "") -> str: try: return path.read_text(encoding="utf-8") except FileNotFoundError: return default