appydave-tools 0.76.14 → 0.77.0
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/CHANGELOG.md +7 -0
- data/bin/gpt_context.rb +21 -0
- data/lib/appydave/tools/dam/project_listing.rb +29 -13
- data/lib/appydave/tools/gpt_context/options.rb +2 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da810302030028afb94bce827071f9f60aa21e3bdda8d3f4422714fa21ee7260
|
|
4
|
+
data.tar.gz: c4a66f057c1daafad0c3eb325e48b976aa8d49142ba6569c80fad41af47d5886
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3af5d4dcfe696d917b956f9883c8ce785b710e76387eda91ec9287e0a445bd59db2c4bb0b3818d084cc533f8a3afc9dacac9c0dab9c37dc26895a71855b25cda
|
|
7
|
+
data.tar.gz: 5c24f2059eeb548730facb75aacd4d49a54e749a7021105fd36fedb55b21956dd4bf9087a22a2894c07150a342823e6db990e0774f3f019f67a92a91da91d9ad
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.76.14](https://github.com/appydave/appydave-tools/compare/v0.76.13...v0.76.14) (2026-03-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add brand resolution integration spec covering BrandResolver, Config, ProjectResolver chain ([af571e7](https://github.com/appydave/appydave-tools/commit/af571e7669397c3e4964a77b4275d36476caaf5a))
|
|
7
|
+
|
|
1
8
|
## [0.76.13](https://github.com/appydave/appydave-tools/compare/v0.76.12...v0.76.13) (2026-03-19)
|
|
2
9
|
|
|
3
10
|
|
data/bin/gpt_context.rb
CHANGED
|
@@ -79,6 +79,10 @@ OptionParser.new do |opts|
|
|
|
79
79
|
options.prompt = message
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
opts.on('-t', '--tokens', 'Show estimated token count after collecting context') do
|
|
83
|
+
options.show_tokens = true
|
|
84
|
+
end
|
|
85
|
+
|
|
82
86
|
opts.separator ''
|
|
83
87
|
opts.separator 'OUTPUT FORMATS'
|
|
84
88
|
opts.separator ' tree - Directory tree structure'
|
|
@@ -132,6 +136,23 @@ options.working_directory ||= Dir.pwd
|
|
|
132
136
|
gatherer = Appydave::Tools::GptContext::FileCollector.new(options)
|
|
133
137
|
content = gatherer.build
|
|
134
138
|
|
|
139
|
+
if options.show_tokens
|
|
140
|
+
token_estimate = (content.length / 4.0).ceil
|
|
141
|
+
char_count = content.length
|
|
142
|
+
warn ''
|
|
143
|
+
warn '── Token Estimate ──────────────────────────'
|
|
144
|
+
warn " Characters : #{char_count.to_s.rjust(10)}"
|
|
145
|
+
warn " Tokens (~4c): #{token_estimate.to_s.rjust(10)}"
|
|
146
|
+
warn ''
|
|
147
|
+
if token_estimate > 200_000
|
|
148
|
+
warn ' ⚠️ WARNING: Exceeds 200k tokens — may not fit most LLM context windows'
|
|
149
|
+
elsif token_estimate > 100_000
|
|
150
|
+
warn ' ⚠️ NOTICE: Exceeds 100k tokens — check your LLM context limit'
|
|
151
|
+
end
|
|
152
|
+
warn '────────────────────────────────────────────'
|
|
153
|
+
warn ''
|
|
154
|
+
end
|
|
155
|
+
|
|
135
156
|
if %w[info debug].include?(options.debug)
|
|
136
157
|
puts '-' * 80
|
|
137
158
|
puts content
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'io/console'
|
|
4
|
+
|
|
3
5
|
# rubocop:disable Style/FormatStringToken
|
|
4
6
|
# Disabled: Using simple unannotated tokens (%s) for straightforward string formatting
|
|
5
7
|
# Annotated tokens (%<foo>s) add unnecessary complexity for simple table formatting
|
|
@@ -28,13 +30,13 @@ module Appydave
|
|
|
28
30
|
'GIT S3 SYNC PATH SSD BACKUP ' \
|
|
29
31
|
'WORKFLOW ACTIVE'
|
|
30
32
|
puts header
|
|
31
|
-
puts '-' * 200
|
|
33
|
+
puts '-' * [terminal_width, 200].min
|
|
32
34
|
else
|
|
33
35
|
header = 'BRAND KEY PROJECTS SIZE LAST MODIFIED ' \
|
|
34
36
|
'GIT PATH SSD BACKUP ' \
|
|
35
37
|
'WORKFLOW ACTIVE'
|
|
36
38
|
puts header
|
|
37
|
-
puts '-' * 189
|
|
39
|
+
puts '-' * [terminal_width, 189].min
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
brand_data.each do |data|
|
|
@@ -50,7 +52,7 @@ module Appydave
|
|
|
50
52
|
format_date(data[:modified]),
|
|
51
53
|
data[:git_status],
|
|
52
54
|
data[:s3_sync],
|
|
53
|
-
shorten_path(data[:path]),
|
|
55
|
+
truncate_path(shorten_path(data[:path]), 35),
|
|
54
56
|
data[:ssd_backup] || 'N/A',
|
|
55
57
|
data[:workflow] || 'N/A',
|
|
56
58
|
data[:active_count] || 0
|
|
@@ -64,7 +66,7 @@ module Appydave
|
|
|
64
66
|
format_size(data[:size]),
|
|
65
67
|
format_date(data[:modified]),
|
|
66
68
|
data[:git_status],
|
|
67
|
-
shorten_path(data[:path]),
|
|
69
|
+
truncate_path(shorten_path(data[:path]), 35),
|
|
68
70
|
data[:ssd_backup] || 'N/A',
|
|
69
71
|
data[:workflow] || 'N/A',
|
|
70
72
|
data[:active_count] || 0
|
|
@@ -85,7 +87,7 @@ module Appydave
|
|
|
85
87
|
'GIT',
|
|
86
88
|
'S3 SYNC'
|
|
87
89
|
)
|
|
88
|
-
puts '-' * 133
|
|
90
|
+
puts '-' * [terminal_width, 133].min
|
|
89
91
|
else
|
|
90
92
|
puts format(
|
|
91
93
|
'%-30s %-15s %10s %12s %20s %-15s',
|
|
@@ -96,7 +98,7 @@ module Appydave
|
|
|
96
98
|
'LAST MODIFIED',
|
|
97
99
|
'GIT'
|
|
98
100
|
)
|
|
99
|
-
puts '-' * 122
|
|
101
|
+
puts '-' * [terminal_width, 122].min
|
|
100
102
|
end
|
|
101
103
|
# rubocop:enable Style/RedundantFormat
|
|
102
104
|
|
|
@@ -193,7 +195,7 @@ module Appydave
|
|
|
193
195
|
'S3 ↑ UPLOAD',
|
|
194
196
|
'S3 ↓ DOWNLOAD'
|
|
195
197
|
)
|
|
196
|
-
puts '-' * 280
|
|
198
|
+
puts '-' * [terminal_width, 280].min
|
|
197
199
|
else
|
|
198
200
|
puts format(
|
|
199
201
|
'%-45s %12s %15s %-15s %-65s %-18s %-18s %-30s',
|
|
@@ -206,7 +208,7 @@ module Appydave
|
|
|
206
208
|
'LIGHT FILES',
|
|
207
209
|
'SSD BACKUP'
|
|
208
210
|
)
|
|
209
|
-
puts '-' * 239
|
|
211
|
+
puts '-' * [terminal_width, 239].min
|
|
210
212
|
end
|
|
211
213
|
# rubocop:enable Style/RedundantFormat
|
|
212
214
|
|
|
@@ -224,7 +226,7 @@ module Appydave
|
|
|
224
226
|
age_display,
|
|
225
227
|
data[:git_status],
|
|
226
228
|
data[:s3_sync],
|
|
227
|
-
shorten_path(data[:path]),
|
|
229
|
+
truncate_path(shorten_path(data[:path]), 65),
|
|
228
230
|
data[:heavy_files] || 'N/A',
|
|
229
231
|
data[:light_files] || 'N/A',
|
|
230
232
|
data[:ssd_backup] || 'N/A',
|
|
@@ -238,7 +240,7 @@ module Appydave
|
|
|
238
240
|
format_size(data[:size]),
|
|
239
241
|
age_display,
|
|
240
242
|
data[:git_status],
|
|
241
|
-
shorten_path(data[:path]),
|
|
243
|
+
truncate_path(shorten_path(data[:path]), 65),
|
|
242
244
|
data[:heavy_files] || 'N/A',
|
|
243
245
|
data[:light_files] || 'N/A',
|
|
244
246
|
data[:ssd_backup] || 'N/A'
|
|
@@ -257,7 +259,7 @@ module Appydave
|
|
|
257
259
|
'GIT',
|
|
258
260
|
'S3'
|
|
259
261
|
)
|
|
260
|
-
puts '-' * 130
|
|
262
|
+
puts '-' * [terminal_width, 130].min
|
|
261
263
|
else
|
|
262
264
|
puts format(
|
|
263
265
|
'%-45s %12s %15s %-15s',
|
|
@@ -266,7 +268,7 @@ module Appydave
|
|
|
266
268
|
'AGE',
|
|
267
269
|
'GIT'
|
|
268
270
|
)
|
|
269
|
-
puts '-' * 117
|
|
271
|
+
puts '-' * [terminal_width, 117].min
|
|
270
272
|
end
|
|
271
273
|
# rubocop:enable Style/RedundantFormat
|
|
272
274
|
|
|
@@ -342,7 +344,7 @@ module Appydave
|
|
|
342
344
|
match_count = matches.size
|
|
343
345
|
puts "#{match_count} project#{'s' if match_count != 1} matching '#{pattern}' in #{brand}:"
|
|
344
346
|
puts 'PROJECT SIZE AGE'
|
|
345
|
-
puts '-' * 100
|
|
347
|
+
puts '-' * [terminal_width, 100].min
|
|
346
348
|
|
|
347
349
|
# Print table rows
|
|
348
350
|
project_data.each do |data|
|
|
@@ -654,6 +656,20 @@ module Appydave
|
|
|
654
656
|
def self.shorten_path(path)
|
|
655
657
|
path.sub(Dir.home, '~')
|
|
656
658
|
end
|
|
659
|
+
|
|
660
|
+
# Truncate path to max_width, preserving the tail with ellipsis prefix
|
|
661
|
+
def self.truncate_path(path, max_width = 35)
|
|
662
|
+
return path if path.nil? || path.length <= max_width
|
|
663
|
+
|
|
664
|
+
"...#{path[-(max_width - 3)..]}"
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
# Return terminal width, defaulting to 120 if unavailable
|
|
668
|
+
def self.terminal_width
|
|
669
|
+
IO.console&.winsize&.last || 120
|
|
670
|
+
rescue StandardError
|
|
671
|
+
120
|
|
672
|
+
end
|
|
657
673
|
end
|
|
658
674
|
end
|
|
659
675
|
end
|
|
@@ -13,6 +13,7 @@ module Appydave
|
|
|
13
13
|
:output_target,
|
|
14
14
|
:working_directory,
|
|
15
15
|
:prompt,
|
|
16
|
+
:show_tokens,
|
|
16
17
|
keyword_init: true
|
|
17
18
|
) do
|
|
18
19
|
def initialize(**args)
|
|
@@ -23,6 +24,7 @@ module Appydave
|
|
|
23
24
|
self.debug ||= 'none'
|
|
24
25
|
self.output_target ||= []
|
|
25
26
|
self.prompt ||= nil
|
|
27
|
+
self.show_tokens ||= false
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
data/package.json
CHANGED