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

Method renderDebugDetail

internal/ui/program.go:625–645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

623}
624
625func (m *harness) renderDebugDetail() {
626 e, ok := debug.FindByID(m.debugSelected)
627 if !ok {
628 m.debugView.SetContent(Dimmed(fmt.Sprintf("(event #%d is not in the ring anymore)", m.debugSelected)))
629 return
630 }
631 body := e.Payload
632 if body == "" {
633 body = Dimmed("(no payload for this event)")
634 m.debugView.SetContent(body)
635 m.debugView.GotoTop()
636 return
637 }
638 // Syntax-highlight JSON payloads and wrap long lines to the viewport
639 // width so values, URLs, and no-break tool output snap into the modal
640 // instead of spilling off the right edge. The modal's title bar is
641 // rendered by viewDebugModal itself — viewport content is only the
642 // payload.
643 m.debugView.SetContent(HighlightPayload(body, m.debugView.Width))
644 m.debugView.GotoTop()
645}
646
647// toggleDebugFocus flips focus between the input box and the debug panel.
648// On the first focus, picks the latest event as the selection so ↑/↓ has a

Callers 1

refreshDebugContentMethod · 0.95

Calls 3

FindByIDFunction · 0.92
DimmedFunction · 0.85
HighlightPayloadFunction · 0.85

Tested by

no test coverage detected