Module userinput

Module userinput 

Source
Expand description

User input: modal dialogs for interactive user prompts. Port of Go’s pkg/userinput/userinput.go.

Provides request/response types for:

  • Text input prompts
  • Confirmation dialogs
  • Checkbox-bearing dialogs

The actual display is handled by the frontend (Tauri webview); this module defines the wire format and a registry for pending requests.

Structs§

UserInputHandler
Registry for pending user input requests. Routes responses from the frontend back to waiting async tasks.
UserInputRequest
Request for user input, sent to the frontend for display. Matches Go’s userinput.UserInputRequest JSON tags.
UserInputResponse
Response from the frontend after user interaction. Matches Go’s userinput.UserInputResponse JSON tags.

Constants§

DEFAULT_TIMEOUT
Default timeout for user input prompts (30 seconds).
RESPONSE_TYPE_CONFIRM
RESPONSE_TYPE_TEXT
SSH_PROMPT_TIMEOUT
Timeout used for SSH passphrase/password prompts (60 seconds).

Functions§

wait_for_response
Wait for a user input response with timeout.