MingaAgent.Branch (Minga v0.1.0)

Copy Markdown View Source

An immutable snapshot of identified transcript entries.

Branch creation and switching are aggregate transcript transitions owned by MingaAgent.Session.Transcript. This value stores only the frozen snapshot and its presentation metadata.

Summary

Types

t()

A named conversation branch snapshot.

Functions

Returns the stable entry IDs in branch order.

Lists branches with their names and message counts.

Returns the branch messages in transcript order.

Creates a branch snapshot from identified entries.

Types

t()

@type t() :: %MingaAgent.Branch{
  created_at: DateTime.t(),
  entries: [MingaAgent.TranscriptEntry.t()],
  name: String.t()
}

A named conversation branch snapshot.

Functions

entry_ids(branch)

@spec entry_ids(t()) :: [pos_integer()]

Returns the stable entry IDs in branch order.

list(branches)

@spec list([t()]) :: String.t()

Lists branches with their names and message counts.

messages(branch)

@spec messages(t()) :: [MingaAgent.Message.t()]

Returns the branch messages in transcript order.

new(name, entries, created_at)

Creates a branch snapshot from identified entries.