File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package chat
22
33import (
44 "context"
5+ "time"
6+
57 "paperdebugger/internal/api/mapper"
68 "paperdebugger/internal/libs/contextutil"
79 "paperdebugger/internal/libs/shared"
@@ -193,6 +195,7 @@ func (s *ChatServerV2) appendConversationMessage(
193195 // Append to the active branch
194196 activeBranch .InappChatHistory = append (activeBranch .InappChatHistory , bsonMsg )
195197 activeBranch .OpenaiChatHistoryCompletion = append (activeBranch .OpenaiChatHistoryCompletion , userOaiMsg )
198+ activeBranch .UpdatedAt = bson .NewDateTimeFromTime (time .Now ())
196199
197200 if err := s .chatServiceV2 .UpdateConversationV2 (conversation ); err != nil {
198201 return nil , nil , err
@@ -332,6 +335,7 @@ func (s *ChatServerV2) CreateConversationMessageStream(
332335 }
333336 activeBranch .InappChatHistory = append (activeBranch .InappChatHistory , bsonMessages ... )
334337 activeBranch .OpenaiChatHistoryCompletion = openaiChatHistory
338+ activeBranch .UpdatedAt = bson .NewDateTimeFromTime (time .Now ())
335339 if err := s .chatServiceV2 .UpdateConversationV2 (conversation ); err != nil {
336340 return s .sendStreamError (stream , err )
337341 }
You can’t perform that action at this time.
0 commit comments