You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ import userAvatar from './user_avatar.svg';
48
48
import squareImg from './PF-social-color-square.svg';
49
49
import { CSSProperties, useState, Fragment, FunctionComponent, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent, Ref, isValidElement, cloneElement, Children, ReactNode, useRef, useEffect } from 'react';
50
50
import FilePreview from '@patternfly/chatbot/dist/dynamic/FilePreview';
51
+
import ImagePreview from '@patternfly/chatbot/dist/dynamic/ImagePreview';
52
+
import filePreview from './file-preview.svg';
51
53
52
54
The `content` prop of the `<Message>` component is passed to a `<Markdown>` component (from [react-markdown](https://remarkjs.github.io/react-markdown/)), which is configured to translate plain text strings into PatternFly [`<Content>` components](/components/content) and code blocks into PatternFly [`<CodeBlock>` components.](/components/code-block)
53
55
@@ -189,7 +191,7 @@ If you are using [model context protocol (MCP)](https://www.redhat.com/en/blog/m
189
191
190
192
### Messages with deep thinking
191
193
192
-
You can share details about the "thought process" behind an LLM's response, also known as deep thinking. To display a customizable, expandable card with these details, pass `deepThinking` to `<Message>` and provide a subheading (optional) and content body.
194
+
You can share details about the "thought process" behind an LLM's response, also known as deep thinking. To display a customizable, expandable card with these details, pass `deepThinking` to `<Message>` and provide a subheading (optional) and content body.
193
195
194
196
Because this is an evolving area, this card content is currently fully customizable.
195
197
@@ -274,6 +276,14 @@ To allow users to edit an attached file, load a new code editor within the ChatB
274
276
275
277
```
276
278
279
+
### Image preview
280
+
281
+
To allow users to preview images, load a modal that contains a view of the file name, file size, and the image. Users can toggle between multiple images by using pagination controls at the bottom of the modal. Return users to the main ChatBot window once they close the modal.
282
+
283
+
```js file="./ImagePreview.tsx"
284
+
285
+
```
286
+
277
287
### File preview
278
288
279
289
If the contents of an attachment cannot be previewed, load a file preview modal with a view of the file name and an unavailable message. When users close the modal, return to the main ChatBot window.
0 commit comments