diff --git a/internal/tui/components/chat/chat.go b/internal/tui/components/chat/chat.go index d261902102ddcf20edf9d735ea6b7808195a163d..2ee0b042315c5608ccb1d4aacf5e25f531c20a92 100644 --- a/internal/tui/components/chat/chat.go +++ b/internal/tui/components/chat/chat.go @@ -8,6 +8,7 @@ import ( "github.com/opencode-ai/opencode/internal/config" "github.com/opencode-ai/opencode/internal/message" "github.com/opencode-ai/opencode/internal/session" + "github.com/opencode-ai/opencode/internal/tui/components/logo" "github.com/opencode-ai/opencode/internal/tui/styles" "github.com/opencode-ai/opencode/internal/tui/theme" "github.com/opencode-ai/opencode/internal/version" @@ -27,7 +28,7 @@ type EditorFocusMsg bool func header() string { return lipgloss.JoinVertical( lipgloss.Top, - logo(), + logoBlock(), repo(), "", cwd(), @@ -91,25 +92,15 @@ func lspsConfigured() string { ) } -func logo() string { - logo := fmt.Sprintf("%s %s", styles.OpenCodeIcon, "OpenCode") +func logoBlock() string { t := theme.CurrentTheme() - baseStyle := styles.BaseStyle() - - versionText := baseStyle. - Foreground(t.TextMuted()). - Render(version.Version) - - return baseStyle. - Bold(true). - Render( - lipgloss.JoinHorizontal( - lipgloss.Left, - logo, - " ", - versionText, - ), - ) + return logo.Render(version.Version, true, logo.Opts{ + FieldColor: t.Accent(), + TitleColorA: t.Primary(), + TitleColorB: t.Secondary(), + CharmColor: t.Primary(), + VersionColor: t.Secondary(), + }) } func repo() string { diff --git a/internal/tui/styles/icons.go b/internal/tui/styles/icons.go index 87255ccd2801f662a2282b3dad237c36464f0781..59f43dca6d995255688268f7859bce774b49aad5 100644 --- a/internal/tui/styles/icons.go +++ b/internal/tui/styles/icons.go @@ -1,8 +1,6 @@ package styles const ( - OpenCodeIcon string = "⌬" - CheckIcon string = "✓" ErrorIcon string = "✖" WarningIcon string = "⚠"