accept/reject better keybind

This commit is contained in:
Mathew Pareles 2025-05-05 00:56:58 -07:00
parent c088ad3c07
commit 09d7e7f3e6
2 changed files with 9 additions and 6 deletions

View file

@ -12,6 +12,7 @@ import { ScrollType } from '../../../../../../../editor/common/editorCommon.js';
import { acceptAllBg, acceptBorder, buttonFontSize, buttonTextColor, rejectBg, rejectBorder } from '../../../../common/helpers/colors.js';
import { VoidCommandBarProps } from '../../../voidCommandBarService.js';
import { AcceptAllButtonWrapper, RejectAllButtonWrapper } from '../sidebar-tsx/SidebarChat.js';
import { MoveDown, MoveLeft, MoveRight, MoveUp } from 'lucide-react';
export const VoidCommandBarMain = ({ uri, editor }: VoidCommandBarProps) => {
const isDark = useIsDark()
@ -148,7 +149,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToDiffIdx(prevDiffIdx);
}
}}
></button>
><MoveUp /></button>
const downButton = <button
className={`
@ -163,7 +164,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToDiffIdx(nextDiffIdx);
}
}}
></button>
><MoveDown /></button>
const leftButton = <button
className={`
@ -178,7 +179,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToURIIdx(prevURIIdx);
}
}}
></button>
><MoveLeft /></button>
const rightButton = <button
className={`
@ -193,7 +194,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToURIIdx(nextURIIdx);
}
}}
></button>
><MoveRight /></button>

View file

@ -473,7 +473,8 @@ registerAction2(class extends Action2 {
f1: true,
title: localize2('voidAcceptDiffAction', 'Void: Accept Diff'),
keybinding: {
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.Enter,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.Enter,
mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.Enter },
weight: KeybindingWeight.VoidExtension,
}
});
@ -510,7 +511,8 @@ registerAction2(class extends Action2 {
f1: true,
title: localize2('voidRejectDiffAction', 'Void: Reject Diff'),
keybinding: {
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.Backspace,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.Backspace,
mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.Backspace },
weight: KeybindingWeight.VoidExtension,
}
});