Skip to main content

Module user_interaction

Module user_interaction 

Source
Expand description

Pass-through for the agent’s typed tool-input parsers (AskUserQuestion, Monitor), which the server reads when folding a tool call into the block a view draws.

Structs§

AskUserQuestionOption
AskUserQuestionPrompt
MonitorInput
Monitor tool’s tool_use.input payload. The renderer consumes description for the chat one-liner + the MONITORS-section header; command is informational; persistent toggles the “(persistent)” suffix on the chat notice; timeout_ms is honoured by the CLI’s task-lifecycle handler.

Constants§

ASK_USER_QUESTION_TOOL_NAME

Functions§

build_question_request
Mirrors buildQuestionRequest(promptToolCall, prompt, index, total).
build_updated_input
Helper used by the worker’s loop driver: build the final updatedInput payload after every question has been answered. Mirrors the tail of requestAskUserQuestionAnswers upstream.
derive_annotation
Mirrors deriveAnnotation. Joins option previews with a blank line separator when no caller-supplied annotation preview is present.
parse_ask_user_question_prompts
Mirrors upstream’s parseAskUserQuestionPrompts. Walks the raw input.questions JSON array, dropping malformed entries and requiring at least 2 options per question (matches upstream’s validity rule).
parse_monitor_input
Parse a Monitor tool_use’s raw_input into a MonitorInput. Returns None when description or command is missing or non-string - both are required for a meaningful render.