Skip to content

feat: add TUI dialog for interactive YOLO mode selection#1

Open
hunterd wants to merge 2 commits into
frankhommers:mainfrom
hunterd:main
Open

feat: add TUI dialog for interactive YOLO mode selection#1
hunterd wants to merge 2 commits into
frankhommers:mainfrom
hunterd:main

Conversation

@hunterd

@hunterd hunterd commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds an interactive TUI dialog that opens when typing /yolo without arguments, showing the current mode and letting the user switch between Off / On / Aggressive directly — without going through the agent.

Changes

  • New tui.ts — TUI plugin entry point (@frankhommers/opencode-yolo/tui):
    • Registers a /yolo slash command via api.command.register()
    • Reads .yolo.json synchronously to determine the current mode
    • Shows a DialogSelect with the current mode pre-selected (● indicator)
    • Writes .yolo.json on selection and closes the dialog
  • package.json — Added "./tui" export subpath
  • tsconfig.json — Added tui.ts to the build include list
  • README.md — Updated with TUI plugin install instructions, dialog screenshot, and development notes

How it looks

┌─────────────────────────────┐
│  YOLO Mode — On        esc  │
├─────────────────────────────┤
│ ○ Off  Require manual ...   │
│ ● On   Currently active...  │
│ ○ Aggressive Auto-approve…  │
└─────────────────────────────┘

The active mode is shown in the dialog title (YOLO Mode — Off / On / Aggressive) and marked with ● in the list with a "Currently active — …" description.

Notes

  • The TUI plugin is a separate entry point that does not depend on the hooks plugin
  • It uses synchronous fs APIs (appropriate for the TUI rendering context)
  • The dialog closes automatically after selecting a mode
  • Accessible also via Ctrl+P → search "yolo"

Closes #(add issue if any)

hunterd added 2 commits June 28, 2026 20:57
Adds TUI plugin for interactive mode selection (Off/On/Aggressive)
via /yolo slash command. Shows current status with ● indicator.

- New: tui.ts with DialogSelect + sync .yolo.json read/write
- package.json: added ./tui export subpath
- tsconfig.json: include tui.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant