Skip to content

Conversation

butschster
Copy link
Collaborator

@butschster butschster commented Apr 6, 2025

This PR enhances the output of the generate command to make it more concise and readable, addressing issues with the current verbose format.

Changes

  • New Renderer: Added a dedicated GenerateCommandRenderer class to handle output formatting consistently
  • Better Visual Indicators: Replaced text labels with symbols (✓ for success, ! for warnings)
  • Improved Alignment: Added dot alignment for document descriptions and paths for easier scanning
  • Proper Log Separation: Moved logging messages to the logger instead of displaying them in the output

Before

 [INFO] Compiling Project structure overview...
                                                                            
 [OK] Document compiled into project-structure.md                           
                                                                            
 [INFO] Compiling Core Interfaces...
                                                                            
 [OK] Document compiled into core/interfaces.md                             
                                                                            
 [INFO] Compiling Modifiers System...
                                                                            
 [WARNING] Document compiled into modifiers/modifiers-core.md with errors   
                                                                            
 * Error in FileSource: Some directories or files contain invalid paths

After

 ✓ Source Token counter [sources/token-counter.md].......................................................................
 ✓ Document source renderer [sources/source-renderer.md].................................................................
 ! Modifiers System [modifiers/modifiers-core.md]........................................................................
    ✗ Error in FileSource: Some directories or files contain invalid paths:

 ✓ PHP Content Modifiers [modifiers/php-modifiers.md]....................................................................
 ! Sanitizer Modifier [modifiers/sanitizer.md]...........................................................................
    ✗ Error in FileSource: Some directories or files contain invalid paths:

 ✓ Path Filtering Utilities [utilities/path-filters.md]..................................................................
 ✓ Tree Building Utilities [utilities/tree-builder.md]...................................................................
 ✓ HTTP Client [utilities/http-client.md]................................................................................
 ✓ Binary Updater [utilities/binary-updater.md]..........................................................................
 ✓ GitHub Client [utilities/github-client.md]............................................................................

- Create dedicated `GenerateCommandRenderer` to format output consistently
- Use symbols (✓, !) to indicate success and warnings
- Apply dot-aligned formatting for document paths
- Move log messages to logger instead of direct output
@butschster butschster added enhancement New feature or request console:cli Console commands and CLI interface console:renderer Renderer components for CLI output labels Apr 6, 2025
@butschster butschster added this to the 1.x milestone Apr 6, 2025
@butschster butschster self-assigned this Apr 6, 2025
@butschster butschster moved this to In review in Context Generator Apr 6, 2025
@butschster butschster merged commit 7ac5bf2 into main Apr 6, 2025
8 checks passed
@butschster butschster deleted the feature/cli-output branch April 6, 2025 09:31
@github-project-automation github-project-automation bot moved this from In review to Done in Context Generator Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console:cli Console commands and CLI interface console:renderer Renderer components for CLI output enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant