Skip to content

Commit 124e337

Browse files
authored
Merge pull request #599 from rebeccaalpert/transcripts
chore(demo): Add demo for transcripts
2 parents 62d4a0c + 0015506 commit 124e337

File tree

5 files changed

+590
-1
lines changed

5 files changed

+590
-1
lines changed

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/module/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
"victory-create-container": "^37.1.1",
7373
"victory-cursor-container": "^37.1.1",
7474
"victory-tooltip": "^37.1.1",
75-
"victory-bar": "^37.1.1"
75+
"victory-bar": "^37.1.1",
76+
"file-saver": "^2.0.5"
7677
},
7778
"overrides": {
7879
"puppeteer": "^23.6.1",

packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import userAvatar from '../Messages/user_avatar.svg';
5959
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
6060
import { getTrackingProviders } from "@patternfly/chatbot/dist/dynamic/tracking";
6161
import { useEffect,useCallback, useRef, useState, FunctionComponent, MouseEvent } from 'react';
62+
import saveAs from 'file-saver';
6263

6364
### Basic ChatBot
6465

@@ -149,3 +150,17 @@ Your code structure should look like this:
149150
```js file="./EmbeddedComparisonChatbot.tsx" isFullscreen
150151

151152
```
153+
154+
### Chat transcripts
155+
156+
This demo illustrates how you could add downloadable transcripts to your ChatBot, which outline conversation details in a Markdown file. This approach allows users to easily share information from a conversation with others.
157+
158+
A message transcript includes details from a single chat message. To download a sample message transcript in this demo, click the "Download" action under a bot message.
159+
160+
A conversation transcript includes details from the entirety of a ChatBot conversation. To download a sample conversation transcript in this demo, open the chat history menu and click "Download" in the options menu for the conversation.
161+
162+
In this example, file download is implemented with [file-saver](https://www.npmjs.com/package/file-saver).
163+
164+
```js file="./ChatbotTranscripts.tsx" isFullscreen
165+
166+
```

0 commit comments

Comments
 (0)