diff --git a/pkg/channels/mqtt/init.go b/pkg/channels/mqtt/init.go index ef0acf181..56080f6f5 100644 --- a/pkg/channels/mqtt/init.go +++ b/pkg/channels/mqtt/init.go @@ -7,17 +7,10 @@ import ( ) func init() { - channels.RegisterFactory("mqtt", func(cfg *config.Config, b *bus.MessageBus) (channels.Channel, error) { - if !cfg.Channels.MQTT.Enabled { - return nil, nil - } - return NewMQTTChannel(cfg.Channels.MQTT, b) - }) - } diff --git a/pkg/channels/mqtt/mqtt.go b/pkg/channels/mqtt/mqtt.go index fdaaabd90..559dfcfc0 100644 --- a/pkg/channels/mqtt/mqtt.go +++ b/pkg/channels/mqtt/mqtt.go @@ -11,6 +11,7 @@ import ( "time" mqtt "github.com/eclipse/paho.mqtt.golang" + "github.com/sipeed/picoclaw/pkg/bus" "github.com/sipeed/picoclaw/pkg/channels" "github.com/sipeed/picoclaw/pkg/config" diff --git a/pkg/gateway/gateway.go b/pkg/gateway/gateway.go index 6643390a8..14c8deff0 100644 --- a/pkg/gateway/gateway.go +++ b/pkg/gateway/gateway.go @@ -75,27 +75,17 @@ type startupBlockedProvider struct { } func (p *startupBlockedProvider) Chat( - _ context.Context, - _ []providers.Message, - _ []providers.ToolDefinition, - _ string, - _ map[string]any, - ) (*providers.LLMResponse, error) { - return nil, fmt.Errorf("%s", p.reason) - } func (p *startupBlockedProvider) GetDefaultModel() string { - return "" - } // Run starts the gateway runtime using the configuration loaded from configPath.