on main help sign in
feat: integrate new title block
commit8807bfebcc8254d518b5aa1eebb541b8024e9720 authorChristian Rocha <christian@rocha.is> dateFri 30 May 2025, 00:00 (1 year ago) parent47bb36b
2 files changed+10−21
internal/tui/components/chat/chat.go+10−19 internal/tui/styles/icons.go−2
internal/tui/components/chat/chat.go+10−19
@@ -8,6 +8,7 @@ import (
88 "github.com/opencode-ai/opencode/internal/config"
99 "github.com/opencode-ai/opencode/internal/message"
1010 "github.com/opencode-ai/opencode/internal/session"
11+ "github.com/opencode-ai/opencode/internal/tui/components/logo"
1112 "github.com/opencode-ai/opencode/internal/tui/styles"
1213 "github.com/opencode-ai/opencode/internal/tui/theme"
1314 "github.com/opencode-ai/opencode/internal/version"
@@ -27,7 +28,7 @@ type EditorFocusMsg bool
2728func header() string {
2829 return lipgloss.JoinVertical(
2930 lipgloss.Top,
30− logo(),
31+ logoBlock(),
3132 repo(),
3233 "",
3334 cwd(),
@@ -91,25 +92,15 @@ func lspsConfigured() string {
9192 )
9293}
9394
94−func logo() string {
95− logo := fmt.Sprintf("%s %s", styles.OpenCodeIcon, "OpenCode")
95+func logoBlock() string {
9696 t := theme.CurrentTheme()
97− baseStyle := styles.BaseStyle()
98−
99− versionText := baseStyle.
100− Foreground(t.TextMuted()).
101− Render(version.Version)
102−
103− return baseStyle.
104− Bold(true).
105− Render(
106− lipgloss.JoinHorizontal(
107− lipgloss.Left,
108− logo,
109− " ",
110− versionText,
111− ),
112− )
97+ return logo.Render(version.Version, true, logo.Opts{
98+ FieldColor: t.Accent(),
99+ TitleColorA: t.Primary(),
100+ TitleColorB: t.Secondary(),
101+ CharmColor: t.Primary(),
102+ VersionColor: t.Secondary(),
103+ })
113104}
114105
115106func repo() string {
internal/tui/styles/icons.go−2
@@ -1,8 +1,6 @@
11package styles
22
33const (
4− OpenCodeIcon string = "⌬"
5−
64 CheckIcon string = "✓"
75 ErrorIcon string = "✖"
86 WarningIcon string = "⚠"