aia 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +7 -6
- data/justfile +5 -0
- data/lib/aia/aia_completion.bash +2 -2
- data/lib/aia/aia_completion.fish +4 -4
- data/lib/aia/aia_completion.zsh +2 -2
- data/lib/aia/cli.rb +2 -2
- data/lib/aia.rb +0 -1
- data/man/aia.1 +1 -1
- data/man/aia.1.md +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be8cb1e68dc5f180c5a75b87ff6519ccda00a7e82a5da524577648d83f2de56a
|
4
|
+
data.tar.gz: b16fc5cf5e15ee1942da68b832f82308a2cd037d3374d8a55bdbe2289be1b030
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa3136515303b071abe2866a48af9702047d117d004b6666150445133ebfa0ebb4c0aa1e86ebc3ea7e023ab6eed255a6a98938c7bf9bbb8c01a9f524130a87f4
|
7
|
+
data.tar.gz: 33d4e8aa6df5e3b3a3b7e5e5811af67e01be18498ce3818dbdd4a863b495132f07fec1333d6273953132931b82852c6a435654fdac6d4aef57e14cd7f2f3ff81
|
data/.semver
CHANGED
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
|
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, --
|
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]-
|
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
|
212
|
-
specifying a file or --no-out_file for disabling file output in favor of standard
|
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
data/lib/aia/aia_completion.bash
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# the bash shell
|
4
4
|
#
|
5
5
|
# This script assumes that the system environment
|
6
|
-
# variable
|
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 "$
|
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/aia_completion.fish
CHANGED
@@ -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
|
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 $
|
16
|
-
pushd $
|
17
|
-
# Generate completions based on .txt files in the
|
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)
|
data/lib/aia/aia_completion.zsh
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# the zsh shell
|
4
4
|
#
|
5
5
|
# This script assumes that the system environment
|
6
|
-
# variable
|
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 "$
|
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 --
|
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?('
|
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
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]-
|
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.
|
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-
|
11
|
+
date: 2024-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|