Feat: save room even if llm failed to properly guess; fix prompt

This commit is contained in:
Grail Finder
2025-06-26 11:36:27 +03:00
parent 661a320fb5
commit 12fe92b261
7 changed files with 134 additions and 117 deletions

View File

@ -79,11 +79,11 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
return
}
http.SetCookie(w, cookie)
tmpl, err := template.ParseGlob("components/*.html")
if err != nil {
abortWithError(w, err.Error())
return
}
// tmpl, err := template.ParseGlob("components/*.html")
// if err != nil {
// abortWithError(w, err.Error())
// return
// }
// check if that user was already in db
userstate, err := loadState(cleanName)
if err != nil || userstate == nil {
@ -120,9 +120,10 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
return
}
}
if err := tmpl.ExecuteTemplate(w, "base", fi); err != nil {
log.Error("failed to execute base template", "error", err)
}
// if err := tmpl.ExecuteTemplate(w, "base", fi); err != nil {
// log.Error("failed to execute base template", "error", err)
// }
http.Redirect(w, r, "/", 302)
}
func makeCookie(username string, remote string) (*http.Cookie, error) {