MCPcopy
hub / github.com/botui/botui / _showActions

Function _showActions

src/scripts/botui.js:309–331  ·  view source on GitHub ↗
(_opts)

Source from the content-addressed store, hash-verified

307 }
308
309 function _showActions(_opts) {
310
311 _checkAction(_opts);
312
313 mergeAtoB({
314 type: 'text',
315 cssClass: '',
316 autoHide: true,
317 addMessage: true
318 }, _opts);
319
320 _instance.action.type = _opts.type;
321 _instance.action.cssClass = _opts.cssClass;
322 _instance.action.autoHide = _opts.autoHide;
323 _instance.action.addMessage = _opts.addMessage;
324
325 return new Promise(function(resolve, reject) {
326 _actionResolve = resolve; // resolved when action is performed, i.e: button clicked, text submitted, etc.
327 setTimeout(function () {
328 _instance.action.show = true;
329 }, _opts.delay || 0);
330 });
331 };
332
333 _interface.action = {
334 show: _showActions,

Callers 1

botui.jsFile · 0.85

Calls 2

_checkActionFunction · 0.85
mergeAtoBFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…