remove /yolo slash command
The runtime escape hatch was redundant: --no-yolo's per-call dialog already exposes 'yes-always-this-session' which flips ConfirmGate into allow-all mode without a separate command. Once a session starts with --no-yolo, the only way to disable confirmations is now to either pick the always-this-session option in the dialog or exit and relaunch. - slash_suggest.go: drop the /yolo entry from the autocomplete list. - interactive.go: remove the case "/yolo" dispatch (falls through to 'unknown command') and delete the orphaned runYoloOn method. - README: drop the /yolo row from the slash-command table and the trailing reference in the --no-yolo flag description.
- commit
- 25cb7d500330ed9427d3206e401195c831618e4c
- author
- patriceckhart · · 2026-05-08 06:18 UTC
- parent
- 09acdbd
- signature
- unsigned
- refs
- tag: v0.1.70
3 files · +1 -30
M README.md +1 -2
| @@ -146,7 +146,7 @@ zot --help | |||
| 146 | 146 | | `--no-ext` | Skip extension discovery for this run. `--ext` still works on top, so `--no-ext --ext ./x` runs only `x`. | | |
| 147 | 147 | | `--with-skills` | Also load user-installed skills. Without this, only the built-in skills shipped in the binary are loaded. | | |
| 148 | 148 | | `--no-skill` | Disable all skills, including built-ins. No `skill` tool is registered and the system prompt has no skill manifest. | | |
| 149 | - | | `--no-yolo` | Confirm every tool call before it runs (interactive TUI only). A dialog shows the tool name and a one-line preview of its args with four choices: yes, yes-always-this-tool-this-session, yes-always-this-session, no. Ignored with a stderr warning in print / json / rpc modes, where tools still run freely so scripts and automation keep working. Type `/yolo` in the TUI to disable the gate for the rest of the session. | | |
| 149 | + | | `--no-yolo` | Confirm every tool call before it runs (interactive TUI only). A dialog shows the tool name and a one-line preview of its args with four choices: yes, yes-always-this-tool-this-session, yes-always-this-session, no. Ignored with a stderr warning in print / json / rpc modes, where tools still run freely so scripts and automation keep working. | | |
| 150 | 150 | ||
| 151 | 151 | ## Tools | |
| 152 | 152 | ||
| @@ -193,7 +193,6 @@ Type `/` in the TUI to open the autocomplete popup. Available commands: | |||
| 193 | 193 | | `/jail` | Confine tools to the current directory. | | |
| 194 | 194 | | `/unjail` | Allow tools to touch paths outside again. | | |
| 195 | 195 | | `/reload-ext` | Hot-reload all extensions (re-read manifests, respawn subprocesses, rebuild tool registry). | | |
| 196 | - | | `/yolo` | Turn off `--no-yolo` confirmation for the rest of this session. | | |
| 197 | 196 | | `/telegram` | Connect, disconnect, or show status of the Telegram bridge (takes `connect` / `disconnect` / `status` as an optional argument; opens a picker without one). When connected, DMs from the paired user become prompts in the running session and the assistant's replies are mirrored back to Telegram. Alias: `/tg`. | | |
| 198 | 197 | | `/clear` | Clear the chat transcript. | | |
| 199 | 198 | | `/exit` | Exit zot. | | |
| @@ -146,7 +146,7 @@ zot --help | |||||
| 146 | | `--no-ext` | Skip extension discovery for this run. `--ext` still works on top, so `--no-ext --ext ./x` runs only `x`. | | 146 | | `--no-ext` | Skip extension discovery for this run. `--ext` still works on top, so `--no-ext --ext ./x` runs only `x`. | | ||
| 147 | | `--with-skills` | Also load user-installed skills. Without this, only the built-in skills shipped in the binary are loaded. | | 147 | | `--with-skills` | Also load user-installed skills. Without this, only the built-in skills shipped in the binary are loaded. | | ||
| 148 | | `--no-skill` | Disable all skills, including built-ins. No `skill` tool is registered and the system prompt has no skill manifest. | | 148 | | `--no-skill` | Disable all skills, including built-ins. No `skill` tool is registered and the system prompt has no skill manifest. | | ||
| 149 | - | | `--no-yolo` | Confirm every tool call before it runs (interactive TUI only). A dialog shows the tool name and a one-line preview of its args with four choices: yes, yes-always-this-tool-this-session, yes-always-this-session, no. Ignored with a stderr warning in print / json / rpc modes, where tools still run freely so scripts and automation keep working. Type `/yolo` in the TUI to disable the gate for the rest of the session. | | 149 | + | | `--no-yolo` | Confirm every tool call before it runs (interactive TUI only). A dialog shows the tool name and a one-line preview of its args with four choices: yes, yes-always-this-tool-this-session, yes-always-this-session, no. Ignored with a stderr warning in print / json / rpc modes, where tools still run freely so scripts and automation keep working. | |
| 150 | 150 | ||||
| 151 | ## Tools | 151 | ## Tools | ||
| 152 | 152 | ||||
| @@ -193,7 +193,6 @@ Type `/` in the TUI to open the autocomplete popup. Available commands: | |||||
| 193 | | `/jail` | Confine tools to the current directory. | | 193 | | `/jail` | Confine tools to the current directory. | | ||
| 194 | | `/unjail` | Allow tools to touch paths outside again. | | 194 | | `/unjail` | Allow tools to touch paths outside again. | | ||
| 195 | | `/reload-ext` | Hot-reload all extensions (re-read manifests, respawn subprocesses, rebuild tool registry). | | 195 | | `/reload-ext` | Hot-reload all extensions (re-read manifests, respawn subprocesses, rebuild tool registry). | | ||
| 196 | - | | `/yolo` | Turn off `--no-yolo` confirmation for the rest of this session. | | |||
| 197 | | `/telegram` | Connect, disconnect, or show status of the Telegram bridge (takes `connect` / `disconnect` / `status` as an optional argument; opens a picker without one). When connected, DMs from the paired user become prompts in the running session and the assistant's replies are mirrored back to Telegram. Alias: `/tg`. | | 196 | | `/telegram` | Connect, disconnect, or show status of the Telegram bridge (takes `connect` / `disconnect` / `status` as an optional argument; opens a picker without one). When connected, DMs from the paired user become prompts in the running session and the assistant's replies are mirrored back to Telegram. Alias: `/tg`. | | ||
| 198 | | `/clear` | Clear the chat transcript. | | 197 | | `/clear` | Clear the chat transcript. | | ||
| 199 | | `/exit` | Exit zot. | | 198 | | `/exit` | Exit zot. | | ||
M internal/agent/modes/interactive.go +0 -27
| @@ -2388,8 +2388,6 @@ func (i *Interactive) runSlash(ctx context.Context, cmd string) (done bool) { | |||
| 2388 | 2388 | i.mu.Unlock() | |
| 2389 | 2389 | case "/reload-ext": | |
| 2390 | 2390 | i.runReloadExt(ctx) | |
| 2391 | - | case "/yolo": | |
| 2392 | - | i.runYoloOn() | |
| 2393 | 2391 | case "/telegram", "/tg": | |
| 2394 | 2392 | if len(parts) >= 2 { | |
| 2395 | 2393 | i.doTelegram(parts[1]) | |
| @@ -3603,31 +3601,6 @@ func (i *Interactive) Confirm(toolName string, preview string) core.ConfirmDecis | |||
| 3603 | 3601 | return <-resp | |
| 3604 | 3602 | } | |
| 3605 | 3603 | ||
| 3606 | - | // runYoloOn disables --no-yolo for the rest of the session. Tool | |
| 3607 | - | // calls run without prompting after this; there's intentionally no | |
| 3608 | - | // way to re-enable gating mid-session, if the user wants that back | |
| 3609 | - | // they can exit and restart with --no-yolo. | |
| 3610 | - | func (i *Interactive) runYoloOn() { | |
| 3611 | - | if i.cfg.ConfirmGate == nil { | |
| 3612 | - | i.mu.Lock() | |
| 3613 | - | i.statusOK = "yolo mode is already on (no --no-yolo in this session)" | |
| 3614 | - | i.statusErr = "" | |
| 3615 | - | i.mu.Unlock() | |
| 3616 | - | i.invalidate() | |
| 3617 | - | return | |
| 3618 | - | } | |
| 3619 | - | i.cfg.ConfirmGate.AllowAll() | |
| 3620 | - | // Also auto-allow any currently pending confirmation so the | |
| 3621 | - | // agent doesn't deadlock if /yolo is typed while a prompt is | |
| 3622 | - | // open. | |
| 3623 | - | i.confirmDialog.AllowAllPending() | |
| 3624 | - | i.mu.Lock() | |
| 3625 | - | i.statusOK = "yolo engaged: no more tool-call confirmations this session" | |
| 3626 | - | i.statusErr = "" | |
| 3627 | - | i.mu.Unlock() | |
| 3628 | - | i.invalidate() | |
| 3629 | - | } | |
| 3630 | - | ||
| 3631 | 3604 | // openTelegramDialog shows the picker for `/telegram` with no arg. | |
| 3632 | 3605 | // Items depend on current state: disconnect + status when running, | |
| 3633 | 3606 | // connect + status when stopped. | |
| @@ -2388,8 +2388,6 @@ func (i *Interactive) runSlash(ctx context.Context, cmd string) (done bool) { | |||||
| 2388 | i.mu.Unlock() | 2388 | i.mu.Unlock() | ||
| 2389 | case "/reload-ext": | 2389 | case "/reload-ext": | ||
| 2390 | i.runReloadExt(ctx) | 2390 | i.runReloadExt(ctx) | ||
| 2391 | - | case "/yolo": | |||
| 2392 | - | i.runYoloOn() | |||
| 2393 | case "/telegram", "/tg": | 2391 | case "/telegram", "/tg": | ||
| 2394 | if len(parts) >= 2 { | 2392 | if len(parts) >= 2 { | ||
| 2395 | i.doTelegram(parts[1]) | 2393 | i.doTelegram(parts[1]) | ||
| @@ -3603,31 +3601,6 @@ func (i *Interactive) Confirm(toolName string, preview string) core.ConfirmDecis | |||||
| 3603 | return <-resp | 3601 | return <-resp | ||
| 3604 | } | 3602 | } | ||
| 3605 | 3603 | ||||
| 3606 | - | // runYoloOn disables --no-yolo for the rest of the session. Tool | |||
| 3607 | - | // calls run without prompting after this; there's intentionally no | |||
| 3608 | - | // way to re-enable gating mid-session, if the user wants that back | |||
| 3609 | - | // they can exit and restart with --no-yolo. | |||
| 3610 | - | func (i *Interactive) runYoloOn() { | |||
| 3611 | - | if i.cfg.ConfirmGate == nil { | |||
| 3612 | - | i.mu.Lock() | |||
| 3613 | - | i.statusOK = "yolo mode is already on (no --no-yolo in this session)" | |||
| 3614 | - | i.statusErr = "" | |||
| 3615 | - | i.mu.Unlock() | |||
| 3616 | - | i.invalidate() | |||
| 3617 | - | return | |||
| 3618 | - | } | |||
| 3619 | - | i.cfg.ConfirmGate.AllowAll() | |||
| 3620 | - | // Also auto-allow any currently pending confirmation so the | |||
| 3621 | - | // agent doesn't deadlock if /yolo is typed while a prompt is | |||
| 3622 | - | // open. | |||
| 3623 | - | i.confirmDialog.AllowAllPending() | |||
| 3624 | - | i.mu.Lock() | |||
| 3625 | - | i.statusOK = "yolo engaged: no more tool-call confirmations this session" | |||
| 3626 | - | i.statusErr = "" | |||
| 3627 | - | i.mu.Unlock() | |||
| 3628 | - | i.invalidate() | |||
| 3629 | - | } | |||
| 3630 | - | ||||
| 3631 | // openTelegramDialog shows the picker for `/telegram` with no arg. | 3604 | // openTelegramDialog shows the picker for `/telegram` with no arg. | ||
| 3632 | // Items depend on current state: disconnect + status when running, | 3605 | // Items depend on current state: disconnect + status when running, | ||
| 3633 | // connect + status when stopped. | 3606 | // connect + status when stopped. | ||
M internal/agent/modes/slash_suggest.go +0 -1
| @@ -46,7 +46,6 @@ var slashCatalog = []slashCommand{ | |||
| 46 | 46 | {Name: "/unjail", Desc: "allow tools to touch paths outside this directory"}, | |
| 47 | 47 | {Name: "/skills", Desc: "list discovered skills (SKILL.md files)"}, | |
| 48 | 48 | {Name: "/reload-ext", Desc: "hot-reload all extensions (re-read manifests and respawn)"}, | |
| 49 | - | {Name: "/yolo", Desc: "turn off --no-yolo confirmation for the rest of this session"}, | |
| 50 | 49 | {Name: "/telegram", Desc: "connect, disconnect, or show status of the telegram bridge"}, | |
| 51 | 50 | {Name: "/clear", Desc: "clear the chat transcript"}, | |
| 52 | 51 | {Name: "/exit", Desc: "exit zot"}, | |
| @@ -46,7 +46,6 @@ var slashCatalog = []slashCommand{ | |||||
| 46 | {Name: "/unjail", Desc: "allow tools to touch paths outside this directory"}, | 46 | {Name: "/unjail", Desc: "allow tools to touch paths outside this directory"}, | ||
| 47 | {Name: "/skills", Desc: "list discovered skills (SKILL.md files)"}, | 47 | {Name: "/skills", Desc: "list discovered skills (SKILL.md files)"}, | ||
| 48 | {Name: "/reload-ext", Desc: "hot-reload all extensions (re-read manifests and respawn)"}, | 48 | {Name: "/reload-ext", Desc: "hot-reload all extensions (re-read manifests and respawn)"}, | ||
| 49 | - | {Name: "/yolo", Desc: "turn off --no-yolo confirmation for the rest of this session"}, | |||
| 50 | {Name: "/telegram", Desc: "connect, disconnect, or show status of the telegram bridge"}, | 49 | {Name: "/telegram", Desc: "connect, disconnect, or show status of the telegram bridge"}, | ||
| 51 | {Name: "/clear", Desc: "clear the chat transcript"}, | 50 | {Name: "/clear", Desc: "clear the chat transcript"}, | ||
| 52 | {Name: "/exit", Desc: "exit zot"}, | 51 | {Name: "/exit", Desc: "exit zot"}, | ||