Implement AI workspace and mitigation workflow

This commit is contained in:
2026-02-15 04:27:28 +00:00
parent de2b9a9bbb
commit 2d3b8fdac6
64 changed files with 7669 additions and 769 deletions

View File

@@ -1,12 +1,10 @@
import asyncio
import random
async def natural_send_message(text,
send,
start_typing,
stop_typing,
skip_thinking=False
):
async def natural_send_message(
text, send, start_typing, stop_typing, skip_thinking=False
):
"""
Parses and sends messages with natural delays based on message length.
@@ -41,7 +39,9 @@ async def natural_send_message(text,
# Decide when to start thinking *before* typing
if not skip_thinking:
if natural_delay > 3.5: # Only delay if response is long
await asyncio.sleep(natural_delay - 3.5) # "Thinking" pause before typing
await asyncio.sleep(
natural_delay - 3.5
) # "Thinking" pause before typing
# Start typing
await start_typing()
@@ -55,4 +55,4 @@ async def natural_send_message(text,
# Optional: Small buffer between messages to prevent rapid-fire responses
await asyncio.sleep(0.5)
return ids
return ids