INNER CODE UNIT · Rust

subagent_store

Far-Beyond-Pulsar/Pulsar-Native · crates/agent-providers/agent_chat_tools/src/lib.rs:206

fn subagent_store() -> ResourceHandle<SubagentStore> {
    EngineContext::global()
        .expect("EngineContext not initialized")
        .store
        .get_or_init::<SubagentStore>()
}

fn now_ms_u64() -> u64 {
    SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .map(|d| d.as_millis() as u64)
        .unwrap_or(0)
}

fn push_subagent_completion(store: &mut SubagentStore, id: &str) {
    if !store.completion_queue.iter().any(|queued| queued == id) {
        store.completion_queue.push_back(id.to_string());
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…