Skip to content

[FEATURE]: Support full-width to toggle Shell/Prompt mode in web UI and TUI #43583

Description

@steve02081504

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

OpenCode uses a leading ! to enter Shell mode (and back to Prompt mode). On CJK input methods (Chinese IME, etc.), typing the ! key usually produces the full-width character instead of the half-width !. As a result:

  • In the TUI, entering !ls is not recognized as a shell command — it's sent to the model as normal text instead of switching into Shell mode.
  • The web UI has the same issue: does not trigger the shell-mode toggle.

This is the same class of friction reported for slash commands in #11485 (where from a CJK IME broke /commands), but here specifically for the shell-mode ! toggle.

Requested feature

Treat the full-width (U+FF01) as equivalent to ! for toggling Shell/Prompt mode, in both the web UI and the TUI:

  • !ls should behave exactly like !ls (enter Shell mode, run ls)
  • After executing a shell command, (like !) should toggle back to Prompt mode

Optionally, this could be made configurable (e.g., a tui.json / config setting listing alternative prefixes, mirroring the general "alternative command prefix" idea from #11485) so it also covers other CJK punctuation.

Why

Shell mode is a core workflow (running deterministic commands). For users who type with a CJK IME, the full-width key is the default output, making the ! shortcut effectively unusable without switching IMEs. Supporting removes that friction for both the web UI and the TUI.

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions