ask-tools-shell 0.3.3 → 0.3.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: 41d421b582c83a93c38b07c9fb03804a092c32235e15f9380de2a2884a80ecc5
4
- data.tar.gz: 48c178e8b7b3a37be306e070eb66ec8c6db56bf3ef8bd59e607bf47d0a7f52ef
3
+ metadata.gz: 6c8152ae1dcc82318421fde8c5a890ada7a6d4f11435a6e642e0724a06bab80e
4
+ data.tar.gz: ce7bb3ea38eb7514ae0f4e44e9cd4adfc1ebed5cf413cc9b424b74e17ce183a8
5
5
  SHA512:
6
- metadata.gz: 1604db63ade73e2dcc3c6974175ce70ed77991722a9281077d705f92d70b11b777ad64eb6730bfe5622737ccc59eab1d1550bad64079ce32980ea69911288f95
7
- data.tar.gz: 0c39aa0ae1f56134ad634e875720c5ca4d8a934a8f2bfd957dcdc944ffb8d9633417735e01d3607513cf53b0d3324e4d83f29cecdf186f7bbb5185158618ccb2
6
+ metadata.gz: 284a6529ddae8a8099ab8d5af6d53fa2e3f53d97780c6ed9b94a26cb8eb6773500c12b1efb9f4087f3f415dc85b91b8724ecad2483ce511ca5c7e863d0dd00c8
7
+ data.tar.gz: a1d656f3851f88949869dc9f4aa1591f79c2ae394fa065f4e8767a55af4c004f63f84df06ef88f11bbfec27c5919b7374cc278f8eb97245f93c02799143b8e6e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.3.4] - 2026-06-25
2
+
3
+ ### Fixed
4
+ - **apply_chunks** no longer silently skips unmatched hunks — returns error when hunk text not found in file
5
+ - **Add File** parser no longer silently drops lines without `+` prefix — collects all lines as content
6
+ - **ApplyPatch tool** now emits proper SSE events during streaming (removed early `next` that suppressed `output_item.added` and `function_call_arguments.delta`)
7
+
1
8
  ## [0.3.3] - 2026-06-25
2
9
 
3
10
  ### Changed
@@ -96,6 +96,9 @@ module Ask
96
96
  end
97
97
 
98
98
  new_content = apply_chunks(raw, entry[:chunks])
99
+ if new_content.nil?
100
+ return Ask::Result.error(message: "Hunk does not match file content for: #{path}")
101
+ end
99
102
  operations.write_file(path, new_content)
100
103
  results << { action: "update", path: entry[:path] }
101
104
 
@@ -141,7 +144,7 @@ module Ask
141
144
  i += 1
142
145
  content_lines = []
143
146
  while i < lines.length && !lines[i].start_with?("***")
144
- content_lines << lines[i].sub(/^\+/, "") if lines[i].start_with?("+")
147
+ content_lines << lines[i].sub(/^\+/, "")
145
148
  i += 1
146
149
  end
147
150
  entries << { type: :add, path: path, lines: content_lines }
@@ -194,7 +197,7 @@ module Ask
194
197
  new_text = chunk[:new].join("\n")
195
198
  file_text = lines.join("\n")
196
199
  idx = file_text.index(old_text)
197
- next unless idx
200
+ return nil unless idx
198
201
 
199
202
  before = file_text[0...idx]
200
203
  after = file_text[(idx + old_text.length)..]
@@ -3,7 +3,7 @@
3
3
  module Ask
4
4
  module Tools
5
5
  module Shell
6
- VERSION = "0.3.3"
6
+ VERSION = "0.3.4"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-tools-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto