From 6ee9b6ee7e76d63abe5e095f8b13973b4cd12a77 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Sat, 20 Dec 2025 21:22:06 +0200 Subject: [PATCH] added deck.chat modules --- deck/chat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deck/chat.py b/deck/chat.py index 3cc1827..976992a 100644 --- a/deck/chat.py +++ b/deck/chat.py @@ -9,16 +9,13 @@ try: except: pass -def _echo(msg, state): - return msg, state - class DeckChat: def __init__(self, start_state={}, chat_prefix='> ', command_prefix='/', paginate=0): """Init the chat class""" self.command_prefix = command_prefix # prefix that commands start with self.chat_prefix = chat_prefix # prefix to write before input self.command_handlers = { # command handler storage - 'default': _echo # echo handler by default + 'default': lambda m,s: (m,s) # echo handler by default } self.state = start_state # internal state object (impl-specific) self.paginate_n = paginate # paginate the responses exceeding N>0 lines