fix(brain): map score and source fields from API response

DirectSubsystem now includes Qdrant similarity score as confidence
and source field as a tag in recall results.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-15 07:48:07 +00:00
parent b0cbd21741
commit 53a4902505

View file

@ -172,6 +172,12 @@ func (s *DirectSubsystem) recall(ctx context.Context, _ *mcp.CallToolRequest, in
if id, ok := mm["id"].(string); ok {
mem.ID = id
}
if score, ok := mm["score"].(float64); ok {
mem.Confidence = score
}
if source, ok := mm["source"].(string); ok {
mem.Tags = append(mem.Tags, "source:"+source)
}
memories = append(memories, mem)
}
}