# `MingaEditor.UI.Picker.Context`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/ui/picker/context.ex#L1)

Picker context struct — what picker sources need from MingaEditor.State.

This struct decouples picker sources from the full `MingaEditor.State`, allowing
sources to depend only on the subset of state they actually use. This makes
sources easier to test, easier to reason about, and prevents the cyclic
dependency between `UI.Picker` and `MingaEditor.State`.

## Fields

- `buffers` — buffer list and active buffer (`MingaEditor.State.Buffers.t()`)
- `editing` — vim state (marks, registers, jump positions, mode)
- `file_tree` — file tree state (if available)
- `search` — search state (buffer search, project search results)
- `viewport` — viewport dimensions
- `tab_bar` — tab bar state (tabs, active tab, agent groups)
- `agent_session` — agent session PID (if available)
- `picker_ui` — picker UI state (context map for sources)
- `capabilities` — frontend capabilities (GUI detection, etc.)
- `theme` — active theme

# `t`

```elixir
@type t() :: %MingaEditor.UI.Picker.Context{
  agent_session: pid() | nil,
  buffers: MingaEditor.State.Buffers.t(),
  capabilities: map(),
  editing: MingaEditor.VimState.t(),
  file_tree: MingaEditor.State.FileTree.t() | nil,
  picker_ui: map(),
  search: MingaEditor.State.Search.t(),
  tab_bar: MingaEditor.State.TabBar.t(),
  theme: MingaEditor.UI.Theme.t(),
  viewport: MingaEditor.Viewport.t()
}
```

# `from_editor_state`

```elixir
@spec from_editor_state(MingaEditor.State.t()) :: t()
```

Builds a picker context from the full editor state.

---

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