diff --git a/src/cwhy/prompts.py b/src/cwhy/prompts.py index 32d381e..de23b41 100644 --- a/src/cwhy/prompts.py +++ b/src/cwhy/prompts.py @@ -137,15 +137,17 @@ def format_file_locations(filename: str, lines: dict[int, str]) -> str: group.append(line_content) last = line_number else: - result += f"File `{filename}`:\n" + result += f"File `{filename}`:\n```\n" result += llm_utils.number_group_of_lines( group, last - len(group) + 1 ) + result += "\n```\n\n" last = None group = [] if last is not None: - result += f"File `{filename}`:\n" + result += f"File `{filename}`:\n```\n" result += llm_utils.number_group_of_lines(group, last - len(group) + 1) + result += "\n```\n\n" return result formatted_file_locations = [