Class ResourceUUIDParameterRenderer

java.lang.Object
uno.anahata.asi.swing.agi.message.part.tool.param.ResourceUUIDParameterRenderer
All Implemented Interfaces:
ParameterRenderer<Object>

public class ResourceUUIDParameterRenderer extends Object implements ParameterRenderer<Object>
A specialized parameter renderer for Resource UUIDs.

This renderer provides a sleek chip showing the Resource Name. It caches the name so it remains visible even if the resource is later unloaded from the context window.

Author:
anahata
  • Field Details

    • agiPanel

      private AgiPanel agiPanel
      The parent agi panel providing context.
    • value

      private Object value
      The current object value.
    • container

      private final JPanel container
      The main UI container.
  • Constructor Details

    • ResourceUUIDParameterRenderer

      public ResourceUUIDParameterRenderer()
      Constructs a new ResourceUUIDParameterRenderer.
  • Method Details

    • init

      public void init(AgiPanel agiPanel, AbstractToolCall<?,?> call, String paramName, Object value)
      Initializes the renderer with its context.
      Specified by:
      init in interface ParameterRenderer<Object>
      Parameters:
      agiPanel - The parent agi panel.
      call - The tool call being rendered.
      paramName - The name of the parameter.
      value - The initial value.
    • getComponent

      public JComponent getComponent()
      Returns the Swing component that performs the rendering.
      Specified by:
      getComponent in interface ParameterRenderer<Object>
      Returns:
      The rendering component.
    • updateContent

      public void updateContent(Object value)
      Updates the renderer with a new value.
      Specified by:
      updateContent in interface ParameterRenderer<Object>
      Parameters:
      value - The new value to render.
    • render

      public boolean render()
      Triggers the rendering logic.
      Specified by:
      render in interface ParameterRenderer<Object>
      Returns:
      True if a visual update occurred.
    • createChip

      private JPanel createChip(String resourceUuid)
      Helper to create a visual JPanel chip representing the resource.
      Parameters:
      resourceUuid - The unique identifier of the resource.
      Returns:
      a styled chip component with open action button.