Add Discord attachment reading and web search capabilities
- Discord channel now downloads and extracts text from attachments (text files, PDFs) - Added WebSearchTool using DuckDuckGo for researcher and coder agents - Improved WebFetchTool with User-Agent header and HTML-to-text stripping - Added pypdf and duckduckgo-search dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,15 @@ class Orchestrator:
|
||||
return f"Error: Agent '{agent_name}' not found"
|
||||
|
||||
content = self.router.strip_mention(msg.content) if msg.content.startswith("@") else msg.content
|
||||
|
||||
# Prepend attachment content so the LLM can see it
|
||||
if msg.attachments:
|
||||
parts: list[str] = []
|
||||
for att in msg.attachments:
|
||||
parts.append(f"[Attached file: {att.filename}]\n{att.content}")
|
||||
parts.append(content)
|
||||
content = "\n\n".join(parts)
|
||||
|
||||
logger.info(f"[{agent_name}] Processing: {content[:80]}")
|
||||
return await engine.run(content)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user