pub fn fork_session(
source_path: &Path,
target_dir: &Path,
entry_id: Option<&str>,
position: Option<&str>,
) -> Result<String>Expand description
Fork a session: create a new session file containing a copy of entries from the source session
up to (and including) the entry with the given entry_id, or all entries if entry_id is None.
If entry_id is provided and position is “at”, the copy goes up to and including that entry.
If position is “before” (default), the copy goes up to but not including the entry
(which must be a user message). Pi-compatible.