lib/aia/main.rb in aia-0.5.13 vs lib/aia/main.rb in aia-0.5.14

- old
+ new

@@ -51,21 +51,10 @@ # TODO: still should verify that the tools are ion the $PATH # tools.class.verify_tools end - def speak(what) - return false unless AIA.config.speak? - # TODO: Consider putting this into a thread - # so that it can speak at the same time - # the output is going to the screen - # MacOS uses the say command - system "say #{Shellwords.escape(what)}" - true - end - - # Function to setup the Reline history with a maximum depth def setup_reline_history(max_history_size=5) Reline::HISTORY.clear # Reline::HISTORY.max_size = max_history_size end @@ -121,11 +110,11 @@ logger.prompt_result(@prompt, result) if AIA.config.chat? setup_reline_history - speak result + AIA.speak result lets_chat end return if AIA.config.next.empty? && AIA.config.pipeline.empty? @@ -225,17 +214,17 @@ the_prompt_text = insert_terse_phrase(the_prompt_text) the_prompt_text << directive_output result = get_and_display_result(the_prompt_text) log_the_follow_up(the_prompt_text, result) - speak result + AIA.speak result end else the_prompt_text = insert_terse_phrase(the_prompt_text) result = get_and_display_result(the_prompt_text) log_the_follow_up(the_prompt_text, result) - speak result + AIA.speak result end the_prompt_text = ask_question_with_reline("\nFollow Up: ") end end