mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-22 07:34:47 +02:00
Both !clear and !reset now respond with "Conversation memory cleared." Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
585 B
Python
17 lines
585 B
Python
"""Clear command handler (alias for !reset)."""
|
|
|
|
from .base import CommandContext, CommandHandler
|
|
|
|
|
|
class ClearCommand(CommandHandler):
|
|
"""Clear conversation history and summary."""
|
|
|
|
name = "clear"
|
|
description = "Clear your chat history"
|
|
usage = "!clear"
|
|
|
|
async def execute(self, args: str, context: CommandContext) -> str:
|
|
"""Clear conversation history and summary for the sender."""
|
|
await context.history.clear_history(context.sender_id)
|
|
await context.history.clear_summary(context.sender_id)
|
|
return "Conversation memory cleared."
|