# `MingaEditor.Agent.EditTimeline`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/agent/edit_timeline.ex#L1)

Per-file ordered sequence of agent edit snapshots.

Records a snapshot after each tool-driven file change so the user can
scrub through the agent's edit history. Each entry stores the file
content *after* that edit, keyed by tool call ID.

Baselines (the content before the first edit) are stored separately so
the timeline can show the full range from "before agent touched the
file" to the current state.

# `t`

```elixir
@type t() :: %MingaEditor.Agent.EditTimeline{
  baselines: %{required(String.t()) =&gt; MingaEditor.Agent.DiffSnapshot.t()},
  entries: %{required(String.t()) =&gt; [MingaEditor.Agent.EditTimeline.Entry.t()]},
  viewing: %{required(String.t()) =&gt; non_neg_integer() | nil}
}
```

# `baseline_content`

```elixir
@spec baseline_content(t(), String.t()) :: {:ok, String.t()} | :error
```

# `baseline_for`

```elixir
@spec baseline_for(t(), String.t()) :: MingaEditor.Agent.DiffSnapshot.t() | nil
```

# `cleanup`

```elixir
@spec cleanup(t()) :: :ok
```

# `content_at`

```elixir
@spec content_at(t(), String.t(), non_neg_integer()) :: {:ok, String.t()} | :error
```

# `entries_for`

```elixir
@spec entries_for(t(), String.t()) :: [MingaEditor.Agent.EditTimeline.Entry.t()]
```

# `entry_count`

```elixir
@spec entry_count(t(), String.t()) :: non_neg_integer()
```

# `go_live`

```elixir
@spec go_live(t(), String.t()) :: t()
```

# `has_entries?`

```elixir
@spec has_entries?(t(), String.t()) :: boolean()
```

# `navigate_next`

```elixir
@spec navigate_next(t(), String.t()) :: {t(), :moved | :at_end | :no_entries}
```

# `navigate_prev`

```elixir
@spec navigate_prev(t(), String.t()) :: {t(), :moved | :at_baseline | :no_entries}
```

# `new`

```elixir
@spec new() :: t()
```

# `record_edit`

```elixir
@spec record_edit(t(), String.t(), String.t(), String.t(), String.t(), String.t()) ::
  t()
```

# `set_viewing`

```elixir
@spec set_viewing(t(), String.t(), non_neg_integer()) :: t()
```

# `viewing_index`

```elixir
@spec viewing_index(t(), String.t()) :: non_neg_integer() | nil
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
