feat: the workspace at /workspace; Настройки show the assistant's model as set, key included, and PostgreSQL's fields only when chosen, its two buttons on one line; pages come in softly
This commit is contained in:
1 parent
352b016384
commit
6db78399ac
10 files changed
+48
-24
No files matched your search
@@ -518,12 +518,8 @@ func (s *Server) handleSetAI(w http.ResponseWriter, r *http.Request) {
|
||||
_ = s.db.SetConfig(cfgAIType, typ)
|
||||
_ = s.db.SetConfig(cfgAIURL, strings.TrimSpace(r.FormValue("ai_url")))
|
||||
_ = s.db.SetConfig(cfgAIModel, strings.TrimSpace(r.FormValue("ai_model")))
|
||||
if k := strings.TrimSpace(r.FormValue("ai_key")); k != "" {
|
||||
_ = s.db.SetConfig(cfgAIKey, k)
|
||||
}
|
||||
if r.FormValue("ai_key_clear") == "1" {
|
||||
_ = s.db.SetConfig(cfgAIKey, "")
|
||||
}
|
||||
// The field shows the key there; what it holds is the key (empty: none).
|
||||
_ = s.db.SetConfig(cfgAIKey, strings.TrimSpace(r.FormValue("ai_key")))
|
||||
http.Redirect(w, r, "/settings#ai", http.StatusSeeOther)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user