pear-programmer 0.1.3 → 0.1.4
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/lib/cli/actions.rb +16 -15
- data/lib/cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bba2de614bc2c5cef8816f714cb1637de973315709d12db51f4185625e719e7
|
4
|
+
data.tar.gz: 6a53b8f660d1196d5b464e384afebea02008d5d0b124422262fa3743af202ce1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3982173e9f98c9cded26008eaeab6f890691a70e7ccbfd67e18b1f75ef213155516e182bd3ced330b5fe3882edd03b46bbf03e7c733694423aaa39635df62d07
|
7
|
+
data.tar.gz: 85e9246aa740c0d21e43ce99490e96a7b3f207d026393f41bd45681dcb565579f9be531daf962fb43efa9d6c8131e4be9629180dc169fd40113c27b6f6dbbdd5
|
data/lib/cli/actions.rb
CHANGED
@@ -58,22 +58,22 @@ module Cli
|
|
58
58
|
Cli::Display.info_message " coding (new|start|list)"
|
59
59
|
|
60
60
|
Cli::Display.info_message "Usage examples:"
|
61
|
-
Cli::Display.info_message "
|
62
|
-
Cli::Display.info_message "
|
63
|
-
Cli::Display.info_message "
|
64
|
-
Cli::Display.info_message "
|
65
|
-
Cli::Display.info_message "
|
61
|
+
Cli::Display.info_message " pear-on init"
|
62
|
+
Cli::Display.info_message " pear-on help"
|
63
|
+
Cli::Display.info_message " pear-on coding new (define a new set of requirements and tasks)"
|
64
|
+
Cli::Display.info_message " pear-on coding start (-a, --auto | will prompt you only when required)"
|
65
|
+
Cli::Display.info_message " pear-on coding list (list all requirements)"
|
66
66
|
end
|
67
67
|
|
68
68
|
# CODER
|
69
69
|
def self.create_coder(options)
|
70
70
|
config = Cli::Configuration.new
|
71
|
-
context = Cli::Display.get_input("context (press enter to use
|
72
|
-
if context.empty?
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
71
|
+
# context = Cli::Display.get_input("context (press enter to use context from your #{Cli::Configuration::FILE_NAME} file): ")
|
72
|
+
# if context.empty?
|
73
|
+
Cli::Display.info_message("using context from your #{Cli::Configuration::FILE_NAME} file:")
|
74
|
+
Cli::Display.info_message(config.default_context)
|
75
|
+
context = config.default_context
|
76
|
+
# end
|
77
77
|
requirements = Cli::Display.get_input("requirements: ")
|
78
78
|
tasks = []
|
79
79
|
while true do
|
@@ -86,7 +86,8 @@ module Cli
|
|
86
86
|
end
|
87
87
|
|
88
88
|
id = PairProgrammer::Api::Coder.create(tasks, context, requirements)
|
89
|
-
|
89
|
+
Cli::Display.success_message("Done")
|
90
|
+
Cli::Display.info_message("You can now run pear-on coding start")
|
90
91
|
end
|
91
92
|
|
92
93
|
def self.run_coder(options)
|
@@ -97,7 +98,7 @@ module Cli
|
|
97
98
|
id = options[:id]
|
98
99
|
else
|
99
100
|
coders = PairProgrammer::Api::Coder.list
|
100
|
-
id = Cli::Display.select("Select
|
101
|
+
id = Cli::Display.select("Select which requirements you would like to work on", coders.inject({}) { |hash, coder| hash[coder["requirements"]] = coder["id"]; hash })
|
101
102
|
end
|
102
103
|
|
103
104
|
while true do
|
@@ -114,12 +115,12 @@ module Cli
|
|
114
115
|
end
|
115
116
|
|
116
117
|
if response["running"]
|
117
|
-
Cli::Display.info_message("
|
118
|
+
Cli::Display.info_message("assistant is still running, will try again in 20 seconds")
|
118
119
|
sleep(20)
|
119
120
|
next
|
120
121
|
elsif response["reached_max_length"]
|
121
122
|
Cli::Display.error_message("conversation has reached its context length due to limitations with LLMs")
|
122
|
-
Cli::Display.error_message("please create a new
|
123
|
+
Cli::Display.error_message("please create a new set of requirements")
|
123
124
|
return
|
124
125
|
elsif response["error"]
|
125
126
|
Cli::Display.error_message("there was an error processing the assistant's response")
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pear-programmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Edelstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: open3
|
@@ -118,7 +118,7 @@ files:
|
|
118
118
|
- lib/pairprogrammer/configuration.rb
|
119
119
|
- lib/spec/cli/actions_spec.rb
|
120
120
|
- lib/spec/spec_helper.rb
|
121
|
-
homepage:
|
121
|
+
homepage:
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata: {}
|