diff options
author | icebaker <icebaker@proton.me> | 2023-11-19 13:35:54 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-11-19 13:35:54 -0300 |
commit | e89a1d57c49c94c16c37a8ee3a69b52a9e2b341b (patch) | |
tree | e82a7579534003f02de32d058f4a60d1d076240c /controllers/interfaces | |
parent | c470d63b169058d81f44569a5f1c4c1fb222279f (diff) |
improving tool specifications
Diffstat (limited to 'controllers/interfaces')
-rw-r--r-- | controllers/interfaces/repl.rb | 2 | ||||
-rw-r--r-- | controllers/interfaces/tools.rb | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/controllers/interfaces/repl.rb b/controllers/interfaces/repl.rb index d4191b1..fd16ea6 100644 --- a/controllers/interfaces/repl.rb +++ b/controllers/interfaces/repl.rb @@ -37,8 +37,6 @@ module NanoBot [proc { prompt }, proc { 'MISSING INPUT' }] ) - Logic::Cartridge::Streaming.enabled?(cartridge, :repl) - Pry.commands.block_command(/(.*)/, 'handler') do |line| session.print(prefix) unless prefix.nil? session.evaluate_and_print(line, mode: 'repl') diff --git a/controllers/interfaces/tools.rb b/controllers/interfaces/tools.rb index d32afed..aa4fb61 100644 --- a/controllers/interfaces/tools.rb +++ b/controllers/interfaces/tools.rb @@ -10,7 +10,7 @@ module NanoBot module Controllers module Interfaces module Tool - def self.confirm(session, cartridge, mode, feedback) + def self.confirming(session, cartridge, mode, feedback) yeses = Logic::Cartridge::Safety.yeses(cartridge) default_answer = Logic::Cartridge::Safety.default_answer(cartridge) dispatch_feedback(session, cartridge, mode, feedback) @@ -52,7 +52,7 @@ module NanoBot def self.dispatch_feedback(session, cartridge, mode, feedback) enabled = Logic::Cartridge::Tools.feedback?(cartridge, mode.to_sym, feedback[:action].to_sym) - enabled = true if feedback[:action].to_sym == :confirm + enabled = true if feedback[:action].to_sym == :confirming return unless enabled @@ -67,7 +67,7 @@ module NanoBot else message = "(#{feedback[:name]} #{feedback[:parameters].to_json})" - message += " =>\n#{feedback[:output]}" if feedback[:action].to_sym == :response + message += " =>\n#{feedback[:output]}" if feedback[:action].to_sym == :responding end message = "#{adapter[:prefix]}#{message}#{adapter[:suffix]}" |