Files
JiboOs/docs/bt/mim/MimConfig.js
2026-03-16 13:53:01 +02:00

70 lines
2.2 KiB
JavaScript

/**
* MIM configuration data generated from the .mim files.
* @class MimConfig
* @memberof jibo.mim
* @private
*/
/**
* Promised loading of a single .mim file.
* @method jibo.mim.MimConfig~load
* @param {string} filePath Path to the .mim file.
* @returns {Promise<MimConfig>} Promise to load a new MimConfig instance.
* @static
*/
/**
* If the Mim has a gui available, either as sampleUtterances or guiConfig.
* @name jibo.mim.MimConfig~hasGui
* @type {Boolean}
* @readOnly
*/
/**
* Find a prompt by id and get the original prompt text for it.
* @method jibo.mim.MimConfig#getOriginalPromptText
* @param {string} id Prompt id to get the text for.
* @return {String} The original prompt text string.
*/
/**
* Pick a prompt and get the text for it.
* @method jibo.mim.MimConfig~getPromptText
* @param {jibo.mim.MimState} mimState State of the active MIM.
* @param {any} promptData Dictionary of variables to use for condition evaluation and text replacement.
* @param {jibo.kb.Node} [rotationNode] Node used to store data
* @return {Object} An object with 'text', 'id', and 'autoRuleOverride' properties.
*/
/**
* Generate a view config object for the MIM GUI, using the javascript code from the .mim file.
* @method jibo.mim.MimConfig~getJavascriptGUI
* @param {any} promptData Prompt data for the MIM
* @return {any} The generated view config object
*/
/**
* See if MimConfig has error prompts of the corresponding type and index.
* @method jibo.mim.MimConfig~hasErrorPrompt
* @param {String} error The error type
* @param {Number} index The prompt index
* @return {Boolean}
*/
/**
* See if MimConfig has at least one verbose prompt.
* @method jibo.mim.MimConfig~hasVerbosePrompt
* @return {Boolean}
*/
/**
* See if MimConfig has at least one truncated prompt.
* @method jibo.mim.MimConfig~hasTruncatedPrompt
* @return {Boolean}
*/
/**
* See if MimConfig has at least one thanks prompt.
* @method jibo.mim.MimConfig~hasThanksPrompt
* @return {Boolean}
*/