(exitState: ExitState)
| 98 | |
| 99 | // Custom input guide that changes based on dialog state |
| 100 | function renderInputGuide(exitState: ExitState): React.ReactNode { |
| 101 | if (showFilenameInput) { |
| 102 | return <Byline> |
| 103 | <KeyboardShortcutHint shortcut="Enter" action="save" /> |
| 104 | <ConfigurableShortcutHint action="confirm:no" context="Confirmation" fallback="Esc" description="go back" /> |
| 105 | </Byline>; |
| 106 | } |
| 107 | if (exitState.pending) { |
| 108 | return <Text>Press {exitState.keyName} again to exit</Text>; |
| 109 | } |
| 110 | return <ConfigurableShortcutHint action="confirm:no" context="Confirmation" fallback="Esc" description="cancel" />; |
| 111 | } |
| 112 | |
| 113 | // Use Settings context so 'n' key doesn't cancel (allows typing 'n' in filename input) |
| 114 | useKeybinding('confirm:no', handleCancel, { |
nothing calls this directly
no outgoing calls
no test coverage detected