Class: BruteCLI::CLI::Commands::Chat
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- BruteCLI::CLI::Commands::Chat
- Defined in:
- lib/brute_cli/cli/commands/chat.rb
Instance Method Summary collapse
Instance Method Details
#call(prompt: nil, **options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/brute_cli/cli/commands/chat.rb', line 18 def call(prompt: nil, **) opts = {} opts[:session_id] = [:session] if [:session] if [:directory] Dir.chdir([:directory]) end if prompt # Single-shot mode: run the prompt and exit. Execution.new(opts).run(prompt) else # Interactive REPL mode. REPL.new(opts).run end end |