View Source Indexer behaviour (fnord v0.4.30)

This behaviour wraps the AI-powered operations used by Cmd.Indexer to allow overrides for testing.

Summary

Types

@type completion() :: {:ok, String.t()}
@type embeddings() :: {:ok, [String.t()]}
@type error() :: {:error, term()}
@type file_content() :: String.t()
@type file_path() :: String.t()
@type indexer() :: struct()

Callbacks

Link to this callback

get_embeddings(indexer, file_path)

View Source
@callback get_embeddings(indexer(), file_path()) :: embeddings() | error()
Link to this callback

get_outline(indexer, file_path, file_content)

View Source
@callback get_outline(indexer(), file_path(), file_content()) :: completion() | error()
Link to this callback

get_summary(indexer, file_path, file_content)

View Source
@callback get_summary(indexer(), file_path(), file_content()) :: completion() | error()
@callback new() :: indexer()