trusty-search 0.3.27

Machine-wide hybrid code search service: BM25 + vector + KG, zero cold-start, MCP server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Handler for `trusty-search dashboard`.

use crate::{daemon_base_url, run_dashboard};
use anyhow::Result;

/// Why: thin wrapper. Auto-starts the daemon (if needed) so the browser
/// doesn't land on an empty page.
/// What: ensures the daemon is up, then forwards to `run_dashboard` which
/// opens `~/.trusty-search/http_addr` and launches the admin panel in the
/// default browser.
/// Test: `cargo run -- dashboard` with no daemon auto-starts it then opens
/// the browser.
pub async fn handle_dashboard() -> Result<()> {
    crate::commands::daemon_guard::ensure_daemon_running_or_exit(&daemon_base_url()).await;
    run_dashboard()
}