From 005d6e0bde9a42e2bebee7b712b0fe9a7be23499 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Thu, 29 May 2025 15:18:47 -0500 Subject: wip: refactoring tui --- internal/tui/components/chat/chat.go | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'internal/tui/components/chat') diff --git a/internal/tui/components/chat/chat.go b/internal/tui/components/chat/chat.go index 4fa6b27b2..7cd49ef6a 100644 --- a/internal/tui/components/chat/chat.go +++ b/internal/tui/components/chat/chat.go @@ -29,7 +29,7 @@ func header(width int) string { } func lspsConfigured(width int) string { - cfg := config.Get() + // cfg := config.Get() title := "LSP Servers" title = ansi.Truncate(title, width, "…") @@ -44,37 +44,37 @@ func lspsConfigured(width int) string { // Get LSP names and sort them for consistent ordering var lspNames []string - for name := range cfg.LSP { - lspNames = append(lspNames, name) - } + // for name := range cfg.LSP { + // lspNames = append(lspNames, name) + // } sort.Strings(lspNames) var lspViews []string - for _, name := range lspNames { - lsp := cfg.LSP[name] - lspName := baseStyle. - Foreground(t.Text()). - Render(fmt.Sprintf("• %s", name)) - - cmd := lsp.Command - cmd = ansi.Truncate(cmd, width-lipgloss.Width(lspName)-3, "…") - - lspPath := baseStyle. - Foreground(t.TextMuted()). - Render(fmt.Sprintf(" (%s)", cmd)) - - lspViews = append(lspViews, - baseStyle. - Width(width). - Render( - lipgloss.JoinHorizontal( - lipgloss.Left, - lspName, - lspPath, - ), - ), - ) - } + // for _, name := range lspNames { + // lsp := cfg.LSP[name] + // lspName := baseStyle. + // Foreground(t.Text()). + // Render(fmt.Sprintf("• %s", name)) + + // cmd := lsp.Command + // cmd = ansi.Truncate(cmd, width-lipgloss.Width(lspName)-3, "…") + + // lspPath := baseStyle. + // Foreground(t.TextMuted()). + // Render(fmt.Sprintf(" (%s)", cmd)) + + // lspViews = append(lspViews, + // baseStyle. + // Width(width). + // Render( + // lipgloss.JoinHorizontal( + // lipgloss.Left, + // lspName, + // lspPath, + // ), + // ), + // ) + // } return baseStyle. Width(width). -- cgit v1.2.3