aia 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '021416691c11252ce3462ee7ec394691e0a7d0fd81eb6df473df3447dd02da3b'
4
- data.tar.gz: 2bd5eb6bd2098c7e9bd04234a11c1192004bb217ec054aa9222334d9b96309d2
3
+ metadata.gz: 63be1bf9f76bf377e09bd05cefc15651c05372863f411c343849d5a68d40a4d8
4
+ data.tar.gz: c979390da7d47566026c89590c283dda30c7cc9a4778242acf131d8a241b58ba
5
5
  SHA512:
6
- metadata.gz: 0e2d78c3b6b1b8848645ef586c3b2f7a4557339504efc1a7434b12e313637e47b6803da8e5fa21908f88ee59046a372ef22553a5fdffe97d5777b65845f5ce41
7
- data.tar.gz: 142dd7b40622124089363670fcb6ffde02368ad07de7016e6c12e0511a47d89d8b0be9b153d31076758c321e6762e1d361fd4ac086b6f8ffca8d2a2abebeff7b
6
+ metadata.gz: ceb70944b23cfe72c06fd3aa62bc377cfa95122238c75cc68906ac6f3117de1d2e9809064343b642016d729dc6cdc8af55706db292858231d0777ad7508d61d0
7
+ data.tar.gz: c1eb7647759e8c0dd9429df75ac4943e7399887e1ef0ffb3ccbc2d9f716a33d114e836c00957ebd6c192515fe4d7a2db336c4e9aa36fc84c446b06da3b1641b9
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 6
4
+ :patch: 7
5
5
  :special: ''
6
6
  :metadata: ''
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ## [Unreleased]
2
+ ## [0.5.7] 2024-01-15
3
+ - Added ERB processing to the config_file
2
4
 
3
5
  ## [0.5.6] 2024-01-15
4
6
  - Adding processing for directives, shell integration and erb to the follow up prompt in a chat session
data/README.md CHANGED
@@ -5,6 +5,9 @@
5
5
  It leverages the `prompt_manager` gem to manage prompts for the `mods` and `sgpt` CLI utilities. It utilizes "ripgrep" for searching for prompt files. It uses `fzf` for prompt selection based on a search term and fuzzy matching.
6
6
 
7
7
  **Most Recent Change**: Refer to the [Changelog](CHANGELOG.md)
8
+ v0.5.7
9
+ - Added ERB processing to config files that have the pattern any_file.ext.erb where ext is the real extension of the file.
10
+
8
11
  v0.5.6
9
12
  - Directives within a chat session follow up are now available
10
13
  - when the `--shell` option is set access to envars and shell scripts are availabe in a chat session follow up prompt
@@ -163,7 +166,10 @@ OPTIONS
163
166
  Specify the backend prompt resolver - default is mods
164
167
 
165
168
  -c, --config_file PATH_TO_CONFIG_FILE
166
- Load Config File - default is nil
169
+ Load Config File. both YAML and TOML formats are supported. Also ERB is
170
+ supported. For example ~/aia_config.yml.erb will be processed through ERB and
171
+ then through YAML. The result will be written out to ~/aia_config.yml so that
172
+ you can manually verify that you got what you wanted from the ERB processing.
167
173
 
168
174
  -d, --debug
169
175
  Turn On Debugging - default is false
data/lib/aia/cli.rb CHANGED
@@ -97,7 +97,19 @@ class AIA::Cli
97
97
  end
98
98
 
99
99
 
100
+ def replace_erb_in_config_file
101
+ content = Pathname.new(AIA.config.config_file).read
102
+ content = ERB.new(content).result(binding)
103
+ AIA.config.config_file = AIA.config.config_file.to_s.gsub('.erb', '')
104
+ Pathname.new(AIA.config.config_file).write content
105
+ end
106
+
107
+
100
108
  def load_config_file
109
+ if AIA.config.config_file.to_s.end_with?(".erb")
110
+ replace_erb_in_config_file
111
+ end
112
+
101
113
  AIA.config.config_file = Pathname.new(AIA.config.config_file)
102
114
  if AIA.config.config_file.exist?
103
115
  AIA.config.merge! parse_config_file
data/man/aia.1 CHANGED
@@ -57,7 +57,7 @@ Print Version \- default is false
57
57
  Specify the backend prompt resolver \- default is mods
58
58
  .TP
59
59
  \fB\-c\fR, \fB\-\-config\[ru]file\fR \fIPATH\[ru]TO\[ru]CONFIG\[ru]FILE\fP
60
- Load Config File \- default is nil
60
+ Load Config File\. both YAML and TOML formats are supported\. Also ERB is supported\. For example \[ti]\[sl]aia\[ru]config\.yml\.erb will be processed through ERB and then through YAML\. The result will be written out to \[ti]\[sl]aia\[ru]config\.yml so that you can manually verify that you got what you wanted from the ERB processing\.
61
61
  .TP
62
62
  \fB\-d\fR, \fB\-\-debug\fR
63
63
  Turn On Debugging \- default is false
data/man/aia.1.md CHANGED
@@ -62,7 +62,7 @@ The aia command-line tool is an interface for interacting with an AI model backe
62
62
  : Specify the backend prompt resolver - default is mods
63
63
 
64
64
  `-c`, `--config_file` *PATH_TO_CONFIG_FILE*
65
- : Load Config File - default is nil
65
+ : Load Config File. both YAML and TOML formats are supported. Also ERB is supported. For example ~/aia_config.yml.erb will be processed through ERB and then through YAML. The result will be written out to ~/aia_config.yml so that you can manually verify that you got what you wanted from the ERB processing.
66
66
 
67
67
  `-d`, `--debug`
68
68
  : Turn On Debugging - default is false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie