feat: handle empty note

This commit is contained in:
Shivam Mishra
2025-07-16 10:28:57 +05:30
parent aedb59ea67
commit 2a0f2a8b1e
2 changed files with 306 additions and 0 deletions
@@ -6,6 +6,8 @@ class Captain::Tools::AddPrivateNoteTool < Captain::Tools::BasePublicTool
conversation = find_conversation(tool_context.state)
return 'Conversation not found' unless conversation
return 'Note content is required' if note.blank?
log_tool_usage('add_private_note', { conversation_id: conversation.id, note_length: note.length })
create_private_note(conversation, note)