|
@@ -41,11 +41,11 @@ const NextLinkWrapper = (props: LinkProps & {children: string, href: string}): J
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const AssistantMessageCard = ({
|
|
const AssistantMessageCard = ({
|
|
|
- children, showActionButtons, onAdopt, onDiscard,
|
|
|
|
|
|
|
+ children, showActionButtons, onAccept, onDiscard,
|
|
|
}: {
|
|
}: {
|
|
|
children: string,
|
|
children: string,
|
|
|
showActionButtons?: boolean
|
|
showActionButtons?: boolean
|
|
|
- onAdopt?: () => void,
|
|
|
|
|
|
|
+ onAccept?: () => void,
|
|
|
onDiscard?: () => void,
|
|
onDiscard?: () => void,
|
|
|
}): JSX.Element => {
|
|
}): JSX.Element => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
@@ -74,9 +74,9 @@ const AssistantMessageCard = ({
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
className="btn btn-outline-secondary"
|
|
className="btn btn-outline-secondary"
|
|
|
- onClick={onAdopt}
|
|
|
|
|
|
|
+ onClick={onAccept}
|
|
|
>
|
|
>
|
|
|
- {t('sidebar_ai_assistant.adopt')}
|
|
|
|
|
|
|
+ {t('sidebar_ai_assistant.accept')}
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
@@ -99,12 +99,12 @@ type Props = {
|
|
|
children: string,
|
|
children: string,
|
|
|
showActionButtons?: boolean,
|
|
showActionButtons?: boolean,
|
|
|
onDiscard?: () => void,
|
|
onDiscard?: () => void,
|
|
|
- onAdopt?: () => void,
|
|
|
|
|
|
|
+ onAccept?: () => void,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export const MessageCard = (props: Props): JSX.Element => {
|
|
export const MessageCard = (props: Props): JSX.Element => {
|
|
|
const {
|
|
const {
|
|
|
- role, children, showActionButtons, onAdopt, onDiscard,
|
|
|
|
|
|
|
+ role, children, showActionButtons, onAccept, onDiscard,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
return role === 'user'
|
|
return role === 'user'
|
|
@@ -112,7 +112,7 @@ export const MessageCard = (props: Props): JSX.Element => {
|
|
|
: (
|
|
: (
|
|
|
<AssistantMessageCard
|
|
<AssistantMessageCard
|
|
|
showActionButtons={showActionButtons}
|
|
showActionButtons={showActionButtons}
|
|
|
- onAdopt={onAdopt}
|
|
|
|
|
|
|
+ onAccept={onAccept}
|
|
|
onDiscard={onDiscard}
|
|
onDiscard={onDiscard}
|
|
|
>{children}
|
|
>{children}
|
|
|
</AssistantMessageCard>
|
|
</AssistantMessageCard>
|