Skip to content

Instantly share code, notes, and snippets.

@larkintuckerllc
Created January 6, 2026 14:05
Show Gist options
  • Select an option

  • Save larkintuckerllc/7186d43bac67cafc65da48ee30d20a26 to your computer and use it in GitHub Desktop.

Select an option

Save larkintuckerllc/7186d43bac67cafc65da48ee30d20a26 to your computer and use it in GitHub Desktop.
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