buildRepairPrompt function
Builds the repair prompt: the original ask plus what was wrong with the answer to it.
Implementation
String buildRepairPrompt(
String original, String previous, List<String> errors) =>
'$original\n\n---\nYour previous output was rejected:\n'
'${previous.length > 600 ? previous.substring(0, 600) : previous}\n'
'Errors: ${errors.isEmpty ? 'output did not match the required format' : errors.join('; ')}\n'
'Output the corrected marker line and nothing else.';