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:
Paul Gauthier 2023-06-28 11:03:59 -07:00
parent 67114d1a80
commit 2691c80ac2

View file

@ -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",
),
),