Class AgiConfigPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, Scrollable

public class AgiConfigPanel extends ScrollablePanel implements PropertyChangeListener
A panel for editing the framework-level configuration of an Agi session.

This panel provides a comprehensive interface for managing the 'DNA' of an AGI session, including loop logic, retry policies, and context window metabolism. It uses MigLayout for responsive, grid-based arrangement.

Author:
anahata
See Also:
  • Field Details

    • config

      private final AgiConfig config
      The underlying configuration model being edited.
    • streamingCheckbox

      private JCheckBox streamingCheckbox
      Checkbox to toggle real-time token streaming.
    • includeThoughtsCheckbox

      private JCheckBox includeThoughtsCheckbox
      Checkbox to request model reasoning (Chain of Thought).
    • expandThoughtsCheckbox

      private JCheckBox expandThoughtsCheckbox
      Checkbox to control initial expansion of thought blocks in the chat UI.
    • expandToolsDropdown

      private JComboBox<ExpandToolsPreference> expandToolsDropdown
      Dropdown for configuring tool call expansion preferences.
    • autoReplyToolsCheckbox

      private JCheckBox autoReplyToolsCheckbox
      Checkbox for automatic re-prompting after tool execution.
    • apiMaxRetriesSpinner

      private JSpinner apiMaxRetriesSpinner
      Spinner for configuring the maximum number of API request retries.
    • apiInitialDelaySpinner

      private JSpinner apiInitialDelaySpinner
      Spinner for configuring the initial backoff delay for retries.
    • apiMaxDelaySpinner

      private JSpinner apiMaxDelaySpinner
      Spinner for configuring the maximum backoff delay for retries.
    • tokenThresholdSpinner

      private JSpinner tokenThresholdSpinner
      Spinner for setting the context window token threshold.
    • textMaxDepthSpinner

      private JSpinner textMaxDepthSpinner
      Spinner for setting the text part maximum depth policy.
    • toolMaxDepthSpinner

      private JSpinner toolMaxDepthSpinner
      Spinner for setting the tool call/response maximum depth policy.
    • blobMaxDepthSpinner

      private JSpinner blobMaxDepthSpinner
      Spinner for setting the blob (image/media) part maximum depth policy.
    • thoughtMaxDepthSpinner

      private JSpinner thoughtMaxDepthSpinner
      Spinner for setting the model thought part maximum depth policy.
    • webSearchMaxDepthSpinner

      private JSpinner webSearchMaxDepthSpinner
      Spinner for setting the hosted web search result maximum depth policy.
    • codeExecutionMaxDepthSpinner

      private JSpinner codeExecutionMaxDepthSpinner
      Spinner for setting the hosted code execution result maximum depth policy.
  • Constructor Details

    • AgiConfigPanel

      public AgiConfigPanel(AgiConfig config)
      Constructs a new panel for the specified AgiConfig.
      Parameters:
      config - The configuration to edit.
  • Method Details

    • initComponents

      private void initComponents()
      Initializes all UI components and defines the two-column grid layout.
    • setupListeners

      private void setupListeners()
      Binds UI components to the underlying AgiConfig properties.
    • loadConfig

      private void loadConfig()
      Loads current values from the AgiConfig into the UI components.
    • createSectionPanel

      private JPanel createSectionPanel(String title)
      Helper for creating styled section panels with titled borders.
      Parameters:
      title - The title for the border.
      Returns:
      The configured JPanel.
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)

      Synchronizes the UI when external configuration changes occur.

      Specified by:
      propertyChange in interface PropertyChangeListener