aia 0.5.8 โ†’ 0.5.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97bd3e1401d2883bca0d6ce3ab427a9fab12d3b71b2114a87fe278a0360f3693
4
- data.tar.gz: 0333f04542cde2c853ccd00aff70e90b9d680960020f5187ab0b265916c24a27
3
+ metadata.gz: 6940189234efc4095d868d636f93f9b0f7996828f83068a02cde912d078f85c9
4
+ data.tar.gz: 4514680742c17109307b754861c0d24ce3674da51f1c0087f660edb3663434dd
5
5
  SHA512:
6
- metadata.gz: 17395c59e8aabf7d4994236fd407beaf2231c6d05744af1fcd84ae588ad7ffcd4abd853096728ca50fb09976075b4ac920200e6732d7736d072e2d2a4071e7fb
7
- data.tar.gz: f8f21824485408330c31fe99b6b77fd072e08486ccd4293df9f9a55fc464369081f901f0bf6bc8c818e2238ad17d63ce497f164cd9960967d0f55942558c55c8
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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 8
4
+ :patch: 9
5
5
  :special: ''
6
6
  :metadata: ''
data/justfile CHANGED
@@ -30,7 +30,11 @@ set dotenv-load := false
30
30
  pwd := env_var('PWD')
31
31
 
32
32
  me := justfile()
33
- home := env_var('HOME')
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
data/lib/aia/main.rb CHANGED
@@ -15,11 +15,15 @@ require_relative 'user_query'
15
15
  # of a single class.
16
16
 
17
17
  class AIA::Main
18
+ SPINNER_FORMAT = :bouncing_ball
19
+
18
20
  include AIA::DynamicContent
19
21
  include AIA::UserQuery
20
22
 
21
23
  attr_accessor :logger, :tools, :backend
22
24
 
25
+ attr_reader :spinner
26
+
23
27
  def initialize(args= ARGV)
24
28
  AIA::Tools.load_tools
25
29
 
@@ -31,6 +35,9 @@ class AIA::Main
31
35
  ]}
32
36
  end
33
37
 
38
+ @spinner = TTY::Spinner.new(":spinner :title", format: SPINNER_FORMAT)
39
+ spinner.update(title: "composing response ... ")
40
+
34
41
  @logger = AIA::Logging.new(AIA.config.log_file)
35
42
 
36
43
  @logger.info(AIA.config) if AIA.config.debug? || AIA.config.verbose?
@@ -118,9 +125,15 @@ class AIA::Main
118
125
 
119
126
 
120
127
  def get_and_display_result(the_prompt_text)
128
+ spinner.auto_spin if AIA.config.verbose?
129
+
121
130
  backend.text = the_prompt_text
122
131
  result = backend.run
123
132
 
133
+ if AIA.config.verbose?
134
+ spinner.success "Done."
135
+ end
136
+
124
137
  AIA.config.out_file.write "\nResponse:\n"
125
138
 
126
139
  if STDOUT == AIA.config.out_file
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
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.8
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-01-18 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -225,6 +225,7 @@ executables:
225
225
  extensions: []
226
226
  extra_rdoc_files: []
227
227
  files:
228
+ - ".better-commits.json"
228
229
  - ".config/tocer/configuration.yml"
229
230
  - ".envrc"
230
231
  - ".semver"
@@ -258,6 +259,7 @@ files:
258
259
  - lib/aia/user_query.rb
259
260
  - lib/aia/version.rb
260
261
  - lib/core_ext/string_wrap.rb
262
+ - lib/core_ext/tty-spinner_log.rb
261
263
  - main.just
262
264
  - man/aia.1
263
265
  - man/aia.1.md
@@ -284,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
286
  - !ruby/object:Gem::Version
285
287
  version: '0'
286
288
  requirements: []
287
- rubygems_version: 3.5.4
289
+ rubygems_version: 3.5.5
288
290
  signing_key:
289
291
  specification_version: 4
290
292
  summary: AI Assistant (aia) a command-line (CLI) utility