feat(01-06): remove matrix reaction-era adapter UX

- Drop reaction-based skill and confirmation helpers from Matrix conversion
- Render !settings as a strict read-only dashboard snapshot
- Align Matrix adapter regressions with command-only helper text
This commit is contained in:
Mikhail Putilovskij 2026-04-03 12:33:15 +03:00
parent 974935c880
commit 3e06a67e24
3 changed files with 2 additions and 52 deletions

View file

@ -2,18 +2,12 @@ from __future__ import annotations
from sdk.interface import UserSettings
CONFIRM_REACTION = "👍"
CANCEL_REACTION = ""
SKILL_REACTIONS = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
REACTION_TO_INDEX = {emoji: idx + 1 for idx, emoji in enumerate(SKILL_REACTIONS)}
def build_skills_text(settings: UserSettings) -> str:
lines: list[str] = ["Скиллы"]
for idx, (name, enabled) in enumerate(settings.skills.items(), start=1):
for name, enabled in settings.skills.items():
state = "on" if enabled else "off"
emoji = SKILL_REACTIONS[idx - 1] if idx - 1 < len(SKILL_REACTIONS) else f"{idx}."
lines.append(f" {state} {emoji} {name}")
lines.append(f" {state} {name}")
lines.append("")
lines.append("!skill on/off <название> — переключить навык.")
return "\n".join(lines)
@ -28,7 +22,3 @@ def build_confirmation_text(description: str) -> str:
"Ответьте !yes для подтверждения или !no для отмены.",
]
)
def reaction_to_skill_index(key: str) -> int | None:
return REACTION_TO_INDEX.get(key)