Class OpcPromptContextLoader

java.lang.Object
com.inductiveautomation.ignition.designer.ai.opc.OpcPromptContextLoader

public final class OpcPromptContextLoader extends Object
Builds bounded OPC source context for Designer AI prompt composers.

The loader only browses structural OPC metadata from explicit prompt references. It does not describe nodes, read live values, search across servers, or browse beyond selected roots.

  • Constructor Details

    • OpcPromptContextLoader

      public OpcPromptContextLoader(DesignerContext context)
      Creates an OPC context loader backed by the Designer's configured OPC connections.
      Parameters:
      context - the Designer context used to browse OPC metadata.
    • OpcPromptContextLoader

      public OpcPromptContextLoader(OpcPromptContextLoader.Browser browser)
      Creates an OPC context loader backed by a caller-supplied browser.
      Parameters:
      browser - the browser used to resolve selected OPC references.
  • Method Details

    • load

      public String load(List<ContextReference> references)
      Loads bounded prompt context for explicit OPC references.

      Non-OPC references in the list are ignored, so hosts can pass their full inserted-reference list; OPC references are identified by an OpcReferenceBody body.

      Parameters:
      references - the inserted prompt references from the host prompt.
      Returns:
      an <opcSourceContext> block, or an empty string when the list carries no OPC references.