mirror of
https://github.com/PR0M3TH3AN/RePrompt.git
synced 2025-09-07 14:38:43 +00:00
update
This commit is contained in:
@@ -225,43 +225,44 @@ def write_custom_sections(custom_sections: List[Dict], script_dir: Path, output_
|
|||||||
file_path = script_dir / "static_files" / file_name
|
file_path = script_dir / "static_files" / file_name
|
||||||
write_static_file(file_path, output_file, section_title)
|
write_static_file(file_path, output_file, section_title)
|
||||||
|
|
||||||
def append_xml_section(output_file: Path):
|
# The XML section has been removed.
|
||||||
"""
|
# def append_xml_section(output_file: Path):
|
||||||
Appends the XML section to the output file within markdown code blocks.
|
# """
|
||||||
|
# Appends the XML section to the output file within markdown code blocks.
|
||||||
Args:
|
#
|
||||||
output_file (Path): Path to the output file where the XML section will be appended.
|
# Args:
|
||||||
"""
|
# output_file (Path): Path to the output file where the XML section will be appended.
|
||||||
xml_content = """
|
# """
|
||||||
## XML Section
|
# xml_content = """
|
||||||
|
# ## XML Section
|
||||||
```xml
|
#
|
||||||
<code_changes>
|
# ```xml
|
||||||
<changed_files>
|
# <code_changes>
|
||||||
<file>
|
# <changed_files>
|
||||||
<file_operation>CREATE</file_operation>
|
# <file>
|
||||||
<file_path>app/new_file.py</file_path>
|
# <file_operation>CREATE</file_operation>
|
||||||
<file_code><![CDATA[
|
# <file_path>app/new_file.py</file_path>
|
||||||
# New Python file
|
# <file_code><![CDATA[
|
||||||
def new_function():
|
# # New Python file
|
||||||
pass
|
# def new_function():
|
||||||
]]></file_code>
|
# pass
|
||||||
</file>
|
# ]]></file_code>
|
||||||
<!-- Add more file changes here -->
|
# </file>
|
||||||
</changed_files>
|
# <!-- Add more file changes here -->
|
||||||
</code_changes>
|
# </changed_files>
|
||||||
```
|
# </code_changes>
|
||||||
|
# ```
|
||||||
**Other rules:**
|
#
|
||||||
- DO NOT remove `<ai_context>` sections. These are to provide you additional context about each file.
|
# **Other rules:**
|
||||||
- If you create a file, add an `<ai_context>` comment section at the top of the file.
|
# - DO NOT remove `<ai_context>` sections. These are to provide you additional context about each file.
|
||||||
- If you update a file make sure its `<ai_context>` stays up-to-date.
|
# - If you create a file, add an `<ai_context>` comment section at the top of the file.
|
||||||
- DO NOT add comments related to your edits.
|
# - If you update a file make sure its `<ai_context>` stays up-to-date.
|
||||||
- DO NOT remove my existing comments.
|
# - DO NOT add comments related to your edits.
|
||||||
"""
|
# - DO NOT remove my existing comments.
|
||||||
with output_file.open('a', encoding='utf-8') as f:
|
# """
|
||||||
f.write(xml_content + "\n")
|
# with output_file.open('a', encoding='utf-8') as f:
|
||||||
logging.info("XML section appended to the context file.")
|
# f.write(xml_content + "\n")
|
||||||
|
# logging.info("XML section appended to the context file.")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main function that orchestrates the generation of the repository context file."""
|
"""Main function that orchestrates the generation of the repository context file."""
|
||||||
@@ -321,8 +322,8 @@ def main():
|
|||||||
todo_path = script_dir / "static_files" / "to-do_list.txt"
|
todo_path = script_dir / "static_files" / "to-do_list.txt"
|
||||||
write_static_file(todo_path, output_file, "To-Do List")
|
write_static_file(todo_path, output_file, "To-Do List")
|
||||||
|
|
||||||
# Append XML section
|
# The XML section output has been removed.
|
||||||
append_xml_section(output_file)
|
# append_xml_section(output_file)
|
||||||
|
|
||||||
logging.info(f"Context file created: {output_file}")
|
logging.info(f"Context file created: {output_file}")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user