NotesServer (fnord v0.8.27)
View SourceSummary
Functions
Uses an AI model to answer a question about the existing research notes. The question should be a concise request for information about the project, such as "What is the purpose of this project?" or "What languages and technologies are used in this project?". The AI model will analyze the existing notes and return a concise answer.
Returns a specification to start this module under a supervisor.
Consolidates all newly extracted facts and user insights into the existing research notes. This uses an AI model to reorganize and consolidate the notes according to specified guidelines. The consolidated notes are saved to persistent storage.
Uses an AI model to analyze the result of a tool call and extract facts about the project. The facts are stored in the server's state and can be consolidated later.
Uses an AI model to analyze the user's message and extract insights about their coding preferences, learning style, personality, and other relevant traits. The insights are stored in the server's state and can be consolidated later.
Callback implementation for GenServer.init/1
.
Waits for the server to complete all operations before returning. This is useful to ensure that all notes have been saved and consolidated before exiting the application or moving on to the next step in the workflow.
Load existing research notes from persistent storage. The project must be set from the --project command line option or CWD.
Saves the new notes that have been collected over the course of the current session to persistent storage. This saves any newly extracted facts and user insights that have not yet been consolidated into the main research notes.
Functions
Uses an AI model to answer a question about the existing research notes. The question should be a concise request for information about the project, such as "What is the purpose of this project?" or "What languages and technologies are used in this project?". The AI model will analyze the existing notes and return a concise answer.
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec consolidate() :: :ok
Consolidates all newly extracted facts and user insights into the existing research notes. This uses an AI model to reorganize and consolidate the notes according to specified guidelines. The consolidated notes are saved to persistent storage.
Currently, consolidation generally happens at the beginning of a new research
session (from AI.Agent.Coordinator
).
Uses an AI model to analyze the result of a tool call and extract facts about the project. The facts are stored in the server's state and can be consolidated later.
@spec ingest_user_msg(binary()) :: :ok
Uses an AI model to analyze the user's message and extract insights about their coding preferences, learning style, personality, and other relevant traits. The insights are stored in the server's state and can be consolidated later.
Callback implementation for GenServer.init/1
.
Waits for the server to complete all operations before returning. This is useful to ensure that all notes have been saved and consolidated before exiting the application or moving on to the next step in the workflow.
@spec load_notes() :: :ok | {:error, any()}
Load existing research notes from persistent storage. The project must be set from the --project command line option or CWD.
Saves the new notes that have been collected over the course of the current session to persistent storage. This saves any newly extracted facts and user insights that have not yet been consolidated into the main research notes.
Returns immediately, but the actual saving process may take some time. Use
join/0
to wait for the server to complete all operations if needed.
The new notes are added to a special section at the end of the existing
research notes, labeled # NEW NOTES (unconsolidated)
. This section is meant
to be consolidated later by the consolidate/0
function.
@spec start_link(opts :: keyword()) :: GenServer.on_start()