|
1 | 1 | import { useIsMutating, useQuery } from "@tanstack/react-query"; |
| 2 | +import { AIChatLog } from "@twilio-paste/ai-chat-log"; |
2 | 3 | import { Box } from "@twilio-paste/box"; |
3 | | -import { ChatBookend, ChatBookendItem, ChatLog } from "@twilio-paste/chat-log"; |
| 4 | +import { Text } from "@twilio-paste/text"; |
4 | 5 | import * as React from "react"; |
5 | 6 | import { useShallow } from "zustand/react/shallow"; |
6 | 7 |
|
@@ -62,29 +63,49 @@ export const AssistantCanvas: React.FC<AssistantCanvasProps> = ({ selectedThread |
62 | 63 | <Box ref={scrollerRef} tabIndex={0} overflowY="auto"> |
63 | 64 | <Box maxWidth="1000px" marginX="auto"> |
64 | 65 | {activeRun != null && <AssistantMessagePoller />} |
65 | | - <ChatLog ref={loggerRef}> |
66 | | - <ChatBookend> |
67 | | - <ChatBookendItem> |
68 | | - Welcome to the Paste Design System Assistant! We're excited to have you here. |
69 | | - </ChatBookendItem> |
70 | | - </ChatBookend> |
71 | | - <ChatBookend> |
72 | | - <ChatBookendItem> |
73 | | - Keep in mind that this is an experimental tool and so the information provided{" "} |
74 | | - <strong>may not be entirely accurate</strong>. |
75 | | - </ChatBookendItem> |
76 | | - <ChatBookendItem> |
77 | | - Your conversations are not used to train OpenAI's models, but are stored by OpenAI. |
78 | | - </ChatBookendItem> |
79 | | - </ChatBookend> |
| 66 | + <AIChatLog ref={loggerRef}> |
| 67 | + <Text |
| 68 | + as="div" |
| 69 | + color="colorTextWeak" |
| 70 | + fontSize="fontSize20" |
| 71 | + lineHeight="lineHeight20" |
| 72 | + fontWeight="fontWeightMedium" |
| 73 | + textAlign="center" |
| 74 | + > |
| 75 | + Welcome to the Paste Design System Assistant! We're excited to have you here. |
| 76 | + </Text> |
| 77 | + <Text |
| 78 | + as="div" |
| 79 | + color="colorTextWeak" |
| 80 | + fontSize="fontSize20" |
| 81 | + lineHeight="lineHeight20" |
| 82 | + fontWeight="fontWeightMedium" |
| 83 | + textAlign="center" |
| 84 | + > |
| 85 | + Keep in mind that this is an experimental tool and so the information provided{" "} |
| 86 | + <Text as="div" fontWeight="fontWeightBold"> |
| 87 | + may not be entirely accurate |
| 88 | + </Text> |
| 89 | + . |
| 90 | + </Text> |
| 91 | + <Text |
| 92 | + as="div" |
| 93 | + color="colorTextWeak" |
| 94 | + fontSize="fontSize20" |
| 95 | + lineHeight="lineHeight20" |
| 96 | + fontWeight="fontWeightMedium" |
| 97 | + textAlign="center" |
| 98 | + > |
| 99 | + Your conversations are not used to train OpenAI's models, but are stored by OpenAI. |
| 100 | + </Text> |
80 | 101 | {messages?.map((threadMessage): React.ReactNode => { |
81 | 102 | if (threadMessage.role === "assistant") { |
82 | 103 | return <AssistantMessage key={threadMessage.id} threadMessage={threadMessage} />; |
83 | 104 | } |
84 | 105 | return <UserMessage key={threadMessage.id} threadMessage={threadMessage} />; |
85 | 106 | })} |
86 | 107 | {(isCreatingAResponse || activeRun != null) && <LoadingMessage maxWidth={logWidth} />} |
87 | | - </ChatLog> |
| 108 | + </AIChatLog> |
88 | 109 | </Box> |
89 | 110 | </Box> |
90 | 111 | ); |
|
0 commit comments