on main help sign in
feat: integrate new title block
8807bfeChristian Rocha
internal/tui/components/chat/chat.go+10−19
@@ -8,6 +8,7 @@ import (
8 "github.com/opencode-ai/opencode/internal/config"
8 "github.com/opencode-ai/opencode/internal/config"
9 "github.com/opencode-ai/opencode/internal/message"
9 "github.com/opencode-ai/opencode/internal/message"
10 "github.com/opencode-ai/opencode/internal/session"
10 "github.com/opencode-ai/opencode/internal/session"
11+ "github.com/opencode-ai/opencode/internal/tui/components/logo"
11 "github.com/opencode-ai/opencode/internal/tui/styles"
12 "github.com/opencode-ai/opencode/internal/tui/styles"
12 "github.com/opencode-ai/opencode/internal/tui/theme"
13 "github.com/opencode-ai/opencode/internal/tui/theme"
13 "github.com/opencode-ai/opencode/internal/version"
14 "github.com/opencode-ai/opencode/internal/version"
@@ -27,7 +28,7 @@ type EditorFocusMsg bool
27func header() string {
28func header() string {
28 return lipgloss.JoinVertical(
29 return lipgloss.JoinVertical(
29 lipgloss.Top,
30 lipgloss.Top,
30− logo(),
31+ logoBlock(),
31 repo(),
32 repo(),
32 "",
33 "",
33 cwd(),
34 cwd(),
@@ -91,25 +92,15 @@ func lspsConfigured() string {
91 )
92 )
92}
93}
93
94
94−func logo() string {
95+func logoBlock() string {
95− logo := fmt.Sprintf("%s %s", styles.OpenCodeIcon, "OpenCode")
96 t := theme.CurrentTheme()
96 t := theme.CurrentTheme()
97− baseStyle := styles.BaseStyle()
98−
99− versionText := baseStyle.
100− Foreground(t.TextMuted()).
101− Render(version.Version)
97+ return logo.Render(version.Version, true, logo.Opts{
102−
98+ FieldColor: t.Accent(),
103− return baseStyle.
99+ TitleColorA: t.Primary(),
104− Bold(true).
100+ TitleColorB: t.Secondary(),
105− Render(
101+ CharmColor: t.Primary(),
106− lipgloss.JoinHorizontal(
102+ VersionColor: t.Secondary(),
107− lipgloss.Left,
108− logo,
109− " ",
110− versionText,
111− ),
112− )
103+ })
113}
104}
114
105
115func repo() string {
106func repo() string {
internal/tui/styles/icons.go−2
@@ -1,8 +1,6 @@
1package styles
1package styles
2
2
3const (
3const (
4− OpenCodeIcon string = "⌬"
5−
6 CheckIcon string = "✓"
4 CheckIcon string = "✓"
7 ErrorIcon string = "✖"
5 ErrorIcon string = "✖"
8 WarningIcon string = "⚠"
6 WarningIcon string = "⚠"