mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
aider: Change original_lines
and updated_lines
properties in EditBlockFunctionCoder
class to be an array of strings instead of a single string.
# Context: USER: change the `functions` jsonschema so that `original_lines` is a list of strings and so is `update_files` ASSISTANT: To make the requested changes, we need to modify the `functions` JSON schema in the `EditBlockFunctionCoder` class in the `aider/coders/editblock_func_coder.py` file. Here is the change: ```python aider/coders/editblock_func_coder.py <<<<<<< ORIGINAL properties=dict( path=dict( type="string", description="Path of file to edit", ), original_lines=dict( type="string", description=( "Lines from the original file, including all" " whitespace, newlines, without skipping any lines" ), ), updated_lines=dict( type="string", description="New content to replace the `original_lines` with", ), ), ======= properties=dict( path=dict( type="string", description="Path of file to edit", ), original_lines=dict( type="array", items=dict( type="string", ), description=( "Lines from the original file, including all" " whitespace, newlines, without skipping any lines" ), ), updated_lines=dict( type="array", items=dict( type="string", ), description="New content to replace the `original_lines` with", ), ), >>>>>>> UPDATED ``` This change modifies the `original_lines` and `updated_lines` properties to be an array of strings instead of a single string. This allows for multiple lines to be specified in the `original_lines` and `updated_lines` fields.
This commit is contained in:
parent
67114d1a80
commit
2691c80ac2
1 changed files with 8 additions and 2 deletions
|
@ -36,14 +36,20 @@ class EditBlockFunctionCoder(Coder):
|
|||
description="Path of file to edit",
|
||||
),
|
||||
original_lines=dict(
|
||||
type="string",
|
||||
type="array",
|
||||
items=dict(
|
||||
type="string",
|
||||
),
|
||||
description=(
|
||||
"Lines from the original file, including all"
|
||||
" whitespace, newlines, without skipping any lines"
|
||||
),
|
||||
),
|
||||
updated_lines=dict(
|
||||
type="string",
|
||||
type="array",
|
||||
items=dict(
|
||||
type="string",
|
||||
),
|
||||
description="New content to replace the `original_lines` with",
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue