mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-25 17:18:11 +00:00
Images and files posted in a Slack thread before the bot joins were invisible to the agent: _fetch_thread_context renders text only, and a caption-less image post was dropped from context entirely (empty text → skip). "@bot what do you think of the chart above?" read as a question about nothing. _render_message_text now appends a compact, sanitized marker per file attachment — [image: chart.png], [video: demo.mp4], [audio: note.m4a], [file: report.pdf (application/pdf)] — so the agent can SEE that prior thread messages carried attachments and ask for a re-share when it needs the bytes. Filenames are stripped of newlines/brackets so a hostile name can't fake context structure. Because both thread-context formatting and parent-text rendering go through _render_message_text, markers appear on the cold-start hydrate, the explicit-mention delta refresh, restart rehydration, and reply_to_text. Reapplied from #32315 onto the current adapter (original patched the pre-plugin gateway/platforms/slack.py, moved in the plugin migration; annotation labels reworked to per-file typed markers, download side handled separately). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| block_kit.py | ||
| plugin.yaml | ||