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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/ask/tools/shell/apply_patch.rb +5 -2
- data/lib/ask/tools/shell/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c8152ae1dcc82318421fde8c5a890ada7a6d4f11435a6e642e0724a06bab80e
|
|
4
|
+
data.tar.gz: ce7bb3ea38eb7514ae0f4e44e9cd4adfc1ebed5cf413cc9b424b74e17ce183a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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(/^\+/, "")
|
|
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
|
-
|
|
200
|
+
return nil unless idx
|
|
198
201
|
|
|
199
202
|
before = file_text[0...idx]
|
|
200
203
|
after = file_text[(idx + old_text.length)..]
|