feat: remove executed by

This commit is contained in:
Shivam Mishra
2025-10-27 14:00:56 +05:30
parent f77f74ea3c
commit 5366469044
@@ -24,8 +24,6 @@ class Captain::Tools::HandoffTool < Captain::Tools::BasePublicTool
private
def trigger_handoff(conversation, reason)
Current.executed_by = @assistant
# post the reason as a private note
conversation.messages.create!(
message_type: :outgoing,
@@ -36,10 +34,7 @@ class Captain::Tools::HandoffTool < Captain::Tools::BasePublicTool
content: reason
)
# Trigger the bot handoff (sets status to open + dispatches events)
conversation.bot_handoff!
ensure
Current.executed_by = nil
end
# TODO: Future enhancement - Add team assignment capability