diff options
Diffstat (limited to 'helpfuncs.go')
| -rw-r--r-- | helpfuncs.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/helpfuncs.go b/helpfuncs.go index 73f8fb0..4a3719c 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -8,6 +8,7 @@ import ( "os" "path" "strings" + "time" "unicode" "math/rand/v2" @@ -111,10 +112,11 @@ func startNewChat() { chatBody.Messages = chatBody.Messages[:2] textView.SetText(chatToText(cfg.ShowSys)) newChat := &models.Chat{ - ID: id + 1, - Name: fmt.Sprintf("%d_%s", id+1, cfg.AssistantRole), - Msgs: string(defaultStarterBytes), - Agent: cfg.AssistantRole, + ID: id + 1, + Name: fmt.Sprintf("%d_%s", id+1, cfg.AssistantRole), + Msgs: string(defaultStarterBytes), + Agent: cfg.AssistantRole, + CreatedAt: time.Now(), } activeChatName = newChat.Name chatMap[newChat.Name] = newChat |
