feat: add afterthoughts, memory callbacks, and callback-worthy extraction
Add triple-pipe afterthought splitting to chat replies so the bot can send a follow-up message 2-5 seconds later, mimicking natural Discord typing behavior. Update all 6 personality prompts with afterthought instructions (~1 in 5 replies) and memory callback guidance so the bot actively references what it knows about users. Enhance memory extraction prompt to flag bold claims, contradictions, and embarrassing moments as high-importance callback-worthy memories with a "callback" topic tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
17
cogs/chat.py
17
cogs/chat.py
@@ -415,7 +415,22 @@ class ChatCog(commands.Cog):
|
||||
except (asyncio.TimeoutError, asyncio.CancelledError):
|
||||
pass
|
||||
|
||||
await message.reply(response, mention_author=False)
|
||||
# Split afterthoughts (triple-pipe delimiter)
|
||||
main_reply = response
|
||||
afterthought = None
|
||||
if "|||" in response:
|
||||
parts = response.split("|||", 1)
|
||||
main_reply = parts[0].strip()
|
||||
afterthought = parts[1].strip() if len(parts) > 1 else None
|
||||
if not main_reply:
|
||||
main_reply = response
|
||||
afterthought = None
|
||||
|
||||
await message.reply(main_reply, mention_author=False)
|
||||
|
||||
if afterthought:
|
||||
await asyncio.sleep(random.uniform(2.0, 5.0))
|
||||
await message.channel.send(afterthought)
|
||||
|
||||
# Fire-and-forget memory extraction
|
||||
if not image_attachment:
|
||||
|
||||
Reference in New Issue
Block a user