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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cli/actions.rb +16 -15
  3. data/lib/cli/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fec1b7f1158dd8a2e1f03fadf4202c4366a0e702c4c46098be671096365cd9c
4
- data.tar.gz: 0442551b11ab8c4475a139ae62f0211763befa68124b06f6582785cb7fd3c4f2
3
+ metadata.gz: 4bba2de614bc2c5cef8816f714cb1637de973315709d12db51f4185625e719e7
4
+ data.tar.gz: 6a53b8f660d1196d5b464e384afebea02008d5d0b124422262fa3743af202ce1
5
5
  SHA512:
6
- metadata.gz: 6816381ef1070d11c9c11ce0879c5e5e10bb08cd2d0c252bf06fa0385e891c12fe42d3f211cebb3510742cf0144922f5522a93b89905943c16524342d82b2afe
7
- data.tar.gz: ab5e4a947cede7c77440570f78b166ca6b0b236ef7def4033295e134ad864754192fd897ebe05245a69f61c830c576349ce9edd6d7347b757812921ad0640ab4
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 " pairprogrammer init"
62
- Cli::Display.info_message " pairprogrammer help"
63
- Cli::Display.info_message " pairprogrammer coding new"
64
- Cli::Display.info_message " pairprogrammer coding start (-a|--auto)"
65
- Cli::Display.info_message " pairprogrammer coding list"
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 default): ")
72
- if context.empty?
73
- Cli::Display.info_message("using default context")
74
- Cli::Display.info_message(config.default_context)
75
- context = config.default_context
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
- puts "Created coding assistant #{id}"
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 your coding assistant:", coders.inject({}) { |hash, coder| hash[coder["requirements"]] = coder["id"]; hash })
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("coder is still running, will try again in 20 seconds")
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 coder, this coder will no longer be able to run")
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
@@ -1,5 +1,5 @@
1
1
  module Cli
2
2
  module Version
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
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.3
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-08 00:00:00.000000000 Z
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: https://github.com/username/pairprogrammer
121
+ homepage:
122
122
  licenses:
123
123
  - MIT
124
124
  metadata: {}