chore: refactoring status updates

This commit is contained in:
adamdottv 2025-05-08 12:03:59 -05:00
commit f41b7bbd0a
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
24 changed files with 366 additions and 264 deletions

View file

@ -4,6 +4,7 @@ import (
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/opencode-ai/opencode/internal/status"
"github.com/opencode-ai/opencode/internal/tui/layout"
"github.com/opencode-ai/opencode/internal/tui/styles"
"github.com/opencode-ai/opencode/internal/tui/theme"
@ -106,7 +107,8 @@ func (t *themeDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return t, util.CmdHandler(CloseThemeDialogMsg{})
}
if err := theme.SetTheme(selectedTheme); err != nil {
return t, util.ReportError(err)
status.Error(err.Error())
return t, nil
}
return t, util.CmdHandler(ThemeChangedMsg{
ThemeName: selectedTheme,
@ -195,4 +197,3 @@ func NewThemeDialogCmp() ThemeDialog {
currentTheme: "",
}
}