@botonic/react 0.48.1 → 0.48.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/constants.d.ts +3 -0
- package/lib/cjs/constants.js +4 -1
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/debug-system-messages.d.ts +147 -0
- package/lib/cjs/debug-system-messages.js +167 -0
- package/lib/cjs/debug-system-messages.js.map +1 -0
- package/lib/cjs/dev-app.d.ts +150 -1
- package/lib/cjs/dev-app.js +27 -3
- package/lib/cjs/dev-app.js.map +1 -1
- package/lib/cjs/index-types.d.ts +5 -0
- package/lib/cjs/index-types.js.map +1 -1
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/webchat/theme/default-theme.js +1 -1
- package/lib/cjs/webchat/theme/default-theme.js.map +1 -1
- package/lib/cjs/webchat/webchat.js +7 -0
- package/lib/cjs/webchat/webchat.js.map +1 -1
- package/lib/cjs/webchat-app.d.ts +3 -2
- package/lib/cjs/webchat-app.js +5 -3
- package/lib/cjs/webchat-app.js.map +1 -1
- package/lib/esm/constants.d.ts +3 -0
- package/lib/esm/constants.js +4 -1
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/debug-system-messages.d.ts +147 -0
- package/lib/esm/debug-system-messages.js +167 -0
- package/lib/esm/debug-system-messages.js.map +1 -0
- package/lib/esm/dev-app.d.ts +150 -1
- package/lib/esm/dev-app.js +27 -3
- package/lib/esm/dev-app.js.map +1 -1
- package/lib/esm/index-types.d.ts +5 -0
- package/lib/esm/index-types.js.map +1 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +3 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/webchat/theme/default-theme.js +1 -1
- package/lib/esm/webchat/theme/default-theme.js.map +1 -1
- package/lib/esm/webchat/webchat.js +7 -0
- package/lib/esm/webchat/webchat.js.map +1 -1
- package/lib/esm/webchat-app.d.ts +3 -2
- package/lib/esm/webchat-app.js +5 -3
- package/lib/esm/webchat-app.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.js +4 -0
- package/src/debug-system-messages.ts +200 -0
- package/src/dev-app.jsx +29 -0
- package/src/index-types.ts +6 -0
- package/src/index.ts +1 -0
- package/src/webchat/theme/default-theme.ts +2 -2
- package/src/webchat/webchat.tsx +18 -1
- package/src/webchat-app.tsx +7 -0
package/lib/cjs/constants.d.ts
CHANGED
package/lib/cjs/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROLES = exports.MAX_ALLOWED_SIZE_MB = exports.MIME_WHITELIST = exports.WEBCHAT = exports.COLORS = void 0;
|
|
3
|
+
exports.WEBCHAT_DEFAULT_CONTENTS = exports.ROLES = exports.MAX_ALLOWED_SIZE_MB = exports.MIME_WHITELIST = exports.WEBCHAT = exports.COLORS = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const botonic_react_logo100x100_png_1 = tslib_1.__importDefault(require("./assets/botonic_react_logo100x100.png"));
|
|
6
6
|
const url_icon_png_1 = tslib_1.__importDefault(require("./assets/url-icon.png"));
|
|
@@ -183,4 +183,7 @@ exports.ROLES = {
|
|
|
183
183
|
RAW_MESSAGE: 'raw-message',
|
|
184
184
|
SYSTEM_DEBUG_TRACE_MESSAGE: 'system-debug-trace-message',
|
|
185
185
|
};
|
|
186
|
+
exports.WEBCHAT_DEFAULT_CONTENTS = {
|
|
187
|
+
INPUT_PLACEHOLDER: 'Ask me something...',
|
|
188
|
+
};
|
|
186
189
|
//# sourceMappingURL=constants.js.map
|
package/lib/cjs/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.js"],"names":[],"mappings":";;;;AAAA,mHAAgE;AAChE,iFAA2C;AAE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QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,oBAAoB,EAAE,sBAAsB;IAC5C,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,0BAA0B,EAAE,4BAA4B;CACzD,CAAA;AAEY,QAAA,wBAAwB,GAAG;IACtC,iBAAiB,EAAE,qBAAqB;CACzC,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev-only mock payloads for every SystemDebugTrace event type.
|
|
3
|
+
*
|
|
4
|
+
* Usage from dev-entry.ts:
|
|
5
|
+
* import { DEBUG_SYSTEM_MESSAGES } from '@botonic/react/src/debug-system-messages'
|
|
6
|
+
* app.addDebugSystemMessage(DEBUG_SYSTEM_MESSAGES.keyword)
|
|
7
|
+
*
|
|
8
|
+
* Usage from the browser console (window.Botonic is the DevApp instance):
|
|
9
|
+
* Botonic.addDebugSystemMessage({ action: 'nlu_keyword', nlu_keyword_name: 'hello', ... })
|
|
10
|
+
* // or use the pre-built fixtures exposed on the DevApp:
|
|
11
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.aiAgent)
|
|
12
|
+
*/
|
|
13
|
+
import { EventAction } from '@botonic/core';
|
|
14
|
+
import type { ChunkIdsGroupedBySourceData } from './components/system-debug-trace/events/knowledge-bases-types';
|
|
15
|
+
export declare const DEBUG_SYSTEM_MESSAGES: {
|
|
16
|
+
keyword: {
|
|
17
|
+
action: EventAction.Keyword;
|
|
18
|
+
flow_id: string;
|
|
19
|
+
flow_node_id: string;
|
|
20
|
+
nlu_keyword_is_regex: false;
|
|
21
|
+
nlu_keyword_name: string;
|
|
22
|
+
};
|
|
23
|
+
smartIntent: {
|
|
24
|
+
action: EventAction.IntentSmart;
|
|
25
|
+
nlu_intent_smart_title: string;
|
|
26
|
+
};
|
|
27
|
+
fallback: {
|
|
28
|
+
action: EventAction.Fallback;
|
|
29
|
+
user_input: string;
|
|
30
|
+
fallback_out: number;
|
|
31
|
+
fallback_message_id: string;
|
|
32
|
+
};
|
|
33
|
+
handoffSuccess: {
|
|
34
|
+
action: EventAction.HandoffSuccess;
|
|
35
|
+
handoff_queue_name: string;
|
|
36
|
+
handoff_is_queue_open: true;
|
|
37
|
+
handoff_has_auto_assign: true;
|
|
38
|
+
handoff_note_id: string;
|
|
39
|
+
};
|
|
40
|
+
botAction: {
|
|
41
|
+
action: EventAction.BotAction;
|
|
42
|
+
payload: string;
|
|
43
|
+
};
|
|
44
|
+
knowledgeBase: {
|
|
45
|
+
action: EventAction.Knowledgebase;
|
|
46
|
+
flow_id: string;
|
|
47
|
+
flow_node_id: string;
|
|
48
|
+
knowledgebase_inference_id: string;
|
|
49
|
+
knowledgebase_fail_reason: string;
|
|
50
|
+
knowledgebase_sources_ids: string[];
|
|
51
|
+
knowledgebase_chunks_ids: string[];
|
|
52
|
+
user_input: string;
|
|
53
|
+
knowledge_base_chunks_with_sources: ChunkIdsGroupedBySourceData[];
|
|
54
|
+
};
|
|
55
|
+
knowledgeBaseFailed: {
|
|
56
|
+
action: EventAction.Knowledgebase;
|
|
57
|
+
flow_id: string;
|
|
58
|
+
flow_node_id: string;
|
|
59
|
+
knowledgebase_inference_id: string;
|
|
60
|
+
knowledgebase_fail_reason: string;
|
|
61
|
+
knowledgebase_sources_ids: never[];
|
|
62
|
+
knowledgebase_chunks_ids: never[];
|
|
63
|
+
user_input: string;
|
|
64
|
+
knowledge_base_chunks_with_sources: never[];
|
|
65
|
+
};
|
|
66
|
+
conditionalChannel: {
|
|
67
|
+
action: EventAction.ConditionalChannel;
|
|
68
|
+
channel: string;
|
|
69
|
+
};
|
|
70
|
+
conditionalCountry: {
|
|
71
|
+
action: EventAction.ConditionalCountry;
|
|
72
|
+
country: string;
|
|
73
|
+
};
|
|
74
|
+
conditionalCustom: {
|
|
75
|
+
action: EventAction.ConditionalCustom;
|
|
76
|
+
conditional_variable: string;
|
|
77
|
+
variable_format: string;
|
|
78
|
+
};
|
|
79
|
+
conditionalQueueStatus: {
|
|
80
|
+
action: EventAction.ConditionalQueueStatus;
|
|
81
|
+
queue_id: string;
|
|
82
|
+
queue_name: string;
|
|
83
|
+
is_queue_open: true;
|
|
84
|
+
is_available_agent: true;
|
|
85
|
+
};
|
|
86
|
+
redirectFlow: {
|
|
87
|
+
action: EventAction.RedirectFlow;
|
|
88
|
+
flow_id: string;
|
|
89
|
+
flow_name: string;
|
|
90
|
+
flow_target_id: string;
|
|
91
|
+
flow_target_name: string;
|
|
92
|
+
};
|
|
93
|
+
webviewActionTriggered: {
|
|
94
|
+
action: EventAction.WebviewActionTriggered;
|
|
95
|
+
webview_target_id: string;
|
|
96
|
+
webview_name: string;
|
|
97
|
+
};
|
|
98
|
+
aiAgent: {
|
|
99
|
+
action: EventAction.AiAgent;
|
|
100
|
+
flow_node_content_id: string;
|
|
101
|
+
user_input: string;
|
|
102
|
+
tools_executed: ({
|
|
103
|
+
tool_name: string;
|
|
104
|
+
tool_arguments: {
|
|
105
|
+
query: string;
|
|
106
|
+
user_id?: undefined;
|
|
107
|
+
};
|
|
108
|
+
tool_results: string;
|
|
109
|
+
knowledgebase_sources_ids: string[];
|
|
110
|
+
knowledgebase_chunks_ids: string[];
|
|
111
|
+
} | {
|
|
112
|
+
tool_name: string;
|
|
113
|
+
tool_arguments: {
|
|
114
|
+
user_id: string;
|
|
115
|
+
query?: undefined;
|
|
116
|
+
};
|
|
117
|
+
tool_results: string;
|
|
118
|
+
knowledgebase_sources_ids?: undefined;
|
|
119
|
+
knowledgebase_chunks_ids?: undefined;
|
|
120
|
+
})[];
|
|
121
|
+
input_guardrails_triggered: never[];
|
|
122
|
+
output_guardrails_triggered: never[];
|
|
123
|
+
exit: false;
|
|
124
|
+
error: false;
|
|
125
|
+
knowledge_base_chunks_with_sources: ChunkIdsGroupedBySourceData[];
|
|
126
|
+
};
|
|
127
|
+
aiAgentWithGuardrails: {
|
|
128
|
+
action: EventAction.AiAgent;
|
|
129
|
+
flow_node_content_id: string;
|
|
130
|
+
user_input: string;
|
|
131
|
+
tools_executed: never[];
|
|
132
|
+
input_guardrails_triggered: string[];
|
|
133
|
+
output_guardrails_triggered: never[];
|
|
134
|
+
exit: false;
|
|
135
|
+
error: false;
|
|
136
|
+
};
|
|
137
|
+
aiAgentError: {
|
|
138
|
+
action: EventAction.AiAgent;
|
|
139
|
+
flow_node_content_id: string;
|
|
140
|
+
user_input: string;
|
|
141
|
+
tools_executed: never[];
|
|
142
|
+
input_guardrails_triggered: never[];
|
|
143
|
+
output_guardrails_triggered: never[];
|
|
144
|
+
exit: false;
|
|
145
|
+
error: true;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dev-only mock payloads for every SystemDebugTrace event type.
|
|
4
|
+
*
|
|
5
|
+
* Usage from dev-entry.ts:
|
|
6
|
+
* import { DEBUG_SYSTEM_MESSAGES } from '@botonic/react/src/debug-system-messages'
|
|
7
|
+
* app.addDebugSystemMessage(DEBUG_SYSTEM_MESSAGES.keyword)
|
|
8
|
+
*
|
|
9
|
+
* Usage from the browser console (window.Botonic is the DevApp instance):
|
|
10
|
+
* Botonic.addDebugSystemMessage({ action: 'nlu_keyword', nlu_keyword_name: 'hello', ... })
|
|
11
|
+
* // or use the pre-built fixtures exposed on the DevApp:
|
|
12
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.aiAgent)
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DEBUG_SYSTEM_MESSAGES = void 0;
|
|
16
|
+
const core_1 = require("@botonic/core");
|
|
17
|
+
const mockChunksWithSources = [
|
|
18
|
+
{
|
|
19
|
+
source: {
|
|
20
|
+
id: 'src-mock-001',
|
|
21
|
+
name: 'Help Center',
|
|
22
|
+
type: 'url',
|
|
23
|
+
scrapingCountryCode: null,
|
|
24
|
+
createdAt: '2026-01-01T00:00:00Z',
|
|
25
|
+
createdBy: 'mock',
|
|
26
|
+
lastUpdatedAt: '2026-01-01T00:00:00Z',
|
|
27
|
+
lastUpdatedBy: 'mock',
|
|
28
|
+
activeExtractionJob: null,
|
|
29
|
+
lastExtractionJob: null,
|
|
30
|
+
},
|
|
31
|
+
chunks: [
|
|
32
|
+
{
|
|
33
|
+
id: 'chunk-mock-001',
|
|
34
|
+
text: 'To reset your password, go to Settings > Security > Reset Password.',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
exports.DEBUG_SYSTEM_MESSAGES = {
|
|
40
|
+
keyword: {
|
|
41
|
+
action: core_1.EventAction.Keyword,
|
|
42
|
+
flow_id: 'flow-mock-001',
|
|
43
|
+
flow_node_id: 'node-mock-001',
|
|
44
|
+
nlu_keyword_is_regex: false,
|
|
45
|
+
nlu_keyword_name: 'hello',
|
|
46
|
+
},
|
|
47
|
+
smartIntent: {
|
|
48
|
+
action: core_1.EventAction.IntentSmart,
|
|
49
|
+
nlu_intent_smart_title: 'Greeting smart intent',
|
|
50
|
+
},
|
|
51
|
+
fallback: {
|
|
52
|
+
action: core_1.EventAction.Fallback,
|
|
53
|
+
user_input: "I don't understand this bot",
|
|
54
|
+
fallback_out: 1,
|
|
55
|
+
fallback_message_id: 'msg-mock-002',
|
|
56
|
+
},
|
|
57
|
+
handoffSuccess: {
|
|
58
|
+
action: core_1.EventAction.HandoffSuccess,
|
|
59
|
+
handoff_queue_name: 'Support Team',
|
|
60
|
+
handoff_is_queue_open: true,
|
|
61
|
+
handoff_has_auto_assign: true,
|
|
62
|
+
handoff_note_id: '',
|
|
63
|
+
},
|
|
64
|
+
botAction: {
|
|
65
|
+
action: core_1.EventAction.BotAction,
|
|
66
|
+
payload: 'custom-action-result',
|
|
67
|
+
},
|
|
68
|
+
knowledgeBase: {
|
|
69
|
+
action: core_1.EventAction.Knowledgebase,
|
|
70
|
+
flow_id: 'flow-mock-001',
|
|
71
|
+
flow_node_id: 'node-mock-004',
|
|
72
|
+
knowledgebase_inference_id: 'inf-mock-001',
|
|
73
|
+
knowledgebase_fail_reason: '',
|
|
74
|
+
knowledgebase_sources_ids: ['src-mock-001'],
|
|
75
|
+
knowledgebase_chunks_ids: ['chunk-mock-001'],
|
|
76
|
+
user_input: 'How do I reset my password?',
|
|
77
|
+
knowledge_base_chunks_with_sources: mockChunksWithSources,
|
|
78
|
+
},
|
|
79
|
+
knowledgeBaseFailed: {
|
|
80
|
+
action: core_1.EventAction.Knowledgebase,
|
|
81
|
+
flow_id: 'flow-mock-001',
|
|
82
|
+
flow_node_id: 'node-mock-004',
|
|
83
|
+
knowledgebase_inference_id: 'inf-mock-002',
|
|
84
|
+
knowledgebase_fail_reason: 'no_relevant_content',
|
|
85
|
+
knowledgebase_sources_ids: [],
|
|
86
|
+
knowledgebase_chunks_ids: [],
|
|
87
|
+
user_input: 'What is the meaning of life?',
|
|
88
|
+
knowledge_base_chunks_with_sources: [],
|
|
89
|
+
},
|
|
90
|
+
conditionalChannel: {
|
|
91
|
+
action: core_1.EventAction.ConditionalChannel,
|
|
92
|
+
channel: 'whatsapp',
|
|
93
|
+
},
|
|
94
|
+
conditionalCountry: {
|
|
95
|
+
action: core_1.EventAction.ConditionalCountry,
|
|
96
|
+
country: 'ES',
|
|
97
|
+
},
|
|
98
|
+
conditionalCustom: {
|
|
99
|
+
action: core_1.EventAction.ConditionalCustom,
|
|
100
|
+
conditional_variable: 'user_plan',
|
|
101
|
+
variable_format: 'string',
|
|
102
|
+
},
|
|
103
|
+
conditionalQueueStatus: {
|
|
104
|
+
action: core_1.EventAction.ConditionalQueueStatus,
|
|
105
|
+
queue_id: 'queue-mock-001',
|
|
106
|
+
queue_name: 'Support Team',
|
|
107
|
+
is_queue_open: true,
|
|
108
|
+
is_available_agent: true,
|
|
109
|
+
},
|
|
110
|
+
redirectFlow: {
|
|
111
|
+
action: core_1.EventAction.RedirectFlow,
|
|
112
|
+
flow_id: 'flow-mock-001',
|
|
113
|
+
flow_name: 'Main Flow',
|
|
114
|
+
flow_target_id: 'flow-mock-002',
|
|
115
|
+
flow_target_name: 'Billing Flow',
|
|
116
|
+
},
|
|
117
|
+
webviewActionTriggered: {
|
|
118
|
+
action: core_1.EventAction.WebviewActionTriggered,
|
|
119
|
+
webview_target_id: 'webview-mock-001',
|
|
120
|
+
webview_name: 'Payment Form',
|
|
121
|
+
},
|
|
122
|
+
aiAgent: {
|
|
123
|
+
action: core_1.EventAction.AiAgent,
|
|
124
|
+
flow_node_content_id: 'content-mock-001',
|
|
125
|
+
user_input: 'Can you help me with my subscription?',
|
|
126
|
+
tools_executed: [
|
|
127
|
+
{
|
|
128
|
+
tool_name: 'retrieve_knowledge',
|
|
129
|
+
tool_arguments: { query: 'subscription management' },
|
|
130
|
+
tool_results: 'Found 3 relevant articles about subscription management.',
|
|
131
|
+
knowledgebase_sources_ids: ['src-mock-001'],
|
|
132
|
+
knowledgebase_chunks_ids: ['chunk-mock-001'],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
tool_name: 'get_user_subscription',
|
|
136
|
+
tool_arguments: { user_id: 'user-mock-001' },
|
|
137
|
+
tool_results: '{"plan": "pro", "renewal_date": "2026-06-01"}',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
input_guardrails_triggered: [],
|
|
141
|
+
output_guardrails_triggered: [],
|
|
142
|
+
exit: false,
|
|
143
|
+
error: false,
|
|
144
|
+
knowledge_base_chunks_with_sources: mockChunksWithSources,
|
|
145
|
+
},
|
|
146
|
+
aiAgentWithGuardrails: {
|
|
147
|
+
action: core_1.EventAction.AiAgent,
|
|
148
|
+
flow_node_content_id: 'content-mock-002',
|
|
149
|
+
user_input: 'Tell me something inappropriate',
|
|
150
|
+
tools_executed: [],
|
|
151
|
+
input_guardrails_triggered: ['content_safety', 'topic_restriction'],
|
|
152
|
+
output_guardrails_triggered: [],
|
|
153
|
+
exit: false,
|
|
154
|
+
error: false,
|
|
155
|
+
},
|
|
156
|
+
aiAgentError: {
|
|
157
|
+
action: core_1.EventAction.AiAgent,
|
|
158
|
+
flow_node_content_id: 'content-mock-003',
|
|
159
|
+
user_input: 'Hello',
|
|
160
|
+
tools_executed: [],
|
|
161
|
+
input_guardrails_triggered: [],
|
|
162
|
+
output_guardrails_triggered: [],
|
|
163
|
+
exit: false,
|
|
164
|
+
error: true,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=debug-system-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-system-messages.js","sourceRoot":"","sources":["../../src/debug-system-messages.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,wCAA2C;AAoB3C,MAAM,qBAAqB,GAAkC;IAC3D;QACE,MAAM,EAAE;YACN,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,KAAK;YACX,mBAAmB,EAAE,IAAI;YACzB,SAAS,EAAE,sBAAsB;YACjC,SAAS,EAAE,MAAM;YACjB,aAAa,EAAE,sBAAsB;YACrC,aAAa,EAAE,MAAM;YACrB,mBAAmB,EAAE,IAAW;YAChC,iBAAiB,EAAE,IAAW;SAC/B;QACD,MAAM,EAAE;YACN;gBACE,EAAE,EAAE,gBAAgB;gBACpB,IAAI,EAAE,qEAAqE;aAC5E;SACF;KACF;CACF,CAAA;AAEY,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE;QACP,MAAM,E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B,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,kCAAkC,EAAE,qBAAqB;KAC9B;IAE7B,qBAAqB,EAAE;QACrB,MAAM,EAAE,kBAAW,CAAC,OAAO;QAC3B,oBAAoB,EAAE,kBAAkB;QACxC,UAAU,EAAE,iCAAiC;QAC7C,cAAc,EAAE,EAAE;QAClB,0BAA0B,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;QACnE,2BAA2B,EAAE,EAAE;QAC/B,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;KACe;IAE7B,YAAY,EAAE;QACZ,MAAM,EAAE,kBAAW,CAAC,OAAO;QAC3B,oBAAoB,EAAE,kBAAkB;QACxC,UAAU,EAAE,OAAO;QACnB,cAAc,EAAE,EAAE;QAClB,0BAA0B,EAAE,EAAE;QAC9B,2BAA2B,EAAE,EAAE;QAC/B,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,IAAI;KACgB;CACO,CAAA"}
|
package/lib/cjs/dev-app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class DevApp extends WebchatApp {
|
|
2
|
-
constructor({ theme, persistentMenu, coverComponent, blockInputs, enableEmojiPicker, enableAttachments, enableUserInput, enableAnimations, shadowDOM, hostId, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, webviews, ...botOptions }: {
|
|
2
|
+
constructor({ theme, persistentMenu, coverComponent, blockInputs, enableEmojiPicker, enableAttachments, enableUserInput, enableAnimations, shadowDOM, hostId, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, contentsByLocale, webviews, ...botOptions }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
theme?: {} | undefined;
|
|
5
5
|
persistentMenu: any;
|
|
@@ -18,12 +18,161 @@ export class DevApp extends WebchatApp {
|
|
|
18
18
|
onClose: any;
|
|
19
19
|
onMessage: any;
|
|
20
20
|
onTrackEvent: any;
|
|
21
|
+
contentsByLocale: any;
|
|
21
22
|
webviews: any;
|
|
22
23
|
});
|
|
23
24
|
webviews: any;
|
|
24
25
|
bot: ReactBot;
|
|
25
26
|
getComponent(host: any, optionsAtRuntime?: {}): import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
render(dest: any, optionsAtRuntime?: {}): void;
|
|
28
|
+
/** Pre-built mock payloads for every debug event type. Handy from the console:
|
|
29
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.aiAgent) */
|
|
30
|
+
get debugSystemMessages(): {
|
|
31
|
+
keyword: {
|
|
32
|
+
action: import("@botonic/core").EventAction.Keyword;
|
|
33
|
+
flow_id: string;
|
|
34
|
+
flow_node_id: string;
|
|
35
|
+
nlu_keyword_is_regex: false;
|
|
36
|
+
nlu_keyword_name: string;
|
|
37
|
+
};
|
|
38
|
+
smartIntent: {
|
|
39
|
+
action: import("@botonic/core").EventAction.IntentSmart;
|
|
40
|
+
nlu_intent_smart_title: string;
|
|
41
|
+
};
|
|
42
|
+
fallback: {
|
|
43
|
+
action: import("@botonic/core").EventAction.Fallback;
|
|
44
|
+
user_input: string;
|
|
45
|
+
fallback_out: number;
|
|
46
|
+
fallback_message_id: string;
|
|
47
|
+
};
|
|
48
|
+
handoffSuccess: {
|
|
49
|
+
action: import("@botonic/core").EventAction.HandoffSuccess;
|
|
50
|
+
handoff_queue_name: string;
|
|
51
|
+
handoff_is_queue_open: true;
|
|
52
|
+
handoff_has_auto_assign: true;
|
|
53
|
+
handoff_note_id: string;
|
|
54
|
+
};
|
|
55
|
+
botAction: {
|
|
56
|
+
action: import("@botonic/core").EventAction.BotAction;
|
|
57
|
+
payload: string;
|
|
58
|
+
};
|
|
59
|
+
knowledgeBase: {
|
|
60
|
+
action: import("@botonic/core").EventAction.Knowledgebase;
|
|
61
|
+
flow_id: string;
|
|
62
|
+
flow_node_id: string;
|
|
63
|
+
knowledgebase_inference_id: string;
|
|
64
|
+
knowledgebase_fail_reason: string;
|
|
65
|
+
knowledgebase_sources_ids: string[];
|
|
66
|
+
knowledgebase_chunks_ids: string[];
|
|
67
|
+
user_input: string;
|
|
68
|
+
knowledge_base_chunks_with_sources: import("./index-types").ChunkIdsGroupedBySourceData[];
|
|
69
|
+
};
|
|
70
|
+
knowledgeBaseFailed: {
|
|
71
|
+
action: import("@botonic/core").EventAction.Knowledgebase;
|
|
72
|
+
flow_id: string;
|
|
73
|
+
flow_node_id: string;
|
|
74
|
+
knowledgebase_inference_id: string;
|
|
75
|
+
knowledgebase_fail_reason: string;
|
|
76
|
+
knowledgebase_sources_ids: never[];
|
|
77
|
+
knowledgebase_chunks_ids: never[];
|
|
78
|
+
user_input: string;
|
|
79
|
+
knowledge_base_chunks_with_sources: never[];
|
|
80
|
+
};
|
|
81
|
+
conditionalChannel: {
|
|
82
|
+
action: import("@botonic/core").EventAction.ConditionalChannel;
|
|
83
|
+
channel: string;
|
|
84
|
+
};
|
|
85
|
+
conditionalCountry: {
|
|
86
|
+
action: import("@botonic/core").EventAction.ConditionalCountry;
|
|
87
|
+
country: string;
|
|
88
|
+
};
|
|
89
|
+
conditionalCustom: {
|
|
90
|
+
action: import("@botonic/core").EventAction.ConditionalCustom;
|
|
91
|
+
conditional_variable: string;
|
|
92
|
+
variable_format: string;
|
|
93
|
+
};
|
|
94
|
+
conditionalQueueStatus: {
|
|
95
|
+
action: import("@botonic/core").EventAction.ConditionalQueueStatus;
|
|
96
|
+
queue_id: string;
|
|
97
|
+
queue_name: string;
|
|
98
|
+
is_queue_open: true;
|
|
99
|
+
is_available_agent: true;
|
|
100
|
+
};
|
|
101
|
+
redirectFlow: {
|
|
102
|
+
action: import("@botonic/core").EventAction.RedirectFlow;
|
|
103
|
+
flow_id: string;
|
|
104
|
+
flow_name: string;
|
|
105
|
+
flow_target_id: string;
|
|
106
|
+
flow_target_name: string;
|
|
107
|
+
};
|
|
108
|
+
webviewActionTriggered: {
|
|
109
|
+
action: import("@botonic/core").EventAction.WebviewActionTriggered;
|
|
110
|
+
webview_target_id: string;
|
|
111
|
+
webview_name: string;
|
|
112
|
+
};
|
|
113
|
+
aiAgent: {
|
|
114
|
+
action: import("@botonic/core").EventAction.AiAgent;
|
|
115
|
+
flow_node_content_id: string;
|
|
116
|
+
user_input: string;
|
|
117
|
+
tools_executed: ({
|
|
118
|
+
tool_name: string;
|
|
119
|
+
tool_arguments: {
|
|
120
|
+
query: string;
|
|
121
|
+
user_id?: undefined;
|
|
122
|
+
};
|
|
123
|
+
tool_results: string;
|
|
124
|
+
knowledgebase_sources_ids: string[];
|
|
125
|
+
knowledgebase_chunks_ids: string[];
|
|
126
|
+
} | {
|
|
127
|
+
tool_name: string;
|
|
128
|
+
tool_arguments: {
|
|
129
|
+
user_id: string;
|
|
130
|
+
query?: undefined;
|
|
131
|
+
};
|
|
132
|
+
tool_results: string;
|
|
133
|
+
knowledgebase_sources_ids?: undefined;
|
|
134
|
+
knowledgebase_chunks_ids?: undefined;
|
|
135
|
+
})[];
|
|
136
|
+
input_guardrails_triggered: never[];
|
|
137
|
+
output_guardrails_triggered: never[];
|
|
138
|
+
exit: false;
|
|
139
|
+
error: false;
|
|
140
|
+
knowledge_base_chunks_with_sources: import("./index-types").ChunkIdsGroupedBySourceData[];
|
|
141
|
+
};
|
|
142
|
+
aiAgentWithGuardrails: {
|
|
143
|
+
action: import("@botonic/core").EventAction.AiAgent;
|
|
144
|
+
flow_node_content_id: string;
|
|
145
|
+
user_input: string;
|
|
146
|
+
tools_executed: never[];
|
|
147
|
+
input_guardrails_triggered: string[];
|
|
148
|
+
output_guardrails_triggered: never[];
|
|
149
|
+
exit: false;
|
|
150
|
+
error: false;
|
|
151
|
+
};
|
|
152
|
+
aiAgentError: {
|
|
153
|
+
action: import("@botonic/core").EventAction.AiAgent;
|
|
154
|
+
flow_node_content_id: string;
|
|
155
|
+
user_input: string;
|
|
156
|
+
tools_executed: never[];
|
|
157
|
+
input_guardrails_triggered: never[];
|
|
158
|
+
output_guardrails_triggered: never[];
|
|
159
|
+
exit: false;
|
|
160
|
+
error: true;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Inject a mock SystemDebugTrace event into the preview webchat.
|
|
165
|
+
* Accepts any DebugEvent payload (plain object with an `action` field).
|
|
166
|
+
*
|
|
167
|
+
* From code:
|
|
168
|
+
* import { DEBUG_SYSTEM_MESSAGES } from '@botonic/react/src/debug-system-messages'
|
|
169
|
+
* app.addDebugSystemMessage(DEBUG_SYSTEM_MESSAGES.aiAgent)
|
|
170
|
+
*
|
|
171
|
+
* From the browser console:
|
|
172
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.conditionalQueueStatus)
|
|
173
|
+
* Botonic.addDebugSystemMessage({ action: 'nlu_keyword', nlu_keyword_name: 'hi', nlu_keyword_is_regex: false, flow_id: 'f1', flow_node_id: 'n1' })
|
|
174
|
+
*/
|
|
175
|
+
addDebugSystemMessage(eventData: any): void;
|
|
27
176
|
onUserInput({ input, session, lastRoutePath }: {
|
|
28
177
|
input: any;
|
|
29
178
|
session: any;
|
package/lib/cjs/dev-app.js
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DevApp = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const core_1 = require("@botonic/core");
|
|
5
6
|
const client_1 = require("react-dom/client");
|
|
7
|
+
const debug_system_messages_1 = require("./debug-system-messages");
|
|
6
8
|
const index_types_1 = require("./index-types");
|
|
7
9
|
const react_bot_1 = require("./react-bot");
|
|
8
10
|
const dom_1 = require("./util/dom");
|
|
9
11
|
const webchat_dev_1 = require("./webchat/webchat-dev");
|
|
10
12
|
const webchat_app_1 = require("./webchat-app");
|
|
11
13
|
class DevApp extends webchat_app_1.WebchatApp {
|
|
12
|
-
constructor({ theme = {}, persistentMenu, coverComponent, blockInputs, enableEmojiPicker, enableAttachments, enableUserInput, enableAnimations, shadowDOM, hostId, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, webviews, ...botOptions }) {
|
|
14
|
+
constructor({ theme = {}, persistentMenu, coverComponent, blockInputs, enableEmojiPicker, enableAttachments, enableUserInput, enableAnimations, shadowDOM, hostId, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, contentsByLocale, webviews, ...botOptions }) {
|
|
13
15
|
super({
|
|
14
16
|
theme,
|
|
15
17
|
persistentMenu,
|
|
@@ -28,6 +30,7 @@ class DevApp extends webchat_app_1.WebchatApp {
|
|
|
28
30
|
onClose,
|
|
29
31
|
onMessage,
|
|
30
32
|
onTrackEvent,
|
|
33
|
+
contentsByLocale,
|
|
31
34
|
});
|
|
32
35
|
this.webviews = webviews;
|
|
33
36
|
this.bot = new react_bot_1.ReactBot({
|
|
@@ -35,7 +38,7 @@ class DevApp extends webchat_app_1.WebchatApp {
|
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
40
|
getComponent(host, optionsAtRuntime = {}) {
|
|
38
|
-
let { theme = {}, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, hostId, ...webchatOptions } = optionsAtRuntime;
|
|
41
|
+
let { theme = {}, storage, storageKey, onInit, onOpen, onClose, onMessage, onTrackEvent, contentsByLocale, hostId, ...webchatOptions } = optionsAtRuntime;
|
|
39
42
|
theme = super.createInitialTheme(optionsAtRuntime);
|
|
40
43
|
storage = storage || this.storage;
|
|
41
44
|
storageKey = storageKey || this.storageKey;
|
|
@@ -44,9 +47,10 @@ class DevApp extends webchat_app_1.WebchatApp {
|
|
|
44
47
|
this.onClose = onClose || this.onClose;
|
|
45
48
|
this.onMessage = onMessage || this.onMessage;
|
|
46
49
|
this.onTrackEvent = onTrackEvent || this.onTrackEvent;
|
|
50
|
+
this.contentsByLocale = contentsByLocale || this.contentsByLocale;
|
|
47
51
|
this.hostId = hostId || this.hostId;
|
|
48
52
|
this.createRootElement(host);
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(webchat_dev_1.WebchatDev, { ...webchatOptions, ref: this.webchatRef, host: this.host, shadowDOM: this.shadowDOM, theme: theme, storage: storage, storageKey: storageKey, onInit: (...args) => this.onInitWebchat(...args), onOpen: (...args) => this.onOpenWebchat(...args), onClose: (...args) => this.onCloseWebchat(...args), onUserInput: (...args) => this.onUserInput(...args), onTrackEvent: (...args) => this.onTrackEvent(...args), webviews: this.webviews }));
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(webchat_dev_1.WebchatDev, { ...webchatOptions, ref: this.webchatRef, host: this.host, shadowDOM: this.shadowDOM, theme: theme, storage: storage, storageKey: storageKey, contentsByLocale: this.contentsByLocale, onInit: (...args) => this.onInitWebchat(...args), onOpen: (...args) => this.onOpenWebchat(...args), onClose: (...args) => this.onCloseWebchat(...args), onUserInput: (...args) => this.onUserInput(...args), onTrackEvent: (...args) => this.onTrackEvent(...args), webviews: this.webviews }));
|
|
50
54
|
}
|
|
51
55
|
render(dest, optionsAtRuntime = {}) {
|
|
52
56
|
(0, dom_1.onDOMLoaded)(() => {
|
|
@@ -56,6 +60,26 @@ class DevApp extends webchat_app_1.WebchatApp {
|
|
|
56
60
|
reactRoot.render(devAppComponent);
|
|
57
61
|
});
|
|
58
62
|
}
|
|
63
|
+
/** Pre-built mock payloads for every debug event type. Handy from the console:
|
|
64
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.aiAgent) */
|
|
65
|
+
get debugSystemMessages() {
|
|
66
|
+
return debug_system_messages_1.DEBUG_SYSTEM_MESSAGES;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Inject a mock SystemDebugTrace event into the preview webchat.
|
|
70
|
+
* Accepts any DebugEvent payload (plain object with an `action` field).
|
|
71
|
+
*
|
|
72
|
+
* From code:
|
|
73
|
+
* import { DEBUG_SYSTEM_MESSAGES } from '@botonic/react/src/debug-system-messages'
|
|
74
|
+
* app.addDebugSystemMessage(DEBUG_SYSTEM_MESSAGES.aiAgent)
|
|
75
|
+
*
|
|
76
|
+
* From the browser console:
|
|
77
|
+
* Botonic.addDebugSystemMessage(Botonic.debugSystemMessages.conditionalQueueStatus)
|
|
78
|
+
* Botonic.addDebugSystemMessage({ action: 'nlu_keyword', nlu_keyword_name: 'hi', nlu_keyword_is_regex: false, flow_id: 'f1', flow_node_id: 'n1' })
|
|
79
|
+
*/
|
|
80
|
+
addDebugSystemMessage(eventData) {
|
|
81
|
+
this.addSystemMessage({ type: core_1.INPUT.SYSTEM_DEBUG_TRACE, data: eventData });
|
|
82
|
+
}
|
|
59
83
|
async onUserInput({ input, session, lastRoutePath }) {
|
|
60
84
|
this.onMessage?.(this, {
|
|
61
85
|
sentBy: index_types_1.SENDERS.user,
|
package/lib/cjs/dev-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-app.js","sourceRoot":"","sources":["../../src/dev-app.jsx"],"names":[],"mappings":";;;;AAAA,6CAA6C;AAE7C,+CAAuC;AACvC,2CAAsC;AACtC,oCAAwC;AACxC,uDAAkD;AAClD,+CAA0C;AAE1C,MAAa,MAAO,SAAQ,wBAAU;IACpC,YAAY,EACV,KAAK,GAAG,EAAE,EACV,cAAc,EACd,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,GAAG,UAAU,EACd;QACC,KAAK,CAAC;YACJ,KAAK;YACL,cAAc;YACd,cAAc;YACd,WAAW;YACX,iBAAiB;YACjB,iBAAiB;YACjB,eAAe;YACf,gBAAgB;YAChB,SAAS;YACT,MAAM;YACN,OAAO;YACP,UAAU;YACV,MAAM;YACN,MAAM;YACN,OAAO;YACP,SAAS;YACT,YAAY;
|
|
1
|
+
{"version":3,"file":"dev-app.js","sourceRoot":"","sources":["../../src/dev-app.jsx"],"names":[],"mappings":";;;;AAAA,wCAAqC;AACrC,6CAA6C;AAE7C,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AAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;IAC9C,CAAC;CACF;AA5ID,wBA4IC"}
|
package/lib/cjs/index-types.d.ts
CHANGED
|
@@ -58,6 +58,9 @@ export interface MinimalHubtypeMessage {
|
|
|
58
58
|
action: string;
|
|
59
59
|
text: string;
|
|
60
60
|
}
|
|
61
|
+
export interface WebchatLocaleContents {
|
|
62
|
+
inputPlaceholder: string;
|
|
63
|
+
}
|
|
61
64
|
export interface PreviewUtils {
|
|
62
65
|
getChunkIdsGroupedBySource: (chunkIds: string[]) => Promise<ChunkIdsGroupedBySourceData[]>;
|
|
63
66
|
onClickOpenChunks: (chunkIdsGroupedBySource: ChunkIdsGroupedBySourceData[]) => void;
|
|
@@ -86,6 +89,7 @@ export interface WebchatArgs {
|
|
|
86
89
|
onMessage?: (app: WebchatApp, message: WebchatMessage) => void;
|
|
87
90
|
onTrackEvent?: TrackEventFunction;
|
|
88
91
|
onConnectionChange?: (app: WebchatApp, isOnline: boolean) => void;
|
|
92
|
+
contentsByLocale?: Record<string, WebchatLocaleContents>;
|
|
89
93
|
appId?: string;
|
|
90
94
|
visibility?: boolean | (() => boolean) | 'dynamic';
|
|
91
95
|
server?: ServerConfig;
|
|
@@ -111,6 +115,7 @@ export interface WebchatProps {
|
|
|
111
115
|
server?: ServerConfig;
|
|
112
116
|
localWebviews?: React.ComponentType[];
|
|
113
117
|
previewUtils?: PreviewUtils;
|
|
118
|
+
contentsByLocale?: Record<string, WebchatLocaleContents>;
|
|
114
119
|
}
|
|
115
120
|
export type EventArgs = {
|
|
116
121
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/index-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/index-types.ts"],"names":[],"mappings":";;;AAsKA,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,sBAAW,CAAA;IACX,wBAAa,CAAA;IACb,0BAAe,CAAA;IACf,4BAAiB,CAAA;AACnB,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,0BAAgB,CAAA;IAChB,4BAAkB,CAAA;AACpB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB"}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { BotonicInputTester, BotonicOutputTester } from './botonic-tester';
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './contexts';
|
|
4
|
+
export { DEBUG_SYSTEM_MESSAGES } from './debug-system-messages';
|
|
4
5
|
export { DevApp } from './dev-app';
|
|
5
6
|
export * from './index-types';
|
|
6
7
|
export { msgsToBotonic, msgToBotonic } from './msg-to-botonic';
|