Skip to content

Conversation

srtaalej
Copy link
Contributor

Type of change (place an x in the [ ] that applies)

  • New sample
  • New feature
  • Bug fix
  • Documentation

Summary

Enables Assistant class features while keeping the other options for messaging available. Updates the README to highlight assistant implementation in listeners/assistant.

Requirements (place an x in each [ ] that applies)

  • I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@srtaalej srtaalej requested a review from zimeg September 17, 2025 19:00
@srtaalej srtaalej self-assigned this Sep 17, 2025
@srtaalej srtaalej added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 17, 2025
@srtaalej srtaalej requested a review from mwbrooks September 17, 2025 19:06
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

🔭 @srtaalej This is a solid start but request quick changes since I'm not finding the assistant class is used in testing when conversing in the assistant "pane"?

Will soon continue the review but wanted to share this first!

@srtaalej srtaalej requested a review from zimeg September 18, 2025 20:03
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@srtaalej This is looking great! I left one more comment in request of some changes, but am thinking the assistant class implementation is solid 👾 ✨

manifest.json Outdated
Comment on lines 102 to 103
"assistant_thread_started",
"assistant_thread_context_changed"
Copy link
Member

Choose a reason for hiding this comment

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

👁️‍🗨️ Nit: Can these be moved to alphabetical order for fast inspection later?

channel=channel_id,
ts=waiting_message["ts"],
text=f"Received an error from Bolty:\n{e}",
text=f":warning: Received an error from Bolty:\n{e}",
Copy link
Member

Choose a reason for hiding this comment

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

⭐ praise: This was helpful for me in testing just now!

if e.response["error"] == "not_in_channel":
# If this app's bot user is not in the public channel,
# we'll try joining the channel and then calling the same API again
client.conversations_join(channel=referred_channel_id)
Copy link
Member

Choose a reason for hiding this comment

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

🤖 suggestion: The channels:join scope is required to use this method and might be good to include in the app manifest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catching this!

# Initialization
app = App(token=os.environ.get("SLACK_BOT_TOKEN"))

logging.basicConfig(level=logging.DEBUG)
Copy link
Member

Choose a reason for hiding this comment

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

🤔 question: I notice debug logs aren't appearing for me... Does the ordering of logger initialization matter for this?

🗣️ thought: We might hold off on such changes for another PR but this diff caught my eye for now-

Comment on lines +25 to +38
prompts: List[Dict[str, str]] = [
{
"title": "What does Slack stand for?",
"message": "Slack, a business communication service, was named after an acronym. Can you guess what it stands for?",
},
{
"title": "Write a draft announcement",
"message": "Can you write a draft announcement about a new feature my team just released? It must include how impactful it is.",
},
{
"title": "Suggest names for my Slack app",
"message": "Can you suggest a few names for my Slack app? The app helps my teammates better organize information and plan priorities and action items.",
},
]
Copy link
Member

Choose a reason for hiding this comment

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

⭐ praise: Nice alignment with the assistant template - it makes me wonder if we wonder how maintenance and updates of both projects might continue going forward...

🔗 https://github.com/slack-samples/bolt-python-assistant-template/blob/7af3ee1ea8863f1b50e8b98a89f5791d2828ee5b/listeners/assistant.py#L25-L38

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants