<commit_before>/**
 * @module botkit
 */
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */
import { Botkit, BotkitMessage } from './core';
import { BotWorker } from './botworker';
import { BotkitDialogWrapper } from './dialogWrapper';
import { Activity, ActivityTypes, TurnContext, MessageFactory, ActionTypes } from 'botbuilder';
import { Dialog, DialogContext, DialogReason, PromptValidatorContext, ActivityPrompt, DialogTurnStatus } from 'botbuilder-dialogs';
import * as mustache from 'mustache';
import * as Debug from 'debug';

const debug = Debug('botkit:conversation');

/**
 * Definition of the handler functions used to handle .ask and .addQuestion conditions
 */
interface BotkitConvoHandler {
    (answer: string, convo: BotkitDialogWrapper, bot: BotWorker, message: BotkitMessage): Promise<any>;
}

/**
 * Definition of the trigger pattern passed into .ask or .addQuestion
 */
interface BotkitConvoTrigger {
    type?: string;
    pattern?: string | RegExp;
    handler: BotkitConvoHandler;
    default?: boolean;
}

/**
 * Template for definiting a BotkitConversation template
 */
interface BotkitMessageTemplate {
    text: ((template: any, vars: any) => string[]) | string[];
    action?: string;
    execute?: {
        script: string;
        thread?: string;
    };
    quick_replies?: ((template: any, vars: any) => any[]) | any[];
    attachments?: ((template: any, vars: any) => any[]) | any[];
    blocks?: ((template: any, vars: any) => any[]) | any[];<commit_msg>Fix dynamic text field type definition<commit_after>/**
 * @module botkit
 */
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */
import { Botkit, BotkitMessage } from './core';
import { BotWorker } from './botworker';
import { BotkitDialogWrapper } from './dialogWrapper';
import { Activity, ActivityTypes, TurnContext, MessageFactory, ActionTypes } from 'botbuilder';
import { Dialog, DialogContext, DialogReason, PromptValidatorContext, ActivityPrompt, DialogTurnStatus } from 'botbuilder-dialogs';
import * as mustache from 'mustache';
import * as Debug from 'debug';

const debug = Debug('botkit:conversation');

/**
 * Definition of the handler functions used to handle .ask and .addQuestion conditions
 */
interface BotkitConvoHandler {
    (answer: string, convo: BotkitDialogWrapper, bot: BotWorker, message: BotkitMessage): Promise<any>;
}

/**
 * Definition of the trigger pattern passed into .ask or .addQuestion
 */
interface BotkitConvoTrigger {
    type?: string;
    pattern?: string | RegExp;
    handler: BotkitConvoHandler;
    default?: boolean;
}

/**
 * Template for definiting a BotkitConversation template
 */
interface BotkitMessageTemplate {
    text: ((template: any, vars: any) => string) | string[];
    action?: string;
    execute?: {
        script: string;
        thread?: string;
    };
    quick_replies?: ((template: any, vars: any) => any[]) | any[];
    attachments?: ((template: any, vars: any) => any[]) | any[];
    blocks?: ((template: any, vars: any) => any[]) | any[];
{'fraction_non_alphanumeric': 0.13517862890247828, 'fraction_numerical': 0.0, 'mean_word_length': 4.285714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '911675', 'n_tokens_mistral': 846, 'n_tokens_neox': 855, 'n_words': 294}