Bases: Protocol
Protocol for implementing file operations for apply_patch.
Create a new file sync.
| PARAMETER | DESCRIPTION |
operation | Dict with 'path' and 'diff' keys TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| def create_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Create a new file sync.
Args:
operation: Dict with 'path' and 'diff' keys
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|
Create a new file async.
| PARAMETER | DESCRIPTION |
operation | Dict with 'path' and 'diff' keys TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| async def a_create_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Create a new file async.
Args:
operation: Dict with 'path' and 'diff' keys
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|
Update an existing file sync.
| PARAMETER | DESCRIPTION |
operation | Dict with 'path' and 'diff' keys TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| def update_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Update an existing file sync.
Args:
operation: Dict with 'path' and 'diff' keys
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|
Update an existing file async.
| PARAMETER | DESCRIPTION |
operation | Dict with 'path' and 'diff' keys TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| async def a_update_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Update an existing file async.
Args:
operation: Dict with 'path' and 'diff' keys
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|
Delete a file sync.
| PARAMETER | DESCRIPTION |
operation | TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| def delete_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Delete a file sync.
Args:
operation: Dict with 'path' key
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|
Delete a file async.
| PARAMETER | DESCRIPTION |
operation | TYPE: dict[str, Any] |
| RETURNS | DESCRIPTION |
dict[str, Any] | Dict with 'status' ("completed" or "failed") and optional 'output' message |
Source code in autogen/tools/experimental/apply_patch/apply_patch_tool.py
| async def a_delete_file(self, operation: dict[str, Any]) -> dict[str, Any]:
"""Delete a file async.
Args:
operation: Dict with 'path' key
Returns:
Dict with 'status' ("completed" or "failed") and optional 'output' message
"""
...
|