From a5b28b5cef105606e4e44877ec39e4571a466509 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Fri, 30 May 2025 08:35:59 -0500 Subject: [PATCH] wip: refactoring tui --- internal/tui/components/chat/sidebar.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/tui/components/chat/sidebar.go b/internal/tui/components/chat/sidebar.go index 4e77c75b..a4673d95 100644 --- a/internal/tui/components/chat/sidebar.go +++ b/internal/tui/components/chat/sidebar.go @@ -9,7 +9,6 @@ import ( "github.com/charmbracelet/lipgloss" "github.com/sst/opencode/internal/config" "github.com/sst/opencode/internal/tui/app" - "github.com/sst/opencode/internal/tui/components/qr" "github.com/sst/opencode/internal/tui/state" "github.com/sst/opencode/internal/tui/styles" "github.com/sst/opencode/internal/tui/theme" @@ -52,12 +51,15 @@ func (m *sidebarCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (m *sidebarCmp) View() string { + t := theme.CurrentTheme() baseStyle := styles.BaseStyle() - qrcode := "" - if m.app.Session.ShareID != nil { - url := "https://dev.opencode.ai/share?id=" - qrcode, _, _ = qr.Generate(url + m.app.Session.Id) - } + shareUrl := baseStyle.Foreground(t.TextMuted()).Render("https://dev.opencode.ai/share?id=" + m.app.Session.Id) + + // qrcode := "" + // if m.app.Session.ShareID != nil { + // url := "https://dev.opencode.ai/share?id=" + // qrcode, _, _ = qr.Generate(url + m.app.Session.Id) + // } return baseStyle. Width(m.width). @@ -69,8 +71,7 @@ func (m *sidebarCmp) View() string { header(m.width), " ", m.sessionSection(), - " ", - qrcode, + shareUrl, ), ) }