feat(task-5): scope matrix context state per room

This commit is contained in:
Mikhail Putilovskij 2026-04-19 17:41:04 +03:00
parent 03160a3b37
commit c11c8ecfbf
7 changed files with 189 additions and 72 deletions

View file

@ -105,11 +105,13 @@ class RealPlatformClient(PlatformClient):
delta=event.text,
finished=False,
)
tokens_used = getattr(chat_api, "last_tokens_used", 0)
await self._prototype_state.set_last_tokens_used(str(chat_id), tokens_used)
yield MessageChunk(
message_id=user_id,
delta="",
finished=True,
tokens_used=getattr(chat_api, "last_tokens_used", 0),
tokens_used=tokens_used,
)
async def get_settings(self, user_id: str) -> UserSettings: