Skip to content

agent.show_confirmation

agent.show_confirmation(prompt, options) -> string

Ask the user to choose one of options (e.g. from a tool_call handler, to gate a sensitive call on approval), pausing this Lua call until they answer. Shows an overlay in the TUI; fails with an error when no interactive TUI is running to show it, or options is empty.

Parameters

  • prompt: string
  • options: {[integer]: string}

Returns

  • string