Class ProjectAlertsContextProvider
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.context.BasicContextProvider
uno.anahata.asi.nb.tools.project.context.AbstractProjectContextProvider
uno.anahata.asi.nb.tools.project.alerts.ProjectAlertsContextProvider
- All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable
Provides real-time diagnostics for a project, including Java compiler errors
and high-level project problems.
- Author:
- anahata-ai
-
Field Summary
Fields inherited from class AbstractProjectContextProvider
project, projectPath, projectsToolkitFields inherited from class BasicContextProvider
children, parentModifier and TypeFieldDescriptionprotected final List<ContextProvider> The list of immediate child providers.protected ContextProviderThe parent provider in the hierarchy.Fields inherited from class BasicPropertyChangeSource
propertyChangeSupportModifier and TypeFieldDescriptionprotected PropertyChangeSupportSupport for firing property change events. -
Constructor Summary
ConstructorsConstructorDescriptionProjectAlertsContextProvider(Projects projectsToolkit, String projectPath) Constructs a new alerts provider for a specific project. -
Method Summary
Modifier and TypeMethodDescriptionvoidpopulateMessage(RagMessage ragMessage) Populates the givenRagMessagewith dynamic, just-in-time context parts.Methods inherited from class AbstractProjectContextProvider
getProject, setProvidingModifier and TypeMethodDescriptionorg.netbeans.api.project.ProjectResolves the NetBeans Project instance, restoring it from the path if needed.voidsetProviding(boolean enabled) Toggles the providing status and triggers a recursive IDE visual refresh.Methods inherited from class BasicContextProvider
getAgi, getChildrenProviders, getParentProvider, setParentProviderModifier and TypeMethodDescriptiongetAgi()Gets the parent AGI session this context provider is registered under.Gets the list of immediate child context providers.Gets the parent context provider in the hierarchy, if any.voidsetParentProvider(ContextProvider parent) Sets the parent context provider for this instance.Methods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerModifier and TypeMethodDescriptionvoidAdds a property change listener.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a property change listener for a specific property.voidrebind()Re-initializes the transientPropertyChangeSupportafter deserialization.voidRemoves a property change listener.voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a property change listener for a specific property.Methods 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, isProvidingModifier and TypeMethodDescriptiondefault ContextPositionGets the designated position of this provider's content in the AI prompt.Gets a detailed description of what this context provider does.default List<ContextProvider> getFlattenedHierarchy(boolean providingOnly) Gets a flattened list of this provider and all its descendants in the hierarchy.default StringGets the fully qualified ID of this provider, reflecting its position in the hierarchy.default StringGenerates a machine-readable header string for this context provider, used to identify the source of injected context in the final prompt.default StringGets an optional icon identifier for this provider.getId()Gets the unique identifier for this context provider.default intCalculates the token count for the system instructions provided by this instance using the active model.getName()Gets the human-readable name of this context provider.default intCalculates the token count for the RAG content provided by this instance using the active model.Gets a list of system instruction strings provided by this context provider.default booleanChecks if this provider is effectively providing context, meaning it is enabled AND all its ancestors in the hierarchy are also enabled.booleanChecks if this context provider is currently active and providing context.Methods inherited from interface PropertyChangeSource
getPropertyChangeSupportModifier and TypeMethodDescriptionGets the PropertyChangeSupport instance for this object.
-
Constructor Details
-
ProjectAlertsContextProvider
-
-
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).Fetches current alerts from the Projects toolkit and appends them to the RAG message. Alerts are grouped by type (Project vs. Compiler).
- Parameters:
ragMessage- The message to be augmented with context.- Throws:
Exception- if an error occurs during context generation.
-

