summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-30 08:35:59 -0500
committeradamdottv <[email protected]>2025-05-30 08:35:59 -0500
commita5b28b5cef105606e4e44877ec39e4571a466509 (patch)
tree8bdfc609610f6a78b1d275489fbf4d9db5601e18
parent9bf024f8bee8ed94218bb492f42639e411ed752e (diff)
downloadopencode-a5b28b5cef105606e4e44877ec39e4571a466509.tar.gz
opencode-a5b28b5cef105606e4e44877ec39e4571a466509.zip
wip: refactoring tui
-rw-r--r--internal/tui/components/chat/sidebar.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/internal/tui/components/chat/sidebar.go b/internal/tui/components/chat/sidebar.go
index 4e77c75b8..a4673d958 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,
),
)
}