agent-search 0.8.0

Unified multi-provider search CLI for AI agents — 13 providers, 13 modes, email verification, one binary
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::errors::SearchError;
use crate::types::SearchResponse;

pub fn render(response: &SearchResponse) {
    let json = serde_json::to_string_pretty(response).expect("failed to serialize response");
    println!("{json}");
}

pub fn render_error(error: &SearchError) {
    let err_response = error.to_error_response();
    let json = serde_json::to_string_pretty(&err_response).expect("failed to serialize error");
    eprintln!("{json}");
}

pub fn render_value(value: &serde_json::Value) {
    let json = serde_json::to_string_pretty(value).expect("failed to serialize value");
    println!("{json}");
}