Store.Project (fnord v0.9.34)
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.
Returns the project's source root as configured in settings, ignoring any in-memory override (e.g. from a worktree session). Used by tools that need to access files outside the worktree's view, such as gitignored files that exist in source but were not propagated to the worktree.
Returns true if the given absolute path is excluded by the project's exclusion policy (user-defined patterns or gitignore).
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
@spec index_status( t(), keyword() ) :: index_status()
@spec original_source_root() :: String.t() | nil
Returns the project's source root as configured in settings, ignoring any in-memory override (e.g. from a worktree session). Used by tools that need to access files outside the worktree's view, such as gitignored files that exist in source but were not propagated to the worktree.
Cached in Services.Globals at session start by Cmd.Ask. Returns nil when no session has cached the value (e.g. in tests that bypass Cmd.Ask).
Returns true if the given absolute path is excluded by the project's exclusion policy (user-defined patterns or gitignore).
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