cline-rb 1.1.3 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b53418df62615e2bef17ca89987ee327820cacaac21fb06c76c70ce465edd9d1
4
- data.tar.gz: 31082e00dacb07c2491df3dd73558ea846d4ccde0843f27afb3df36cd11cdc3b
3
+ metadata.gz: 0cae03339b133588a9f0a4e04d66bf789cade5365495513a17a94839402d814f
4
+ data.tar.gz: 63d588d57d86ffad47a0c5e385f32d6b35118e0452696fb13b2fa17af9bcbed1
5
5
  SHA512:
6
- metadata.gz: 58183c443e1bd679c6ca5622f39e12359d64b4c6eb342d4e1cdec50c65a6b5c7bfdf5664b7b41cef415a55bf5e8c16ee83b2fd95c6f5f7ac5eb9d5c040cf9d56
7
- data.tar.gz: 33317d33bbb1f2d0ca61071dbdb4ed59ab16403885d5c7db9796696a8042fa61695850a4e9d87a63d20c87b56137b79bdb930d2cbb60db52afee43c144297fe7
6
+ metadata.gz: a3c9ce62b490930ce6b43a602221bf9ec6a26671f3cf8dc18ebfa5fd24b20836cd46524b2369d9e64b7625349c089f9051d1d282e23269c56cda122457cd3153
7
+ data.tar.gz: 778623fac356f2d8a3369b08ac23a6aacf871ad162bdbd239d8734ed2c5c36946fc89a00f49a3dca602bbfe397c5fd501c4f727125bf6cf9aa49ff8e55558af2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v1.1.4](https://github.com/Muriel-Salvan/cline-rb/compare/v1.1.3...v1.1.4) (2026-10-22 09:34:43)
2
+
3
+ ### Patches
4
+
5
+ * [feat(cli): use temp prompt file when a single arg exceeds per-arg limit](https://github.com/Muriel-Salvan/cline-rb/commit/52c9486a2f97af29d4c10afbc596bef7f61994f3)
6
+
1
7
  # [v1.1.3](https://github.com/Muriel-Salvan/cline-rb/compare/v1.1.2...v1.1.3) (2026-10-14 15:38:46)
2
8
 
3
9
  ### Patches
data/lib/cline/cli.rb CHANGED
@@ -133,7 +133,11 @@ module Cline
133
133
  task_args = parse_task_options(**kwargs)
134
134
  # Use a prompt temporary file if the prompt is too long to fit in the command line.
135
135
  (
136
- if stripped_prompt && stripped_prompt.size + 2 > Utils::Os.max_cmd_length - (Utils::Os.cline_exe + task_args).map { |arg| "\"#{arg}\"" }.join(' ').size
136
+ if stripped_prompt && (
137
+ stripped_prompt.bytesize + 2 > Utils::Os.max_cmd_length -
138
+ (Utils::Os.cline_exe + task_args).map { |arg| "\"#{arg}\"" }.join(' ').bytesize ||
139
+ stripped_prompt.bytesize + 2 > Utils::Os.max_arg_length
140
+ )
137
141
  proc do |&run_block|
138
142
  Utils::File.with_temp_dir do |tmp_dir|
139
143
  prompt_file = "#{tmp_dir}/prompt.txt"
@@ -37,6 +37,11 @@ module Cline
37
37
  def max_cmd_length
38
38
  @max_cmd_length ||= Integer(`getconf ARG_MAX`.strip)
39
39
  end
40
+
41
+ # @return [Integer] Maximum length a single command-line argument can have
42
+ def max_arg_length
43
+ @max_arg_length ||= [131_072, max_cmd_length].min
44
+ end
40
45
  end
41
46
  end
42
47
  end
@@ -40,6 +40,11 @@ module Cline
40
40
  def max_cmd_length
41
41
  8191
42
42
  end
43
+
44
+ # @return [Integer] Maximum length a single command-line argument can have
45
+ def max_arg_length
46
+ 8191
47
+ end
43
48
  end
44
49
  end
45
50
  end
data/lib/cline/version.rb CHANGED
@@ -2,5 +2,5 @@ module Cline
2
2
  # @!group Public API
3
3
 
4
4
  # Gem version
5
- VERSION = '1.1.3'
5
+ VERSION = '1.1.4'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cline-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan