Uh oh! We couldn’t find any match.

Please try other search keywords.

Bixby Developer Center

Guides

dialog

optionalvalue required

Begin a dialog template.

In Bixby, a dialog is a dynamically-generated message that gives status information, presents results, asks questions, or otherwise communicates with the user. Bixby has default dialog for many prompts and actions; you can create dialog templates to customize and improve these messages, tailoring them to your capsule.

Dialog is separate from, but complementary to, Bixby Views.

You must place each unique dialog in its own *.dialog.bxb file. This file must be in the appropriate locale-specific resources folder.

Example

In its simplest form, a dialog file looks like this:

// resources/en-US/dialog/NumDice.dialog.bxb
dialog (Concept) {
match: NumDice
template ("Number of dice")
}

The template begins by specifying a Dialog Mode. Then it specifies a match pattern and a template, the actual dialog text.

EBNF Grammar

This is the EBNF grammar for Bixby dialog templates.

template                 = { literal | eval | optional | agreement eval | agreement source } ;
eval                     = "#{" , expression , "}" ;
optional                 = "[" , { template } , "]" ;
agreement source         = "%{" , agreement id , ":" , template , "}" ;
agreement eval           = "@{" , agreement id , agreement class symbol , ":" , agreement class variants, "}" ;
agreement class symbol   = alpha character ;
agreement class variants = literal , { "," , literal } ;
literal                  = { anything - ( "#{" | "[" | "%[" | "@{" ) } ;

Child Keys

description
required
Documentation to describe the Dialog using this key
form
optional
Allows you to more explicitly determine how articles and demonstratives appear in dialog
match
optional
The match pattern will be evaluated to decide which dialog to use based on the evaluation context
template
optional
Text to be passed
template-macro
optional
Encapsulates dialog logic that normally would lead to duplication