From 31ae4ceacfa579c73aa56def8b5690036f9c0bb5 Mon Sep 17 00:00:00 2001 From: moqsien Date: Thu, 26 Oct 2023 16:35:47 +0800 Subject: [PATCH] bugfix --- pkgs/tui/ui.go | 2 +- pkgs/tui/ui_conf.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tui/ui.go b/pkgs/tui/ui.go index f19f82c..870f241 100644 --- a/pkgs/tui/ui.go +++ b/pkgs/tui/ui.go @@ -62,6 +62,6 @@ func (that *GPTUI) Run() { that.Program = tea.NewProgram(that.GVM, tea.WithAltScreen()) } if _, err := that.Program.Run(); err != nil { - gprint.PrintError("%+v", err) + gprint.PrintError("Run bubbletea failed: %+v", err) } } diff --git a/pkgs/tui/ui_conf.go b/pkgs/tui/ui_conf.go index 4316bb4..63aff5a 100644 --- a/pkgs/tui/ui_conf.go +++ b/pkgs/tui/ui_conf.go @@ -219,7 +219,7 @@ func SetConfig(cfg *config.Config, values map[string]string) { cfg.Spark.APPKey = values[sparkApiKey] } if values[sparkApiSecrete] != "" { - cfg.Spark.APPSecrete = values[sparkApiKey] + cfg.Spark.APPSecrete = values[sparkApiSecrete] } if values[sparkMaxTokens] != "" { cfg.Spark.MaxTokens = gconv.Int64(values[sparkMaxTokens])