From bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 18 Jun 2025 22:59:42 -0400 Subject: 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 --- packages/tui/internal/app/app.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'packages/tui/internal/app') 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) } -- cgit v1.2.3