diff options
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) } |
