File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ During CLI sessions, you can use special commands:
115115| ` /reset ` | Clear conversation history |
116116| ` /eval ` | Save current conversation for evaluation |
117117| ` /compact ` | Compact conversation to lower context usage |
118+ | ` /yolo ` | Toggle automatic approval of tool calls |
118119
119120## 🔧 Configuration Reference
120121
Original file line number Diff line number Diff line change 1616 EvalSessionMsg struct {}
1717 CompactSessionMsg struct {}
1818 CopySessionToClipboardMsg struct {}
19+ ToggleYoloMsg struct {}
1920)
2021
2122// Agent commands
@@ -85,6 +86,16 @@ func BuiltInSessionCommands() []Item {
8586 return core .CmdHandler (EvalSessionMsg {})
8687 },
8788 },
89+ {
90+ ID : "session.yolo" ,
91+ Label : "Yolo" ,
92+ SlashCommand : "/yolo" ,
93+ Description : "Toggle automatic approval of tool calls" ,
94+ Category : "Session" ,
95+ Execute : func () tea.Cmd {
96+ return core .CmdHandler (ToggleYoloMsg {})
97+ },
98+ },
8899 }
89100}
90101
Original file line number Diff line number Diff line change @@ -193,6 +193,17 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
193193
194194 return a , core .CmdHandler (notification.ShowMsg {Text : "Conversation copied to clipboard." })
195195
196+ case commands.ToggleYoloMsg :
197+ sess := a .application .Session ()
198+ sess .ToolsApproved = ! sess .ToolsApproved
199+ var statusText string
200+ if sess .ToolsApproved {
201+ statusText = "Yolo mode enabled: tools will be auto-approved"
202+ } else {
203+ statusText = "Yolo mode disabled: tools will require confirmation"
204+ }
205+ return a , core .CmdHandler (notification.ShowMsg {Text : statusText })
206+
196207 case commands.AgentCommandMsg :
197208 resolvedCommand := a .application .ResolveCommand (context .Background (), msg .Command )
198209 return a , core .CmdHandler (editor.SendMsg {Content : resolvedCommand })
You can’t perform that action at this time.
0 commit comments