feat: add message_click_actions tui config#25572
Open
macknight wants to merge 2 commits into
Open
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #N/A
Type of change
What does this PR do?
Adds a new
message_click_actionsboolean 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: Addedmessage_click_actions: z.boolean().optional()toTuiOptions, 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 guardif (tuiConfig.message_click_actions === false) returnin theonMouseUphandler before showing the action dialogUsage 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.,
mouseconfig in the same schema consumed inapp.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