From 8c24c02a5761b547997f2cfb17cd75960c08ddbd Mon Sep 17 00:00:00 2001 From: walker <13750528578@163.com> Date: Sun, 5 Jul 2026 02:51:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E9=BB=98=E8=AE=A4=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20claude=20CLI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/config.example.yaml | 4 ++-- internal/config/config.go | 4 ++-- internal/config/config_test.go | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/config.example.yaml b/configs/config.example.yaml index 2381475..d5934d1 100644 --- a/configs/config.example.yaml +++ b/configs/config.example.yaml @@ -2,10 +2,10 @@ output: dir: output ai: - command: ccs + command: claude args: - - codex - --bare + - --disable-slash-commands retry: delays: - 1s diff --git a/internal/config/config.go b/internal/config/config.go index 5af2554..6dc5987 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -294,10 +294,10 @@ func Load(configPath string) (*Config, error) { cfg.Output.Dir = "output" } if cfg.AI.Command == "" { - cfg.AI.Command = "ccs" + cfg.AI.Command = "claude" } if len(cfg.AI.Args) == 0 { - cfg.AI.Args = []string{"codex", "--bare"} + cfg.AI.Args = []string{"--bare", "--disable-slash-commands"} } if cfg.AI.Retry.Delays == nil { cfg.AI.Retry.Delays = cloneDurations(defaultAIRetryDelays) diff --git a/internal/config/config_test.go b/internal/config/config_test.go index e35d07b..c186f06 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -24,11 +24,11 @@ func TestLoadAppliesDefaultAIConfig(t *testing.T) { if cfg.Output.Dir != "custom-output" { t.Fatalf("Output.Dir = %q, want %q", cfg.Output.Dir, "custom-output") } - if cfg.AI.Command != "ccs" { - t.Fatalf("AI.Command = %q, want %q", cfg.AI.Command, "ccs") + if cfg.AI.Command != "claude" { + t.Fatalf("AI.Command = %q, want %q", cfg.AI.Command, "claude") } - if !reflect.DeepEqual(cfg.AI.Args, []string{"codex", "--bare"}) { - t.Fatalf("AI.Args = %v, want %v", cfg.AI.Args, []string{"codex", "--bare"}) + if !reflect.DeepEqual(cfg.AI.Args, []string{"--bare", "--disable-slash-commands"}) { + t.Fatalf("AI.Args = %v, want %v", cfg.AI.Args, []string{"--bare", "--disable-slash-commands"}) } wantRetryDelays := []time.Duration{time.Second, 2 * time.Second, 5 * time.Second, 9 * time.Second, 17 * time.Second} if !reflect.DeepEqual(cfg.AI.Retry.Delays, wantRetryDelays) {