diff options
| author | Dax Raad <[email protected]> | 2025-06-18 22:59:42 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-18 23:01:19 -0400 |
| commit | bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9 (patch) | |
| tree | 1e630283bb595c6e1f8ce21d83ae8ba99f24e51a /packages/tui/internal/app | |
| parent | e5e9b3e3c04df00db57d573d3cc0a029736184b1 (diff) | |
| download | opencode-bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9.tar.gz opencode-bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9.zip | |
BREAKING CONFIG CHANGE
We have changed the config format yet again - but this should be the
final time. You can see the readme for more details but the summary is
- got rid of global providers config
- got rid of global toml
- global config is now in `~/.config/opencode/config.json`
- it will be merged with any project level config
Diffstat (limited to 'packages/tui/internal/app')
| -rw-r--r-- | packages/tui/internal/app/app.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/tui/internal/app/app.go b/packages/tui/internal/app/app.go index eb4bd2dad..72e6ad5eb 100644 --- a/packages/tui/internal/app/app.go +++ b/packages/tui/internal/app/app.go @@ -5,6 +5,7 @@ import ( "fmt" "path/filepath" "sort" + "strings" "log/slog" @@ -61,8 +62,10 @@ func New( } configInfo := configResponse.JSON200 if configInfo.Keybinds == nil { - keybinds := make(map[string]string) - keybinds["leader"] = "ctrl+x" + leader := "ctrl+x" + keybinds := client.ConfigKeybinds{ + Leader: &leader, + } configInfo.Keybinds = &keybinds } @@ -76,6 +79,12 @@ func New( if configInfo.Theme != nil { appState.Theme = *configInfo.Theme } + if configInfo.Model != nil { + splits := strings.Split(*configInfo.Model, "/") + appState.Provider = splits[0] + appState.Model = strings.Join(splits[1:], "/") + } + if appState.Theme != "" { theme.SetTheme(appState.Theme) } |
