| 1 | package config |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "strings" |
| 6 | ) |
| 7 | |
| 8 | func renderAgentSafetyControls(b *strings.Builder, c *Config, scope RenderScope) { |
| 9 | if len(c.Agent.PlanModeReadOnlyCommands) > 0 { |
| 10 | fmt.Fprintf(b, "plan_mode_read_only_commands = %s # legacy compatibility only; Plan bash uses Permissions\n", renderStringArray(c.Agent.PlanModeReadOnlyCommands)) |
| 11 | } else { |
| 12 | b.WriteString("# plan_mode_read_only_commands = [\"gh issue view\"] # legacy compatibility only; Plan bash uses Permissions\n") |
| 13 | } |
| 14 | _ = scope |
| 15 | } |
| 16 |