-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
area: coreLogic for Indexer, Parser, Graph, or Generator.Logic for Indexer, Parser, Graph, or Generator.priority: mediumNormal priority; adds value but not urgent.Normal priority; adds value but not urgent.refactorCode change that neither fixes a bug nor adds a feature.Code change that neither fixes a bug nor adds a feature.
Description
Problem
The ContextGenerator::generate function in src/core/generator.rs is currently a massive, monolithic block of code. It handles multiple responsibilities: resolving focus targets, fallback vector searching, expanding the call graph, and formatting the Markdown string. This violates the Single Responsibility Principle and makes the core logic hard to maintain.
Proposed Solution
- Extract specific responsibilities into smaller, private helper functions within
ContextGenerator:resolve_focus_targets(query) -> Vec<String>expand_graph_depth(initial_targets, depth) -> Vec<String>format_markdown_report(files, edges) -> String
- Clean up the main
generatefunction to act simply as an orchestrator.
Definition of Done
-
generatefunction is broken down into smaller, logical sub-functions. - Core functionality remains identical (no regression in Markdown output).
- Code readability and maintainability are vastly improved.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreLogic for Indexer, Parser, Graph, or Generator.Logic for Indexer, Parser, Graph, or Generator.priority: mediumNormal priority; adds value but not urgent.Normal priority; adds value but not urgent.refactorCode change that neither fixes a bug nor adds a feature.Code change that neither fixes a bug nor adds a feature.