File tree Expand file tree Collapse file tree
src/mechanicalmind_ai/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ import click
3+ from mechanicalmind_ai .core import ErrorDiagnosisEngine
4+ import datetime
5+
6+ @click .command ()
7+ @click .argument ('error_log' )
8+ def diagnose (error_log ):
9+ """CLI para diagnóstico de errores de dependencias"""
10+ try :
11+ engine = ErrorDiagnosisEngine ()
12+ result = engine .full_diagnosis (error_log )
13+
14+ click .echo ("\n === Diagnóstico MechMind AI ===" )
15+ click .echo (f"📌 Error: { error_log [:100 ]} ..." )
16+ click .echo (f"🔍 Tipo: { result ['error_type' ]} " )
17+ click .echo (f"🔄 Confianza: { result ['confidence' ]* 100 :.1f} %" )
18+ click .echo ("\n 💡 Soluciones recomendadas:" )
19+ for i , sol in enumerate (result ['solutions' ], 1 ):
20+ click .echo (f" { i } . { sol } " )
21+ click .echo (f"\n ⏰ Timestamp: { result ['timestamp' ]} " )
22+ click .echo ("=" * 40 )
23+ except Exception as e :
24+ click .echo (f"❌ Error en el diagnóstico: { str (e )} " , err = True )
25+
26+ if __name__ == '__main__' :
27+ diagnose ()
You can’t perform that action at this time.
0 commit comments