new json schema for multi-file edits

This commit is contained in:
Paul Gauthier 2023-06-21 19:18:25 -07:00
parent 25444bbe9e
commit 04d0f95af9
2 changed files with 14 additions and 9 deletions

View file

@ -729,7 +729,8 @@ class Coder:
return None, err
def parse_partial_args(self):
# dump(self.partial_response_function_call)
dump(self.partial_response_function_call)
data = self.partial_response_function_call.get("arguments")
if not data:
return

View file

@ -2,6 +2,7 @@ import os
from aider import diffs
from ..dump import dump
from .base_coder import Coder
from .func_prompts import FunctionPrompts
@ -13,19 +14,21 @@ class FunctionCoder(Coder):
description="create or update a file",
parameters=dict(
type="object",
properties=dict(
items=dict(
type="array",
items=dict(
type="object",
required=["explanation", "file_path", "file_content"],
required=["explanation", "files_to_update"],
properties=dict(
explanation=dict(
type="string",
description=(
"Explanation of the changes to be made to the code (markdown format)"
"Explanation of the changes to be made to the code (future tense,"
" markdown format)"
),
),
files_to_update=dict(
type="array",
items=dict(
type="object",
required=["file_path", "file_content"],
properties=dict(
file_path=dict(
type="string",
description="Path of file to write",
@ -56,6 +59,7 @@ class FunctionCoder(Coder):
def modify_incremental_response(self):
args = self.parse_partial_args()
dump(args)
if not args:
return