| ... | ... | @@ -114,7 +114,7 @@ import { WorkspacePageContainer } from "../components/WorkspacePageContainer"; |
| 114 | 114 | import { WorkspacePageHeader } from "../components/WorkspacePageHeader"; |
| 115 | 115 | import { isCommandPaletteOpen } from "../commandPaletteBus"; |
| 116 | 116 | import { isElectron } from "../env"; |
| 117 | | import { resolveShortcutCommand } from "../keybindings"; |
| 117 | import { resolveShortcutCommand, shortcutLabelForCommand } from "../keybindings"; |
| 118 | 118 | import { isTerminalFocused } from "../lib/terminalFocus"; |
| 119 | 119 | import { PanelLayoutControls } from "../components/chat/PanelLayoutControls"; |
| 120 | 120 | import { Button } from "../components/ui/button"; |
| ... | ... | @@ -1577,7 +1577,7 @@ function PullRequestsRouteView() { |
| 1577 | 1577 | terminalShortcutLabel={null} |
| 1578 | 1578 | rightPanelAvailable={rightPanelAvailable} |
| 1579 | 1579 | rightPanelOpen={rightPanelState.isOpen} |
| 1580 | | rightPanelShortcutLabel={null} |
| 1580 | rightPanelShortcutLabel={shortcutLabelForCommand(keybindings, "rightPanel.toggle")} |
| 1581 | 1581 | rightPanelUnavailableLabel="Select a pull request first" |
| 1582 | 1582 | liveAgentCount={0} |
| 1583 | 1583 | onToggleTerminal={() => undefined} |
| ... | ... | @@ -1914,6 +1914,12 @@ function PullRequestsRouteView() { |
| 1914 | 1914 | event.stopPropagation(); |
| 1915 | 1915 | if (!event.repeat) closeSurface(activePullRequestSurface); |
| 1916 | 1916 | }); |
| 1917 | const toggleRightPanelFromShortcut = useEffectEvent((event: KeyboardEvent) => { |
| 1918 | if (!rightPanelAvailable) return; |
| 1919 | event.preventDefault(); |
| 1920 | event.stopPropagation(); |
| 1921 | if (!event.repeat) toggleRightPanel(); |
| 1922 | }); |
| 1917 | 1923 | useEffect(() => { |
| 1918 | 1924 | const onKeyDown = (event: KeyboardEvent) => { |
| 1919 | 1925 | if (event.defaultPrevented || isCommandPaletteOpen()) return; |
| ... | ... | @@ -1921,6 +1927,7 @@ function PullRequestsRouteView() { |
| 1921 | 1927 | context: { terminalFocus: isTerminalFocused() }, |
| 1922 | 1928 | }); |
| 1923 | 1929 | if (command === "rightPanel.close") closeActiveSurfaceFromShortcut(event); |
| 1930 | if (command === "rightPanel.toggle") toggleRightPanelFromShortcut(event); |
| 1924 | 1931 | if (command === "thread.copyReference") copyPullRequestFromShortcut(event); |
| 1925 | 1932 | }; |
| 1926 | 1933 | window.addEventListener("keydown", onKeyDown); |