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:
parent
a3449fc864
commit
9c555261b3
15 changed files with 791 additions and 0 deletions
13
adapter/telegram/states.py
Normal file
13
adapter/telegram/states.py
Normal 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() # Подтверждение деструктивного действия
|
||||
Loading…
Add table
Add a link
Reference in a new issue