Represents a task with an identifier, description, and status.
Tasks follow a state machine that transitions from :pending through :in_progress to :completed.
Summary
Functions
Creates a new task with the given ID and description.
Returns the string representation of a task status.
Types
@type status() :: :pending | :in_progress | :completed
@type t() :: %Mojentic.LLM.Tools.EphemeralTaskManager.Task{ description: String.t(), id: pos_integer(), status: status() }
Functions
Creates a new task with the given ID and description.
Examples
iex> Task.new(1, "Write tests")
%Task{id: 1, description: "Write tests", status: :pending}
Returns the string representation of a task status.
Examples
iex> Task.status_to_string(:pending)
"pending"
iex> Task.status_to_string(:in_progress)
"in_progress"