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§
- File
OpsTool - 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.
Nonemeans 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.