Skip to content

feat: accept assistant.threads.setStatus method arguments from the assistant class - #1371

Merged
zimeg merged 4 commits into
ai-appsfrom
zimeg-feat-assistant-set-status-arguments
Sep 29, 2025
Merged

feat: accept assistant.threads.setStatus method arguments from the assistant class#1371
zimeg merged 4 commits into
ai-appsfrom
zimeg-feat-assistant-set-status-arguments

Conversation

@zimeg

Copy link
Copy Markdown
Member

Summary

This PR accepts assistant.thread.setStatus method arguments from the Assistant class to support additional arguments.

Preview

The following is now supported when using the Assistant class:

@assistant.user_messagedefrespond_in_assistant_thread(
client: WebClient,
context: BoltContext,
logger: logging.Logger,
payload: dict,
say: Say,
set_status: SetStatus,
):
loading_messages= [
"Teaching the hamsters to type faster…",
"Untangling the internet cables…",
"Consulting the office goldfish…",
"Polishing up the response just for you…",
"Convincing the AI to stop overthinking…",
]
set_status(
status="Bolt is typing",
loading_messages=loading_messages,
)

Testing

Use the changes of this PR and this sample app: slack-samples/bolt-python-assistant-template#12 🏁

  • Planning to follow up soon with unit tests!

Notes

Hoping to align a similar implementation for bolt-js too: slackapi/bolt-js#2660 👾

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components

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.

@codecov

codecovBot commented Sep 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (ai-apps@973af99). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## ai-apps #1371 +/- ##
==========================================
Coverage ? 91.00% ==========================================
Files ? 222 Lines ? 7514 Branches ? 0 ==========================================
Hits ? 6838 Misses ? 676 Partials ? 0 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mwbrooksmwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking solid @zimeg! I'll test this out momentarily.

❓ Are you still planning to add some unit tests to this?

thread_ts=self.thread_ts,
status=status,
loading_messages=loading_messages,
**kwargs,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priaise: The **kwargs is a nice touch to add some future proofing for additional arguments. 🆗

@zimeg

Copy link
Copy Markdown
MemberAuthor

@mwbrooks I was hoping to've found tests sooner! Thank you for reviewing this so fast though 🎁 ✨

Let's mark this as a draft for now, but I will aim for soon follow up.

@zimeg
zimeg marked this pull request as draft September 24, 2025 19:23
@zimeg
zimeg marked this pull request as ready for review September 26, 2025 00:49
@zimeg
zimeg requested a review from mwbrooksSeptember 26, 2025 00:49

@mwbrooksmwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Beauty!

🧪 I've tested it with the sample app branch and things look good!

📚 Thanks for generating the docs! 🙇🏻

@zimeg

Copy link
Copy Markdown
MemberAuthor

@mwbrooks Thank you! Let's merge this for upcoming releases in more testing and similar 🚢 💨

@zimeg
zimeg merged commit c8f2d6e into ai-appsSep 29, 2025
14 checks passed
@zimeg
zimeg deleted the zimeg-feat-assistant-set-status-arguments branch September 29, 2025 21:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@zimeg@mwbrooks