Skip to content

feat: add message_click_actions tui config#25572

Open
macknight wants to merge 2 commits into
anomalyco:devfrom
macknight:dev
Open

feat: add message_click_actions tui config#25572
macknight wants to merge 2 commits into
anomalyco:devfrom
macknight:dev

Conversation

@macknight
Copy link
Copy Markdown

@macknight macknight commented May 3, 2026

Issue for this PR

Closes #N/A

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a new message_click_actions boolean option to TUI config (tui.json) that allows users to disable the message action popup (Revert/Copy/Fork) that appears when clicking on user messages in the chat session.

Some users have a habit of clicking around in the terminal, which accidentally triggers the popup frequently. This option gives users control over this behavior.

Changes:

  • packages/opencode/src/cli/cmd/tui/config/tui-schema.ts: Added message_click_actions: z.boolean().optional() to TuiOptions, described as "Enable or disable the message click action popup (Revert/Copy/Fork). Default: true"
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx: Added guard if (tuiConfig.message_click_actions === false) return in the onMouseUp handler before showing the action dialog

Usage in ~/.config/opencode/tui.json:

{
  "message_click_actions": false
}

Default behavior is unchanged (popup shown when option is not set or set to true).

How did you verify your code works?

The change is minimal — follows the exact same pattern as existing boolean TUI options (e.g., mouse config in the same schema consumed in app.tsx). The guard condition mirrors existing early-return patterns in the same file.

Screenshots / recordings

N/A — no UI change, only a config option that suppresses existing behavior.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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