MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / inModal

Method inModal

internal/ui/program.go:547–555  ·  view source on GitHub ↗

inModal reports whether the current state should render a centered full-screen modal in place of the normal viewport+input layout. Two callers: the debug detail view (Enter on a panel entry) and the approval-with-diff flow (write_file proposal).

()

Source from the content-addressed store, hash-verified

545// callers: the debug detail view (Enter on a panel entry) and the
546// approval-with-diff flow (write_file proposal).
547func (m *harness) inModal() bool {
548 if m.debugMode == debugDetail && debug.Enabled() {
549 return true
550 }
551 if m.state == stateAwaitingApproval && m.approvalDetail != "" {
552 return true
553 }
554 return false
555}
556
557// modalSize returns the outer width/height of the detail modal — capped so
558// it doesn't get unreadably wide on big monitors, and clamped so small

Callers 1

layoutMethod · 0.95

Calls 1

EnabledFunction · 0.92

Tested by

no test coverage detected