MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / renderWorktreeInfoLine

Method renderWorktreeInfoLine

internal/tui/dashboard.go:143–155  ·  view source on GitHub ↗

renderWorktreeInfoLine renders the branch and directory info line for the header.

()

Source from the content-addressed store, hash-verified

141
142// renderWorktreeInfoLine renders the branch and directory info line for the header.
143func (a *App) renderWorktreeInfoLine() string {
144 branch, dir := a.getWorktreeInfo()
145 if branch == "" {
146 return ""
147 }
148
149 branchLabel := SubtitleStyle.Render("branch:")
150 branchValue := lipgloss.NewStyle().Foreground(PrimaryColor).Render(" " + branch)
151 dirLabel := SubtitleStyle.Render(" dir:")
152 dirValue := lipgloss.NewStyle().Foreground(TextColor).Render(" " + dir)
153
154 return lipgloss.JoinHorizontal(lipgloss.Center, " ", branchLabel, branchValue, dirLabel, dirValue)
155}
156
157// renderHeader renders the header with branding, state, iteration, and elapsed time.
158func (a *App) renderHeader() string {

Calls 2

getWorktreeInfoMethod · 0.95
RenderMethod · 0.45