diff --git a/enterprise/app/services/captain/tools/react_to_message_tool.rb b/enterprise/app/services/captain/tools/react_to_message_tool.rb index c2a1dda..8cfd40e 100644 --- a/enterprise/app/services/captain/tools/react_to_message_tool.rb +++ b/enterprise/app/services/captain/tools/react_to_message_tool.rb @@ -14,7 +14,8 @@ module Captain super(assistant, user: user) end - def execute(emoji:) + def execute(args = {}) + emoji = args[:emoji] || args['emoji'] return error_response('Conversation not found') unless @conversation.present? return error_response('Emoji is required') if emoji.blank? diff --git a/enterprise/lib/captain/tools/add_contact_note_tool.rb b/enterprise/lib/captain/tools/add_contact_note_tool.rb index e1475ab..7a74d21 100755 --- a/enterprise/lib/captain/tools/add_contact_note_tool.rb +++ b/enterprise/lib/captain/tools/add_contact_note_tool.rb @@ -2,7 +2,8 @@ class Captain::Tools::AddContactNoteTool < Captain::Tools::BasePublicTool description 'Add a note to a contact profile' param :note, type: 'string', desc: 'The note content to add to the contact' - def perform(tool_context, note:) + def perform(tool_context, args = {}) + note = args[:note] || args['note'] contact = find_contact(tool_context.state) return 'Contact not found' unless contact diff --git a/enterprise/lib/captain/tools/add_label_to_conversation_tool.rb b/enterprise/lib/captain/tools/add_label_to_conversation_tool.rb index 429f33b..07f0a7a 100755 --- a/enterprise/lib/captain/tools/add_label_to_conversation_tool.rb +++ b/enterprise/lib/captain/tools/add_label_to_conversation_tool.rb @@ -2,7 +2,8 @@ class Captain::Tools::AddLabelToConversationTool < Captain::Tools::BasePublicToo description 'Add a label to a conversation' param :label_name, type: 'string', desc: 'The name of the label to add' - def perform(tool_context, label_name:) + def perform(tool_context, args = {}) + label_name = args[:label_name] || args['label_name'] conversation = find_conversation(tool_context.state) return 'Conversation not found' unless conversation diff --git a/enterprise/lib/captain/tools/add_private_note_tool.rb b/enterprise/lib/captain/tools/add_private_note_tool.rb index 36e1ef9..4281def 100755 --- a/enterprise/lib/captain/tools/add_private_note_tool.rb +++ b/enterprise/lib/captain/tools/add_private_note_tool.rb @@ -2,7 +2,8 @@ class Captain::Tools::AddPrivateNoteTool < Captain::Tools::BasePublicTool description 'Add a private note to a conversation' param :note, type: 'string', desc: 'The private note content' - def perform(tool_context, note:) + def perform(tool_context, args = {}) + note = args[:note] || args['note'] conversation = find_conversation(tool_context.state) return 'Conversation not found' unless conversation diff --git a/enterprise/lib/captain/tools/update_priority_tool.rb b/enterprise/lib/captain/tools/update_priority_tool.rb index 1196911..dc0c752 100755 --- a/enterprise/lib/captain/tools/update_priority_tool.rb +++ b/enterprise/lib/captain/tools/update_priority_tool.rb @@ -2,7 +2,8 @@ class Captain::Tools::UpdatePriorityTool < Captain::Tools::BasePublicTool description 'Update the priority of a conversation' param :priority, type: 'string', desc: 'The priority level: low, medium, high, urgent, or nil to remove priority' - def perform(tool_context, priority:) + def perform(tool_context, args = {}) + priority = args[:priority] || args['priority'] @conversation = find_conversation(tool_context.state) return 'Conversation not found' unless @conversation