aip-cli 0.10.5

AI profile manager for Claude Code and Codex CLI.
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::sync::OnceLock;
use std::time::Duration;

pub fn shared_client() -> &'static reqwest::Client {
    static CLIENT: OnceLock<reqwest::Client> = OnceLock::new();
    CLIENT.get_or_init(|| {
        reqwest::Client::builder()
            .connect_timeout(Duration::from_secs(5))
            .timeout(Duration::from_secs(15))
            .build()
            .expect("failed to build HTTP client")
    })
}