Class ProjectAlertsContextProvider

All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable

public class ProjectAlertsContextProvider extends AbstractProjectContextProvider
Provides real-time diagnostics for a project, including Java compiler errors and high-level project problems.
Author:
anahata-ai
  • Constructor Details

    • ProjectAlertsContextProvider

      public ProjectAlertsContextProvider(Projects projectsToolkit, String projectPath)
      Constructs a new alerts provider for a specific project.
      Parameters:
      projectsToolkit - The parent Projects toolkit.
      projectPath - The absolute path to the project.
  • 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).

      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.