Packages

fnord

0.4.30

AI code archaeology

Current section

Files

Jump to
fnord lib cmd ask.ex
Raw

lib/cmd/ask.ex

defmodule Cmd.Ask do
def run(opts) do
with :ok <- validate(opts) do
AI.Agent.Answers.perform(AI.new(), opts)
else
{:error, :project_not_found} ->
UI.error("Project not found; verify that the project has been indexed.")
end
end
defp validate(_opts) do
cond do
!Store.project_exists?() -> {:error, :project_not_found}
true -> :ok
end
end
end