picoclaw/pkg/channels/feishu/feishu_32.go
Back Yu c9197c9370
feat(feishu): 新增下载目录配置功能
- 在配置文件中添加 download_dir 字段用于自定义文件下载路径
- 支持相对路径(相对于工作空间)、绝对路径和家目录(~)简写
- 实现路径解析逻辑,包括环境变量展开和路径验证
- 当配置路径不可用时自动回退到系统临时目录
- 添加完整的路径解析测试用例

📝 docs(feishu): 更新文档说明下载目录配置

- 在README中新增download_dir字段说明
- 详细描述各种路径配置方式和使用示例
- 说明默认行为和安全回退机制
- 添加环境变量配置示例
2026-03-26 09:51:36 +08:00

61 lines
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
}
var errUnsupported = errors.New("feishu channel is not supported on 32-bit architectures")
// NewFeishuChannel returns an error on 32-bit architectures where the Feishu SDK is not supported
func NewFeishuChannel(cfg config.FeishuConfig, bus *bus.MessageBus, globalCfg *config.Config) (*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 errUnsupported
}
// Stop is a stub method to satisfy the Channel interface
func (c *FeishuChannel) Stop(ctx context.Context) error {
return errUnsupported
}
// Send is a stub method to satisfy the Channel interface
func (c *FeishuChannel) Send(ctx context.Context, msg bus.OutboundMessage) error {
return errUnsupported
}
// EditMessage is a stub method to satisfy MessageEditor
func (c *FeishuChannel) EditMessage(ctx context.Context, chatID, messageID, content string) error {
return errUnsupported
}
// SendPlaceholder is a stub method to satisfy PlaceholderCapable
func (c *FeishuChannel) SendPlaceholder(ctx context.Context, chatID string) (string, error) {
return "", errUnsupported
}
// ReactToMessage is a stub method to satisfy ReactionCapable
func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID string) (func(), error) {
return func() {}, errUnsupported
}
// SendMedia is a stub method to satisfy MediaSender
func (c *FeishuChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error {
return errUnsupported
}