Module: AIA
- Defined in:
- lib/aia/main.rb,
lib/aia.rb,
lib/aia/clause.rb,
lib/aia/version.rb
Overview
aia/lib/aia/clause.rb
Defined Under Namespace
Modules: BackendCommon, Clause, DynamicContent, UserQuery Classes: AiClientBackend, Cli, Client, Config, Directives, Editor, Fzf, Glow, Llm, Logging, Main, Mods, Prompt, Sgpt, Subl, Tools, Vim
Constant Summary collapse
- VERSION_FILEPATH =
"#{__dir__}/../../.version"
- VERSION =
Versionaire::Version File.read(VERSION_FILEPATH).strip
Class Attribute Summary collapse
-
.client ⇒ Object
Returns the value of attribute client.
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
- .debug? ⇒ Boolean
- .run(args = ARGV) ⇒ Object
- .speak(what) ⇒ Object
- .verbose? ⇒ Boolean
- .version ⇒ Object
Class Attribute Details
.client ⇒ Object
Returns the value of attribute client.
49 50 51 |
# File 'lib/aia.rb', line 49 def client @client end |
.config ⇒ Object
Returns the value of attribute config.
48 49 50 |
# File 'lib/aia.rb', line 48 def config @config end |
Class Method Details
.run(args = ARGV) ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/aia.rb', line 51 def run(args=ARGV) args = args.split(' ') if args.is_a?(String) # TODO: Currently this is a one and done architecture. # If the args contain an "-i" or and "--interactive" # flag could this turn into some kind of # conversation REPL? AIA::Main.new(args).call end |
.speak(what) ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/aia.rb', line 63 def speak(what) return unless config.speak? if OS.osx? && 'siri' == config.voice.downcase system "say #{Shellwords.escape(what)}" else Client.speak(what) end end |
.version ⇒ Object
9 |
# File 'lib/aia/version.rb', line 9 def self.version = VERSION |