Crate agcodex_apply_patch

Crate agcodex_apply_patch 

Source

Structs§

AffectedPaths
Applies each parsed patch hunk to the filesystem. Returns an error if any of the changes could not be applied. Tracks file paths affected by applying a patch.
ApplyPatchAction
ApplyPatchAction is the result of parsing an apply_patch command. By construction, all paths should be absolute paths.
ApplyPatchArgs
Both the raw PATCH argument to apply_patch as well as the PATCH argument parsed into hunks.
ApplyPatchFileUpdate
Intended result of a file update for apply_patch.

Enums§

ApplyPatchFileChange
ExtractHeredocError
Hunk
MaybeApplyPatch
MaybeApplyPatchVerified
ParseError

Constants§

APPLY_PATCH_TOOL_INSTRUCTIONS
Detailed instructions for gpt-4.1 on how to use the apply_patch tool.

Functions§

apply_hunks
Applies hunks and continues to update stdout/stderr
apply_patch
Applies the patch and prints the result to stdout/stderr.
maybe_parse_apply_patch
maybe_parse_apply_patch_verified
cwd must be an absolute path so that we can resolve relative paths in the patch.
parse_patch
print_summary
Print the summary of changes in git-style format. Write a summary of changes to the given writer.
unified_diff_from_chunks
unified_diff_from_chunks_with_context