({
debug,
ideSelection,
toolPermissionContext,
setToolPermissionContext,
apiKeyStatus,
commands,
agents,
isLoading,
verbose,
messages,
onAutoUpdaterResult,
autoUpdaterResult,
input,
onInputChange,
mode,
onModeChange,
stashedPrompt,
setStashedPrompt,
submitCount,
onShowMessageSelector,
onMessageActionsEnter,
mcpClients,
pastedContents,
setPastedContents,
vimMode,
setVimMode,
showBashesDialog,
setShowBashesDialog,
onExit,
getToolUseContext,
onSubmit: onSubmitProp,
onAgentSubmit,
isSearchingHistory,
setIsSearchingHistory,
onDismissSideQuestion,
isSideQuestionVisible,
helpOpen,
setHelpOpen,
hasSuppressedDialogs,
isLocalJSXCommandActive = false,
insertTextRef,
voiceInterimRange
}: Props)
| 192 | const PROMPT_FOOTER_LINES = 5; |
| 193 | const MIN_INPUT_VIEWPORT_LINES = 3; |
| 194 | function PromptInput({ |
| 195 | debug, |
| 196 | ideSelection, |
| 197 | toolPermissionContext, |
| 198 | setToolPermissionContext, |
| 199 | apiKeyStatus, |
| 200 | commands, |
| 201 | agents, |
| 202 | isLoading, |
| 203 | verbose, |
| 204 | messages, |
| 205 | onAutoUpdaterResult, |
| 206 | autoUpdaterResult, |
| 207 | input, |
| 208 | onInputChange, |
| 209 | mode, |
| 210 | onModeChange, |
| 211 | stashedPrompt, |
| 212 | setStashedPrompt, |
| 213 | submitCount, |
| 214 | onShowMessageSelector, |
| 215 | onMessageActionsEnter, |
| 216 | mcpClients, |
| 217 | pastedContents, |
| 218 | setPastedContents, |
| 219 | vimMode, |
| 220 | setVimMode, |
| 221 | showBashesDialog, |
| 222 | setShowBashesDialog, |
| 223 | onExit, |
| 224 | getToolUseContext, |
| 225 | onSubmit: onSubmitProp, |
| 226 | onAgentSubmit, |
| 227 | isSearchingHistory, |
| 228 | setIsSearchingHistory, |
| 229 | onDismissSideQuestion, |
| 230 | isSideQuestionVisible, |
| 231 | helpOpen, |
| 232 | setHelpOpen, |
| 233 | hasSuppressedDialogs, |
| 234 | isLocalJSXCommandActive = false, |
| 235 | insertTextRef, |
| 236 | voiceInterimRange |
| 237 | }: Props): React.ReactNode { |
| 238 | const mainLoopModel = useMainLoopModel(); |
| 239 | // A local-jsx command (e.g., /mcp while agent is running) renders a full- |
| 240 | // screen dialog on top of PromptInput via the immediate-command path with |
| 241 | // shouldHidePromptInput: false. Those dialogs don't register in the overlay |
| 242 | // system, so treat them as a modal overlay here to stop navigation keys from |
| 243 | // leaking into TextInput/footer handlers and stacking a second dialog. |
| 244 | const isModalOverlayActive = useIsModalOverlayActive() || isLocalJSXCommandActive; |
| 245 | const [isAutoUpdating, setIsAutoUpdating] = useState(false); |
| 246 | const [exitMessage, setExitMessage] = useState<{ |
| 247 | show: boolean; |
| 248 | key?: string; |
| 249 | }>({ |
| 250 | show: false |
| 251 | }); |
nothing calls this directly
no test coverage detected