Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 8807bfe

Browse files
meowgorithmkujtimiihoxha
authored andcommitted
feat: integrate new title block
1 parent 47bb36b commit 8807bfe

2 files changed

Lines changed: 10 additions & 21 deletions

File tree

internal/tui/components/chat/chat.go

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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
2728
func 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

115106
func repo() string {

internal/tui/styles/icons.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package styles
22

33
const (
4-
OpenCodeIcon string = "⌬"
5-
64
CheckIcon string = "✓"
75
ErrorIcon string = "✖"
86
WarningIcon string = "⚠"

0 commit comments

Comments
 (0)