Skip to main content

get_session_messages

Function get_session_messages 

Source
pub fn get_session_messages(
    config_dir: &Path,
    session_id: &str,
    directory: Option<&str>,
) -> SessionHistory
Expand description

Read the full transcript for one session.

Returns a default SessionHistory when the file can’t be found or opened - no messages and a zero compaction count, which is indistinguishable from a session that never compacted. Each of those paths logs UNREAD_TRANSCRIPT_COUNT_NOTE so the difference is recoverable from the log even though it is not from the return value.