pub fn insert_session(
conn: &Connection,
id: &str,
chat_id: Option<&str>,
title: &str,
model: &str,
source: &str,
) -> Result<()>Expand description
Insert a new session.
chat_id is Some only for Bot platforms (the platform chat identifier);
pass None for GUI/TUI sessions. source records which frontend created
the session ("gui", "tui", "qq", "feishu").