feat(tui): theme override with OPENCODE_THEME

This commit is contained in:
adamelmore 2025-07-21 08:56:45 -05:00
commit bb17d14665
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 5 additions and 2 deletions

View file

@ -3,6 +3,7 @@ package app
import (
"context"
"fmt"
"os"
"path/filepath"
"sort"
"strings"
@ -103,6 +104,10 @@ func New(
if configInfo.Theme != "" {
appState.Theme = configInfo.Theme
}
themeEnv := os.Getenv("OPENCODE_THEME")
if themeEnv != "" {
appState.Theme = themeEnv
}
var modeIndex int
var mode *opencode.Mode