commitgpt 0.3.7 → 0.3.8

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: 0f0375fced0367f258ad0a60fdda99b10e11e42c2919b87b1a4e3b7d34c64a39
4
- data.tar.gz: b900f3eb0ad5fe040bbcdc1c928bb1e3843b94a3251141911e3ba28816775fde
3
+ metadata.gz: 5087467607c5fa8e321e66d9515ac5ebd4a65ef513a1cb0dc9a5819db4e72601
4
+ data.tar.gz: 3e33525a45b3892e4811671dde772df60e230d22b1b011019f3906ab4752ff1e
5
5
  SHA512:
6
- metadata.gz: '079b9b9c114a763033df5a4cddd958e51a9c07b0ed9d09216499d8e60ca9f0f1d3f264a3eb24b1566f215f928e91c73d1cd0318bf1ad812705da02a24bddce94'
7
- data.tar.gz: c95285ec608aaa8e5b534d8cc5e6ed2bd3682f460f5b0df7744408521bef5e71f6662b38974e4abf56a7ee4086bb1aed2cf6396ff3d7df61e69f69b16c234e1d
6
+ metadata.gz: c78638efe575fd73035cffee4bd8779eace5552315beb8c5400a6223d99410dd4981fef26c755156920fd65206f99b9c4bdb3530b638afdf2dfbb3bd76e5190c
7
+ data.tar.gz: f40cc753a3b6849df45d2b8a11b19d008ad20661f4461d5ba61f54a20ce8234592fa6432b64354a7e27bbfd0ffda1dde82fb2f5385bd34dec76fab6bc3012f75
@@ -10,6 +10,9 @@ require_relative 'string'
10
10
  module CommitGpt
11
11
  # Interactive setup wizard for configuring AI providers
12
12
  class SetupWizard
13
+ # Seconds to wait when fetching the provider's model list
14
+ MODEL_FETCH_TIMEOUT = 30
15
+
13
16
  def initialize
14
17
  @prompt = TTY::Prompt.new
15
18
  end
@@ -251,7 +254,7 @@ module CommitGpt
251
254
 
252
255
  models = nil
253
256
  begin
254
- Timeout.timeout(5) do
257
+ Timeout.timeout(MODEL_FETCH_TIMEOUT) do
255
258
  headers = {
256
259
  'Content-Type' => 'application/json',
257
260
  'User-Agent' => "Ruby/#{RUBY_VERSION}"
@@ -269,7 +272,7 @@ module CommitGpt
269
272
  end
270
273
  end
271
274
  rescue Timeout::Error
272
- puts '✖ Connection timeout (5s). Please check your network, base_url, and api_key.'.red
275
+ puts "✖ Connection timeout (#{MODEL_FETCH_TIMEOUT}s). Please check your network, base_url, and api_key.".red
273
276
  exit(0)
274
277
  rescue StandardError => e
275
278
  puts "✖ Error fetching models: #{e.message}".red
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CommitGpt
4
- VERSION = '0.3.7'
4
+ VERSION = '0.3.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commitgpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peng Zhang