summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/app
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-06-26 10:16:07 -0500
committerJay V <[email protected]>2025-06-26 17:21:53 -0400
commit2e26b58d160cc7cfc5c403cd63cbb30fad9fe8d0 (patch)
tree8adf56cd142dd6426bfa93aa8ed891d326f69231 /packages/tui/internal/app
parent31b56e5a05313fea9232bea4c9e90db00a2d23e7 (diff)
downloadopencode-2e26b58d160cc7cfc5c403cd63cbb30fad9fe8d0.tar.gz
opencode-2e26b58d160cc7cfc5c403cd63cbb30fad9fe8d0.zip
feat: default system theme (#419)
Co-authored-by: adamdottv <[email protected]>
Diffstat (limited to 'packages/tui/internal/app')
-rw-r--r--packages/tui/internal/app/app.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/tui/internal/app/app.go b/packages/tui/internal/app/app.go
index 4c156b68d..e8775921a 100644
--- a/packages/tui/internal/app/app.go
+++ b/packages/tui/internal/app/app.go
@@ -14,6 +14,7 @@ import (
"github.com/sst/opencode/internal/commands"
"github.com/sst/opencode/internal/components/toast"
"github.com/sst/opencode/internal/config"
+ "github.com/sst/opencode/internal/styles"
"github.com/sst/opencode/internal/theme"
"github.com/sst/opencode/internal/util"
"github.com/sst/opencode/pkg/client"
@@ -103,6 +104,12 @@ func New(
}
if appState.Theme != "" {
+ if appState.Theme == "system" && styles.Terminal != nil {
+ theme.UpdateSystemTheme(
+ styles.Terminal.Background,
+ styles.Terminal.BackgroundIsDark,
+ )
+ }
theme.SetTheme(appState.Theme)
}