feat(ui): add Ctrl/Cmd+L to send selected text to chat
Bind mod+l to append the current selection into the chat composer (Cursor-style), and move session sidebar toggle to mod+alt+l so desktop menus stay in sync. Closes #208. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
e0bd787468
commit
3ad3f21024
@@ -10,6 +10,7 @@ import { useThemeSystem } from '@/contexts/useThemeSystem';
|
||||
import { sessionEvents } from '@/lib/sessionEvents';
|
||||
import { createWorktreeSession } from '@/lib/worktreeSessionCreator';
|
||||
import { showOpenCodeStatus } from '@/lib/openCodeStatus';
|
||||
import { addSelectionToChat } from '@/lib/addSelectionToChat';
|
||||
|
||||
const getActiveElementSelectedText = (): string => {
|
||||
if (typeof document === 'undefined') {
|
||||
@@ -77,6 +78,7 @@ type MenuAction =
|
||||
| 'toggle-terminal'
|
||||
| 'toggle-terminal-expanded'
|
||||
| 'copy'
|
||||
| 'add-selection-to-chat'
|
||||
| 'theme-light'
|
||||
| 'theme-dark'
|
||||
| 'theme-system'
|
||||
@@ -278,6 +280,10 @@ export const useMenuActions = (
|
||||
setThemeMode('system');
|
||||
break;
|
||||
|
||||
case 'add-selection-to-chat':
|
||||
addSelectionToChat();
|
||||
break;
|
||||
|
||||
case 'toggle-sidebar':
|
||||
toggleSidebar();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user