extract_session_files

Function extract_session_files 

Source
pub fn extract_session_files(
    messages: &[Message],
    working_directory: &str,
) -> Vec<String>
Expand description

Extracts file paths mentioned in a list of messages.

Parses tool_use blocks to find file paths from tools like Read, Edit, Write, Glob, and Bash commands. Returns unique file paths that were referenced.

§Arguments

  • messages - The messages to extract file paths from
  • working_directory - The session’s working directory, used to convert absolute paths to relative paths for comparison with git files

§Returns

A vector of unique file paths (relative to the working directory when possible).