compose 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/prompts/task.txt +1 -1
- data/lib/compose/cli.rb +1 -1
- data/lib/compose/file_processor.rb +16 -1
- data/lib/compose/version.rb +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: d36eebaf01309fb4c0762dcbc6665e48704c47efdcc53d705a959eca780cbc2f
|
4
|
+
data.tar.gz: d109de09f9b08947aa5b17a3f67ce4e050854cc123a69d4ae95c791586e0e719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 657a0b56b8e25976c901be35c47d531947f524eef84e2696d9ebd0cdea8468b19ec1517b3eca803d49d4dac88e4a37b819695d3a8226bb323171fdeff8d38dd8
|
7
|
+
data.tar.gz: 72e63f67707c80f0287d5faab11e611e08f4910640e02be9c570738a11bfa939f4adba9c64a2ecd1cf9684c06fcdd5327f181fd1ebce40d2e1bde61ceee8c70e
|
data/config/prompts/task.txt
CHANGED
data/lib/compose/cli.rb
CHANGED
@@ -22,7 +22,7 @@ module Compose
|
|
22
22
|
ApiKeyUtils.setup(verifier_model)
|
23
23
|
|
24
24
|
file_processor = FileProcessor.new(files, include_imports: options[:include_imports], model: code_model)
|
25
|
-
puts "Loaded #{file_processor.files.count} file(s)."
|
25
|
+
puts "Loaded #{file_processor.files.count} file(s): #{file_processor.files.keys.map { |path| File.exist?(path) ? Pathname.new(path).relative_path_from(Pathname.pwd).to_s : path }.join(', ')}"
|
26
26
|
|
27
27
|
task = ask('What do you need me to do? (Type \'ask\' followed by your question to ask a question instead):')
|
28
28
|
|
@@ -80,7 +80,22 @@ module Compose
|
|
80
80
|
private
|
81
81
|
|
82
82
|
def find_files_in_directory(directory)
|
83
|
-
|
83
|
+
tracked_files = `git ls-files #{directory}`.split("\n")
|
84
|
+
tracked_files.select do |path|
|
85
|
+
File.file?(path) && text_file?(path)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def text_file?(path)
|
90
|
+
return false if File.zero?(path)
|
91
|
+
|
92
|
+
bytes = File.read(path, 1024) or return false
|
93
|
+
bytes.each_byte do |byte|
|
94
|
+
return false if [0, 1, 2, 3, 4, 5, 6, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31].include?(byte)
|
95
|
+
end
|
96
|
+
true
|
97
|
+
rescue
|
98
|
+
false
|
84
99
|
end
|
85
100
|
end
|
86
101
|
end
|
data/lib/compose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dreaming Tulpa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-openai
|