Created
January 6, 2026 14:05
-
-
Save larkintuckerllc/7186d43bac67cafc65da48ee30d20a26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index b4970c5..2cca6b4 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -11,15 +11,17 @@ def handle_agent_command(ack, command, client, respond): | |
| ack() | |
| channel_id = command["channel_id"] | |
| prompt = command.get("text", "") | |
| - message = f"Working on the prompt... {prompt}" | |
| + message = f"Prompt: {prompt}" | |
| try: | |
| - client.chat_postMessage(channel=channel_id, text=message) | |
| + result = client.chat_postMessage(channel=channel_id, text=message) | |
| + client.chat_postMessage(channel=channel_id, thread_ts=result["ts"], text="Thinking...") | |
| except SlackApiError as e: | |
| error = e.response["error"] | |
| if error == "not_in_channel": | |
| try: | |
| client.conversations_join(channel=channel_id) | |
| - client.chat_postMessage(channel=channel_id, text=message) | |
| + result = client.chat_postMessage(channel=channel_id, text=message) | |
| + client.chat_postMessage(channel=channel_id, thread_ts=result["ts"], text="Thinking...") | |
| except SlackApiError as join_error: | |
| respond(f"Something went wrong: {join_error.response['error']}") | |
| elif error == "channel_not_found": |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment