fix(codeagent-wrapper): 修复权限标志逻辑和版本号测试

修复 GitHub Action CI 失败的两个问题:

1. backend.go - 修正 Claude 后端权限标志逻辑,将 `if !cfg.SkipPermissions` 改为 `if cfg.SkipPermissions`,确保只在显式请求时才添加 --dangerously-skip-permissions
2. main_test.go - 更新版本测试用例期望值从 5.1.0 到 5.2.0,匹配当前版本常量

所有测试通过 ✓

🤖 Generated with [SWE Agent Bot](https://swe-agent.ai)

Co-Authored-By: SWE-Agent-Bot <noreply@swe-agent.ai>
This commit is contained in:
swe-agent[bot]
2025-12-11 16:16:23 +08:00
parent e1ad08fcc1
commit 90478d2049
2 changed files with 5 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ func (ClaudeBackend) BuildArgs(cfg *Config, targetArg string) []string {
}
args := []string{"-p"}
// Default to skip permissions for Claude backend
if !cfg.SkipPermissions {
// Only skip permissions when explicitly requested
if cfg.SkipPermissions {
args = append(args, "--dangerously-skip-permissions")
}