# Pull Request Template ## Description Adds a new built-in tool that allows Captain scenarios to resolve conversations programmatically. This enables automated workflows like the misdirected contact deflector to close conversations after handling them, while still allowing human review via label filtering. ## Type of change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. tested by mentioning it to be used in captain v2 scenario <img width="1180" height="828" alt="image" src="https://github.com/user-attachments/assets/e70baf96-0c70-407e-af2c-328500ac5434" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tanmay Deep Sharma <32020192+tds-1@users.noreply.github.com>
18 lines
439 B
Ruby
18 lines
439 B
Ruby
module Current
|
|
thread_mattr_accessor :user
|
|
thread_mattr_accessor :account
|
|
thread_mattr_accessor :account_user
|
|
thread_mattr_accessor :executed_by
|
|
thread_mattr_accessor :contact
|
|
thread_mattr_accessor :captain_resolve_reason
|
|
|
|
def self.reset
|
|
Current.user = nil
|
|
Current.account = nil
|
|
Current.account_user = nil
|
|
Current.executed_by = nil
|
|
Current.contact = nil
|
|
Current.captain_resolve_reason = nil
|
|
end
|
|
end
|