surfaces/adapter/telegram/states.py
Mikhail Putilovskij 9c555261b3 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.
2026-03-31 21:35:16 +03:00

13 lines
621 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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() # Подтверждение деструктивного действия