Fix: startnewchat fill created_at
This commit is contained in:
@@ -211,8 +211,10 @@ func startNewChat(keepSysP bool) {
|
|||||||
chatBody.Messages = chatBody.Messages[:2]
|
chatBody.Messages = chatBody.Messages[:2]
|
||||||
textView.SetText(chatToText(chatBody.Messages, cfg.ShowSys))
|
textView.SetText(chatToText(chatBody.Messages, cfg.ShowSys))
|
||||||
newChat := &models.Chat{
|
newChat := &models.Chat{
|
||||||
ID: id + 1,
|
ID: id + 1,
|
||||||
Name: fmt.Sprintf("%d_%s", id+1, cfg.AssistantRole),
|
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)
|
// chat is written to db when we get first llm response (or any)
|
||||||
// actual chat history (messages) would be parsed then
|
// actual chat history (messages) would be parsed then
|
||||||
Msgs: "",
|
Msgs: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user