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

Method renderGHError

internal/tui/settings.go:358–383  ·  view source on GitHub ↗

renderGHError renders the GH CLI error dialog.

(modalWidth int)

Source from the content-addressed store, hash-verified

356
357// renderGHError renders the GH CLI error dialog.
358func (s *SettingsOverlay) renderGHError(modalWidth int) string {
359 var result strings.Builder
360
361 errorHeaderStyle := lipgloss.NewStyle().
362 Bold(true).
363 Foreground(ErrorColor).
364 Padding(0, 1)
365 errorMsgStyle := lipgloss.NewStyle().
366 Foreground(TextColor).
367 Padding(0, 1)
368
369 result.WriteString(errorHeaderStyle.Render("GitHub CLI Error"))
370 result.WriteString("\n\n")
371 result.WriteString(errorMsgStyle.Render(s.ghError))
372 result.WriteString("\n\n")
373
374 hintStyle := lipgloss.NewStyle().
375 Foreground(MutedColor).
376 Padding(0, 1)
377 result.WriteString(hintStyle.Render(fmt.Sprintf("Install: https://cli.github.com")))
378 result.WriteString("\n")
379 result.WriteString(hintStyle.Render("PR creation has been disabled."))
380
381 _ = modalWidth
382 return result.String()
383}

Callers 1

RenderMethod · 0.95

Calls 2

RenderMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected