@@ -2,8 +2,9 @@ package splash
8 "github.com/charmbracelet/bubbles/v2/key"
9 "github.com/charmbracelet/bubbles/v2/key"
9 tea "github.com/charmbracelet/bubbletea/v2"
10 tea "github.com/charmbracelet/bubbletea/v2"
@@ -142,7 +143,6 @@ func (s *splashCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
142 case tea.KeyPressMsg:
143 case tea.KeyPressMsg:
144 case key.Matches(msg, s.keyMap.Back):
145 case key.Matches(msg, s.keyMap.Back):
145− slog.Info("Back key pressed in splash screen")
146 if s.needsAPIKey {
146 if s.needsAPIKey {
147 // Go back to model selection
147 // Go back to model selection
148 s.needsAPIKey = false
148 s.needsAPIKey = false
@@ -339,10 +339,10 @@ func (s *splashCmp) isProviderConfigured(providerID string) bool {
340func (s *splashCmp) View() string {
340func (s *splashCmp) View() string {
341 t := styles.CurrentTheme()
341 t := styles.CurrentTheme()
343 var content string
342 var content string
344 if s.needsAPIKey {
343 if s.needsAPIKey {
344+ infoSection := s.infoSection()
345− remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2)
345+ remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - lipgloss.Height(infoSection)
346 apiKeyView := s.apiKeyInput.View()
346 apiKeyView := s.apiKeyInput.View()
347 apiKeySelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
347 apiKeySelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
348 lipgloss.JoinVertical(
348 lipgloss.JoinVertical(
@@ -353,10 +353,12 @@ func (s *splashCmp) View() string {
353 content = lipgloss.JoinVertical(
353 content = lipgloss.JoinVertical(
354 lipgloss.Left,
354 lipgloss.Left,
355 s.logoRendered,
355 s.logoRendered,
356 apiKeySelector,
357 apiKeySelector,
358 } else if s.isOnboarding {
359 } else if s.isOnboarding {
360+ infoSection := s.infoSection()
359− remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2)
361+ remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - lipgloss.Height(infoSection)
360 modelListView := s.modelList.View()
362 modelListView := s.modelList.View()
361 modelSelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
363 modelSelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
362 lipgloss.JoinVertical(
364 lipgloss.JoinVertical(
@@ -369,11 +371,10 @@ func (s *splashCmp) View() string {
369 content = lipgloss.JoinVertical(
371 content = lipgloss.JoinVertical(
370 lipgloss.Left,
372 lipgloss.Left,
371 s.logoRendered,
373 s.logoRendered,
372 modelSelector,
375 modelSelector,
374 } else if s.needsProjectInit {
377 } else if s.needsProjectInit {
375− t := styles.CurrentTheme()
377 titleStyle := t.S().Base.Foreground(t.FgBase)
378 titleStyle := t.S().Base.Foreground(t.FgBase)
378 bodyStyle := t.S().Base.Foreground(t.FgMuted)
379 bodyStyle := t.S().Base.Foreground(t.FgMuted)
379 shortcutStyle := t.S().Base.Foreground(t.Success)
380 shortcutStyle := t.S().Base.Foreground(t.Success)
@@ -403,8 +404,9 @@ func (s *splashCmp) View() string {
405 buttons := lipgloss.JoinHorizontal(lipgloss.Left, yesButton, " ", noButton)
406 buttons := lipgloss.JoinHorizontal(lipgloss.Left, yesButton, " ", noButton)
407+ infoSection := s.infoSection()
407− remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2)
409+ remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - lipgloss.Height(infoSection)
409 initContent := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
411 initContent := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
410 lipgloss.JoinVertical(
412 lipgloss.JoinVertical(
@@ -418,10 +420,15 @@ func (s *splashCmp) View() string {
418 content = lipgloss.JoinVertical(
420 content = lipgloss.JoinVertical(
419 lipgloss.Left,
421 lipgloss.Left,
420 s.logoRendered,
422 s.logoRendered,
421 initContent,
424 initContent,
424− content = s.logoRendered
427+ parts := []string{
431+ content = lipgloss.JoinVertical(lipgloss.Left, parts...)
427 return t.S().Base.
434 return t.S().Base.
@@ -451,6 +458,16 @@ func (s *splashCmp) Cursor() *tea.Cursor {
451 return nil
458 return nil
461+func (s *splashCmp) infoSection() string {
462+ return lipgloss.JoinVertical(
466+ lipgloss.JoinHorizontal(lipgloss.Left, s.lspBlock(), s.mcpBlock()),
454func (s *splashCmp) logoBlock() string {
471func (s *splashCmp) logoBlock() string {
455 t := styles.CurrentTheme()
472 t := styles.CurrentTheme()
456 const padding = 2
473 const padding = 2
@@ -471,8 +488,8 @@ func (m *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
472 // Calculate the correct Y offset based on current state
489 // Calculate the correct Y offset based on current state
473 logoHeight := lipgloss.Height(m.logoRendered)
490 logoHeight := lipgloss.Height(m.logoRendered)
491+ infoSectionHeight := lipgloss.Height(m.infoSection())
474− baseOffset := logoHeight + SplashScreenPaddingY
492+ baseOffset := logoHeight + SplashScreenPaddingY + infoSectionHeight
476 if m.needsAPIKey {
493 if m.needsAPIKey {
477 // For API key input, position at the bottom of the remaining space
494 // For API key input, position at the bottom of the remaining space
478 remainingHeight := m.height - logoHeight - (SplashScreenPaddingY * 2)
495 remainingHeight := m.height - logoHeight - (SplashScreenPaddingY * 2)
@@ -482,7 +499,7 @@ func (m *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
482 cursor.X = cursor.X + SplashScreenPaddingX
499 cursor.X = cursor.X + SplashScreenPaddingX
483 } else if m.isOnboarding {
500 } else if m.isOnboarding {
484 // For model list, use the original calculation
501 // For model list, use the original calculation
485− listHeight := min(40, m.height-(SplashScreenPaddingY*2)-logoHeight-2)
502+ listHeight := min(40, m.height-(SplashScreenPaddingY*2)-logoHeight-1-infoSectionHeight)
486 offset := m.height - listHeight
503 offset := m.height - listHeight
487 cursor.Y += offset
504 cursor.Y += offset
488 // Model list doesn't have a prompt, so add padding + space for list styling
505 // Model list doesn't have a prompt, so add padding + space for list styling
@@ -516,3 +533,96 @@ func (s *splashCmp) Bindings() []key.Binding {
517 return []key.Binding{}
534 return []key.Binding{}
537+func (s *splashCmp) getMaxInfoWidth() int {
538+ return min(s.width-(SplashScreenPaddingX*2), 40)
541+func (s *splashCmp) cwd() string {
542+ cwd := config.Get().WorkingDir()
543+ t := styles.CurrentTheme()
544+ homeDir, err := os.UserHomeDir()
545+ if err == nil && cwd != homeDir {
546+ cwd = strings.ReplaceAll(cwd, homeDir, "~")
548+ maxWidth := s.getMaxInfoWidth()
549+ return t.S().Muted.Width(maxWidth).Render(cwd)
552+func LSPList(maxWidth int) []string {
553+ t := styles.CurrentTheme()
554+ lspList := []string{}
555+ lsp := config.Get().LSP.Sorted()
557+ return []string{t.S().Base.Foreground(t.Border).Render("None")}
559+ for _, l := range lsp {
560+ iconColor := t.Success
562+ iconColor = t.FgMuted
564+ lspList = append(lspList,
567+ IconColor: iconColor,
569+ Description: l.LSP.Command,
578+func (s *splashCmp) lspBlock() string {
579+ t := styles.CurrentTheme()
580+ maxWidth := s.getMaxInfoWidth() / 2
581+ section := t.S().Subtle.Render("LSPs")
582+ lspList := append([]string{section, ""}, LSPList(maxWidth-1)...)
583+ return t.S().Base.Width(maxWidth).PaddingRight(1).Render(
584+ lipgloss.JoinVertical(
591+func MCPList(maxWidth int) []string {
592+ t := styles.CurrentTheme()
593+ mcpList := []string{}
594+ mcps := config.Get().MCP.Sorted()
596+ return []string{t.S().Base.Foreground(t.Border).Render("None")}
598+ for _, l := range mcps {
599+ iconColor := t.Success
601+ iconColor = t.FgMuted
603+ mcpList = append(mcpList,
606+ IconColor: iconColor,
608+ Description: l.MCP.Command,
617+func (s *splashCmp) mcpBlock() string {
618+ t := styles.CurrentTheme()
619+ maxWidth := s.getMaxInfoWidth() / 2
620+ section := t.S().Subtle.Render("MCPs")
621+ mcpList := append([]string{section, ""}, MCPList(maxWidth-1)...)
622+ return t.S().Base.Width(maxWidth).PaddingRight(1).Render(
623+ lipgloss.JoinVertical(