+7
-2
bsky.py
+7
-2
bsky.py
···
675
675
if message.name == 'add_post_to_bluesky_reply_thread':
676
676
tool_call_results[message.tool_call_id] = message.status
677
677
logger.debug(f"Tool result: {message.tool_call_id} -> {message.status}")
678
+
elif message.name == 'flag_archival_memory_for_deletion':
679
+
tool_call_results[message.tool_call_id] = message.status
680
+
logger.debug(f"Tool result: {message.tool_call_id} -> {message.status}")
678
681
elif message.name == 'ignore_notification':
679
682
# Check if the tool was successful
680
683
if hasattr(message, 'tool_return') and message.status == 'success':
···
776
779
memory_text = args.get('memory_text', '')
777
780
confirm = args.get('confirm', False)
778
781
779
-
# Only flag for deletion if confirmed
780
-
if confirm and memory_text:
782
+
# Only flag for deletion if confirmed and has all required fields
783
+
if confirm and memory_text and reason:
781
784
flagged_memories.append({
782
785
'reason': reason,
783
786
'memory_text': memory_text
···
785
788
logger.debug(f"Found memory flagged for deletion (reason: {reason}): {memory_text[:50]}...")
786
789
elif not confirm:
787
790
logger.debug(f"Memory deletion not confirmed, skipping: {memory_text[:50]}...")
791
+
elif not reason:
792
+
logger.warning(f"Memory deletion missing reason, skipping: {memory_text[:50]}...")
788
793
except json.JSONDecodeError as e:
789
794
logger.error(f"Failed to parse flag_archival_memory_for_deletion arguments: {e}")
790
795