feat: add multimodal media pipeline for image support across all providers and channels
Widen Message.content from string to string | MessageContentPart[] to support multimodal content. Add Attachment type to channel layer, media conversion utilities, and image extraction to all channel adapters (Telegram, Discord, Slack, WhatsApp). Update all model clients (Anthropic, OpenAI, Gemini, Bedrock) to convert structured content to provider-specific formats. Fix downstream consumers (tokens, compaction, TUI, local models) to handle the widened type via getMessageText() helper.
This commit is contained in:
+1
-1
@@ -348,7 +348,7 @@ function createMessageRouter(deps: {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await agent.process(msg.text);
|
||||
const response = await agent.process(msg.text, msg.attachments);
|
||||
await reply({ text: response, replyTo: msg.id });
|
||||
} catch (error) {
|
||||
console.error(`Error processing message from ${msg.channel}:${msg.senderId}:`, error);
|
||||
|
||||
Reference in New Issue
Block a user