Module: RosettAi::SmartFeedback::ThorMiddleware

Defined in:
lib/rosett_ai/smart_feedback/thor_middleware.rb

Overview

Middleware that intercepts Thor::UndefinedCommandError and Thor::UnknownArgumentError to provide "Did you mean?" suggestions.

Integrates with Thor's error handling to enhance error messages without replacing the standard error flow.

Author:

  • hugo

  • claude

Defined Under Namespace

Modules: CommandDispatch

Class Method Summary collapse

Class Method Details

.install(cli_class) ⇒ Object

Enhance a Thor CLI class with smart feedback.

Parameters:

  • cli_class (Class)

    the Thor CLI class to enhance



20
21
22
# File 'lib/rosett_ai/smart_feedback/thor_middleware.rb', line 20

def self.install(cli_class)
  cli_class.singleton_class.prepend(CommandDispatch)
end