aia 0.5.7 โ 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.better-commits.json +150 -0
- data/.semver +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +8 -4
- data/justfile +15 -2
- data/lib/aia/cli.rb +23 -14
- data/lib/aia/logging.rb +3 -0
- data/lib/aia/main.rb +21 -18
- data/lib/aia/prompt.rb +3 -17
- data/lib/aia/user_query.rb +21 -0
- data/lib/aia.rb +9 -1
- data/lib/core_ext/tty-spinner_log.rb +25 -0
- data/main.just +10 -1
- data/man/aia.1 +3 -2
- data/man/aia.1.md +4 -3
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6940189234efc4095d868d636f93f9b0f7996828f83068a02cde912d078f85c9
|
4
|
+
data.tar.gz: 4514680742c17109307b754861c0d24ce3674da51f1c0087f660edb3663434dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f6771282c2c4349ffe3b4fd392b7eedb8f98eeb115c1284fdea527de949b254a075fcca5715b7b2bcca0bc7a939baa36acf87011f0601d891e347287e58de7
|
7
|
+
data.tar.gz: 3646af990eda9f294cb55884ea8b281c2141272d4954d3b50bbdebfc462c8bed87e5bc8ad5eced92ed262139d6a52a7b8d88a5d244f8c297cdf0eda2f3485e4d
|
@@ -0,0 +1,150 @@
|
|
1
|
+
{
|
2
|
+
"check_status": true,
|
3
|
+
"commit_type": {
|
4
|
+
"enable": true,
|
5
|
+
"initial_value": "feat",
|
6
|
+
"infer_type_from_branch": true,
|
7
|
+
"append_emoji_to_label": false,
|
8
|
+
"append_emoji_to_commit": false,
|
9
|
+
"options": [
|
10
|
+
{
|
11
|
+
"value": "feat",
|
12
|
+
"label": "feat",
|
13
|
+
"hint": "A new feature",
|
14
|
+
"emoji": "โจ"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"value": "fix",
|
18
|
+
"label": "fix",
|
19
|
+
"hint": "A bug fix",
|
20
|
+
"emoji": "๐"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"value": "docs",
|
24
|
+
"label": "docs",
|
25
|
+
"hint": "Documentation only changes",
|
26
|
+
"emoji": "๐"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"value": "refactor",
|
30
|
+
"label": "refactor",
|
31
|
+
"hint": "A code change that neither fixes a bug nor adds a feature",
|
32
|
+
"emoji": "๐จ"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"value": "perf",
|
36
|
+
"label": "perf",
|
37
|
+
"hint": "A code change that improves performance",
|
38
|
+
"emoji": "๐"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"value": "test",
|
42
|
+
"label": "test",
|
43
|
+
"hint": "Adding missing tests or correcting existing tests",
|
44
|
+
"emoji": "๐จ"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"value": "build",
|
48
|
+
"label": "build",
|
49
|
+
"hint": "Changes that affect the build system or external dependencies",
|
50
|
+
"emoji": "๐ง"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"value": "ci",
|
54
|
+
"label": "ci",
|
55
|
+
"hint": "Changes to our CI configuration files and scripts",
|
56
|
+
"emoji": "๐ค"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"value": "chore",
|
60
|
+
"label": "chore",
|
61
|
+
"hint": "Other changes that do not modify src or test files",
|
62
|
+
"emoji": "๐งน"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"value": "",
|
66
|
+
"label": "none"
|
67
|
+
}
|
68
|
+
]
|
69
|
+
},
|
70
|
+
"commit_scope": {
|
71
|
+
"enable": true,
|
72
|
+
"custom_scope": false,
|
73
|
+
"initial_value": "app",
|
74
|
+
"options": [
|
75
|
+
{
|
76
|
+
"value": "app",
|
77
|
+
"label": "app"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"value": "shared",
|
81
|
+
"label": "shared"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"value": "server",
|
85
|
+
"label": "server"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"value": "tools",
|
89
|
+
"label": "tools"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"value": "",
|
93
|
+
"label": "none"
|
94
|
+
}
|
95
|
+
]
|
96
|
+
},
|
97
|
+
"check_ticket": {
|
98
|
+
"infer_ticket": true,
|
99
|
+
"confirm_ticket": true,
|
100
|
+
"add_to_title": true,
|
101
|
+
"append_hashtag": false,
|
102
|
+
"title_position": "start"
|
103
|
+
},
|
104
|
+
"commit_title": {
|
105
|
+
"max_size": 70
|
106
|
+
},
|
107
|
+
"commit_body": {
|
108
|
+
"enable": true,
|
109
|
+
"required": false
|
110
|
+
},
|
111
|
+
"commit_footer": {
|
112
|
+
"enable": true,
|
113
|
+
"initial_value": [],
|
114
|
+
"options": [
|
115
|
+
"closes",
|
116
|
+
"breaking-change",
|
117
|
+
"deprecated",
|
118
|
+
"custom"
|
119
|
+
]
|
120
|
+
},
|
121
|
+
"breaking_change": {
|
122
|
+
"add_exclamation_to_title": true
|
123
|
+
},
|
124
|
+
"confirm_commit": true,
|
125
|
+
"print_commit_output": true,
|
126
|
+
"branch_pre_commands": [],
|
127
|
+
"branch_post_commands": [],
|
128
|
+
"worktree_pre_commands": [],
|
129
|
+
"worktree_post_commands": [],
|
130
|
+
"branch_user": {
|
131
|
+
"enable": true,
|
132
|
+
"required": false,
|
133
|
+
"separator": "/"
|
134
|
+
},
|
135
|
+
"branch_type": {
|
136
|
+
"enable": true,
|
137
|
+
"separator": "/"
|
138
|
+
},
|
139
|
+
"branch_ticket": {
|
140
|
+
"enable": true,
|
141
|
+
"required": false,
|
142
|
+
"separator": "_"
|
143
|
+
},
|
144
|
+
"branch_description": {
|
145
|
+
"max_length": 70
|
146
|
+
},
|
147
|
+
"branch_action_default": "branch",
|
148
|
+
"enable_worktrees": true,
|
149
|
+
"overrides": {}
|
150
|
+
}
|
data/.semver
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -124,7 +124,10 @@ OPTIONS
|
|
124
124
|
|
125
125
|
--completion SHELL_NAME
|
126
126
|
|
127
|
-
--dump
|
127
|
+
--dump PATH/TO/FILE.ext
|
128
|
+
Dump the current configuration to a file in the format denoted by the fileโs
|
129
|
+
extension. Currently only .yml, .yaml and .toml are acceptable file
|
130
|
+
extensions. If the file exists, it will be over-written without warning.
|
128
131
|
|
129
132
|
-e, --edit
|
130
133
|
Invokes an editor on the prompt file. You can make changes to the prompt file,
|
@@ -246,8 +249,9 @@ USAGE NOTES
|
|
246
249
|
bash, zsh, or fish shells. Itโs crucial to integrate the script into the shellโs
|
247
250
|
runtime to take effect.
|
248
251
|
|
249
|
-
The --dump
|
250
|
-
requested.
|
252
|
+
The --dump path/to/file.ext option will write the current configuration to a file in
|
253
|
+
the format requested by the fileโs extension. The following extensions are supported:
|
254
|
+
.yml, .yaml and .toml
|
251
255
|
|
252
256
|
PROMPT DIRECTIVES
|
253
257
|
Within a prompt text file any line that begins with โ//โ is considered a prompt
|
@@ -323,7 +327,7 @@ The `aia` configuration defaults can be over-ridden by system environment variab
|
|
323
327
|
| VERBOSE | FALSE | AIA_VERBOSE |
|
324
328
|
|
325
329
|
|
326
|
-
See the `@options` hash in the `cli.rb` file for a complete list. There are some config items that do not necessarily make sense for use as an envar over-ride. For example if you set `export
|
330
|
+
See the `@options` hash in the `cli.rb` file for a complete list. There are some config items that do not necessarily make sense for use as an envar over-ride. For example if you set `export AIA_DUMP_FILE=config.yaml` then `aia` would dump the current configuration config.yaml and exit every time it is ran until you finally `unset AIA_DUMP_FILE`
|
327
331
|
|
328
332
|
In addition to these config items for `aia` the optional command line parameters for the backend prompt processing utilities (mods and sgpt) can also be set using envars with the "AIA_" prefix. For example "export AIA_TOPP=1.0" will set the "--topp 1.0" command line option for the `mods` utility when its used as the backend processor.
|
329
333
|
|
data/justfile
CHANGED
@@ -30,7 +30,11 @@ set dotenv-load := false
|
|
30
30
|
pwd := env_var('PWD')
|
31
31
|
|
32
32
|
me := justfile()
|
33
|
-
|
33
|
+
|
34
|
+
home := env_var('HOME')
|
35
|
+
downloads_dir := env_var('HOME') + "/Downloads/"
|
36
|
+
documents_dir := env_var('HOME') + "/Documents/"
|
37
|
+
|
34
38
|
backup_dir := env_var('JUST_BACKUP_DIR')
|
35
39
|
backup_file := trim_start_match(me, home)
|
36
40
|
my_backup := backup_dir + backup_file
|
@@ -116,7 +120,7 @@ module_git := "/Users/dewayne/just_modules/git.just"
|
|
116
120
|
|
117
121
|
|
118
122
|
# Install Locally
|
119
|
-
install: update_toc_in_readmen create_man_page
|
123
|
+
install: update_toc_in_readmen create_man_page flay
|
120
124
|
rake install
|
121
125
|
|
122
126
|
|
@@ -129,6 +133,15 @@ update_toc_in_readmen:
|
|
129
133
|
preview_man_page:
|
130
134
|
kramdown-man {{RR}}/man/aia.1.md
|
131
135
|
|
136
|
+
# Static Code Check
|
137
|
+
flay: coverage
|
138
|
+
flay {{RR}}
|
139
|
+
|
140
|
+
|
141
|
+
# View coverage report
|
142
|
+
coverage: test
|
143
|
+
open {{RR}}/coverage/index.html
|
144
|
+
|
132
145
|
|
133
146
|
# Run Unit Tests
|
134
147
|
test:
|
data/lib/aia/cli.rb
CHANGED
@@ -134,7 +134,7 @@ class AIA::Cli
|
|
134
134
|
#
|
135
135
|
model: ["gpt-4-1106-preview", "--llm --model"],
|
136
136
|
#
|
137
|
-
|
137
|
+
dump_file: [nil, "--dump"],
|
138
138
|
completion: [nil, "--completion"],
|
139
139
|
#
|
140
140
|
chat?: [false, "--chat"],
|
@@ -173,7 +173,7 @@ class AIA::Cli
|
|
173
173
|
def execute_immediate_commands
|
174
174
|
show_usage if AIA.config.help?
|
175
175
|
show_version if AIA.config.version?
|
176
|
-
dump_config_file if AIA.config.
|
176
|
+
dump_config_file if AIA.config.dump_file
|
177
177
|
show_completion if AIA.config.completion
|
178
178
|
end
|
179
179
|
|
@@ -181,13 +181,16 @@ class AIA::Cli
|
|
181
181
|
def dump_config_file
|
182
182
|
a_hash = prepare_config_as_hash
|
183
183
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
184
|
+
dump_file = Pathname.new AIA.config.dump_file
|
185
|
+
extname = dump_file.extname.to_s.downcase
|
186
|
+
|
187
|
+
case extname
|
188
|
+
when '.yml', '.yaml'
|
189
|
+
dump_file.write YAML.dump(a_hash)
|
190
|
+
when '.toml'
|
191
|
+
dump_file.write TomlRB.dump(a_hash)
|
189
192
|
else
|
190
|
-
abort "Invalid config file format request. Only #{CF_FORMATS.join(', ')} are supported."
|
193
|
+
abort "Invalid config file format (#{extname}) request. Only #{CF_FORMATS.join(', ')} are supported."
|
191
194
|
end
|
192
195
|
|
193
196
|
exit
|
@@ -200,9 +203,10 @@ class AIA::Cli
|
|
200
203
|
a_hash = AIA.config.to_h
|
201
204
|
a_hash['dump'] = nil
|
202
205
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
+
%w[ arguments config_file dump_file ].each do |unwanted_key|
|
207
|
+
a_hash.delete(unwanted_key)
|
208
|
+
end
|
209
|
+
|
206
210
|
a_hash
|
207
211
|
end
|
208
212
|
|
@@ -252,8 +256,14 @@ class AIA::Cli
|
|
252
256
|
AIA.config[option_sym] = switch.include?('out_file') ? STDOUT : nil
|
253
257
|
arguments.slice!(index,1)
|
254
258
|
else
|
255
|
-
|
256
|
-
|
259
|
+
value = arguments[index + 1]
|
260
|
+
if value.nil? || value.start_with?('-')
|
261
|
+
STDERR.puts "ERROR: #{option_sym} requires a parameter value"
|
262
|
+
exit(1)
|
263
|
+
else
|
264
|
+
AIA.config[option_sym] = value
|
265
|
+
arguments.slice!(index,2)
|
266
|
+
end
|
257
267
|
end
|
258
268
|
end
|
259
269
|
|
@@ -349,4 +359,3 @@ class AIA::Cli
|
|
349
359
|
end
|
350
360
|
end
|
351
361
|
end
|
352
|
-
|
data/lib/aia/logging.rb
CHANGED
@@ -13,6 +13,9 @@ class AIA::Logging
|
|
13
13
|
'a' # append to existing file
|
14
14
|
)
|
15
15
|
else
|
16
|
+
# SMELL: Looks like you get logging whether you want it or not
|
17
|
+
# TODO: when path is nil create a fake logger
|
18
|
+
# that does nothing
|
16
19
|
Logger.new(STDOUT) # Fall back to standard output if path is nil or invalid
|
17
20
|
end
|
18
21
|
|
data/lib/aia/main.rb
CHANGED
@@ -9,15 +9,21 @@ require_relative 'dynamic_content'
|
|
9
9
|
require_relative 'prompt'
|
10
10
|
require_relative 'logging'
|
11
11
|
require_relative 'tools'
|
12
|
+
require_relative 'user_query'
|
12
13
|
|
13
14
|
# Everything is being handled within the context
|
14
15
|
# of a single class.
|
15
16
|
|
16
17
|
class AIA::Main
|
17
|
-
|
18
|
+
SPINNER_FORMAT = :bouncing_ball
|
18
19
|
|
20
|
+
include AIA::DynamicContent
|
21
|
+
include AIA::UserQuery
|
22
|
+
|
19
23
|
attr_accessor :logger, :tools, :backend
|
20
24
|
|
25
|
+
attr_reader :spinner
|
26
|
+
|
21
27
|
def initialize(args= ARGV)
|
22
28
|
AIA::Tools.load_tools
|
23
29
|
|
@@ -29,6 +35,9 @@ class AIA::Main
|
|
29
35
|
]}
|
30
36
|
end
|
31
37
|
|
38
|
+
@spinner = TTY::Spinner.new(":spinner :title", format: SPINNER_FORMAT)
|
39
|
+
spinner.update(title: "composing response ... ")
|
40
|
+
|
32
41
|
@logger = AIA::Logging.new(AIA.config.log_file)
|
33
42
|
|
34
43
|
@logger.info(AIA.config) if AIA.config.debug? || AIA.config.verbose?
|
@@ -44,9 +53,13 @@ class AIA::Main
|
|
44
53
|
|
45
54
|
|
46
55
|
def speak(what)
|
47
|
-
return unless AIA.config.speak?
|
56
|
+
return false unless AIA.config.speak?
|
57
|
+
# TODO: Consider putting this into a thread
|
58
|
+
# so that it can speak at the same time
|
59
|
+
# the output is going to the screen
|
48
60
|
# MacOS uses the say command
|
49
61
|
system "say #{Shellwords.escape(what)}"
|
62
|
+
true
|
50
63
|
end
|
51
64
|
|
52
65
|
|
@@ -57,22 +70,6 @@ class AIA::Main
|
|
57
70
|
end
|
58
71
|
|
59
72
|
|
60
|
-
# Function to prompt the user with a question using reline
|
61
|
-
def ask_question_with_reline(prompt)
|
62
|
-
if prompt.start_with?("\n")
|
63
|
-
puts
|
64
|
-
puts
|
65
|
-
prompt = prompt[1..]
|
66
|
-
end
|
67
|
-
|
68
|
-
answer = Reline.readline(prompt)
|
69
|
-
Reline::HISTORY.push(answer) unless answer.nil? || Reline::HISTORY.to_a.include?(answer)
|
70
|
-
answer
|
71
|
-
rescue Interrupt
|
72
|
-
''
|
73
|
-
end
|
74
|
-
|
75
|
-
|
76
73
|
def call
|
77
74
|
@directives_processor.execute_my_directives
|
78
75
|
|
@@ -128,9 +125,15 @@ class AIA::Main
|
|
128
125
|
|
129
126
|
|
130
127
|
def get_and_display_result(the_prompt_text)
|
128
|
+
spinner.auto_spin if AIA.config.verbose?
|
129
|
+
|
131
130
|
backend.text = the_prompt_text
|
132
131
|
result = backend.run
|
133
132
|
|
133
|
+
if AIA.config.verbose?
|
134
|
+
spinner.success "Done."
|
135
|
+
end
|
136
|
+
|
134
137
|
AIA.config.out_file.write "\nResponse:\n"
|
135
138
|
|
136
139
|
if STDOUT == AIA.config.out_file
|
data/lib/aia/prompt.rb
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
require 'reline'
|
4
4
|
|
5
5
|
require_relative 'dynamic_content'
|
6
|
+
require_relative 'user_query'
|
6
7
|
|
7
8
|
class AIA::Prompt
|
8
9
|
include AIA::DynamicContent
|
9
|
-
|
10
|
+
include AIA::UserQuery
|
11
|
+
|
10
12
|
#
|
11
13
|
# used when no prompt_id is provided but there
|
12
14
|
# are extra parameters that need to be passed
|
@@ -134,22 +136,6 @@ class AIA::Prompt
|
|
134
136
|
end
|
135
137
|
|
136
138
|
|
137
|
-
# Function to prompt the user with a question using reline
|
138
|
-
def ask_question_with_reline(prompt)
|
139
|
-
if prompt.start_with?("\n")
|
140
|
-
puts
|
141
|
-
puts
|
142
|
-
prompt = prompt[1..]
|
143
|
-
end
|
144
|
-
|
145
|
-
answer = Reline.readline(prompt)
|
146
|
-
Reline::HISTORY.push(answer) unless answer.nil? || Reline::HISTORY.to_a.include?(answer)
|
147
|
-
answer
|
148
|
-
rescue Interrupt
|
149
|
-
''
|
150
|
-
end
|
151
|
-
|
152
|
-
|
153
139
|
# query the user for a value to the keyword allow the
|
154
140
|
# reuse of the previous value shown as the default
|
155
141
|
#
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# aia/lia/aia/user_query.rb
|
2
|
+
|
3
|
+
require 'reline'
|
4
|
+
|
5
|
+
module AIA::UserQuery
|
6
|
+
|
7
|
+
# Function to prompt the user with a question using reline
|
8
|
+
def ask_question_with_reline(prompt)
|
9
|
+
if prompt.start_with?("\n")
|
10
|
+
puts
|
11
|
+
puts
|
12
|
+
prompt = prompt[1..]
|
13
|
+
end
|
14
|
+
|
15
|
+
answer = Reline.readline(prompt)
|
16
|
+
Reline::HISTORY.push(answer) unless answer.nil? || Reline::HISTORY.to_a.include?(answer)
|
17
|
+
answer
|
18
|
+
rescue Interrupt
|
19
|
+
''
|
20
|
+
end
|
21
|
+
end
|
data/lib/aia.rb
CHANGED
@@ -23,7 +23,15 @@ require 'hashie'
|
|
23
23
|
require 'pathname'
|
24
24
|
require 'reline'
|
25
25
|
require 'shellwords'
|
26
|
-
require 'tempfile'
|
26
|
+
require 'tempfile' # SMELL: is this still being used?
|
27
|
+
|
28
|
+
require 'tty-spinner'
|
29
|
+
|
30
|
+
unless TTY::Spinner.new.respond_to?(:log)
|
31
|
+
# Allows messages to be sent to the console while
|
32
|
+
# the spinner is still spinning.
|
33
|
+
require_relative './core_ext/tty-spinner_log'
|
34
|
+
end
|
27
35
|
|
28
36
|
require 'prompt_manager'
|
29
37
|
require 'prompt_manager/storage/file_system_adapter'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# aia/lib/core_ext/tty-spinner_log.rb
|
2
|
+
#
|
3
|
+
# The gem's README shows the log method; bit the
|
4
|
+
# author has been spinning his wheels since 2021 on pushing a release
|
5
|
+
# with it. This is a stop gap.
|
6
|
+
|
7
|
+
module TTY
|
8
|
+
class Spinner
|
9
|
+
# Log a message to the output
|
10
|
+
# This will clear the current spinner line, print the log message,
|
11
|
+
# and then redraw or resume the spinner on a new line.
|
12
|
+
#
|
13
|
+
# @param [String] message
|
14
|
+
# the log message to print
|
15
|
+
#
|
16
|
+
# @api public
|
17
|
+
def log(message)
|
18
|
+
synchronize do
|
19
|
+
clear_line # Clear the spinner
|
20
|
+
output.puts(message) # Log the message
|
21
|
+
redraw_indent # Redraw the spinner frame
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/main.just
CHANGED
@@ -18,7 +18,7 @@ module git /Users/dewayne/just_modules/git.just
|
|
18
18
|
|
19
19
|
|
20
20
|
# Install Locally
|
21
|
-
install: update_toc_in_readmen create_man_page
|
21
|
+
install: update_toc_in_readmen create_man_page flay
|
22
22
|
rake install
|
23
23
|
|
24
24
|
|
@@ -31,6 +31,15 @@ update_toc_in_readmen:
|
|
31
31
|
preview_man_page:
|
32
32
|
kramdown-man {{RR}}/man/aia.1.md
|
33
33
|
|
34
|
+
# Static Code Check
|
35
|
+
flay: coverage
|
36
|
+
flay {{RR}}
|
37
|
+
|
38
|
+
|
39
|
+
# View coverage report
|
40
|
+
coverage: test
|
41
|
+
open {{RR}}/coverage/index.html
|
42
|
+
|
34
43
|
|
35
44
|
# Run Unit Tests
|
36
45
|
test:
|
data/man/aia.1
CHANGED
@@ -27,7 +27,8 @@ begin a chat session with the backend after the initial prompt response; will s
|
|
27
27
|
.TP
|
28
28
|
\fB\-\-completion\fR \fISHELL\[ru]NAME\fP
|
29
29
|
.TP
|
30
|
-
\fB\-\-dump\fR \
|
30
|
+
\fB\-\-dump\fR \fIPATH\[sl]TO\[sl]FILE\.ext\fP
|
31
|
+
Dump the current configuration to a file in the format denoted by the file\[cq]s extension\. Currently only \.yml, \.yaml and \.toml are acceptable file extensions\. \fIIf the file exists, it will be over\-written without warning\.\fP
|
31
32
|
.TP
|
32
33
|
\fB\-e\fR, \fB\-\-edit\fR
|
33
34
|
Invokes an editor on the prompt file\. You can make changes to the prompt file, save it and the newly saved prompt will be processed by the backend\.
|
@@ -116,7 +117,7 @@ To acquire an OpenAI access key, first create an account on the OpenAI platform,
|
|
116
117
|
.PP
|
117
118
|
The \fB\-\-completion\fR option displays a script that enables prompt ID auto\-completion for bash, zsh, or fish shells\. It\[cq]s crucial to integrate the script into the shell\[cq]s runtime to take effect\.
|
118
119
|
.PP
|
119
|
-
The \fB\-\-dump\fR
|
120
|
+
The \fB\-\-dump path\[sl]to\[sl]file\.ext\fR option will write the current configuration to a file in the format requested by the file\[cq]s extension\. The following extensions are supported: \.yml, \.yaml and \.toml
|
120
121
|
.SH PROMPT DIRECTIVES
|
121
122
|
.PP
|
122
123
|
Within a prompt text file any line that begins with \[lq]\[sl]\[sl]\[rq] is considered a prompt directive\. There are numerious prompt directives available\. In the discussion above on the configuration you learned about the \[lq]\[sl]\[sl]config\[rq] directive\.
|
data/man/aia.1.md
CHANGED
@@ -31,8 +31,8 @@ The aia command-line tool is an interface for interacting with an AI model backe
|
|
31
31
|
`--completion` *SHELL_NAME*
|
32
32
|
: Show completion script for bash|zsh|fish - default is nil
|
33
33
|
|
34
|
-
`--dump` *
|
35
|
-
: Dump a
|
34
|
+
`--dump` *PATH/TO/FILE.ext*
|
35
|
+
: Dump the current configuration to a file in the format denoted by the file's extension. Currently only .yml, .yaml and .toml are acceptable file extensions. *If the file exists, it will be over-written without warning.*
|
36
36
|
|
37
37
|
`-e`, `--edit`
|
38
38
|
: Invokes an editor on the prompt file. You can make changes to the prompt file, save it and the newly saved prompt will be processed by the backend.
|
@@ -122,7 +122,8 @@ To acquire an OpenAI access key, first create an account on the OpenAI platform,
|
|
122
122
|
|
123
123
|
The `--completion` option displays a script that enables prompt ID auto-completion for bash, zsh, or fish shells. It's crucial to integrate the script into the shell's runtime to take effect.
|
124
124
|
|
125
|
-
The `--dump`
|
125
|
+
The `--dump path/to/file.ext` option will write the current configuration to a file in the format requested by the file's extension. The following extensions are supported: .yml, .yaml and .toml
|
126
|
+
|
126
127
|
|
127
128
|
## PROMPT DIRECTIVES
|
128
129
|
|
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.9
|
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-
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: simplecov
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: tocer
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,6 +225,7 @@ executables:
|
|
211
225
|
extensions: []
|
212
226
|
extra_rdoc_files: []
|
213
227
|
files:
|
228
|
+
- ".better-commits.json"
|
214
229
|
- ".config/tocer/configuration.yml"
|
215
230
|
- ".envrc"
|
216
231
|
- ".semver"
|
@@ -241,8 +256,10 @@ files:
|
|
241
256
|
- lib/aia/tools/sgpt.rb
|
242
257
|
- lib/aia/tools/subl.rb
|
243
258
|
- lib/aia/tools/vim.rb
|
259
|
+
- lib/aia/user_query.rb
|
244
260
|
- lib/aia/version.rb
|
245
261
|
- lib/core_ext/string_wrap.rb
|
262
|
+
- lib/core_ext/tty-spinner_log.rb
|
246
263
|
- main.just
|
247
264
|
- man/aia.1
|
248
265
|
- man/aia.1.md
|
@@ -269,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
286
|
- !ruby/object:Gem::Version
|
270
287
|
version: '0'
|
271
288
|
requirements: []
|
272
|
-
rubygems_version: 3.5.
|
289
|
+
rubygems_version: 3.5.5
|
273
290
|
signing_key:
|
274
291
|
specification_version: 4
|
275
292
|
summary: AI Assistant (aia) a command-line (CLI) utility
|