Skip to content

Commit a0f40c3

Browse files
committed
chore(docs): rearrange ai chat log sections
1 parent 9ca09bd commit a0f40c3

File tree

1 file changed

+31
-31
lines changed
  • packages/paste-website/src/pages/components/ai-chat-log

1 file changed

+31
-31
lines changed

packages/paste-website/src/pages/components/ai-chat-log/index.mdx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -206,33 +206,6 @@ The `AIChatMessageBody` component has two sizes, `size="default"` and `size="ful
206206
</AIChatLog>`}
207207
</LivePreview>
208208

209-
### Messages with animation
210-
The `AIChatMessageBody` component has an optional `animate` prop that can be used to apply a typewriter animation to the text. This should only be applied to the most recent message received from the AI.
211-
212-
<LivePreview
213-
scope={{
214-
AIChatLog,
215-
AIChatMessage,
216-
AIChatMessageAuthor,
217-
AIChatMessageBody,
218-
AIChatMessageActionCard,
219-
AIChatMessageActionGroup,
220-
Button,
221-
ThumbsUpIcon,
222-
ThumbsDownIcon,
223-
CopyIcon,
224-
RefreshIcon,
225-
Button,
226-
ResetIcon,
227-
Anchor,
228-
InlineCode
229-
}}
230-
language="jsx"
231-
noInline
232-
>
233-
{animatedBotWithFeedback}
234-
</LivePreview>
235-
236209
### Message with Actions
237210

238211
Message actions can be used to provide quick responses or actions to the user.
@@ -283,14 +256,14 @@ Actions can still be added in `AIChatMessageBody` which are returned from the AI
283256
{botWithBodyActions}
284257
</LivePreview>
285258

286-
### Loading States
259+
### Generating Messages
260+
261+
#### Loading
287262

288263
Use the `AIChatMessageLoading` component to indicate that the bot is typing or processing a response. During this time **no user input should be accepted**. No new messages should be added to a chat until the AI operation is finished processing.
289264

290265
The SkeletonLoader lengths vary on each render to give a more natural pending message body interaction.
291266

292-
#### Loading
293-
294267
<LivePreview
295268
scope={{
296269
AIChatLog,
@@ -305,7 +278,7 @@ The SkeletonLoader lengths vary on each render to give a more natural pending me
305278
{botWithLoading}
306279
</LivePreview>
307280

308-
#### Loading with Stop Button
281+
##### Loading with Stop Button
309282

310283
<LivePreview
311284
scope={{
@@ -321,6 +294,33 @@ The SkeletonLoader lengths vary on each render to give a more natural pending me
321294
{botWithLoadingStopButton}
322295
</LivePreview>
323296

297+
### Animating
298+
The `AIChatMessageBody` component has an optional `animated` prop that can be used to apply a typewriter animation to the text. This should only be applied to the most recent message received from the AI.
299+
300+
<LivePreview
301+
scope={{
302+
AIChatLog,
303+
AIChatMessage,
304+
AIChatMessageAuthor,
305+
AIChatMessageBody,
306+
AIChatMessageActionCard,
307+
AIChatMessageActionGroup,
308+
Button,
309+
ThumbsUpIcon,
310+
ThumbsDownIcon,
311+
CopyIcon,
312+
RefreshIcon,
313+
Button,
314+
ResetIcon,
315+
Anchor,
316+
InlineCode
317+
}}
318+
language="jsx"
319+
noInline
320+
>
321+
{animatedBotWithFeedback}
322+
</LivePreview>
323+
324324
### Customizing Avatar
325325

326326
`AIChatMessageAuthor` can be customized by passing an icon, image, or string to the `avatarIcon`, `avatarSrc`, or `avatarName` props. [Learn more about the API](/components/ai-chat-log/api#aichatmessageauthor).

0 commit comments

Comments
 (0)