Saltar al contenido principal
Versión: 0.16.1

Function: askForDecision()

function askForDecision(runDir, prompt): Promise<string>;

Defined in: core/hooks/humanInput.ts:18

Asks the human for a decision through two channels in parallel, whichever answers first wins: (1) the installed InteractionPort (the keyboard, for a person running the process in their own terminal, see tui/terminalInteraction.ts), and (2) a response file, for when something else (e.g. Claude Code, or a non-terminal host driving its own UI — an Electron main process, a Tauri sidecar) is piloting the run and has no interactive stdin to write to.

Returns the answer lowercased and trimmed ("", "y", "n", "q"...).

Parameters​

ParameterType
runDirstring
promptApprovalPrompt

Returns​

Promise<string>