on main help sign in
feat(ui): switch to hyper theme when provider hyper is chosen
commita4488ca06a3e0f7427fc2979b54aeb3877272e72 authorChristian Rocha <christian@rocha.is> dateMon 27 Apr 2026, 14:32 (6 months ago) parent9d4653e
3 files changed+10−3
internal/ui/common/common.go+6 internal/ui/model/header.go+1−1 internal/ui/model/ui.go+3−2
internal/ui/common/common.go+6
@@ -55,6 +55,12 @@ func largeModelProviderID(ws workspace.Workspace) string {
5555 return cfg.Models[config.SelectedModelTypeLarge].Provider
5656}
5757
58+// IsHyper reports whether the currently selected large model is provided
59+// by Hyper.
60+func (c *Common) IsHyper() bool {
61+ return largeModelProviderID(c.Workspace) == "hyper"
62+}
63+
5864// CenterRect returns a new [Rectangle] centered within the given area with the
5965// specified width and height.
6066func CenterRect(area uv.Rectangle, width, height int) uv.Rectangle {
internal/ui/model/header.go+1−1
@@ -63,7 +63,7 @@ func (h *header) drawHeader(
6363) {
6464 t := h.com.Styles
6565 if width != h.width || compact != h.compact {
66− h.logo = renderLogo(h.com.Styles, compact, width)
66+ h.logo = renderLogo(h.com.Styles, compact, h.com.IsHyper(), width)
6767 }
6868
6969 h.width = width
internal/ui/model/ui.go+3−2
@@ -2984,7 +2984,7 @@ func (m *UI) renderEditorView(width int) string {
29842984
29852985// cacheSidebarLogo renders and caches the sidebar logo at the specified width.
29862986func (m *UI) cacheSidebarLogo(width int) {
2987− m.sidebarLogo = renderLogo(m.com.Styles, true, width)
2987+ m.sidebarLogo = renderLogo(m.com.Styles, true, m.com.IsHyper(), width)
29882988}
29892989
29902990// applyTheme replaces the active styles with the given theme and
@@ -3691,7 +3691,7 @@ func (m *UI) disableDockerMCP() tea.Msg {
36913691}
36923692
36933693// renderLogo renders the Crush logo with the given styles and dimensions.
3694−func renderLogo(t *styles.Styles, compact bool, width int) string {
3694+func renderLogo(t *styles.Styles, compact, hyper bool, width int) string {
36953695 return logo.Render(t.Logo.GradCanvas, version.Version, compact, logo.Opts{
36963696 FieldColor: t.Logo.FieldColor,
36973697 TitleColorA: t.Logo.TitleColorA,
@@ -3699,5 +3699,6 @@ func renderLogo(t *styles.Styles, compact bool, width int) string {
36993699 CharmColor: t.Logo.CharmColor,
37003700 VersionColor: t.Logo.VersionColor,
37013701 Width: width,
3702+ Hyper: hyper,
37023703 })
37033704}