INNER CODE UNIT · Rust

push_subagent_completion

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

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());
    }
}

fn summarize_workspace(workspace_root: &Path) -> Value {
    let mut file_count = 0usize;
    let mut dir_count = 0usize;
    let mut sampled_paths = Vec::new();
    let mut stack = vec![workspace_root.to_path_buf()];
    let mut visited = 0usize;
    const MAX_VISITS: usize = 1600;
    const MAX_SAMPLES: usize = 24;

    while let Some(path) = stack.pop() {
        if visited >= MAX_VISITS {
            break;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…