In-memory state for one interactive mix athena.chat session.
Plain struct + transformation functions — deliberately not a GenServer.
The REPL is single-process and synchronous; each turn produces a new
%Session{} from the previous one.
Summary
Functions
Extract every ToolResult from the session's message history, ordered
most-recent first.
Types
@type t() :: %ExAthena.Chat.Session{ cost_usd: float(), cwd: String.t() | nil, iteration: non_neg_integer(), messages: [ExAthena.Messages.Message.t()], mode: atom(), model: String.t(), permission_mode: atom(), provider: atom(), tools: :all | [module()], usage: %{input_tokens: non_neg_integer(), output_tokens: non_neg_integer()} }
Functions
@spec apply_result(t(), ExAthena.Result.t()) :: t()
@spec tool_results(t()) :: [ExAthena.Messages.ToolResult.t()]
Extract every ToolResult from the session's message history, ordered
most-recent first.
Used by /expand in the REPL so the user can reference recent tool
outputs by position (/expand 1 for the latest, /expand 2 for the
one before, etc.).