mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-29 12:09:31 +08:00
fix: failed to set right status in memory (#17472)
As title Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -886,6 +886,18 @@ func (s *MemoryService) AddMessage(ctx context.Context, currentUserID string, me
|
||||
return true, "All add to task.", nil
|
||||
}
|
||||
|
||||
func (s *MemoryService) saveAgentMessage(ctx context.Context, memoryIDs []string, msg MemoryMessage) (bool, string, error) {
|
||||
res, err := NewMemoryMessageService(s).QueueSaveToMemoryTask(ctx, splitFilterValues(memoryIDs), msg)
|
||||
if err != nil {
|
||||
return false, err.Error(), err
|
||||
}
|
||||
errorMsg := memorySaveErrorMessage(res)
|
||||
if errorMsg != "" {
|
||||
return false, errorMsg, nil
|
||||
}
|
||||
return true, "All add to task.", nil
|
||||
}
|
||||
|
||||
func missingRequestedMemoryIDs(requestedMemoryIDs, accessibleMemoryIDs []string) []string {
|
||||
if len(requestedMemoryIDs) == 0 {
|
||||
return []string{}
|
||||
|
||||
Reference in New Issue
Block a user