Skip to main content

fetch_snapshot

Function fetch_snapshot 

Source
pub async fn fetch_snapshot(
    client: &Client,
    db_path: &Path,
    agent_auth_path: &Path,
    cache: &Cache,
    endpoints: &Endpoints,
    cache_ttl: Duration,
) -> Result<FetchOutcome>
Expand description

Cache-aware fetch. db_path is Cursor’s state.vscdb — the caller resolves [cursor] db_path (config override) vs db::default_db_path, the same override pattern as openai.codex_auth_path. agent_auth_path is the headless cursor-agent CLI’s own auth.json, tried when db_path is missing — see db::resolve_access_token.