Class OpenTopComponentsContextProvider

All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable

public class OpenTopComponentsContextProvider extends BasicContextProvider
Provides a real-time Markdown table of all open TopComponents (windows) in the IDE.
Author:
anahata
  • Constructor Details

    • OpenTopComponentsContextProvider

      public OpenTopComponentsContextProvider()
      Constructs a new provider for open TopComponents.
  • Method Details

    • populateMessage

      public void populateMessage(RagMessage ragMessage) throws Exception
      Populates the given RagMessage with dynamic, just-in-time context parts. These parts are appended to the end of the user's prompt (RAG).

      Injects a Markdown table representing the current state of all open TopComponents into the RAG message. This allows the ASI to understand the user's visual workspace.

      Parameters:
      ragMessage - The message to be augmented with context.
      Throws:
      Exception - if an error occurs during context generation.