Implement unified Discoverer + Enhancer architecture
- Rename AutoEnhancer to Discoverer with clear element discovery focus - Implement unified enhancement pipeline in Enhancer: * Phase 1: Element Discovery (configurable, respects existing insertr classes) * Phase 2: ID Generation via engine * Phase 3: Content Injection via engine - Add EnhancementConfig and DiscoveryConfig for flexible configuration - Update all method names and references (discoverNode, DiscoveryResult, etc.) - Support both manual class insertion and automatic discovery - Maintain single enhance command interface while providing unified internal pipeline - Update all constructors to use new configuration-based approach This establishes the clean Discoverer + Enhancer architecture discussed, with discovery as configurable first phase and enhancement as unified pipeline.
This commit is contained in:
@@ -53,11 +53,11 @@ func runAutoEnhance(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
|
||||
// Create auto enhancer
|
||||
enhancer := content.NewAutoEnhancer()
|
||||
// Create discoverer
|
||||
discoverer := content.NewDiscoverer()
|
||||
|
||||
// Run auto enhancement
|
||||
result, err := enhancer.EnhanceDirectory(inputDir, autoEnhanceOutput, autoEnhanceAggressive)
|
||||
// Run element discovery
|
||||
result, err := discoverer.DiscoverDirectory(inputDir, autoEnhanceOutput, autoEnhanceAggressive)
|
||||
if err != nil {
|
||||
return fmt.Errorf("auto-enhancement failed: %w", err)
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ func runEnhance(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
// Create enhancer
|
||||
enhancer := content.NewEnhancer(client, siteID)
|
||||
enhancer := content.NewDefaultEnhancer(client, siteID)
|
||||
|
||||
fmt.Printf("🚀 Starting enhancement process...\n")
|
||||
fmt.Printf("📁 Input: %s\n", inputDir)
|
||||
|
||||
Reference in New Issue
Block a user