Skip to content

feat: widen set_suggested_prompts initialization scope to any DM#1549

Draft
WilliamBergamin wants to merge 10 commits into
mainfrom
update-set-suggested-prompts-init
Draft

feat: widen set_suggested_prompts initialization scope to any DM#1549
WilliamBergamin wants to merge 10 commits into
mainfrom
update-set-suggested-prompts-init

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Widens the initialization scope of set_suggested_prompts so it is available for any DM to the app, not just within assistant threads.

Testing

TBD

Run the full suite:

./scripts/install_all_and_run_tests.sh

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

WilliamBergamin and others added 7 commits July 2, 2026 17:46
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

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.54%. Comparing base (8fbd503) to head (812f7c3).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant