aia 0.5.0 → 0.5.1

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: 926de232dae7c4e214ae72129e7da50bb4ca130388bc47e78d102ae4e5ddcfde
4
- data.tar.gz: 6b57f7aa93ef06246465a3e143f444b0cb61105f1fd775fbce791d0b46fabc7d
3
+ metadata.gz: be8cb1e68dc5f180c5a75b87ff6519ccda00a7e82a5da524577648d83f2de56a
4
+ data.tar.gz: b16fc5cf5e15ee1942da68b832f82308a2cd037d3374d8a55bdbe2289be1b030
5
5
  SHA512:
6
- metadata.gz: dae3b2adb921947200e1cc819c6f3f3918251a1298a752ed9ee7b19da7a515e66e6f87b21402b30ab6e81e03769bdba9d73f23101b42ef87c9ca8a8f5a8baf62
7
- data.tar.gz: 5ba9e32129ab8331aec76ddcda9d81445835c28fefe308c5b27bb65fe1780c41f2d5f0727eb1702a0403da342c89892c6186fcd553d13587174a2ff5f0d5f6d8
6
+ metadata.gz: fa3136515303b071abe2866a48af9702047d117d004b6666150445133ebfa0ebb4c0aa1e86ebc3ea7e023ab6eed255a6a98938c7bf9bbb8c01a9f524130a87f4
7
+ data.tar.gz: 33d4e8aa6df5e3b3a3b7e5e5811af67e01be18498ce3818dbdd4a863b495132f07fec1333d6273953132931b82852c6a435654fdac6d4aef57e14cd7f2f3ff81
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 0
4
+ :patch: 1
5
5
  :special: ''
6
6
  :metadata: ''
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  ## [Unreleased]
2
+
3
+ ## [0.5.1] 2024-01-12
4
+ - removed a wicked puts "loaded" statement
5
+ - fixed missed code when the options were changed to --out_file and --log_file
6
+ - fixed completion functions by updating $PROMPT_DIR to $AIA_PROMPTS_DIR to match the documentation.
7
+
2
8
  ## [0.5.0] 2024-01-05
3
9
  - breaking changes:
4
10
  - changed `--config` to `--config_file`
data/README.md CHANGED
@@ -107,7 +107,8 @@ OPTIONS
107
107
  Invokes an editor on the prompt file. You can make changes to the prompt file,
108
108
  save it and the newly saved prompt will be processed by the backend.
109
109
 
110
- --shell This option tells aia to replace references to system environment variables in
110
+ --shell
111
+ This option tells aia to replace references to system environment variables in
111
112
  the prompt with the value of the envar. envars are like $HOME and ${HOME} in
112
113
  this example their occurance will be replaced by the value of ENV[‘HOME’].
113
114
  Also the dynamic shell command in the pattern $(shell command) will be executed
@@ -138,7 +139,7 @@ OPTIONS
138
139
  -b, --[no]-backend LLM TOOL
139
140
  Specify the backend prompt resolver - default is mods
140
141
 
141
- -c, --config PATH_TO_CONFIG_FILE
142
+ -c, --config_file PATH_TO_CONFIG_FILE
142
143
  Load Config File - default is nil
143
144
 
144
145
  -d, --debug
@@ -153,7 +154,7 @@ OPTIONS
153
154
  -h, --help
154
155
  Show Usage - default is false
155
156
 
156
- -l, --[no]-log PATH_TO_LOG_FILE
157
+ -l, --[no]-log_file PATH_TO_LOG_FILE
157
158
  Log FILEPATH - default is $HOME/.prompts/prompts.log
158
159
 
159
160
  -m, --[no]-markdown
@@ -208,9 +209,9 @@ OpenAI ACCOUNT IS REQUIRED
208
209
 
209
210
  USAGE NOTES
210
211
  aia is designed for flexibility, allowing users to pass prompt ids and context files
211
- as arguments. Some options change the behavior of the output, such as ---out_file for
212
- specifying a file or --no-out_file for disabling file output in favor of standard output
213
- (STDPIT).
212
+ as arguments. Some options change the behavior of the output, such as --out_file for
213
+ specifying a file or --no-out_file for disabling file output in favor of standard
214
+ output (STDPIT).
214
215
 
215
216
  The --completion option displays a script that enables prompt ID auto-completion for
216
217
  bash, zsh, or fish shells. It’s crucial to integrate the script into the shell’s
data/justfile CHANGED
@@ -69,6 +69,11 @@ project := "`basename $RR`"
69
69
  backup_envrc.rb
70
70
 
71
71
 
72
+ # Delete all mods saved conversations
73
+ mods_delete_all:
74
+ mods -l | awk '{print $1}' | xargs -I {} mods -d {}
75
+
76
+
72
77
  #################################################
73
78
  ## Private recipes
74
79
 
@@ -3,7 +3,7 @@
3
3
  # the bash shell
4
4
  #
5
5
  # This script assumes that the system environment
6
- # variable PROMPTS_DIR has been set correctly
6
+ # variable AIA_PROMPTS_DIR has been set correctly
7
7
 
8
8
  _aia_completion() {
9
9
  # The current word being completed
@@ -18,7 +18,7 @@ _aia_completion() {
18
18
  # Check if we are currently completing the option that requires prompt IDs
19
19
  if [[ "$prev_word" == "aia" ]]; then
20
20
  # Change directory to the prompts directory
21
- cd "$PROMPTS_DIR" || return
21
+ cd "$AIA_PROMPTS_DIR" || return
22
22
 
23
23
  # Generate a list of relative paths from the ~/.prompts directory (without .txt extension)
24
24
  local files=($(find . -name "*.txt" -type f | sed 's|^\./||' | sed 's/\.txt$//'))
@@ -2,7 +2,7 @@
2
2
  # Setup a prompt completion for use with the fish shell
3
3
  #
4
4
  # This script assumes that the system environment
5
- # variable PROMPTS_DIR has been set correctly
5
+ # variable AIA_PROMPTS_DIR has been set correctly
6
6
 
7
7
  function __fish_aia_complete
8
8
  # Get the command line and current token
@@ -12,9 +12,9 @@ function __fish_aia_complete
12
12
  # Check if we are currently completing the option that requires prompt IDs
13
13
  if set -q cmd_line[2]
14
14
  # Change directory to the prompts directory
15
- if test -d $PROMPTS_DIR
16
- pushd $PROMPTS_DIR
17
- # Generate completions based on .txt files in the PROMPTS_DIR directory
15
+ if test -d $AIA_PROMPTS_DIR
16
+ pushd $AIA_PROMPTS_DIR
17
+ # Generate completions based on .txt files in the AIA_PROMPTS_DIR directory
18
18
  for file in (find . -name "*.txt" -type f)
19
19
  set file (string replace -r '\.txt$' '' -- $file)
20
20
  set file (string replace -r '^\./' '' -- $file)
@@ -3,7 +3,7 @@
3
3
  # the zsh shell
4
4
  #
5
5
  # This script assumes that the system environment
6
- # variable PROMPTS_DIR has been set correctly
6
+ # variable AIA_PROMPTS_DIR has been set correctly
7
7
 
8
8
  _aia_completion() {
9
9
  # The current word being completed
@@ -18,7 +18,7 @@ _aia_completion() {
18
18
  # Check if we are currently completing the option that requires prompt IDs
19
19
  if [[ "$prev_word" == "aia" ]]; then
20
20
  # Change directory to the prompts directory
21
- cd "$PROMPTS_DIR" || return
21
+ cd "$AIA_PROMPTS_DIR" || return
22
22
 
23
23
  # Generate a list of relative paths from the ~/.prompts directory (without .txt extension)
24
24
  local files=($(find . -name "*.txt" -type f | sed 's|^\./||' | sed 's/\.txt$//'))
data/lib/aia/cli.rb CHANGED
@@ -143,7 +143,7 @@ class AIA::Cli
143
143
  config_file:[nil, "-c --config_file"],
144
144
  prompts_dir:["~/.prompts", "-p --prompts"],
145
145
  out_file: [STDOUT, "-o --out_file --no-out_file"],
146
- log_file: ["~/.prompts/_prompts.log", "-l --log --no-log"],
146
+ log_file: ["~/.prompts/_prompts.log", "-l --log_file --no-log_file"],
147
147
  #
148
148
  backend: ['mods', "-b --be --backend --no-backend"],
149
149
  }
@@ -236,7 +236,7 @@ class AIA::Cli
236
236
  arguments.slice!(index,1)
237
237
  else
238
238
  if switch.include?('-no-')
239
- AIA.config[option_sym] = switch.include?('output') ? STDOUT : nil
239
+ AIA.config[option_sym] = switch.include?('out_file') ? STDOUT : nil
240
240
  arguments.slice!(index,1)
241
241
  else
242
242
  AIA.config[option_sym] = arguments[index + 1]
data/lib/aia.rb CHANGED
@@ -6,7 +6,6 @@ def tramp_require(what, &block)
6
6
  begin
7
7
  require_result = require what
8
8
  loaded = true
9
- puts "Loaded"
10
9
  rescue Exception => ex
11
10
  # Do nothing
12
11
  end
data/man/aia.1 CHANGED
@@ -68,7 +68,7 @@ Use Fuzzy Matching when searching for a prompt \- default is false
68
68
  \fB\-h\fR, \fB\-\-help\fR
69
69
  Show Usage \- default is false
70
70
  .TP
71
- \fB\-l\fR, \fB\-\-\[lB]no\[rB]\-log\fR \fIPATH\[ru]TO\[ru]LOG\[ru]FILE\fP
71
+ \fB\-l\fR, \fB\-\-\[lB]no\[rB]\-log\[ru]file\fR \fIPATH\[ru]TO\[ru]LOG\[ru]FILE\fP
72
72
  Log FILEPATH \- default is \[Do]HOME\[sl]\.prompts\[sl]prompts\.log
73
73
  .TP
74
74
  \fB\-m\fR, \fB\-\-\[lB]no\[rB]\-markdown\fR
data/man/aia.1.md CHANGED
@@ -73,7 +73,7 @@ The aia command-line tool is an interface for interacting with an AI model backe
73
73
  `-h`, `--help`
74
74
  : Show Usage - default is false
75
75
 
76
- `-l`, `--[no]-log` *PATH_TO_LOG_FILE*
76
+ `-l`, `--[no]-log_file` *PATH_TO_LOG_FILE*
77
77
  : Log FILEPATH - default is $HOME/.prompts/prompts.log
78
78
 
79
79
  `-m`, `--[no]-markdown`
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.0
4
+ version: 0.5.1
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-06 00:00:00.000000000 Z
11
+ date: 2024-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie