Skip to main content

register_trim

Function register_trim 

Source
pub fn register_trim(
    project_path: Option<&str>,
    keep: usize,
    session_id: Option<&str>,
    all: bool,
    threshold_mb: u64,
    force: bool,
) -> Result<()>
Expand description

Trim oversized sessions by keeping only the most recent requests.

Very long chat sessions (100+ requests) can grow to 50-100+ MB, which causes VS Code to fail loading them. This command trims the requests array to keep only the most recent N entries, dramatically reducing file size. The full session is preserved as a .jsonl.bak backup.