|
|
@@ -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,
|
|
|
),
|
|
|
)
|
|
|
}
|