Continue AI features and improve protocol support

This commit is contained in:
2026-02-15 16:57:32 +00:00
parent 2d3b8fdac6
commit 85e97e895d
62 changed files with 5472 additions and 441 deletions

View File

@@ -1,5 +1,4 @@
import asyncio
import random
async def natural_send_message(
@@ -11,7 +10,8 @@ async def natural_send_message(
Args:
chat_session: The active chat session.
ts: Timestamp of the message.
c: The context or object with `.send()`, `.start_typing()`, and `.stop_typing()` methods.
c: The context or object with `.send()`, `.start_typing()`,
and `.stop_typing()` methods.
text: A string containing multiple messages separated by double newlines (`\n\n`).
Behavior:
@@ -34,7 +34,7 @@ async def natural_send_message(
length_factor = len(message) / 25
# ~50 chars ≈ +1s processing
# ~25 chars ≈ +1s processing
natural_delay = min(base_delay + length_factor, 10) # Cap at 5s max
natural_delay = min(base_delay + length_factor, 10) # Cap at 10s max
# Decide when to start thinking *before* typing
if not skip_thinking: