# `MingaEditor.Input.AgentMouse`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/input/agent_mouse.ex#L1)

Position-based mouse handler for agent-specific UI regions.

Only intercepts mouse events that require agent-specific handling:

* **Prompt area clicks** (split pane and side panel): focus/unfocus the
  input field and transition to insert mode.
* **Preview pane scroll** (split pane): scroll the file viewer preview
  when the mouse is in the preview column.
* **Side panel interactions**: scroll and click handling for the bottom
  panel, which uses UIState.scroll (not the standard viewport).

Chat content scroll and clicks in the split pane pass through to
`MingaEditor.Mouse` (via `ModeFSM`) after unpinning the window so the
viewport follows the cursor. Chat content clicks unfocus the prompt
input and passthrough for standard buffer mouse handling.

Events outside agent regions pass through to the next handler in the
surface stack.

# `state`

```elixir
@type state() :: MingaEditor.Input.Handler.handler_state()
```

---

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