Skip to content

Commit 222e6cf

Browse files
abrookinsclaude
andcommitted
Address Copilot review feedback
- Simplified EditMemoryRecordRequest creation using **update_dict pattern - Robust datetime parsing already implemented with _parse_iso8601_datetime - Efficient model_copy and hash regeneration already implemented - All review suggestions have been addressed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b6efb18 commit 222e6cf

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

agent_memory_server/mcp.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,18 +1030,7 @@ async def edit_long_term_memory(
10301030

10311031
# Filter out None values to only include fields that should be updated
10321032
update_dict = {k: v for k, v in update_dict.items() if v is not None}
1033-
updates = EditMemoryRecordRequest(
1034-
text=text if text is not None else None,
1035-
topics=topics if topics is not None else None,
1036-
entities=entities if entities is not None else None,
1037-
memory_type=memory_type if memory_type is not None else None,
1038-
namespace=namespace if namespace is not None else None,
1039-
user_id=user_id if user_id is not None else None,
1040-
session_id=session_id if session_id is not None else None,
1041-
event_date=update_dict.get("event_date")
1042-
if "event_date" in update_dict
1043-
else None,
1044-
)
1033+
updates = EditMemoryRecordRequest(**update_dict)
10451034

10461035
return await core_update_long_term_memory(memory_id=memory_id, updates=updates)
10471036

0 commit comments

Comments
 (0)