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:
parent
974935c880
commit
3e06a67e24
3 changed files with 2 additions and 52 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue