Skip to content

feat: use set_suggested_prompts helper with agent_view #1549#94

Draft
mwbrooks wants to merge 1 commit into
mainfrom
mwbrooks-test-set-suggested-prompts
Draft

feat: use set_suggested_prompts helper with agent_view #1549#94
mwbrooks wants to merge 1 commit into
mainfrom
mwbrooks-test-set-suggested-prompts

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Jul 9, 2026

Copy link
Copy Markdown
Member

Warning

This PR currently ships a vendored bolt wheel. We must remove the vendored bolt (run /unvendor-bolt or the equivalent steps) once PR #1549 is merged and released to PyPI, then bump slack-bolt in all three requirements.txt files to the released version. Do not merge until then.

Summary

This pull request migrates all three sample apps from the raw client.assistant_threads_setSuggestedPrompts(...) Web API call to the Bolt context.set_suggested_prompts helper, to verify the fixes in slackapi/bolt-python#1549.

Changes:

  • Replaces client.assistant_threads_setSuggestedPrompts(...) with await context.set_suggested_prompts(...) (sync equivalent for openai-agents-sdk and pydantic-ai) in each listeners/events/app_home_opened.py
  • Updates the corresponding tests/test_app_home_opened.py in each sample to mock the injected helper on the fake context instead of the raw client method

Notes

Test Plan

  • pytest passes in all three samples (7/7 each)
  • ruff check . and ruff format --check . clean in all three samples
  • Manual E2E: for each sample, python3 app.py, open a DM, confirm the three suggested prompts render with title "How can I help you today?"
  • Manual E2E: click a suggested prompt, confirm agent reply
  • Manual E2E: send a plain DM message, confirm agent reply
  • After PR #1549 is released: swap vendored wheel for a versioned PyPI dependency and re-run all of the above

Vendors slack-bolt built from PR #1549 (commit 812f7c3) and migrates all
three sample apps from raw client.assistant_threads_setSuggestedPrompts
calls to the context.set_suggested_prompts helper.

The PR fixes two problems: (1) the helper's constructor required thread_ts,
which is None for top-level DMs under agent_view, and (2) the middleware
did not inject the helper for app_home_opened events. Both fixes are
exercised here — the samples now call the helper from app_home_opened
when tab == "messages".

Do not merge until PR #1549 is released to PyPI.
@mwbrooks mwbrooks changed the title test: verify set_suggested_prompts helper via bolt-python PR #1549 feat: use set_suggested_prompts helper with agent_view #1549 Jul 9, 2026
@mwbrooks mwbrooks self-assigned this Jul 9, 2026
@mwbrooks mwbrooks added the enhancement New feature or request label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant