feat: widen set_suggested_prompts initialization scope to any DM#1549
Draft
WilliamBergamin wants to merge 10 commits into
Draft
feat: widen set_suggested_prompts initialization scope to any DM#1549WilliamBergamin wants to merge 10 commits into
WilliamBergamin wants to merge 10 commits into
Conversation
The characterization tests for the pre-existing assistant predicates, and the shared scenario fixture improvements, were moved to a separate branch (PR #1548) so they can land on main first as a regression net. This branch now keeps only the tests for behavior it introduces: the new is_message_event, is_any_im_message_event, and is_im_message_event predicates. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Reunites this branch with PR #1548 (assistant predicate characterization tests + shared scenario fixtures), which was split out to land on main first. Resolved the add/add conflict in test_payload_utils.py by taking the union: this branch's new-behavior tests (is_message_event, is_any_im_message_event, is_im_message_event) plus the assistant-predicate characterization tests from #1548. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Move set_title construction into AssistantUtilities as a property and attach it from the assistant-event branch of AttachingConversationKwargs (sync and async). Previously set_title was attached to any IM message event that had a thread_ts; it is now assistant-thread-only, matching say/get_thread_context/save_thread_context. set_suggested_prompts remains available for any DM to the app. AssistantUtilities now derives channel_id/thread_ts directly from the payload: from the assistant_thread property for assistant_* events (via the new has_channel_id_and_thread_ts helper in internals.py) and from channel/thread_ts for message events, instead of reading them off the BoltContext. Also simplify the assistant-thread message predicates in payload_utils, since is_im_message_event / is_any_im_message_event already imply is_event. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1549 +/- ##
==========================================
+ Coverage 91.44% 91.54% +0.09%
==========================================
Files 228 228
Lines 7285 7285
==========================================
+ Hits 6662 6669 +7
+ Misses 623 616 -7 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Widens the initialization scope of
set_suggested_promptsso it is available for any DM to the app, not just within assistant threads.Testing
TBD
Run the full suite:
Category
slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapter/docsRequirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.shafter making the changes.