mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
e10b1e1fd4
Add outbound media sending capability so the agent can publish media attachments (images, files, audio, video) through channels via the bus. - Add MediaPart and OutboundMediaMessage types to bus - Add PublishOutboundMedia/SubscribeOutboundMedia bus methods - Add MediaSender interface discovered via type assertion by Manager - Add media dispatch/worker in Manager with shared retry logic - Extend ToolResult with Media field and MediaResult constructor - Publish outbound media from agent loop on tool results - Implement SendMedia for Telegram, Discord, Slack, LINE, OneBot, WeCom
16 lines
419 B
Go
16 lines
419 B
Go
package channels
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sipeed/picoclaw/pkg/bus"
|
|
)
|
|
|
|
// MediaSender is an optional interface for channels that can send
|
|
// media attachments (images, files, audio, video).
|
|
// Manager discovers channels implementing this interface via type
|
|
// assertion and routes OutboundMediaMessage to them.
|
|
type MediaSender interface {
|
|
SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error
|
|
}
|