feat(matrix): add adapter baseline and platform-aware command hints
This commit is contained in:
parent
bcdaea5143
commit
82eb711844
20 changed files with 1127 additions and 3 deletions
33
tests/adapter/matrix/test_reactions.py
Normal file
33
tests/adapter/matrix/test_reactions.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from adapter.matrix.reactions import (
|
||||
build_confirmation_text,
|
||||
build_skills_text,
|
||||
reaction_to_skill_index,
|
||||
)
|
||||
from sdk.interface import UserSettings
|
||||
|
||||
|
||||
def test_build_skills_text():
|
||||
settings = UserSettings(
|
||||
skills={"web-search": True, "fetch-url": False},
|
||||
connectors={},
|
||||
soul={},
|
||||
safety={},
|
||||
plan={},
|
||||
)
|
||||
text = build_skills_text(settings)
|
||||
assert "web-search" in text
|
||||
assert "fetch-url" in text
|
||||
assert "Реакции 1️⃣-9️⃣" in text
|
||||
|
||||
|
||||
def test_build_confirmation_text():
|
||||
text = build_confirmation_text("Отправить письмо?")
|
||||
assert "Отправить письмо?" in text
|
||||
assert "подтвердить" in text
|
||||
|
||||
|
||||
def test_reaction_to_skill_index():
|
||||
assert reaction_to_skill_index("1️⃣") == 1
|
||||
assert reaction_to_skill_index("👍") is None
|
||||
Loading…
Add table
Add a link
Reference in a new issue