Skip to content

feat: fuzzy plugin name matching with candidate selection - #154

Merged
pluginslab merged 6 commits into
devfrom
feature/issue-53-plugins-activation-issue
Mar 21, 2026
Merged

pluginslab merged 6 commits into
devfrom
feature/issue-53-plugins-activation-issue

Conversation

@tomepajk

Copy link
Copy Markdown
Collaborator

Summary

  • Fuzzy plugin resolution: Activate/deactivate now accept plugin display names, not just slugs. PHP resolves against installed plugins with tiered matching (exact slug → exact name → prefix → substring).
  • Candidate action buttons: When certainty is below 8.0 or multiple plugins match, returns top 5 candidates as clickable action buttons instead of guessing wrong.
  • Smarter name extraction: JS strips trailing "plugin" from input (e.g. "activate the blocks plugin" → extracts "blocks").
  • LLM-aware responses: interpretResult tells the LLM to ask the user to choose when match is ambiguous.

Closes #53

Test plan

  • "activate akismet" → activates directly (high certainty)
  • "activate the blocks plugin" → extracts "blocks", matches correctly
  • "activate cache" → shows candidate buttons if multiple cache plugins installed
  • "deactivate nonexistent-plugin" → returns "no plugin found" error
  • Action buttons from candidates work when clicked

🤖 Generated with Claude Code

tomepajk and others added 6 commits March 21, 2026 14:16
…into feature/issue-53-plugins-activation-issue

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
…into feature/issue-53-plugins-activation-issue
- Accept plugin name or slug in activate/deactivate abilities
- Strip trailing "plugin" from extracted name (e.g. "blocks plugin" → "blocks")
- Show candidate action buttons when multiple plugins match
- Tell LLM to ask user to choose when match is ambiguous

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Safety net for cases where JS extraction doesn't strip it or the
LLM passes "blocks plugin" directly as the tool argument.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

@pluginslab pluginslab left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safe update — certainty threshold at 8.0 prevents wrong actions on ambiguous matches, candidate buttons for low-confidence results, existing confirmation flow preserved for destructive operations. Fixes #53 from Day 1. LGTM!

@pluginslab
pluginslab merged commit e88470b into dev Mar 21, 2026
1 of 4 checks passed
@pluginslab
pluginslab deleted the feature/issue-53-plugins-activation-issue branch May 27, 2026 23:04
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.

2 participants