{RindZddlmZmZmZmZmZmZmZm Z ddl m Z ddl m Z mZddlmZGddeZy) z< MainWindow - Finestra principale dell'applicazione desktop ) QMainWindowQWidget QVBoxLayoutQMenuBarQMenu QMessageBoxQLabel QStatusBar)Qt)QAction QKeySequence) ChatWidgetc@eZdZdZfdZdZdZdZdZdZ xZ S) MainWindowz/Finestra principale di Jarvis-Cognitive Desktopcpt|||_|j|j y)N)super__init__kernelinit_uiapply_stylesheet)selfr __class__s desktop/ui/main_window.pyrzMainWindow.__init__s*    cNddd}|j|jj|jjj}|j d||j ddddt |j|_|j|j|jt|_ |j|j|jdd j}|jjd |d y ) z Inizializza l'interfaccia utentez#Marco Aurelio (Imperatore Filosofo)z"Warren Mentor (Investment Advisor)aureliowarrenz Jarvis - dii(rz Pronto | u ti dà il benvenutoN)getractive_profile capitalizesetWindowTitle setGeometryr chat_widgetsetCentralWidgetcreate_menu_barr statusBar setStatusBarsplitstrip showMessage)r profile_namesprofile_displayphilosopher_names rrzMainWindow.init_uis =: (++ KK & & KK & & 1 1 3  i'89: c3,&dkk2 d../ $ $..)*005a8>>@ ""Y/?.@@T#UVrc~|j}|jd}td|}|jt d|j j |jj|j||jtd|}|jt d|j j |j|j||jd}td|}|jt d|j j |jj|j||jd }td |}|j j |j|j|y ) zCrea la barra dei menuz&Fileu📄 Indicizza DocumentozCtrl+OEscizCtrl+Qz&Chatu🗑️ Pulisci ChatzCtrl+Nz&Aiutou ℹ️ InfoN)menuBaraddMenur setShortcutr triggeredconnectr&upload_document addAction addSeparatorclose clear_chat show_about) rmenubar file_menu index_action exit_action chat_menunew_chat_action help_menu about_actions rr(zMainWindow.create_menu_bar7sd,,.OOG, 94@   h!78&&t'7'7'G'GHL) fd+  X 67%%djj1K(OOG, ""8$?##L$:;!!))$*:*:*E*EFO,OOH- }d3 &&t7L)rc ddd}|j|jj|jjjddf\}}}t j |d|d|d|d |d |d y ) z0Mostra finestra About con info dinamiche profilo)z Marco Aurelioz#Imperatore Romano e Filosofo Stoicoz 121-180 d.C.)z Warren MentorzDeep Value Investment AdvisorzBuffett/Munger/GrahamrzFilosofo Stoico SconosciutozInfo - Jarvis z

Jarvis - zC

Versione: 2.0 Desktop (PyQt6)

Profilo: z, z

Periodo: a7


Applicazione desktop per conversazioni filosofiche con l'antica saggezza stoica.

LLM: Claude Anthropic (Haiku 4.5)

RAG: ChromaDB + ParentDocumentRetriever

Framework: PyQt6 + LangChain


Un ponte tra l'antica saggezza e il mondo contemporaneo.

N)r!rr"r#rabout)r profile_infonametitleperiods rr=zMainWindow.show_about]s`a +.. KK & & [[ ' ' 2 2 46G W eV  TF #D6"""&r%1""(*U U rc&|jdy)z!Applica lo stile all'applicazionea QMainWindow { background-color: #f5f5f5; } QTextEdit { background-color: white; border: 1px solid #ddd; border-radius: 5px; padding: 10px; font-size: 13px; font-family: 'Segoe UI', 'Arial', sans-serif; } QLineEdit { background-color: white; border: 1px solid #ddd; border-radius: 5px; padding: 8px; font-size: 13px; } QLineEdit:focus { border: 2px solid #4CAF50; } QPushButton { background-color: #4CAF50; color: white; border: none; border-radius: 5px; padding: 8px 16px; font-size: 13px; font-weight: bold; } QPushButton:hover { background-color: #45a049; } QPushButton:pressed { background-color: #3d8b40; } QPushButton:disabled { background-color: #cccccc; color: #666666; } QLabel { color: #333; } QMenuBar { background-color: #fff; border-bottom: 1px solid #ddd; } QMenuBar::item:selected { background-color: #4CAF50; color: white; } QMenu { background-color: white; border: 1px solid #ddd; } QMenu::item:selected { background-color: #4CAF50; color: white; } QStatusBar { background-color: #fff; border-top: 1px solid #ddd; color: #666; } N) setStyleSheet)rs rrzMainWindow.apply_stylesheetys A A rc~tj|ddtjjtjjztjj}|tjjk(r,|j j d|jy|jy)z&Gestisce la chiusura dell'applicazionezConferma uscitazVuoi davvero chiudere Jarvis?zArresto Kernel...N) rquestionStandardButtonYesNor)r-acceptignore)reventreplys r closeEventzMainWindow.closeEvents$$   +  & & * *[-G-G-J-J J  & & ) )   K..22 2 NN & &': ; LLN LLNr) __name__ __module__ __qualname____doc__rrr(r=rrX __classcell__)rs@rrrs(9 W>$*L 8D LrrN)r\PyQt6.QtWidgetsrrrrrrr r PyQt6.QtCorer PyQt6.QtGuir r desktop.ui.chat_widgetrrrrrcs2--r