Skip to content

feat(nlp): add offline Smart Natural Language Commands dashboard - #2583

Open
MatinHoseiny wants to merge 1 commit into
PixelPlayerHQ:masterfrom
MatinHoseiny:feature/smart-commands
Open

feat(nlp): add offline Smart Natural Language Commands dashboard#2583
MatinHoseiny wants to merge 1 commit into
PixelPlayerHQ:masterfrom
MatinHoseiny:feature/smart-commands

Conversation

@MatinHoseiny

Copy link
Copy Markdown

Description

This PR introduces a 100% offline, local natural language command dashboard that allows users to manage local music collections using plain English text commands.

Key features:

  • Zero API / Network Dependencies: The command parser is lightweight, offline, and runs purely on local regexes and background coroutines.
  • Conjunction Splitting: Parses commands containing multiple artists or genres seamlessly (e.g. "create playlist of Pop Smoke and Queen").
  • Typo Tolerance: Implements a space-optimized Levenshtein distance algorithm to match queries with database entries even with spelling mistakes.
  • Direct Integration: The Smart screen is added as the fourth tab in the bottom navigation bar with a matching theme-friendly icon.
  • Safety Dialogs: Destructive actions (artist bulk deletion) are protected by a secure 2-step confirmation dialog showing the exact local file paths to be deleted.

Files Added:

  • data/nlp/: Contains the intents, command parser, fuzzy matching engine, repository, and result models.
  • presentation/nlp/: Contains the Compose screen dashboard and its state ViewModel.
  • NlpCommandParserTest.kt: A comprehensive suite of unit tests validating parsing, splitting, and matching offline.

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