refac
This commit is contained in:
1 parent
bbfdbd59f2
commit
30f82788bc
1 file changed
+20
@@ -46,6 +46,8 @@ export enum Shortcut {
|
|||||||
//Message
|
//Message
|
||||||
GENERATE_MESSAGE_PAIR = 'generateMessagePair',
|
GENERATE_MESSAGE_PAIR = 'generateMessagePair',
|
||||||
REGENERATE_RESPONSE = 'regenerateResponse',
|
REGENERATE_RESPONSE = 'regenerateResponse',
|
||||||
|
ALLOW_TOOL_CALL = 'allowToolCall',
|
||||||
|
DENY_TOOL_CALL = 'denyToolCall',
|
||||||
COPY_LAST_CODE_BLOCK = 'copyLastCodeBlock',
|
COPY_LAST_CODE_BLOCK = 'copyLastCodeBlock',
|
||||||
COPY_LAST_RESPONSE = 'copyLastResponse',
|
COPY_LAST_RESPONSE = 'copyLastResponse',
|
||||||
STOP_GENERATING = 'stopGenerating',
|
STOP_GENERATING = 'stopGenerating',
|
||||||
@@ -71,6 +73,8 @@ export const CONFIGURABLE_SHORTCUTS = [
|
|||||||
Shortcut.FOCUS_INPUT,
|
Shortcut.FOCUS_INPUT,
|
||||||
Shortcut.GENERATE_MESSAGE_PAIR,
|
Shortcut.GENERATE_MESSAGE_PAIR,
|
||||||
Shortcut.REGENERATE_RESPONSE,
|
Shortcut.REGENERATE_RESPONSE,
|
||||||
|
Shortcut.ALLOW_TOOL_CALL,
|
||||||
|
Shortcut.DENY_TOOL_CALL,
|
||||||
Shortcut.COPY_LAST_CODE_BLOCK,
|
Shortcut.COPY_LAST_CODE_BLOCK,
|
||||||
Shortcut.COPY_LAST_RESPONSE
|
Shortcut.COPY_LAST_RESPONSE
|
||||||
] as const;
|
] as const;
|
||||||
@@ -95,6 +99,8 @@ export const DEFAULT_KEYBINDINGS: KeybindingsMap = {
|
|||||||
[Shortcut.FOCUS_INPUT]: 'Shift+Escape',
|
[Shortcut.FOCUS_INPUT]: 'Shift+Escape',
|
||||||
[Shortcut.GENERATE_MESSAGE_PAIR]: 'Cmd+Shift+Enter',
|
[Shortcut.GENERATE_MESSAGE_PAIR]: 'Cmd+Shift+Enter',
|
||||||
[Shortcut.REGENERATE_RESPONSE]: 'Cmd+R',
|
[Shortcut.REGENERATE_RESPONSE]: 'Cmd+R',
|
||||||
|
[Shortcut.ALLOW_TOOL_CALL]: 'Cmd+Alt+Enter',
|
||||||
|
[Shortcut.DENY_TOOL_CALL]: 'Cmd+Alt+Backspace',
|
||||||
[Shortcut.COPY_LAST_CODE_BLOCK]: 'Cmd+Shift+;',
|
[Shortcut.COPY_LAST_CODE_BLOCK]: 'Cmd+Shift+;',
|
||||||
[Shortcut.COPY_LAST_RESPONSE]: 'Cmd+Shift+C'
|
[Shortcut.COPY_LAST_RESPONSE]: 'Cmd+Shift+C'
|
||||||
};
|
};
|
||||||
@@ -333,6 +339,20 @@ export const shortcuts: ShortcutRegistry = {
|
|||||||
category: 'Message',
|
category: 'Message',
|
||||||
configurable: true
|
configurable: true
|
||||||
},
|
},
|
||||||
|
[Shortcut.ALLOW_TOOL_CALL]: {
|
||||||
|
name: 'Allow Tool Call',
|
||||||
|
keys: ['mod', 'alt', 'Enter'],
|
||||||
|
category: 'Message',
|
||||||
|
configurable: true,
|
||||||
|
tooltip: 'Only active when a tool call is waiting for approval.'
|
||||||
|
},
|
||||||
|
[Shortcut.DENY_TOOL_CALL]: {
|
||||||
|
name: 'Deny Tool Call',
|
||||||
|
keys: ['mod', 'alt', 'Backspace'],
|
||||||
|
category: 'Message',
|
||||||
|
configurable: true,
|
||||||
|
tooltip: 'Only active when a tool call is waiting for approval.'
|
||||||
|
},
|
||||||
[Shortcut.STOP_GENERATING]: {
|
[Shortcut.STOP_GENERATING]: {
|
||||||
name: 'Stop Generating',
|
name: 'Stop Generating',
|
||||||
keys: ['Escape'],
|
keys: ['Escape'],
|
||||||
|
|||||||
Reference in new issue
Block a user