Skip to main content

Refactoring Prompt

Refactoring

User: The current code logic isn't conceptual enough and is somewhat difficult to understand
Assistant: Your issue is that the current DirInsCommand class logic lacks conceptual clarity and is challenging to comprehend. I will improve code readability and conceptual clarity through refactoring.

Implementation steps:

  • Introduce explicit data models to represent directory structures
  • Separate presentation logic from data collection logic
  • Simplify the recursive traversal algorithm
  • Enhance naming expressiveness
  • Add more comments to explain design rationale

English translation: