CwdSwitchPromptScreen(
self,
*,
current_cwd: str,
thread_cwd: str,
project_settings_change_detected: bool ModalScreen[CwdSwitchChoice]| Name | Type |
|---|---|
| current_cwd | str |
| thread_cwd | str |
| project_settings_change_detected | bool |
| abort | CwdSwitchAbortMode | None |
Modal asking whether to switch cwd when resuming or switching to a thread.
Compose the confirmation dialog.
Focus the modal so screen bindings work after nested modal flows.
Disable the abort binding unless the prompt was opened for it.
Textual gates a binding's action on a truthy check_action result, so
both False and None stop a from dispatching action_abort -- in
neither case does the key fire the action, and it falls through the same
way. They differ only in footer presentation (False hides the binding,
None shows it grayed out), which is moot here anyway: every binding is
declared show=False and the modal renders its own help line instead of
a Footer. We return False to mark the disabled state explicitly; the
actual inertness backstop is action_abort's own self._abort is None
guard, should the action ever be dispatched.
Dismiss with switch.
Dismiss with stay.
Dismiss with abort to skip the resume/switch, when the prompt allows it.
Treat cancellation as staying in the current cwd.
Delegate Ctrl+C to the app-level quit/interrupt handler.
Delegate Ctrl+D to the app-level quit handler.