> For the complete documentation index, see [llms.txt](https://cyr1en.gitbook.io/commandprompter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cyr1en.gitbook.io/commandprompter/configuration/prompts-configuration/dialog-ui.md).

# Dialog UI

The Dialog UI uses Paper's native dialog API. These values are defaults for inline `<d:...>` prompts; inline constraints and preset fields can override them.

```yaml
DialogUI:
  Title: Prompt
  Confirm-Button:
    Label: <green>Confirm</green>
    Tooltip: Confirm this action
  Cancel-Button:
    Label: <red>Cancel</red>
    Tooltip: Cancel this action
  Defaults:
    Text:
      MaxLength: 256
      Multiline: false
      MultilineMaxLines: 4
      Width: 200
    Choice:
      Default-Options: ''
    Number:
      Min: 0.0
      Max: 100.0
      Step: 1.0
    Tab:
      MaxButtons: 5
```

## Window and buttons

* `Title` is the fallback for ordinary inline dialogs when no `d:title` row overrides it, and it is always used by the `d:tab` text-input fallback. A successful button-form `d:tab` instead uses that tag's display text as its window title. (`d:tab` cannot be combined with the compound-only `d:title` row.) JSON Dialog presets can supply their own `title`.
* Confirm and Cancel labels and tooltips accept MiniMessage and legacy color codes.
* Prompt dialogs do not close when the player presses Escape or activates a component action such as `open_url`. Confirm, Cancel, Exit, or an answer button ends the dialog explicitly.

## Text defaults

* `MaxLength`: 1–8192 characters.
* `Multiline`: enables multiline input.
* `MultilineMaxLines`: 1–16; used when multiline is enabled.
* `Width`: 1–8192 pixels in YAML validation.

An inline `text[...]` filter can override all three numeric values.

## Choice defaults

`Default-Options` is a comma-separated fallback for `<d:choice:Label>`. An explicit `choice[one,two]` list takes precedence. With no configured or inline options, the client receives one empty option.

## Number defaults

`Min`, `Max`, and `Step` must be finite, with `Min < Max` and `Step > 0`. The initial value defaults to the midpoint. Inline number constraints can override the range, step, and initial value.

## Tab defaults

`MaxButtons` must be 1–256. At or below the threshold, tab completions become buttons. Zero completions or a count above the threshold produces a text-input fallback.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cyr1en.gitbook.io/commandprompter/configuration/prompts-configuration/dialog-ui.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
