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

Function renderTurnHeader

internal/ui/program.go:914–929  ·  view source on GitHub ↗

renderTurnHeader returns a "── 15:23:45 ─────────…" divider sized to width. Called when the user submits a new prompt so each turn has an unmistakable boundary in the scrollback.

(width int)

Source from the content-addressed store, hash-verified

912// width. Called when the user submits a new prompt so each turn has an
913// unmistakable boundary in the scrollback.
914func renderTurnHeader(width int) string {
915 if width < 24 {
916 width = 80
917 }
918 leftSep := "── "
919 label := " " + time.Now().Format("15:04:05") + " "
920 // lipgloss.Width handles wide characters / ANSI sanely.
921 used := lipgloss.Width(leftSep) + lipgloss.Width(label)
922 tail := width - used
923 if tail < 3 {
924 tail = 3
925 }
926 return turnDividerStyle.Render(leftSep) +
927 turnTimestampStyle.Render(label) +
928 turnDividerStyle.Render(strings.Repeat("─", tail))
929}
930
931var debugBoxStyle = lipgloss.NewStyle().
932 Border(lipgloss.NormalBorder()).

Callers 1

updateInputMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected