Repair prompt for when nothing parseable was produced at all.
(raw_text: &str)
| 1105 | |
| 1106 | /// Repair prompt for when nothing parseable was produced at all. |
| 1107 | fn build_parse_failure_repair(raw_text: &str) -> String { |
| 1108 | if raw_text.trim().is_empty() { |
| 1109 | return "Your previous response contained no JSON. Respond with ONLY a single valid JSON object that matches the schema — no prose, no markdown, no analysis, and put the object in your reply content (not in a thinking/reasoning aside).".to_string(); |
| 1110 | } |
| 1111 | format!( |
| 1112 | "Your previous output could not be parsed as a JSON object:\n\n{}\n\nReturn ONLY a single valid JSON object matching the schema — no prose, no markdown.", |
| 1113 | truncate_utf8(raw_text, 2000) |
| 1114 | ) |
| 1115 | } |
| 1116 | |
| 1117 | fn build_repair_message(raw_text: &str, errors: &[String]) -> String { |
| 1118 | // Truncate raw output in repair message to avoid blowing context |
no test coverage detected