feat(ui): keyboard nav (Enter advances step) + yaml-health warning on launch

This commit is contained in:
Bossiara13 2026-04-23 02:13:43 +03:00
parent 0b1604e018
commit 521b124f05
2 changed files with 25 additions and 0 deletions

View file

@ -123,7 +123,21 @@ class Bridge:
return {"ok": False, "error": f"LLM недоступен: {ex}"}
def _check_yaml_health():
if not COMMANDS_YAML.exists():
return
try:
yaml_writer.load_yaml(COMMANDS_YAML)
except Exception as ex:
bak = COMMANDS_YAML.with_suffix(COMMANDS_YAML.suffix + ".bak")
msg = f"[command_builder] Не удалось разобрать {COMMANDS_YAML.name}: {ex}"
if bak.exists():
msg += f"\n[command_builder] Резервная копия доступна: {bak} — можно восстановить вручную."
print(msg, file=sys.stderr)
def main():
_check_yaml_health()
bridge = Bridge()
index_path = WEB_DIR / "index.html"
if not index_path.exists():