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,7 +2,6 @@ from __future__ import annotations
from typing import Any
from adapter.matrix.reactions import CANCEL_REACTION, CONFIRM_REACTION, reaction_to_skill_index
from core.protocol import (
Attachment,
IncomingCallback,
@ -95,43 +94,6 @@ def from_command(body: str, sender: str, chat_id: str, room_id: str | None = Non
)
def from_reaction(event: Any, sender: str, chat_id: str) -> IncomingCallback | None:
content = getattr(event, "content", {}) or {}
relates_to = content.get("m.relates_to", {})
key = getattr(event, "key", None) or relates_to.get("key")
event_id = getattr(event, "event_id", None) or relates_to.get("event_id")
if not key:
return None
if key == CONFIRM_REACTION:
return IncomingCallback(
user_id=sender,
platform=PLATFORM,
chat_id=chat_id,
action="confirm",
payload={"event_id": event_id, "reaction": key},
)
if key == CANCEL_REACTION:
return IncomingCallback(
user_id=sender,
platform=PLATFORM,
chat_id=chat_id,
action="cancel",
payload={"event_id": event_id, "reaction": key},
)
skill_index = reaction_to_skill_index(key)
if skill_index is not None:
return IncomingCallback(
user_id=sender,
platform=PLATFORM,
chat_id=chat_id,
action="toggle_skill",
payload={"event_id": event_id, "reaction": key, "skill_index": skill_index},
)
return None
def from_room_event(event: Any, room_id: str, chat_id: str) -> IncomingEvent | None:
body = (getattr(event, "body", None) or "").strip()
sender = getattr(event, "sender", "")