From 168b75ae214314307d1f49809747a6f05e3390c4 Mon Sep 17 00:00:00 2001 From: Hoshina Date: Wed, 1 Apr 2026 22:51:28 +0800 Subject: [PATCH] style(lint): fix config and qq formatting --- pkg/channels/qq/qq_test.go | 16 ++++++++-------- pkg/config/config.go | 24 +++++++++++++----------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/pkg/channels/qq/qq_test.go b/pkg/channels/qq/qq_test.go index 905532f01..a34aac9ca 100644 --- a/pkg/channels/qq/qq_test.go +++ b/pkg/channels/qq/qq_test.go @@ -50,15 +50,15 @@ func TestHandleC2CMessage_IncludesAccountIDMetadata(t *testing.T) { case <-ctx.Done(): t.Fatal("timeout waiting for inbound message") return - case inbound, ok := <-messageBus.InboundChan(): - if !ok { - t.Fatal("expected inbound message") - } - if inbound.Context.Raw["account_id"] != "7750283E123456" { - t.Fatalf("account_id raw = %q, want %q", inbound.Context.Raw["account_id"], "7750283E123456") - } - return + case inbound, ok := <-messageBus.InboundChan(): + if !ok { + t.Fatal("expected inbound message") } + if inbound.Context.Raw["account_id"] != "7750283E123456" { + t.Fatalf("account_id raw = %q, want %q", inbound.Context.Raw["account_id"], "7750283E123456") + } + return + } } } diff --git a/pkg/config/config.go b/pkg/config/config.go index 23ba57086..99072e2ff 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -25,17 +25,19 @@ const CurrentVersion = 2 // Config is the current config structure with version support type Config struct { - Version int `json:"version" yaml:"-"` // Config schema version for migration - Agents AgentsConfig `json:"agents" yaml:"-"` - Session SessionConfig `json:"session,omitempty" yaml:"-"` - Channels ChannelsConfig `json:"channels" yaml:"channels"` - ModelList SecureModelList `json:"model_list" yaml:"model_list"` // New model-centric provider configuration - Gateway GatewayConfig `json:"gateway" yaml:"-"` - Hooks HooksConfig `json:"hooks,omitempty" yaml:"-"` - Tools ToolsConfig `json:"tools" yaml:",inline"` - Heartbeat HeartbeatConfig `json:"heartbeat" yaml:"-"` - Devices DevicesConfig `json:"devices" yaml:"-"` - Voice VoiceConfig `json:"voice" yaml:"-"` + // Config schema version for migration. + Version int `json:"version" yaml:"-"` + Agents AgentsConfig `json:"agents" yaml:"-"` + Session SessionConfig `json:"session,omitempty" yaml:"-"` + Channels ChannelsConfig `json:"channels" yaml:"channels"` + // New model-centric provider configuration. + ModelList SecureModelList `json:"model_list" yaml:"model_list"` + Gateway GatewayConfig `json:"gateway" yaml:"-"` + Hooks HooksConfig `json:"hooks,omitempty" yaml:"-"` + Tools ToolsConfig `json:"tools" yaml:",inline"` + Heartbeat HeartbeatConfig `json:"heartbeat" yaml:"-"` + Devices DevicesConfig `json:"devices" yaml:"-"` + Voice VoiceConfig `json:"voice" yaml:"-"` // BuildInfo contains build-time version information BuildInfo BuildInfo `json:"build_info,omitempty" yaml:"-"`