diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fcbe2caa..06d5782e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -24,6 +24,7 @@ import { useMobileTabBar } from '@/hooks/useMobileTabBar' import { TTSProvider } from './contexts/TTSContext' import { ThemeProvider, useThemeMode } from './contexts/ThemeContext' import { AuthProvider } from './contexts/AuthContext' +import { KeyboardShortcutsProvider } from './contexts/KeyboardShortcutsContext' import { EventProvider, usePermissions, useEventContext } from '@/contexts/EventContext' import { SwipeNavigationProvider, useSwipeNavigation } from '@/contexts/SwipeNavigationContext' import { PermissionRequestDialog } from './components/session/PermissionRequestDialog' @@ -34,6 +35,7 @@ import { onNotificationClick } from '@/lib/serviceWorker' import { useAuth } from '@/hooks/useAuth' import { useOpenCodeFailureToast } from '@/hooks/useOpenCodeFailureToast' import { useOpenCodeServerActions } from '@/hooks/useOpenCodeServerActions' +import { useGlobalShortcutActions } from '@/hooks/useGlobalShortcutActions' import { RestartServerDialog } from '@/components/settings/RestartServerDialog' const queryClient = new QueryClient({ @@ -116,6 +118,11 @@ function PermissionDialogWrapper() { ) } +function GlobalShortcuts() { + useGlobalShortcutActions() + return null +} + function AppShell() { const navigate = useNavigate() const location = useLocation() @@ -188,21 +195,24 @@ function AppShell() { -
- -
- -
-
- - - - - - - - - + + +
+ +
+ +
+
+ + + + + + + + + +
diff --git a/frontend/src/api/types/settings.ts b/frontend/src/api/types/settings.ts index 9893a704..302b5d37 100644 --- a/frontend/src/api/types/settings.ts +++ b/frontend/src/api/types/settings.ts @@ -4,6 +4,7 @@ import { DEFAULT_KEYBOARD_SHORTCUTS, DEFAULT_USER_PREFERENCES, DEFAULT_LEADER_KEY, + DEFAULT_DIRECT_SHORTCUTS, BLOCKED_SERVER_ENV_KEYS, selectPreferredOpenCodeConfigSourceName, type TTSConfig, @@ -27,8 +28,8 @@ import type { NotificationPreferences } from '@opencode-manager/shared/types' import { saveFile } from '@/lib/download' export type { TTSConfig, STTConfig, OpenCodeConfigFile, OpenCodeConfigSourceFile, OpenCodeConfigSourceName, UpdateOpenCodeConfigRequest, ModelConfig, ProviderConfig, SandboxPreferences, NotificationPreferences, SkillFileInfo, CreateSkillRequest, UpdateSkillRequest, SkillScope, InstallSkillFromGithubRequest, InstallSkillResponse } -export type { UserPreferences, UpdateSettingsRequest, CustomCommand, GitCredential, GitIdentity, GitIdentityProfile } from '@opencode-manager/shared' -export { DEFAULT_TTS_CONFIG, DEFAULT_STT_CONFIG, DEFAULT_KEYBOARD_SHORTCUTS, DEFAULT_USER_PREFERENCES, DEFAULT_LEADER_KEY, BLOCKED_SERVER_ENV_KEYS } +export type { UserPreferences, UpdateSettingsRequest, CustomCommand, GitCredential, GitIdentity, GitIdentityProfile, KeyboardShortcutAction } from '@opencode-manager/shared' +export { DEFAULT_TTS_CONFIG, DEFAULT_STT_CONFIG, DEFAULT_KEYBOARD_SHORTCUTS, DEFAULT_USER_PREFERENCES, DEFAULT_LEADER_KEY, DEFAULT_DIRECT_SHORTCUTS, BLOCKED_SERVER_ENV_KEYS } export { isOpenCodeConfigSourceName } from '@opencode-manager/shared' export function getOpenCodeConfigSources(config: OpenCodeConfigFile): OpenCodeConfigSourceFile[] { diff --git a/frontend/src/components/agent/AgentQuickSelect.tsx b/frontend/src/components/agent/AgentQuickSelect.tsx index ab659426..fad74bdb 100644 --- a/frontend/src/components/agent/AgentQuickSelect.tsx +++ b/frontend/src/components/agent/AgentQuickSelect.tsx @@ -54,7 +54,6 @@ export function AgentQuickSelect({ const buttonContent = (