feat: implement adapter/telegram/ with aiogram 3.x

Virtual DM chats, FSM (idle/waiting_response/settings states),
SQLite local DB for tg_users+chats, converter, keyboards, and
handlers for /start, /new, /chats, /settings, confirm callbacks.
This commit is contained in:
Mikhail Putilovskij 2026-03-31 21:35:16 +03:00
parent a3449fc864
commit 9c555261b3
15 changed files with 791 additions and 0 deletions

View file

@ -0,0 +1,13 @@
# adapter/telegram/states.py
from aiogram.fsm.state import State, StatesGroup
class ChatState(StatesGroup):
idle = State() # В активном чате, ждём сообщения
waiting_response = State() # Запрос ушёл на платформу, ждём ответа
class SettingsState(StatesGroup):
menu = State() # Главное меню настроек
soul_editing = State() # Редактирует имя/инструкции агента
confirm_action = State() # Подтверждение деструктивного действия