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:
2026-03-01 11:30:16 -05:00
parent 97e5738a2f
commit 6866ca8adf
8 changed files with 78 additions and 1 deletions

View File

@@ -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: