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:
Haruko386
2026-07-28 19:13:22 +08:00
committed by GitHub
parent 7f21a7ba18
commit 4885dda32a
8 changed files with 161 additions and 33 deletions

View File

@@ -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{}