Class AsiDesktopMainPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AsiDesktopMainPanel extends JPanel
The main container for the Anahata AI Swing UI, managing multiple agi sessions. It provides a session list and a tabbed area for active agis.
Author:
gemini-3-flash-preview
See Also:
  • Field Details

    • asiContainer

      protected final AsiDesktopAsiContainer asiContainer
      The parent ASI container managing the global state.
    • asiContainerPanel

      protected final AsiCardsContainerPanel asiContainerPanel
      The sidebar panel for switching between active sessions.
    • tabbedPane

      protected final JTabbedPane tabbedPane
      The central tabbed pane for displaying active agi conversations.
    • asiListener

      private final EdtPropertyChangeListener asiListener
      The listener for changes in the container's active agis list.
  • Constructor Details

    • AsiDesktopMainPanel

      public AsiDesktopMainPanel(AsiDesktopAsiContainer container)
      Constructs a new MainPanel.
      Parameters:
      container - The standalone ASI container.
  • Method Details

    • showPreferences

      public void showPreferences()
      Displays the global ASI preferences dashboard.
    • start

      public void start()
      Starts the background refresh of the session list and loads persisted sessions. If no sessions are loaded, a new empty agi is created.
    • ensureTabAndSelect

      public void ensureTabAndSelect(@NonNull @NonNull Agi agi)
      Internal UI helper to ensure the agi has a corresponding tab and selects it.
      Parameters:
      agi - The agi session to focus.
    • removeTab

      public void removeTab(@NonNull @NonNull Agi agi)
      Internal UI helper to remove the tab associated with the agi session.
      Parameters:
      agi - The agi session to close.
    • handleNicknameChange

      private void handleNicknameChange(PropertyChangeEvent evt)
      Handles updates to a agi's nickname by updating the corresponding tab title.
      Parameters:
      evt - The property change event for "nickname".
    • handleAsiChange

      private void handleAsiChange(PropertyChangeEvent evt)
      Handles changes to the container's active agis list, syncing the UI tabs.
      Parameters:
      evt - The property change event for "activeAgis".