refactor: modules only need to know the config values they need to know

This commit is contained in:
2026-04-09 23:00:10 +02:00
parent 66a32c751a
commit 6d9cfaf8be
7 changed files with 29 additions and 44 deletions
+2 -2
View File
@@ -430,7 +430,7 @@ def offset(delta: str) -> None:
logger.error(parse_error or "Invalid offset delta")
sys.exit(1)
response = ControlClient(config=_app_config).send(
response = ControlClient(_app_config.watch.socket_path).send(
{"cmd": "offset", "delta": parsed_delta}
)
if not response.get("ok"):
@@ -442,7 +442,7 @@ def offset(delta: str) -> None:
@ctl_app.command
def status() -> None:
"""Print current watch session status as JSON."""
response = ControlClient(config=_app_config).send({"cmd": "status"})
response = ControlClient(_app_config.watch.socket_path).send({"cmd": "status"})
if not response.get("ok"):
logger.error(response.get("error", "Unknown error"))
sys.exit(1)