fix(daemon-beta t3): headless claude -p 寫卡卡權限確認——帶 --permission-mode acceptEdits(真機 e2e 第二枚實撞)
This commit is contained in:
+3
-1
@@ -68,7 +68,9 @@ func ExtractWithClaude(binPath, absRoot, relPath string) ([]string, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), claudeExtractTimeout)
|
||||
defer cancel()
|
||||
// /rag-extract-file=template 既有萃取 skill;cwd=監看根(template 已代裝,skill 就在 .claude/commands/)。
|
||||
cmd := exec.CommandContext(ctx, binPath, "-p", fmt.Sprintf("/rag-extract-file %s", relPath))
|
||||
// --permission-mode acceptEdits:headless 無人按核准,寫卡會卡在權限確認(07-24 真機 e2e 實撞);
|
||||
// acceptEdits 只自動放行檔案編輯、不放行任意 Bash,範圍侷限在監看根(cwd)。
|
||||
cmd := exec.CommandContext(ctx, binPath, "-p", fmt.Sprintf("/rag-extract-file %s", relPath), "--permission-mode", "acceptEdits")
|
||||
cmd.Dir = absRoot
|
||||
out, err := cmd.CombinedOutput()
|
||||
if ctx.Err() == context.DeadlineExceeded {
|
||||
|
||||
Reference in New Issue
Block a user