Class OpenTopComponentsContextProvider
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.context.BasicContextProvider
uno.anahata.asi.nb.tools.ide.context.OpenTopComponentsContextProvider
- All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable
Provides a real-time Markdown table of all open TopComponents (windows) in the IDE.
- Author:
- anahata
-
Field Summary
Fields inherited from class BasicContextProvider
children, parentFields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new provider for open TopComponents. -
Method Summary
Modifier and TypeMethodDescriptionvoidpopulateMessage(RagMessage ragMessage) Populates the givenRagMessagewith dynamic, just-in-time context parts.Methods inherited from class BasicContextProvider
getAgi, getChildrenProviders, getParentProvider, setParentProviderMethods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextProvider
getContextPosition, getDescription, getFlattenedHierarchy, getFullyQualifiedId, getHeader, getIconId, getId, getInstructionsTokenCount, getName, getRagTokenCount, getSystemInstructions, isEffectivelyProviding, isProviding, setProvidingMethods inherited from interface PropertyChangeSource
getPropertyChangeSupport
-
Constructor Details
-
OpenTopComponentsContextProvider
public OpenTopComponentsContextProvider()Constructs a new provider for open TopComponents.
-
-
Method Details
-
populateMessage
Populates the givenRagMessagewith 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.
-

