Provider-aware normalized completion index with bounded deterministic snapshots.
Summary
Functions
Returns all indexed items in deterministic order for compatibility callers.
Returns an empty completion index.
Finds one exact stable item identity.
Builds an index from candidates grouped by their provider identity.
Replaces one provider batch after collapsing true provider-local duplicates.
Returns a bounded deterministic semantic snapshot without building a full match list.
Returns a bounded snapshot that retains a matching selected identity across reranking.
Updates one exact stable item identity while preserving index ownership.
Types
@type t() :: %Minga.Editing.Completion.Index{ providers: %{ required(Minga.Editing.Completion.Item.provider_id()) => Minga.Editing.Completion.Index.Provider.t() }, total_count: non_neg_integer() }
Functions
@spec all_items(t()) :: [Minga.Editing.Completion.Item.t()]
Returns all indexed items in deterministic order for compatibility callers.
@spec empty() :: t()
Returns an empty completion index.
@spec find_item(t(), Minga.Editing.Completion.Item.id() | nil) :: Minga.Editing.Completion.Item.t() | nil
Finds one exact stable item identity.
@spec from_items([Minga.Editing.Completion.Item.t()]) :: t()
Builds an index from candidates grouped by their provider identity.
@spec put_provider( t(), Minga.Editing.Completion.Item.provider_id(), [Minga.Editing.Completion.Item.t()], boolean() ) :: t()
Replaces one provider batch after collapsing true provider-local duplicates.
@spec snapshot(t(), String.t(), pos_integer()) :: Minga.Editing.Completion.Index.Snapshot.t()
Returns a bounded deterministic semantic snapshot without building a full match list.
@spec snapshot( t(), String.t(), pos_integer(), Minga.Editing.Completion.Item.id() | nil ) :: Minga.Editing.Completion.Index.Snapshot.t()
Returns a bounded snapshot that retains a matching selected identity across reranking.
@spec update_item( t(), Minga.Editing.Completion.Item.id(), (Minga.Editing.Completion.Item.t() -> Minga.Editing.Completion.Item.t()) ) :: t()
Updates one exact stable item identity while preserving index ownership.