Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 3, 2026

Summary

Improve Addie's understanding of Slack messages beyond plain text:

  • Forwarded messages: Extract content from attachments array when users forward messages
  • Reaction confirmations: Thumbs up/check on "should I proceed?" = yes; thumbs down/X = no
  • File share awareness: See file metadata (name, type, size, link) when users share files
  • URL fetching: New fetch_url tool reads web content from URLs shared in messages
  • Slack file reading: New read_slack_file tool downloads and reads text files from Slack

Changes

  • Add extractForwardedContent() to pull text from forwarded message attachments
  • Add extractFileInfo() to extract metadata from shared files
  • Add extractUrls() helper for URL detection in messages
  • Add handleReactionAdded() event handler for emoji reactions on Addie's messages
  • Define POSITIVE_REACTIONS and NEGATIVE_REACTIONS sets for confirmation detection
  • Update handleDirectMessage and handleAppMention to use new extractors
  • Update type guards in handleChannelMessage to allow file-only messages
  • New file: server/src/addie/mcp/url-tools.ts with URL/file fetching tools

Test plan

  • Forward a message to a channel and @mention Addie asking about it
  • Forward a message in a DM to Addie
  • Share a file and @mention Addie asking about it
  • Have Addie ask "should I proceed?" and react with 👍 - should proceed
  • Have Addie ask "should I proceed?" and react with 👎 - should not proceed
  • React with 👍 on a non-confirmation message - should record as feedback only
  • Share a URL and ask Addie "what is this link about?" - should fetch and summarize
  • Share a text file and ask Addie to read it - should use read_slack_file

🤖 Generated with Claude Code

bokelley and others added 3 commits January 2, 2026 19:55
When users forward messages in Slack (via channel @mention or DM), the
forwarded content is in the `attachments` array, not the `text` field.
This caused Addie to miss the forwarded content entirely.

Changes:
- Add `extractForwardedContent()` helper to extract text from attachments
- Apply extraction in `handleAppMention` for channel @mentions
- Apply extraction in `handleDirectMessage` for DMs
- Update type guard in `handleChannelMessage` to allow DMs with attachments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Reaction confirmations: When users react to Addie's messages with
  thumbs up/check, treat as "yes, proceed". Thumbs down/X means no.
  Non-confirmation reactions are recorded as feedback.

- File share awareness: Extract file metadata (name, type, size, link)
  from file_share messages so Addie knows what files were shared.

- URL extraction: Helper function to extract URLs from Slack messages
  for future link-following capability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New tools for Addie:
- fetch_url: Fetch and read content from web URLs shared in messages
  - Extracts text from HTML
  - Supports text/html/markdown extraction modes
  - Handles timeouts and size limits
  - Blocks localhost and local IPs

- read_slack_file: Download and read files shared in Slack
  - Uses bot token for authentication
  - Supports text-based files (txt, md, json, code files, etc.)
  - Gracefully handles PDFs and images (acknowledges but can't read)
  - Enforces size limits

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit 48605ec into main Jan 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants