Skip to main content

Module file_ops

Module file_ops 

Source
Expand description

File operation tools with composable functionality.

This module provides the FileOpsTool for file discovery and listing operations, along with supporting utilities for diff previews and path helpers.

Structs§

FileOpsTool
File operations tool with multiple modes

Constants§

SUPPRESSED_PREVIEW_REASON
Stable machine-readable reason for suppressed diff previews.

Functions§

build_diff_preview
Build a unified diff preview between before and after content.
canonical_diff_previews
Return the canonical bounded diff entries from a file-operation response.
diff_output_has_effective_change
Determine whether a canonical diff contract represents an effective mutation. None means the response is not a file-operation response and callers should use the tool’s normal success semantics.
diff_preview_error_skip
Create a diff preview response when an error prevents diff generation.
diff_preview_size_skip
Create a diff preview response when content exceeds the size limit.
diff_preview_suppressed
Create a diff preview response when inline diffs are suppressed due to too many changes.
diff_preview_user_message
User-facing one-line summary for a skipped/suppressed diff entry.
is_image_path
Check whether a path looks like an image file based on extension.