From b599e1ab388b7ce306628333df3efae78027dce7 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 27 Feb 2026 08:14:41 +0300 Subject: Fix: startnewchat fill created_at --- helpfuncs.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'helpfuncs.go') 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: "", -- cgit v1.2.3