SidZddlZddlZddlZddlmZddlmZddlmZm Z ddl m Z ddl m Z ddlmZmZmZdd lmZd Zd Zed k(r eyy#e$reZej2j5ej2j7ed Zeed5ZejAdddejAdejBjEddejAddejAde#edejAejHejAddddddn #1swYnxYwe%dde%dee%de%ejHe%dde&dejNdYdZ[ydZ[wwxYw)zo Jarvis-Cognitive Desktop - Marco Aurelio Applicazione desktop PyQt6 per interazione con l'Imperatore Filosofo N)datetime) load_dotenv) QApplicationQDialog)QIcon) MainWindow)ProfileSelectorDialogload_last_profilesave_last_profile) JarvisKernelc tjjtjjt}tjj |d}t |d5}|jddd|jdtjjdd|jdd|jd|jd|jdt|d |jd j tj||||jdddd d d tddtd |tdtd j tj|||tddt!j"|||y #1swYxYw) z9Hook globale per catturare tutte le eccezioni non gestite crash.loga P================================================================================CRASH: %Y-%m-%d %H:%M:%SzTipo: Errore:  N!ERRORE CRITICO - Log salvato in: )ospathdirnameabspath__file__joinopenwriternowstrftime__name__str tracebackformat_exceptionprintsys__excepthook__)exctypevaluetb project_rootlog_filefs main.pyexception_hookr0s}77??277??8#<=Lww||L+6H h ! "VHB  '(,,.112EFGrJK 6("  &))*"-. (3u:,d+,  227E2FGH "VHB ! Bvh- -hZ 89 VH "''),,WeR@ AB VHB-wr*!!!s -C'GG"c tt_tjj tjj t}tjj|dd}tjj|rtd|t|n tdtdtdtdtd td d } d d l m }td|d}tdttj }|j#d|j%dt'}t)|}|j+t,j.j0k7r tdtj2d |j5}t7|td||&d d lmcm} || j>|<td|tdtjj|dd} tA| |} td| jCtdtE| } | jGtd||j+} td | jItd!tj2| y #t$r$}td|tdYd }~d }~wwxYw)"z%Entry point dell'applicazione desktopdataz.envz6[JARVIS DESKTOP] Caricamento variabili d'ambiente da: ) dotenv_pathz2[JARVIS DESKTOP] ATTENZIONE: File .env non trovatoz= ============================================================u&⏳ CARICAMENTO EMBEDDINGS IN CORSO...u3 Questo può richiedere 1-2 minuti al primo avviou= Attendere prego, l'applicazione si aprirà automaticamentez============================================================= Nr)HuggingFaceEmbeddingszO[EMBEDDINGS] Inizializzazione modello sentence-transformers/all-MiniLM-L6-v2...z&sentence-transformers/all-MiniLM-L6-v2) model_nameu+[EMBEDDINGS] ✅ Modello caricato e pronto u4[EMBEDDINGS] ⚠️ Errore caricamento embeddings: u5[EMBEDDINGS] L'app funzionerà ma senza supporto RAG zJarvis Cognitive) last_profilez5[JARVIS DESKTOP] Selezione profilo annullata. Uscita.z&[JARVIS DESKTOP] Profilo selezionato: z+[EMBEDDINGS] Cache registrata per profilo: z+[JARVIS DESKTOP] Inizializzazione Kernel...configz config.yaml) config_path profile_namez [JARVIS DESKTOP] Avvio Kernel...z[JARVIS DESKTOP] Kernel attivoz0[JARVIS DESKTOP] Applicazione pronta - Profilo: z"[JARVIS DESKTOP] Arresto Kernel...z[JARVIS DESKTOP] Arrivederci)%r0r' excepthookrrrrrrexistsr&rlangchain_huggingfacer4 ExceptionrargvsetApplicationNamesetOrganizationNamer r execr DialogCodeAcceptedexitget_selected_profiler (services.ragservice.rag_document_manager ragservicerag_document_manager_EMBEDDINGS_CACHEr startrshowstop)r,env_path embeddingsr4eappr6dialogselected_profilerag_mgrr8kernelwindow exit_codes r/mainrW/ss$CN77??277??8#<=Lww||L&&9H ww~~h FxjQR) BD - 23 ?@ IJ -J H? _`*?  <= sxx C-../%&L " =F {{}**333 EF  224&' 23C2D EFBB6@!!"23 ;>L__main__rrrrrrrrrzPremi INVIO per chiudere...)(__doc__r'rr$rdotenvrPyQt6.QtWidgetsrr PyQt6.QtGuirdesktop.ui.main_windowr"desktop.ui.profile_selector_dialogr r r core.kernelr r0rWr"r=rOrrrrr-rr.rr r!r# format_excr&inputrDr/res  1- %+0Rj z  77<< 9;G (C  %A GGbO $ GGglhlln556IJK2N O GGvhbM " GGhs1vhd+ , GG(I((* + GGbO $  % % % 6(m 1(<=  "i""$% m +, 's2 AF?>F:B-E F:E A"F::F?