diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx index 3711da19f6..d6b4bdfafe 100644 --- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx +++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx @@ -188,7 +188,7 @@ const ChatWrapper = () => { return null if (welcomeMessage.suggestedQuestions && welcomeMessage.suggestedQuestions?.length > 0) { return ( -
+
{ background={appData?.site.icon_background} imageUrl={appData?.site.icon_url} /> -
- - +
+
+ + +
diff --git a/web/app/components/base/chat/chat/answer/suggested-questions.tsx b/web/app/components/base/chat/chat/answer/suggested-questions.tsx index 11ef3e4d1c..7b8da0e9f0 100644 --- a/web/app/components/base/chat/chat/answer/suggested-questions.tsx +++ b/web/app/components/base/chat/chat/answer/suggested-questions.tsx @@ -3,6 +3,7 @@ import { memo } from 'react' import type { ChatItem } from '../../types' import { useChatContext } from '../context' import Button from '@/app/components/base/button' +import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' type SuggestedQuestionsProps = { item: ChatItem @@ -11,6 +12,10 @@ const SuggestedQuestions: FC = ({ item, }) => { const { onSend } = useChatContext() + const media = useBreakpoints() + const isMobile = media === MediaType.mobile + const klassName = `mr-1 mt-1 ${isMobile ? 'block overflow-hidden text-ellipsis' : ''} max-w-full shrink-0 last:mr-0` + const { isOpeningStatement, suggestedQuestions, @@ -25,7 +30,7 @@ const SuggestedQuestions: FC = ({