format_file_content

Function format_file_content 

Source
pub fn format_file_content(
    path: &str,
    content: &str,
    total_lines: usize,
    returned_lines: usize,
    truncated: bool,
) -> String
Expand description

Format file content response

Creates a consistent response format for file read operations. This is backward compatible with the existing ReadFileTool output format.

ยงArguments

  • path - Path to the file
  • content - File content (already truncated if needed)
  • total_lines - Total lines in the original file
  • returned_lines - Number of lines actually returned
  • truncated - Whether the content was truncated