Skip to main content

EDIT_FILE_TOOL_SCHEMA

Constant EDIT_FILE_TOOL_SCHEMA 

Source
pub const EDIT_FILE_TOOL_SCHEMA: &str = r#"{
    "type": "object",
    "properties": {
        "file_path": {
            "type": "string",
            "description": "The absolute path to the file to edit"
        },
        "old_string": {
            "type": "string",
            "description": "The string to find and replace"
        },
        "new_string": {
            "type": "string",
            "description": "The string to replace with"
        },
        "replace_all": {
            "type": "boolean",
            "description": "Whether to replace all occurrences or just the first. Defaults to false."
        },
        "fuzzy_match": {
            "type": "boolean",
            "description": "Enable fuzzy matching for whitespace-insensitive matching. Defaults to false."
        },
        "fuzzy_threshold": {
            "type": "number",
            "description": "Similarity threshold for fuzzy matching (0.0 to 1.0). Defaults to 0.7."
        }
    },
    "required": ["file_path", "old_string", "new_string"]
}"#;
Expand description

EditFile tool JSON schema constant.