feat: use bolt context when possible#29
Conversation
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin Super amazing changes! 📠
I left small suggestions that'd be curious to mirror across files but no blocker if the agentic applications aren't running 🚢 💨
There was a problem hiding this comment.
🌟 praise: This is a significant improvement for standard findings across requests. I am finding we have a quick note on this here:
| async def handle_app_home_opened( | ||
| client: AsyncWebClient, context: AsyncBoltContext, logger: Logger | ||
| ): |
There was a problem hiding this comment.
| async def handle_app_home_opened( | |
| client: AsyncWebClient, context: AsyncBoltContext, logger: Logger | |
| ): | |
| async def handle_app_home_opened( | |
| client: AsyncWebClient, | |
| context: AsyncBoltContext, | |
| logger: Logger, | |
| ): |
🧮 suggestion: To make reading down fastest!
There was a problem hiding this comment.
I like this suggestion 💯 But I think we might need to do this in another PR since this is fighting against the formatter slightly, we might want to make this a claude guideline 🤔
| channel_id = context.channel_id | ||
| team_id = context.team_id | ||
| text = event.get("text", "") | ||
| thread_ts = event.get("thread_ts") or event["ts"] |
There was a problem hiding this comment.
🔭 thought: I'm curious if you have thoughts ahead to this change too?
There was a problem hiding this comment.
Yess definitely aim to change this once context.thread_ts works for any payload 🙏
| def handle_feedback( | ||
| ack: Ack, body: dict, client: WebClient, context: BoltContext, logger: Logger | ||
| ): |
There was a problem hiding this comment.
| def handle_feedback( | |
| ack: Ack, body: dict, client: WebClient, context: BoltContext, logger: Logger | |
| ): | |
| def handle_feedback( | |
| ack: Ack, | |
| body: dict, | |
| client: WebClient, | |
| context: BoltContext, | |
| logger: Logger, | |
| ): |
🪵 suggestion: While we're making a change here?
|
🗣️ ramble: Forgive me if this should be a |
Type of change
Summary
These changes make casey use the
BoltContextto extract values liketeam_identerprise_iduser_id. This aims to make casey more reliable by reusing the same references Bolt uses internallyRequirements