diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-02-27 08:14:41 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-02-27 08:14:41 +0300 |
| commit | b599e1ab388b7ce306628333df3efae78027dce7 (patch) | |
| tree | f1180fc7085070a6bef73391f74d1d1ca2f829ee /helpfuncs.go | |
| parent | 0d947340904db30b3dce36f5ebd5230057da9f18 (diff) | |
Fix: startnewchat fill created_at
Diffstat (limited to 'helpfuncs.go')
| -rw-r--r-- | helpfuncs.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helpfuncs.go b/helpfuncs.go index 55b3353..356dd37 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -211,8 +211,10 @@ func startNewChat(keepSysP bool) { chatBody.Messages = chatBody.Messages[:2] textView.SetText(chatToText(chatBody.Messages, cfg.ShowSys)) newChat := &models.Chat{ - ID: id + 1, - Name: fmt.Sprintf("%d_%s", id+1, cfg.AssistantRole), + ID: id + 1, + Name: fmt.Sprintf("%d_%s", id+1, cfg.AssistantRole), + CreatedAt: time.Now(), + UpdatedAt: time.Now(), // chat is written to db when we get first llm response (or any) // actual chat history (messages) would be parsed then Msgs: "", |
