Class ToolbarPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ToolbarPanel extends JPanel
The vertical toolbar panel for the agi UI, containing primary action toggles.
Author:
anahata
See Also:
  • Field Details

    • ICON_SIZE

      private static final int ICON_SIZE
      The size of the icons in the toolbar.
      See Also:
    • agiPanel

      private final AgiPanel agiPanel
      The parent agi panel.
    • agi

      private Agi agi
      The active agi session.
    • config

      private SwingAgiConfig config
      The agi configuration.
    • toggleLocalToolsButton

      private JToggleButton toggleLocalToolsButton
      Toggle button for local tool execution.
    • toggleHostedToolsButton

      private JToggleButton toggleHostedToolsButton
      Toggle button for server-side tool execution.
    • toggleAutoreplyButton

      private JToggleButton toggleAutoreplyButton
      Toggle button for automatic tool loop replies.
    • togglePrunedButton

      private JToggleButton togglePrunedButton
      Toggle button for showing/hiding pruned parts.
    • clearAgiButton

      private JButton clearAgiButton
      Button to clear the agi history.
    • screenShareButton

      private JButton screenShareButton
      Button for live screen sharing.
  • Constructor Details

    • ToolbarPanel

      public ToolbarPanel(AgiPanel agiPanel)
      Constructs a new ToolbarPanel.
      Parameters:
      agiPanel - The parent agi panel.
  • Method Details

    • initComponents

      public void initComponents()
      Initializes the UI components and layout.
    • reload

      public void reload()
      Reloads the panel with the new agi state.
    • createIconButton

      private JButton createIconButton(Icon icon, String tooltip)
      Helper method to create a standard icon button.
      Parameters:
      icon - The icon to display.
      tooltip - The tooltip text.
      Returns:
      The created JButton.
    • createIconToggleButton

      private JToggleButton createIconToggleButton(Icon icon, String tooltip, boolean selected)
      Helper method to create a standard icon toggle button.
      Parameters:
      icon - The icon to display.
      tooltip - The tooltip text.
      selected - The initial selected state.
      Returns:
      The created JToggleButton.
    • clearAgi

      private void clearAgi(ActionEvent e)
      Action listener for the clear agi button.
      Parameters:
      e - The action event.
    • togglePruned

      private void togglePruned(ActionEvent e)
      Action listener for the toggle pruned button.
      Parameters:
      e - The action event.
    • toggleLocalTools

      private void toggleLocalTools(ActionEvent e)
      Action listener for the toggle local tools button.
      Parameters:
      e - The action event.
    • toggleHostedTools

      private void toggleHostedTools(ActionEvent e)
      Action listener for the toggle server tools button.
      Parameters:
      e - The action event.
    • syncToggles

      private void syncToggles()
      Synchronizes the toggle buttons with the current configuration and updates tooltips.
    • toggleAutoreply

      private void toggleAutoreply(ActionEvent e)
      Action listener for the toggle autoreply button.
      Parameters:
      e - The action event.