feat: add toggleable hotkey hints to sidebar buttons and refac ShortcutsModal

- Add src/lib/shortcuts.ts as the single source of truth for every shortcut
- Create HotkeyHint.svelte to show OS-aware key combos (⌘ on Mac, Ctrl elsewhere)
- Make sidebar “New Chat” and “Search” buttons display their shortcuts on hover
- Add user setting to toggle these sidebar hints
- Refactor ShortcutsModal into categorized (Global, Chat, Message, Input), data-driven sections
- Introduce ShortcutItem.svelte to render each row, dividers, and multi-line text
- Fix “Focus text area” action and include “Close modal” shortcut
- Wire everything through +layout.svelte and the shortcuts registry
This commit is contained in:
silentoplayz
2025-10-20 16:21:59 -04:00
parent e24fec0de4
commit e361606c61
9 changed files with 450 additions and 453 deletions
+1
View File
@@ -187,6 +187,7 @@ type Settings = {
highContrastMode?: boolean;
title?: TitleSettings;
showChatTitleInTab?: boolean;
showSidebarHotkeyHints?: boolean;
splitLargeDeltas?: boolean;
chatDirection?: 'LTR' | 'RTL' | 'auto';
ctrlEnterToSend?: boolean;