feat(tui): make the mouse disablable (#6824, #7926) (#13748)

This commit is contained in:
Gautier DI FOLCO
2026-04-06 04:14:11 +02:00
committed by GitHub
parent 9e156ea168
commit 4712c18a58
6 changed files with 11 additions and 4 deletions

View File

@@ -125,6 +125,8 @@ import type { EventSource } from "./context/sdk"
import { DialogVariant } from "./component/dialog-variant"
function rendererConfig(_config: TuiConfig.Info): CliRendererConfig {
const mouseEnabled = !Flag.OPENCODE_DISABLE_MOUSE && (_config.mouse ?? true)
return {
externalOutputMode: "passthrough",
targetFps: 60,
@@ -133,6 +135,7 @@ function rendererConfig(_config: TuiConfig.Info): CliRendererConfig {
useKittyKeyboard: { events: process.platform === "win32" },
autoFocus: false,
openConsoleOnError: false,
useMouse: mouseEnabled,
consoleOptions: {
keyBindings: [{ name: "y", ctrl: true, action: "copy-selection" }],
onCopySelection: (text) => {