ai-push-hooks 0.1.9 → 0.1.10
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.
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -249,6 +249,7 @@ def run_llm_step(
|
|
|
249
249
|
last_error = ""
|
|
250
250
|
last_output = ""
|
|
251
251
|
wants_json = bool(step.schema)
|
|
252
|
+
expects_json_array = step.schema in {"string_array", "docs_issue_array"}
|
|
252
253
|
for attempt in range(1, total_attempts + 1):
|
|
253
254
|
result = call_opencode(
|
|
254
255
|
context,
|
|
@@ -269,7 +270,7 @@ def run_llm_step(
|
|
|
269
270
|
if not wants_json:
|
|
270
271
|
finalize_opencode_session(context, stage_name, session_id)
|
|
271
272
|
return result.output_text
|
|
272
|
-
if
|
|
273
|
+
if expects_json_array:
|
|
273
274
|
payload = extract_json_array(result.output_text)
|
|
274
275
|
else:
|
|
275
276
|
payload = extract_json_object(result.output_text)
|
|
@@ -281,7 +282,7 @@ def run_llm_step(
|
|
|
281
282
|
if attempt >= total_attempts:
|
|
282
283
|
break
|
|
283
284
|
snippet = last_output[: context.config.llm.invalid_json_feedback_max_chars]
|
|
284
|
-
if
|
|
285
|
+
if expects_json_array:
|
|
285
286
|
suffix = "Return ONLY valid JSON array."
|
|
286
287
|
else:
|
|
287
288
|
suffix = "Return ONLY valid JSON object."
|