Skip to content

[FEATURE]: Support localized slash command names when UI language is set to Chinese #25814

@LifetimeVip

Description

@LifetimeVip

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

When the UI language is set to Chinese, slash commands (like /new, /undo, /model, /review, etc.) still appear and must be typed in English. The command categories are already translated in the i18n system (e.g., packages/app/src/i18n/zh.ts has command.category translations), but the actual slash command names/aliases are not localized.

Suggested approach:

Add an optional \�liases\ field to command definitions that accepts localized names. The command parser would match both the primary English name and any configured aliases. This would allow Chinese users to type e.g. /新建 (for /new) or /撤销 (for /undo).

Example mapping:

English Chinese alias Description
/new /新建 Create a new chat session
/undo /撤销 Undo last message
/model /模型 Switch model
/review /审查 Review changes

Implementation notes:

  • The command system is in packages/opencode/src/command/
  • Commands are defined with Schema.Struct and have a
    ame\ field
  • The prompt popover in the UI shows available commands
  • Adding an \�liases\ string array to the command schema and matching it during lookup would enable this without breaking existing behavior

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions