Skip to content

feat(commands): unknown-@gittensory-verb suggestion (did-you-mean) in the help fallback #2170

Description

@JSONbored

Today an unrecognized verb silently resolves to "help" (src/github/commands.ts:173) with no hint that the typed verb was unknown. As the command surface grows to review/pause/resume/resolve/configuration/explain (#1960), a maintainer who types @gittensory reveiw gets a generic help card. Add a PURE did-you-mean suggester (nearest-verb by simple edit distance over the known command names) and surface a one-line hint in the help fallback when the raw verb was non-empty but unrecognized.

Deliverables

  • Add a pure suggestCommand(rawVerb) returning the closest known command (mention + action verbs) or null when nothing is within a small edit-distance threshold
  • Thread the suggestion into the help-card builder so an unknown non-empty verb renders a Did you mean @gittensory <x>? line; a bare @gittensory (no verb) shows no suggestion
  • Keep it PURE + public-safe (no network); tests only in this bounty
  • Unit tests: exact typo→suggestion, far-off gibberish→no suggestion, empty verb→no suggestion, known verb→no suggestion (both branches of the threshold)

References

  • src/github/commands.ts:173 (unknown→help downgrade)
  • src/github/commands.ts:223 (buildPublicAgentCommandComment)
  • test/unit/github-commands.test.ts
  • #1960

Part of #1960.


size: XS · held for later release (gittensor:bug once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions