refactor: move runtime state under project data directory
Some checks failed
CI / lint-and-compile (push) Has been cancelled
CI / lint-and-compile (pull_request) Has been cancelled

This commit is contained in:
root
2026-04-17 15:57:51 +08:00
parent e41ee8bcc8
commit c1e261aa14
7 changed files with 21 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ def _query_marketplace_latest_vsix(publisher: str, extension: str) -> tuple[str,
def bootstrap_from_vsix() -> None:
lingma_bin = Path(os.getenv("LINGMA_BIN", "/app/bin/Lingma"))
lingma_bin = Path(os.getenv("LINGMA_BIN", "/app/data/bin/Lingma"))
source_type = os.getenv("LINGMA_SOURCE_TYPE", "marketplace").strip().lower()
vsix_url = os.getenv(
"LINGMA_VSIX_URL",

View File

@@ -31,13 +31,13 @@ def load_settings() -> Settings:
api_keys = [k.strip() for k in keys_raw.split(",") if k.strip()]
work_dir = os.getenv(
"LINGMA_WORK_DIR",
str(Path.home() / ".lingma" / "vscode" / "sharedClientCache"),
"/app/data/.lingma/vscode/sharedClientCache",
)
return Settings(
host=os.getenv("HOST", "0.0.0.0"),
port=int(os.getenv("PORT", "8317")),
api_keys=api_keys,
lingma_bin=os.getenv("LINGMA_BIN", "/app/bin/Lingma"),
lingma_bin=os.getenv("LINGMA_BIN", "/app/data/bin/Lingma"),
lingma_work_dir=work_dir,
lingma_socket_port=int(os.getenv("LINGMA_SOCKET_PORT", "36510")),
lingma_startup_timeout=int(os.getenv("LINGMA_STARTUP_TIMEOUT", "40")),