Skip to main content

APPLY_PATCH_TOOL_DESCRIPTION

Constant APPLY_PATCH_TOOL_DESCRIPTION 

Source
pub const APPLY_PATCH_TOOL_DESCRIPTION: &str = "Apply a patch in VT Code format (*** Begin Patch / *** Update File: path / @@ hunks with -/+ lines / *** End Patch); standard unified diffs (---/+++ format) are rejected. *** Add File: path, *** Delete File: path, and *** Move to: path (after *** Update File) are also supported. Every patch path must be workspace-relative; absolute paths, `..`, and traversal-like forms are rejected. Changes are applied after permission checks. Call this tool directly instead of through a shell; JSON calls use input (patch is an alias). Use complete current context/deletion lines, preserving internal whitespace; boundary whitespace and Unicode punctuation normalization are supported, but partial lines are rejected. A typed context mismatch permits one fresh bounded file read range per affected path per turn; other limits remain authoritative.";
Expand description

Model-visible description of the apply_patch tool. It leads with the accepted envelope so the model writes the right format on the first try, and states the unified-diff rejection and path rules as plain facts instead of shouted warnings. Registration sites append SEMANTIC_ANCHOR_GUIDANCE via with_semantic_anchor_guidance.