Skip to content

Commit 4e6da79

Browse files
authored
Merge pull request #1588 from krissetto/global-yolo
🫡
2 parents bfd57a3 + 1405da5 commit 4e6da79

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

cmd/root/run.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ func (f *runExecFlags) runOrExec(ctx context.Context, out *cli.Printer, args []s
160160
f.hideToolResults = true
161161
slog.Debug("Applying user settings", "hide_tool_results", true)
162162
}
163+
if userSettings.YOLO && !f.autoApprove {
164+
f.autoApprove = true
165+
slog.Debug("Applying user settings", "YOLO", true)
166+
}
163167

164168
// Apply alias options if this is an alias reference
165169
// Alias options only apply if the flag wasn't explicitly set by the user

pkg/userconfig/userconfig.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ type Settings struct {
4444
// Theme is the default theme reference (e.g., "dark", "light")
4545
// Theme files are loaded from ~/.cagent/themes/<theme>.yaml
4646
Theme string `yaml:"theme,omitempty"`
47+
// YOLO enables auto-approve mode for all tool calls globally
48+
YOLO bool `yaml:"YOLO,omitempty"`
4749
}
4850

4951
// CredentialHelper contains configuration for a credential helper command

0 commit comments

Comments
 (0)