feat(opencode): add /yolo toggle and per-agent thinking control#27851
feat(opencode): add /yolo toggle and per-agent thinking control#27851salema97 wants to merge 2 commits into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found a potentially related PR: PR #12633: feat(tui): add auto-accept mode for permission requests This PR appears related as it also adds an auto-approval/auto-accept feature for permissions, though it focuses on the TUI rather than a The other results (PRs #7137 and #22047) are related to permission skipping flags but appear to be different in scope. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Adds a new /yolo slash command in TUI sessions that toggles auto-approval
of all permission requests without prompting the user.
Changes:
- TUI session commands: new /yolo slash command in command palette
- KV store: persists yolo_mode state across sessions
- TUI footer: shows 'YOLO' indicator in warning color when active
- TUI sidebar: shows 'YOLO MODE' badge above the version footer
- TUI sync: auto-replies permissions when kv.get('yolo_mode') is true
Adds a field to agent configuration that allows overriding the model's default thinking/reasoning mode per agent. - — forces thinking on (uses model defaults) - — forces thinking off (strips all reasoning options) - — uses model default behavior This is useful for custom agents where you want deterministic, fast responses without reasoning overhead, or conversely where you want to ensure reasoning is enabled regardless of model defaults. Files changed: - config/agent.ts — added to schema and KNOWN_KEYS - agent/agent.ts — added to Info schema and merge logic - session/llm.ts — strips thinking options when agent.thinking=false
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Closing in favor of two separate PRs:
|
Issue for this PR
Closes #
Type of change
What does this PR do?
This PR adds two independent but complementary features:
1.
/yolotoggle command for auto-approving permissionsAdds a new
/yoloslash command in the TUI session that toggles auto-approval of all permission requests without prompting the user. This is useful for power users who want to skip repetitive permission dialogs during a session while keeping the permission system intact.The implementation uses the existing KV store to persist the toggle state across the session, and auto-replies to
permission.askedevents when the mode is active.Changes:
/yoloslash command in the command palette (toggles on/off)yolo_modestate across the sessionYOLOindicator in warning color when activeYOLO MODEbadge above the version footerreply: "once"whenkv.get('yolo_mode')is true2. Per-agent
thinkingtoggleAdds a
thinkingfield to agent configuration that allows overriding the model's default thinking/reasoning mode on a per-agent basis.thinking: true— forces thinking on (uses model defaults)thinking: false— forces thinking off (strips all reasoning options from the request)thinking: undefined— uses model default behaviorThis is useful for custom agents where you want deterministic, fast responses without reasoning overhead, or conversely where you want to ensure reasoning is enabled regardless of model defaults.
Changes:
thinkingto schema andKNOWN_KEYSthinkingtoInfoschema and merge logicagent.thinking === falseExample agent config:
How did you verify your code works?
YOLO mode:
/yolocommand appears in the session command palettePer-agent thinking:
thinkingfield is accepted in agent markdown frontmatterthinking: falsestrips reasoning options before the LLM callthinking: truepreserves model default reasoning behaviorthinkingleaves model defaults unchangedScreenshots / recordings
N/A — TUI terminal UI and backend logic, no graphical screenshots.
Checklist