mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 01:47:24 +00:00
fix(dashboard): paste macOS Cmd+V in the agent dashboard pop-out (#40866)
The dashboard pop-out only claimed zoom chords in before-input-event, so Kitty-mode xterm encoded Cmd+V as CSI u and consumed it before the Edit menu accelerator could fire, typing a stray "v" instead of pasting. Claim the chord with the shared isMacAppPasteInput matcher and route it through the existing ui:appMenuPaste owner, matching the main window. Fixes #40862 Co-authored-by: Neil <neil@stably.ai>
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
type KeybindingOverrides
|
||||
} from '../../shared/keybindings'
|
||||
import { wslHostsWindowArguments } from '../wsl/host-lifecycle/wsl-host-gate'
|
||||
import { isMacAppPasteInput } from './mac-app-paste-input'
|
||||
|
||||
const MIN_WIDTH = 480
|
||||
const MIN_HEIGHT = 360
|
||||
@@ -192,8 +193,14 @@ export function createOrFocusDashboardPopout(
|
||||
}
|
||||
})
|
||||
|
||||
// No renderer shortcut routing exists here; handle zoom chords and yield everything else.
|
||||
// No renderer shortcut routing exists here; handle paste and zoom chords and yield everything else.
|
||||
window.webContents.on('before-input-event', (event, input) => {
|
||||
if (isMacAppPasteInput(input)) {
|
||||
// Kitty-mode xterm encodes Cmd+V as CSI u and consumes it, so the Edit menu accelerator never fires.
|
||||
event.preventDefault()
|
||||
window.webContents.send('ui:appMenuPaste')
|
||||
return
|
||||
}
|
||||
if (input.type !== 'keyDown') {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user