Skip to content

feat(whatsapp): add slash command handling and text feedback#819

Open
reski-rukmantiyo wants to merge 1 commit intonextlevelbuilder:devfrom
reski-rukmantiyo:dev-311-whatsapp-command
Open

feat(whatsapp): add slash command handling and text feedback#819
reski-rukmantiyo wants to merge 1 commit intonextlevelbuilder:devfrom
reski-rukmantiyo:dev-311-whatsapp-command

Conversation

@reski-rukmantiyo
Copy link
Copy Markdown
Contributor

Summary

  • Add WhatsApp slash commands: /reset, /stop, /stopall, /menu
  • Commands are intercepted before the normal message pipeline in inbound.go
  • New commands.go handles routing and publishes appropriate InboundMessage events via the bus
  • New sendText() helper in outbound.go for direct plain-text replies (used for /menu and /reset confirmation)
  • /stop and /stopall delegate feedback to the consumer after cancel result is known

Files changed

  • internal/channels/whatsapp/commands.go (new) — command handler with menu help text
  • internal/channels/whatsapp/inbound.go — command interception before media/pipeline processing
  • internal/channels/whatsapp/outbound.gosendText() helper for direct text delivery

Test plan

  • Send /menu via WhatsApp and verify help text is returned
  • Send /reset and confirm conversation history is cleared with confirmation message
  • Send /stop during an active task and verify task cancellation
  • Send /stopall with multiple active tasks and verify all are cancelled
  • Send /unknown and verify it passes through to the normal agent pipeline (not intercepted)
  • Send a regular message (no /) and verify it reaches the agent normally

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant