deepwiki-rs 1.2.6

deepwiki-rs(also known as Litho) is a high-performance automatic generation engine for C4 architecture documentation, developed using Rust. It can intelligently analyze project structures, identify core components, parse dependency relationships, and leverage large language models (LLMs) to automatically generate professional architecture documentation.
use crate::generator::{
    {
        step_forward_agent::{StepForwardAgent, AgentDataConfig, DataSource, PromptTemplate, LLMCallMode, FormatterConfig},
    },
};
use crate::generator::research::memory::MemoryScope;
use crate::generator::research::types::{AgentType, WorkflowReport};

#[derive(Default)]
pub struct WorkflowResearcher;

impl StepForwardAgent for WorkflowResearcher {
    type Output = WorkflowReport;
    
    fn agent_type(&self) -> String {
        AgentType::WorkflowResearcher.to_string()
    }

    fn agent_type_enum(&self) -> Option<AgentType> {
        Some(AgentType::WorkflowResearcher)
    }

    fn memory_scope_key(&self) -> String {
        MemoryScope::STUDIES_RESEARCH.to_string()
    }

    fn data_config(&self) -> AgentDataConfig {
        AgentDataConfig {
            required_sources: vec![
                DataSource::ResearchResult(AgentType::SystemContextResearcher.to_string()),
                DataSource::ResearchResult(AgentType::DomainModulesDetector.to_string()),
                DataSource::CODE_INSIGHTS
            ],
            optional_sources: vec![],
        }
    }
    
    fn prompt_template(&self) -> PromptTemplate {
        PromptTemplate {
            system_prompt: "Analyze the project's core functional workflows, focusing from a functional perspective without being limited to excessive technical details".to_string(),
            opening_instruction: "The following research reports are provided for analyzing the system's main workflows".to_string(),
            closing_instruction: "Please analyze the system's core workflows based on the research materials".to_string(),
            llm_call_mode: LLMCallMode::Extract,
            formatter_config: FormatterConfig::default(),
        }
    }
}