Skip to content

feat: Add NLP support for slash commands and improve receipt validation#32

Open
sezallagwal wants to merge 1 commit intoRocketChat:mainfrom
sezallagwal:feature/enhanced-slash-commands
Open

feat: Add NLP support for slash commands and improve receipt validation#32
sezallagwal wants to merge 1 commit intoRocketChat:mainfrom
sezallagwal:feature/enhanced-slash-commands

Conversation

@sezallagwal
Copy link

Closes #31

Changes

NLP Fallback for Slash Commands

  • Added handleNLPCommand(): Implemented in app/src/utils/command_utils.ts.
  • LLM Parsing: Unrecognized commands now fall through to LLM parsing instead of failing immediately.
  • Usage: Commands like /receipt change currency to USD now function identically to mentioning the bot directly.

Enforce Minimum Receipt Items

  • Conditional UI: Modified app/src/modals/editReceiptModal.ts to conditionally hide the "Remove Item" button.
  • Logic: The button is now visible only when items.length > 1.
  • Goal: Prevents users from accidentally creating invalid empty receipts.

Discoverability

  • Help Update: Updated the help message in app/src/utils/command_utils.ts.
  • Examples: Users are now shown natural language examples (e.g., /receipt change currency to USD) in the help output.

Files Changed

  • app/src/utils/command_utils.ts: Added NLP fallback logic and updated help strings.
  • app/src/modals/editReceiptModal.ts: Added conditional rendering for the remove item button.

Demo

Recording.2026-01-21.084741.mp4

@sezallagwal
Copy link
Author

@khelli07 @ashbunnn Can you review this pr?

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