ColdCacheWarningScreen(
self,
warning: ColdCacheWarning | None,
*,
handoff: bool = False,
allow_sendModalScreen[ColdCacheChoice | None]| Name | Type | Description |
|---|---|---|
warning* | ColdCacheWarning | None | |
handoff | bool | Default: False |
allow_send | bool | Default: False |
| Name | Type |
|---|---|
| warning | ColdCacheWarning | None |
| handoff | bool |
| allow_send | bool |
Offer actions for a turn whose prompt cache may be cold.
Dismisses with the chosen ColdCacheChoice, or None on a
programmatic pop. Esc is mapped to CANCEL so the user is never
forced into a spend they did not explicitly choose. None and
CANCEL are both non-send outcomes. HANDOFF authorizes summarization
without sending the submitted turn.
Validated policy, pricing, and cause for this turn, or
None when no reliable estimate exists. The body then shows
a generic expiry notice.
Offer a summarized thread as the default action.
Include a send action in the handoff menu when a message has been submitted.
Compose the warning dialog.
Focus the scrollable copy and select the first action.
The body receives Page Up/Down while the modal's priority bindings keep Tab and arrow keys navigating the pinned actions.
Move the cursor up one row (wraps at the top).
Move the cursor down one row (wraps at the bottom).
Resolve with the highlighted choice.
Cancel the pending send or decline the handoff, keeping the draft.
The method name must stay cancel: the app owns a priority escape
binding that, for an active ModalScreen, dispatches to action_cancel
if present and otherwise falls through to dismiss(None). Renaming this
would silently regress Esc to a None dismiss instead of an explicit
cancel.