@patternfly/chatbot 6.7.0-prerelease.4 → 6.7.0-prerelease.5
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/dist/cjs/Message/Message.d.ts +4 -2
- package/dist/cjs/Message/Message.js +19 -2
- package/dist/cjs/Message/Message.test.js +13 -1
- package/dist/css/main.css +4 -0
- package/dist/css/main.css.map +1 -1
- package/dist/esm/Message/Message.d.ts +4 -2
- package/dist/esm/Message/Message.js +19 -2
- package/dist/esm/Message/Message.test.js +13 -1
- package/package.json +8 -8
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +3 -13
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithClickedResponseActions.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomStructure.tsx +1 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithDeepThinking.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithDividers.tsx +1 -8
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +0 -5
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithIconSwapping.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownDeepThinking.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownToolCall.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownToolResponse.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMultipleActionGroups.tsx +0 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithPersistedActions.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +0 -8
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +0 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +0 -10
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolCall.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx +0 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +6 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +0 -3
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +1 -3
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotCompact.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotDisplayMode.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotScrolling.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotTranscripts.tsx +0 -7
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +0 -4
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +0 -3
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +0 -2
- package/patternfly-docs/content/extensions/chatbot/examples/demos/WhiteEmbeddedChatbot.tsx +0 -4
- package/src/Message/Message.scss +5 -0
- package/src/Message/Message.test.tsx +13 -1
- package/src/Message/Message.tsx +37 -11
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
|
|
3
3
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
4
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
5
4
|
|
|
6
5
|
export const MessageWithMultipleActionGroups: FunctionComponent = () => (
|
|
7
6
|
<>
|
|
8
7
|
<Message
|
|
9
8
|
name="Bot"
|
|
10
9
|
role="bot"
|
|
11
|
-
avatar={patternflyAvatar}
|
|
12
10
|
content="This message contains multiple action groups, each with their own selection persistence: \n1. Feedback actions (thumbs up/down) with persistent selections \n2. Utility actions (copy, download) with non-persistent selections \n3. Listen action with persistent selection"
|
|
13
11
|
actions={[
|
|
14
12
|
{
|
|
@@ -41,7 +39,6 @@ export const MessageWithMultipleActionGroups: FunctionComponent = () => (
|
|
|
41
39
|
<Message
|
|
42
40
|
name="Bot"
|
|
43
41
|
role="bot"
|
|
44
|
-
avatar={patternflyAvatar}
|
|
45
42
|
content="This message contains multiple action groups, both of which persist selections."
|
|
46
43
|
actions={[
|
|
47
44
|
{
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithPersistedActions.tsx
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
|
|
3
3
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
4
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
5
4
|
|
|
6
5
|
export const MessageWithPersistedActions: FunctionComponent = () => (
|
|
7
6
|
<Message
|
|
8
7
|
name="Bot"
|
|
9
8
|
role="bot"
|
|
10
|
-
avatar={patternflyAvatar}
|
|
11
9
|
content="I updated your account with those settings. You're ready to set up your first dashboard! Click a button and then click outside the message - notice the selection persists."
|
|
12
10
|
actions={{
|
|
13
11
|
// eslint-disable-next-line no-console
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
4
3
|
import { CopyIcon, WrenchIcon } from '@patternfly/react-icons';
|
|
5
4
|
|
|
6
5
|
export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
@@ -8,7 +7,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
8
7
|
<Message
|
|
9
8
|
name="Bot"
|
|
10
9
|
role="bot"
|
|
11
|
-
avatar={patternflyAvatar}
|
|
12
10
|
content="Did you clear your cache?"
|
|
13
11
|
quickResponses={[
|
|
14
12
|
{ id: '1', content: 'Yes', onClick: () => alert('Clicked yes') },
|
|
@@ -18,7 +16,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
18
16
|
<Message
|
|
19
17
|
name="Bot"
|
|
20
18
|
role="bot"
|
|
21
|
-
avatar={patternflyAvatar}
|
|
22
19
|
content="What browser are you noticing the issue in?"
|
|
23
20
|
quickResponses={[
|
|
24
21
|
{ id: '1', content: 'Microsoft Edge', onClick: () => alert('Clicked Edge') },
|
|
@@ -31,7 +28,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
31
28
|
<Message
|
|
32
29
|
name="Bot"
|
|
33
30
|
role="bot"
|
|
34
|
-
avatar={patternflyAvatar}
|
|
35
31
|
content="Welcome back, User! How can I help you today?"
|
|
36
32
|
quickResponses={[
|
|
37
33
|
{ id: '1', content: 'Help me with an access issue', onClick: () => alert('Clicked id 1') },
|
|
@@ -44,7 +40,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
44
40
|
<Message
|
|
45
41
|
name="Bot"
|
|
46
42
|
role="bot"
|
|
47
|
-
avatar={patternflyAvatar}
|
|
48
43
|
content="Did you clear your cache?"
|
|
49
44
|
quickResponses={[
|
|
50
45
|
{ id: '1', content: 'Yes', isDisabled: true },
|
|
@@ -54,7 +49,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
54
49
|
<Message
|
|
55
50
|
name="Bot"
|
|
56
51
|
role="bot"
|
|
57
|
-
avatar={patternflyAvatar}
|
|
58
52
|
content="Welcome back, User! How can I help you today?"
|
|
59
53
|
quickResponses={[
|
|
60
54
|
{ id: '1', content: 'Help me with an access issue', onClick: () => alert('Clicked id 1') },
|
|
@@ -67,7 +61,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
67
61
|
<Message
|
|
68
62
|
name="Bot"
|
|
69
63
|
role="bot"
|
|
70
|
-
avatar={patternflyAvatar}
|
|
71
64
|
content="Example with compact responses"
|
|
72
65
|
quickResponses={[
|
|
73
66
|
{ id: '1', content: 'Yes', onClick: () => alert('Clicked id 1') },
|
|
@@ -78,7 +71,6 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
|
|
|
78
71
|
<Message
|
|
79
72
|
name="Bot"
|
|
80
73
|
role="bot"
|
|
81
|
-
avatar={patternflyAvatar}
|
|
82
74
|
content="Example with icons"
|
|
83
75
|
quickResponses={[
|
|
84
76
|
{ id: '1', content: 'Update your settings', onClick: () => alert('Clicked yes'), icon: <WrenchIcon /> },
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
4
3
|
import { explorePipelinesQuickStart } from './explore-pipeline-quickstart.ts';
|
|
5
4
|
import { monitorSampleAppQuickStart } from '@patternfly/chatbot/src/Message/QuickStarts/monitor-sampleapp-quickstart.ts';
|
|
6
5
|
import { QuickStart } from '@patternfly/chatbot/dist/esm/Message/QuickStarts/types';
|
|
@@ -10,7 +9,6 @@ export const MessageWithQuickStartExample: FunctionComponent = () => (
|
|
|
10
9
|
<Message
|
|
11
10
|
name="Bot"
|
|
12
11
|
role="bot"
|
|
13
|
-
avatar={patternflyAvatar}
|
|
14
12
|
content="Follow this quick guide to install the Pipelines Operator."
|
|
15
13
|
quickStarts={{
|
|
16
14
|
quickStart: explorePipelinesQuickStart as QuickStart,
|
|
@@ -20,7 +18,6 @@ export const MessageWithQuickStartExample: FunctionComponent = () => (
|
|
|
20
18
|
<Message
|
|
21
19
|
name="Bot"
|
|
22
20
|
role="bot"
|
|
23
|
-
avatar={patternflyAvatar}
|
|
24
21
|
content="This quick start tile includes prerequisites and a default icon."
|
|
25
22
|
quickStarts={{
|
|
26
23
|
quickStart: monitorSampleAppQuickStart,
|
|
@@ -30,7 +27,6 @@ export const MessageWithQuickStartExample: FunctionComponent = () => (
|
|
|
30
27
|
<Message
|
|
31
28
|
name="Bot"
|
|
32
29
|
role="bot"
|
|
33
|
-
avatar={patternflyAvatar}
|
|
34
30
|
content="This quick start tile is compact"
|
|
35
31
|
quickStarts={{
|
|
36
32
|
quickStart: monitorSampleAppQuickStart,
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
|
|
3
3
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
4
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
5
4
|
|
|
6
5
|
export const ResponseActionExample: FunctionComponent = () => (
|
|
7
6
|
<>
|
|
8
7
|
<Message
|
|
9
8
|
name="Bot"
|
|
10
9
|
role="bot"
|
|
11
|
-
avatar={patternflyAvatar}
|
|
12
10
|
content="I updated your account with those settings. You're ready to set up your first dashboard!"
|
|
13
11
|
actions={{
|
|
14
12
|
// eslint-disable-next-line no-console
|
|
@@ -27,7 +25,6 @@ export const ResponseActionExample: FunctionComponent = () => (
|
|
|
27
25
|
name="Bot"
|
|
28
26
|
role="bot"
|
|
29
27
|
showActionsOnInteraction
|
|
30
|
-
avatar={patternflyAvatar}
|
|
31
28
|
content="This message has response actions visually hidden until you hover over the message via mouse, or an action would receive focus via keyboard."
|
|
32
29
|
actions={{
|
|
33
30
|
// eslint-disable-next-line no-console
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
4
3
|
import { Button, Flex, FlexItem, Label, Popover } from '@patternfly/react-core';
|
|
5
4
|
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
|
|
6
5
|
|
|
@@ -31,7 +30,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
31
30
|
<Message
|
|
32
31
|
name="Bot"
|
|
33
32
|
role="bot"
|
|
34
|
-
avatar={patternflyAvatar}
|
|
35
33
|
content="This example has a custom subtitle and footer with no pagination"
|
|
36
34
|
sources={{
|
|
37
35
|
sources: [
|
|
@@ -83,7 +81,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
83
81
|
<Message
|
|
84
82
|
name="Bot"
|
|
85
83
|
role="bot"
|
|
86
|
-
avatar={patternflyAvatar}
|
|
87
84
|
content="This example has a body description that's within the recommended limit of 2 lines:"
|
|
88
85
|
sources={{
|
|
89
86
|
sources: [
|
|
@@ -112,7 +109,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
112
109
|
<Message
|
|
113
110
|
name="Bot"
|
|
114
111
|
role="bot"
|
|
115
|
-
avatar={patternflyAvatar}
|
|
116
112
|
content="This example has a body description that's longer than the recommended limit of 2 lines, with a link to load the rest of the description:"
|
|
117
113
|
sources={{
|
|
118
114
|
sources: [
|
|
@@ -141,7 +137,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
141
137
|
<Message
|
|
142
138
|
name="Bot"
|
|
143
139
|
role="bot"
|
|
144
|
-
avatar={patternflyAvatar}
|
|
145
140
|
content="This example has a truncated title:"
|
|
146
141
|
sources={{
|
|
147
142
|
sources: [
|
|
@@ -164,7 +159,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
164
159
|
<Message
|
|
165
160
|
name="Bot"
|
|
166
161
|
role="bot"
|
|
167
|
-
avatar={patternflyAvatar}
|
|
168
162
|
content="This example only includes 1 source:"
|
|
169
163
|
sources={{
|
|
170
164
|
sources: [
|
|
@@ -181,7 +175,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
181
175
|
<Message
|
|
182
176
|
name="Bot"
|
|
183
177
|
role="bot"
|
|
184
|
-
avatar={patternflyAvatar}
|
|
185
178
|
content="This example has a title and no body description:"
|
|
186
179
|
sources={{
|
|
187
180
|
sources: [
|
|
@@ -203,7 +196,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
203
196
|
<Message
|
|
204
197
|
name="Bot"
|
|
205
198
|
role="bot"
|
|
206
|
-
avatar={patternflyAvatar}
|
|
207
199
|
content="This example displays the source as a link, without a title (not recommended)"
|
|
208
200
|
sources={{
|
|
209
201
|
sources: [
|
|
@@ -223,7 +215,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
223
215
|
<Message
|
|
224
216
|
name="Bot"
|
|
225
217
|
role="bot"
|
|
226
|
-
avatar={patternflyAvatar}
|
|
227
218
|
content="This example displays a compact sources card"
|
|
228
219
|
sources={{
|
|
229
220
|
sources: [
|
|
@@ -245,7 +236,6 @@ export const MessageWithSourcesExample: FunctionComponent = () => {
|
|
|
245
236
|
<Message
|
|
246
237
|
name="Bot"
|
|
247
238
|
role="bot"
|
|
248
|
-
avatar={patternflyAvatar}
|
|
249
239
|
content="This example demonstrates the non-paginated layout option. When enabled, all source cards are displayed in a flex layout that wraps automatically based on available space:"
|
|
250
240
|
sources={{
|
|
251
241
|
sources: [
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolCall.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, useState } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
4
3
|
import { Checkbox, Flex, FlexItem } from '@patternfly/react-core';
|
|
5
4
|
|
|
6
5
|
export const MessageWithToolCallExample: FunctionComponent = () => {
|
|
@@ -19,7 +18,6 @@ export const MessageWithToolCallExample: FunctionComponent = () => {
|
|
|
19
18
|
<Message
|
|
20
19
|
name="Bot"
|
|
21
20
|
role="bot"
|
|
22
|
-
avatar={patternflyAvatar}
|
|
23
21
|
content="This example has a static tool call title:"
|
|
24
22
|
toolCall={{
|
|
25
23
|
titleText: "Calling 'awesome_tool'",
|
|
@@ -30,7 +28,6 @@ export const MessageWithToolCallExample: FunctionComponent = () => {
|
|
|
30
28
|
<Message
|
|
31
29
|
name="Bot"
|
|
32
30
|
role="bot"
|
|
33
|
-
avatar={patternflyAvatar}
|
|
34
31
|
content="This example has an expandable tool call title, with an additional description:"
|
|
35
32
|
toolCall={{
|
|
36
33
|
titleText: "Calling 'awesome_tool_expansion'",
|
|
@@ -42,7 +39,6 @@ export const MessageWithToolCallExample: FunctionComponent = () => {
|
|
|
42
39
|
<Message
|
|
43
40
|
name="Bot"
|
|
44
41
|
role="bot"
|
|
45
|
-
avatar={patternflyAvatar}
|
|
46
42
|
content="This example has an expandable tool call that is expanded by default:"
|
|
47
43
|
toolCall={{
|
|
48
44
|
isDefaultExpanded: true,
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useState, FunctionComponent, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
|
-
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
4
3
|
import { CopyIcon, WrenchIcon } from '@patternfly/react-icons';
|
|
5
4
|
import {
|
|
6
5
|
Button,
|
|
@@ -27,7 +26,6 @@ export const MessageWithToolResponseExample: FunctionComponent = () => {
|
|
|
27
26
|
<Message
|
|
28
27
|
name="Bot"
|
|
29
28
|
role="bot"
|
|
30
|
-
avatar={patternflyAvatar}
|
|
31
29
|
content="This message has a body description that's within the recommended limit of 2 lines:"
|
|
32
30
|
toolResponse={{
|
|
33
31
|
toggleContent: 'Tool response: toolName',
|
|
@@ -138,7 +136,6 @@ export const MessageWithToolResponseExample: FunctionComponent = () => {
|
|
|
138
136
|
<Message
|
|
139
137
|
name="Bot"
|
|
140
138
|
role="bot"
|
|
141
|
-
avatar={patternflyAvatar}
|
|
142
139
|
content="This message has a tool response that is collapsed by default:"
|
|
143
140
|
toolResponse={{
|
|
144
141
|
isDefaultExpanded: false,
|
|
@@ -333,6 +333,12 @@ _Italic text, formatted with single underscores_
|
|
|
333
333
|
avatar={userAvatar}
|
|
334
334
|
avatarProps={{ isBordered: true }}
|
|
335
335
|
/>
|
|
336
|
+
<Message
|
|
337
|
+
name="User"
|
|
338
|
+
role="user"
|
|
339
|
+
content="This is a user message with `avatarProps` set to set an avatar with initials and a blue color."
|
|
340
|
+
avatarProps={{ initials: 'A', color: 'blue' }}
|
|
341
|
+
/>
|
|
336
342
|
<Message name="User" role="user" content="This is a user message with no avatar" />
|
|
337
343
|
<Message
|
|
338
344
|
name="User"
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Fragment, FunctionComponent, useState, useEffect } from 'react';
|
|
2
2
|
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
|
3
3
|
import userAvatar from './user_avatar.svg';
|
|
4
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
5
4
|
import {
|
|
6
5
|
Accordion,
|
|
7
6
|
AccordionContent,
|
|
@@ -637,7 +636,6 @@ export const UserMessageWithExtraContent: FunctionComponent = () => (
|
|
|
637
636
|
}}
|
|
638
637
|
/>
|
|
639
638
|
<Message
|
|
640
|
-
avatar={patternflyAvatar}
|
|
641
639
|
name="Bot"
|
|
642
640
|
role="bot"
|
|
643
641
|
content="This is a message with a live progress summmary card."
|
|
@@ -647,7 +645,6 @@ export const UserMessageWithExtraContent: FunctionComponent = () => (
|
|
|
647
645
|
}}
|
|
648
646
|
/>
|
|
649
647
|
<Message
|
|
650
|
-
avatar={patternflyAvatar}
|
|
651
648
|
name="Bot"
|
|
652
649
|
role="bot"
|
|
653
650
|
content="This is a message with a version selector card."
|
|
@@ -657,7 +654,6 @@ export const UserMessageWithExtraContent: FunctionComponent = () => (
|
|
|
657
654
|
}}
|
|
658
655
|
/>
|
|
659
656
|
<Message
|
|
660
|
-
avatar={patternflyAvatar}
|
|
661
657
|
name="Bot"
|
|
662
658
|
role="bot"
|
|
663
659
|
content="All set! I've finished building the Discovery ISO. The next step is to download it and boot your hosts, which you can do using the summary card I've prepared for you:"
|
package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import MessageBar from '@patternfly/chatbot/dist/dynamic/MessageBar';
|
|
|
8
8
|
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
|
|
9
9
|
import Message, { MessageProps } from '@patternfly/chatbot/dist/dynamic/Message';
|
|
10
10
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
11
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
12
11
|
import { FormGroup, Radio } from '@patternfly/react-core';
|
|
13
12
|
|
|
14
13
|
export const ChatbotWelcomeInteractionDemo: FunctionComponent = () => {
|
|
@@ -50,7 +49,6 @@ export const ChatbotWelcomeInteractionDemo: FunctionComponent = () => {
|
|
|
50
49
|
content: 'API response goes here',
|
|
51
50
|
name: 'Bot',
|
|
52
51
|
isLoading: true,
|
|
53
|
-
avatar: patternflyAvatar,
|
|
54
52
|
timestamp: date.toLocaleString()
|
|
55
53
|
});
|
|
56
54
|
setMessages(newMessages);
|
|
@@ -70,7 +68,6 @@ export const ChatbotWelcomeInteractionDemo: FunctionComponent = () => {
|
|
|
70
68
|
content: 'API response goes here',
|
|
71
69
|
name: 'Bot',
|
|
72
70
|
isLoading: false,
|
|
73
|
-
avatar: patternflyAvatar,
|
|
74
71
|
timestamp: date.toLocaleString(),
|
|
75
72
|
actions: {
|
|
76
73
|
// eslint-disable-next-line no-console
|
|
@@ -30,7 +30,6 @@ import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
|
30
30
|
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
31
31
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
32
32
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
33
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
34
33
|
import { getTrackingProviders } from '@patternfly/chatbot/dist/dynamic/tracking';
|
|
35
34
|
import { InitProps } from '@patternfly/chatbot/dist/dynamic/tracking';
|
|
36
35
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
@@ -108,7 +107,6 @@ const initialMessages: MessageProps[] = [
|
|
|
108
107
|
role: 'bot',
|
|
109
108
|
content: markdown,
|
|
110
109
|
name: 'Bot',
|
|
111
|
-
avatar: patternflyAvatar,
|
|
112
110
|
timestamp: date.toLocaleString(),
|
|
113
111
|
actions: {
|
|
114
112
|
positive: { onClick: () => tracking.trackSingleItem(actionEventName, { response: 'Good response' }) },
|
|
@@ -225,7 +223,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
225
223
|
content: 'API response goes here',
|
|
226
224
|
name: 'Bot',
|
|
227
225
|
isLoading: true,
|
|
228
|
-
avatar: patternflyAvatar,
|
|
229
226
|
timestamp: date.toLocaleString()
|
|
230
227
|
});
|
|
231
228
|
setMessages(newMessages);
|
|
@@ -245,7 +242,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
245
242
|
content: 'API response goes here',
|
|
246
243
|
name: 'Bot',
|
|
247
244
|
isLoading: false,
|
|
248
|
-
avatar: patternflyAvatar,
|
|
249
245
|
timestamp: date.toLocaleString(),
|
|
250
246
|
actions: {
|
|
251
247
|
positive: { onClick: () => tracking.trackSingleItem(actionEvent2, { response: 'Good response' }) },
|
|
@@ -28,7 +28,6 @@ import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
|
28
28
|
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
29
29
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
30
30
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
31
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
32
31
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
33
32
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
34
33
|
|
|
@@ -70,7 +69,6 @@ export const BasicDemo: FunctionComponent = () => {
|
|
|
70
69
|
{
|
|
71
70
|
role: 'bot',
|
|
72
71
|
content: 'Great, I can reference this attachment throughout our conversation.',
|
|
73
|
-
avatar: patternflyAvatar,
|
|
74
72
|
name: 'Bot'
|
|
75
73
|
}
|
|
76
74
|
];
|
|
@@ -14,7 +14,6 @@ import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel'
|
|
|
14
14
|
import { BellIcon, CalendarAltIcon, ClipboardIcon, CodeIcon, UploadIcon } from '@patternfly/react-icons';
|
|
15
15
|
import { useDropzone } from 'react-dropzone';
|
|
16
16
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
17
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
18
17
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
19
18
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
20
19
|
import { cloneElement, FunctionComponent, isValidElement, ReactNode, useState, Children } from 'react';
|
|
@@ -79,8 +78,7 @@ const messages: MessageProps[] = [
|
|
|
79
78
|
{
|
|
80
79
|
role: 'bot',
|
|
81
80
|
content: 'I sure can!',
|
|
82
|
-
name: 'Bot'
|
|
83
|
-
avatar: patternflyAvatar
|
|
81
|
+
name: 'Bot'
|
|
84
82
|
}
|
|
85
83
|
];
|
|
86
84
|
|
|
@@ -30,7 +30,6 @@ import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
|
30
30
|
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
31
31
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
32
32
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
33
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
34
33
|
|
|
35
34
|
const footnoteProps = {
|
|
36
35
|
label: 'Always review AI-generated content prior to use.'
|
|
@@ -89,7 +88,6 @@ const initialMessages: MessageProps[] = [
|
|
|
89
88
|
role: 'bot',
|
|
90
89
|
content: markdown,
|
|
91
90
|
name: 'Bot',
|
|
92
|
-
avatar: patternflyAvatar,
|
|
93
91
|
timestamp: date.toLocaleString(),
|
|
94
92
|
actions: {
|
|
95
93
|
// eslint-disable-next-line no-console
|
|
@@ -208,7 +206,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
208
206
|
content: 'API response goes here',
|
|
209
207
|
name: 'Bot',
|
|
210
208
|
isLoading: true,
|
|
211
|
-
avatar: patternflyAvatar,
|
|
212
209
|
timestamp: date.toLocaleString()
|
|
213
210
|
});
|
|
214
211
|
setMessages(newMessages);
|
|
@@ -228,7 +225,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
228
225
|
content: 'API response goes here',
|
|
229
226
|
name: 'Bot',
|
|
230
227
|
isLoading: false,
|
|
231
|
-
avatar: patternflyAvatar,
|
|
232
228
|
timestamp: date.toLocaleString(),
|
|
233
229
|
actions: {
|
|
234
230
|
// eslint-disable-next-line no-console
|
|
@@ -48,7 +48,6 @@ import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
|
|
|
48
48
|
import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
|
|
49
49
|
import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
|
|
50
50
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
51
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
52
51
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
53
52
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
54
53
|
|
|
@@ -75,7 +74,6 @@ const initialMessages: MessageProps[] = [
|
|
|
75
74
|
role: 'bot',
|
|
76
75
|
content: markdown,
|
|
77
76
|
name: 'Bot',
|
|
78
|
-
avatar: patternflyAvatar,
|
|
79
77
|
timestamp: date.toLocaleString(),
|
|
80
78
|
actions: {
|
|
81
79
|
// eslint-disable-next-line no-console
|
|
@@ -198,7 +196,6 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
|
|
|
198
196
|
role: 'bot',
|
|
199
197
|
content: 'API response goes here',
|
|
200
198
|
name: 'Bot',
|
|
201
|
-
avatar: patternflyAvatar,
|
|
202
199
|
isLoading: true,
|
|
203
200
|
timestamp: date.toLocaleString()
|
|
204
201
|
});
|
|
@@ -213,7 +210,6 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
|
|
|
213
210
|
role: 'bot',
|
|
214
211
|
content: 'API response goes here',
|
|
215
212
|
name: 'Bot',
|
|
216
|
-
avatar: patternflyAvatar,
|
|
217
213
|
isLoading: false,
|
|
218
214
|
actions: {
|
|
219
215
|
// eslint-disable-next-line no-console
|
|
@@ -41,7 +41,6 @@ import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
|
41
41
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
42
42
|
import { BarsIcon } from '@patternfly/react-icons';
|
|
43
43
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
44
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
45
44
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
46
45
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
47
46
|
|
|
@@ -102,7 +101,6 @@ const initialMessages: MessageProps[] = [
|
|
|
102
101
|
role: 'bot',
|
|
103
102
|
content: markdown,
|
|
104
103
|
name: 'Bot',
|
|
105
|
-
avatar: patternflyAvatar,
|
|
106
104
|
timestamp: date.toLocaleString(),
|
|
107
105
|
actions: {
|
|
108
106
|
// eslint-disable-next-line no-console
|
|
@@ -218,7 +216,6 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
|
|
|
218
216
|
role: 'bot',
|
|
219
217
|
content: 'API response goes here',
|
|
220
218
|
name: 'Bot',
|
|
221
|
-
avatar: patternflyAvatar,
|
|
222
219
|
isLoading: true,
|
|
223
220
|
timestamp: date.toLocaleString()
|
|
224
221
|
});
|
|
@@ -238,7 +235,6 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
|
|
|
238
235
|
role: 'bot',
|
|
239
236
|
content: 'API response goes here',
|
|
240
237
|
name: 'Bot',
|
|
241
|
-
avatar: patternflyAvatar,
|
|
242
238
|
isLoading: false,
|
|
243
239
|
actions: {
|
|
244
240
|
// eslint-disable-next-line no-console
|
|
@@ -31,7 +31,6 @@ import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
|
31
31
|
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
32
32
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
33
33
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
34
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
35
34
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
36
35
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
37
36
|
|
|
@@ -94,7 +93,6 @@ const initialMessages: MessageProps[] = [
|
|
|
94
93
|
role: 'bot',
|
|
95
94
|
content: markdown,
|
|
96
95
|
name: 'Bot',
|
|
97
|
-
avatar: patternflyAvatar,
|
|
98
96
|
timestamp: date.toLocaleString(),
|
|
99
97
|
actions: {
|
|
100
98
|
// eslint-disable-next-line no-console
|
|
@@ -233,7 +231,6 @@ export const ChatbotScrollingDemo: React.FunctionComponent = () => {
|
|
|
233
231
|
content: 'API response goes here',
|
|
234
232
|
name: 'Bot',
|
|
235
233
|
isLoading: true,
|
|
236
|
-
avatar: patternflyAvatar,
|
|
237
234
|
timestamp: date.toLocaleString()
|
|
238
235
|
});
|
|
239
236
|
setMessages(newMessages);
|
|
@@ -255,7 +252,6 @@ export const ChatbotScrollingDemo: React.FunctionComponent = () => {
|
|
|
255
252
|
content: 'API response goes here.',
|
|
256
253
|
name: 'Bot',
|
|
257
254
|
isLoading: false,
|
|
258
|
-
avatar: patternflyAvatar,
|
|
259
255
|
timestamp: date.toLocaleString(),
|
|
260
256
|
actions: {
|
|
261
257
|
// eslint-disable-next-line no-console
|
|
@@ -30,7 +30,6 @@ import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
|
30
30
|
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
|
31
31
|
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
|
32
32
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
33
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
34
33
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
35
34
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
36
35
|
import saveAs from 'file-saver';
|
|
@@ -182,7 +181,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
182
181
|
role: 'bot',
|
|
183
182
|
content: markdown,
|
|
184
183
|
name: 'Bot',
|
|
185
|
-
avatar: patternflyAvatar,
|
|
186
184
|
timestamp: date.toLocaleString(),
|
|
187
185
|
actions: {
|
|
188
186
|
download: {
|
|
@@ -193,7 +191,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
193
191
|
role: 'bot',
|
|
194
192
|
content: markdown,
|
|
195
193
|
name: 'Bot',
|
|
196
|
-
avatar: patternflyAvatar,
|
|
197
194
|
timestamp: date.toLocaleString()
|
|
198
195
|
},
|
|
199
196
|
selectedModel
|
|
@@ -292,7 +289,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
292
289
|
content: 'API response goes here',
|
|
293
290
|
name: 'Bot',
|
|
294
291
|
isLoading: true,
|
|
295
|
-
avatar: patternflyAvatar,
|
|
296
292
|
timestamp: date.toLocaleString()
|
|
297
293
|
});
|
|
298
294
|
setMessages(newMessages);
|
|
@@ -308,7 +304,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
308
304
|
loadedMessages.pop();
|
|
309
305
|
const id = generateId();
|
|
310
306
|
const timestamp = date.toLocaleString();
|
|
311
|
-
const avatar = patternflyAvatar;
|
|
312
307
|
const name = 'Bot';
|
|
313
308
|
const content = 'API response goes here';
|
|
314
309
|
const role = 'bot';
|
|
@@ -318,7 +313,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
318
313
|
content,
|
|
319
314
|
name,
|
|
320
315
|
isLoading: false,
|
|
321
|
-
avatar,
|
|
322
316
|
timestamp,
|
|
323
317
|
actions: {
|
|
324
318
|
download: {
|
|
@@ -329,7 +323,6 @@ export const ChatbotDemo: FunctionComponent = () => {
|
|
|
329
323
|
role,
|
|
330
324
|
content,
|
|
331
325
|
name,
|
|
332
|
-
avatar,
|
|
333
326
|
timestamp
|
|
334
327
|
},
|
|
335
328
|
selectedModel
|
|
@@ -39,7 +39,6 @@ import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
|
|
|
39
39
|
import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
|
40
40
|
import { BarsIcon } from '@patternfly/react-icons';
|
|
41
41
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
42
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
43
42
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
44
43
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
45
44
|
|
|
@@ -100,7 +99,6 @@ const initialMessages: MessageProps[] = [
|
|
|
100
99
|
role: 'bot',
|
|
101
100
|
content: markdown,
|
|
102
101
|
name: 'Bot',
|
|
103
|
-
avatar: patternflyAvatar,
|
|
104
102
|
timestamp: date.toLocaleString(),
|
|
105
103
|
actions: {
|
|
106
104
|
// eslint-disable-next-line no-console
|
|
@@ -209,7 +207,6 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
|
|
|
209
207
|
role: 'bot',
|
|
210
208
|
content: 'API response goes here',
|
|
211
209
|
name: 'Bot',
|
|
212
|
-
avatar: patternflyAvatar,
|
|
213
210
|
isLoading: true,
|
|
214
211
|
timestamp: date.toLocaleString()
|
|
215
212
|
});
|
|
@@ -229,7 +226,6 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
|
|
|
229
226
|
role: 'bot',
|
|
230
227
|
content: 'API response goes here',
|
|
231
228
|
name: 'Bot',
|
|
232
|
-
avatar: patternflyAvatar,
|
|
233
229
|
isLoading: false,
|
|
234
230
|
actions: {
|
|
235
231
|
// eslint-disable-next-line no-console
|
package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx
CHANGED
|
@@ -22,7 +22,6 @@ import ChatbotHeader, { ChatbotHeaderMain } from '@patternfly/chatbot/dist/dynam
|
|
|
22
22
|
import Compare from '@patternfly/chatbot/dist/dynamic/Compare';
|
|
23
23
|
import { BarsIcon } from '@patternfly/react-icons';
|
|
24
24
|
import userAvatar from '../Messages/user_avatar.svg';
|
|
25
|
-
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
|
26
25
|
import '@patternfly/react-core/dist/styles/base.css';
|
|
27
26
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
28
27
|
|
|
@@ -53,7 +52,6 @@ export const CompareChild = ({ name, input, hasNewInput, setIsSendButtonDisabled
|
|
|
53
52
|
timestamp: `${date?.toLocaleDateString()} ${date?.toLocaleTimeString()}`
|
|
54
53
|
});
|
|
55
54
|
newMessages.push({
|
|
56
|
-
avatar: patternflyAvatar,
|
|
57
55
|
id: generateId(),
|
|
58
56
|
name,
|
|
59
57
|
role: 'bot',
|
|
@@ -76,7 +74,6 @@ export const CompareChild = ({ name, input, hasNewInput, setIsSendButtonDisabled
|
|
|
76
74
|
role: 'bot',
|
|
77
75
|
content: `API response from ${name} goes here`,
|
|
78
76
|
name,
|
|
79
|
-
avatar: patternflyAvatar,
|
|
80
77
|
isLoading: false,
|
|
81
78
|
actions: {
|
|
82
79
|
// eslint-disable-next-line no-console
|