Store.Project (fnord v0.9.11)
View SourceSummary
Functions
Resolves path within the project's source root. Returns {:ok, path} if
the file exists, or {:error, :enoent} if it does not.
Returns the status of the index for the given project.
Reads the project prompt from FNORD.md and FNORD.local.md in the source
root.
Returns no source files when source_root is nil to avoid crashing.
Types
@type index_status() :: %{ new: [Store.Project.Entry.t()], stale: [Store.Project.Entry.t()], deleted: [Store.Project.Entry.t()] }
Functions
@spec conversations(t()) :: [Store.Project.Conversation.t()]
@spec delete(t()) :: :ok
@spec delete_missing_files(t()) :: {t(), Enumerable.t()}
@spec find_entry(t(), String.t()) :: {:ok, Store.Project.Entry.t()} | {:error, :enoent}
@spec find_file(t(), binary()) :: {:ok, binary()} | {:error, :enoent} | {:error, File.posix()}
Resolves path within the project's source root. Returns {:ok, path} if
the file exists, or {:error, :enoent} if it does not.
@spec index_status(t()) :: index_status()
Returns the status of the index for the given project.
It classifies entries into:
:deleted- entries that were indexed but the source files have been removed:stale- entries whose indexed metadata is stale compared to the source file:new- entries for unindexed files that exist in the source
Reads the project prompt from FNORD.md and FNORD.local.md in the source
root.
Returns:
{:ok, prompt}(at least one file has content){:error, :not_found}
When both files have content, the resulting prompt will include instructions from both files, along with a short note indicating priority.
@spec source_files(t()) :: {t(), Enumerable.t()}
Returns no source files when source_root is nil to avoid crashing.
@spec stored_files(t()) :: Enumerable.t()
@spec torch(t()) :: :ok