leanCheckboxAt reports whether terminal coordinates land on the "Lean Mode" checkbox row. It mirrors the layout produced by render: the checkbox sits one blank row below the last card, at the cards' left offset.
(x, y int)
| 627 | // Mode" checkbox row. It mirrors the layout produced by render: the checkbox |
| 628 | // sits one blank row below the last card, at the cards' left offset. |
| 629 | func (m *agentPickerModel) leanCheckboxAt(x, y int) bool { |
| 630 | originX, originY := m.panelOrigin() |
| 631 | |
| 632 | checkboxY := originY + agentPickerCardsTop + m.cardRows() + 1 |
| 633 | if y != checkboxY { |
| 634 | return false |
| 635 | } |
| 636 | relX := x - originX - agentPickerCardsLeft |
| 637 | return relX >= 0 && relX < lipgloss.Width(m.leanCheckbox()) |
| 638 | } |
| 639 | |
| 640 | // leanCheckbox renders the "Lean Mode" checkbox line. |
| 641 | func (m *agentPickerModel) leanCheckbox() string { |