mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
931093c19d
Add bus.Peer struct and explicit Peer/MessageID fields to InboundMessage,
replacing the implicit peer_kind/peer_id/message_id metadata convention.
- Add Peer{Kind, ID} type to pkg/bus/types.go
- Extend InboundMessage with Peer and MessageID fields
- Change BaseChannel.HandleMessage signature to accept peer and messageID
- Adapt all 12 channel implementations to pass structured peer/messageID
- Simplify agent extractPeer() to read msg.Peer directly
- extractParentPeer unchanged (parent_peer still via metadata)
40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
//go:build !amd64 && !arm64 && !riscv64 && !mips64 && !ppc64
|
|
|
|
package feishu
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/sipeed/picoclaw/pkg/bus"
|
|
"github.com/sipeed/picoclaw/pkg/channels"
|
|
"github.com/sipeed/picoclaw/pkg/config"
|
|
)
|
|
|
|
// FeishuChannel is a stub implementation for 32-bit architectures
|
|
type FeishuChannel struct {
|
|
*channels.BaseChannel
|
|
}
|
|
|
|
// NewFeishuChannel returns an error on 32-bit architectures where the Feishu SDK is not supported
|
|
func NewFeishuChannel(cfg config.FeishuConfig, bus *bus.MessageBus) (*FeishuChannel, error) {
|
|
return nil, errors.New(
|
|
"feishu channel is not supported on 32-bit architectures (armv7l, 386, etc.). Please use a 64-bit system or disable feishu in your config",
|
|
)
|
|
}
|
|
|
|
// Start is a stub method to satisfy the Channel interface
|
|
func (c *FeishuChannel) Start(ctx context.Context) error {
|
|
return nil
|
|
}
|
|
|
|
// Stop is a stub method to satisfy the Channel interface
|
|
func (c *FeishuChannel) Stop(ctx context.Context) error {
|
|
return nil
|
|
}
|
|
|
|
// Send is a stub method to satisfy the Channel interface
|
|
func (c *FeishuChannel) Send(ctx context.Context, msg bus.OutboundMessage) error {
|
|
return errors.New("feishu channel is not supported on 32-bit architectures")
|
|
}
|