Module utils

Module utils 

Source
Expand description

Utility functions for tools

Re-exports§

pub use run::execute_command;
pub use run::stream_command;
pub use run::validate_command_safety;
pub use run::CommandOptions;
pub use run::CommandResult;

Modules§

run
Tool execution utilities

Constants§

MAX_RESPONSE_LEN
Maximum response length before truncation
TRUNCATED_MESSAGE
Truncation message

Functions§

check_file_exists
Check if a file exists and return appropriate error
create_edit_snippet
Create a snippet around a specific line for editing feedback
expand_tabs
Expand tabs in text content
format_with_line_numbers
Format file content with line numbers
maybe_truncate
Truncate content if it exceeds the specified length
run_command
Run a shell command asynchronously with timeout
validate_absolute_path
Validate that a path is absolute
validate_directory_operation
Check if path is a directory and validate operation