@lobehub/chat 1.138.1 → 1.138.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/docker-compose/local/docker-compose.yml +1 -1
  4. package/docker-compose/local/grafana/docker-compose.yml +1 -1
  5. package/docker-compose/production/grafana/docker-compose.yml +1 -1
  6. package/locales/ar/chat.json +1 -1
  7. package/locales/ar/common.json +1 -1
  8. package/locales/ar/models.json +35 -8
  9. package/locales/ar/plugin.json +1 -1
  10. package/locales/ar/welcome.json +1 -1
  11. package/locales/bg-BG/chat.json +1 -1
  12. package/locales/bg-BG/common.json +1 -1
  13. package/locales/bg-BG/models.json +35 -8
  14. package/locales/bg-BG/plugin.json +1 -1
  15. package/locales/bg-BG/welcome.json +1 -1
  16. package/locales/de-DE/chat.json +1 -1
  17. package/locales/de-DE/common.json +1 -1
  18. package/locales/de-DE/models.json +35 -8
  19. package/locales/de-DE/plugin.json +1 -1
  20. package/locales/de-DE/welcome.json +1 -1
  21. package/locales/en-US/chat.json +1 -1
  22. package/locales/en-US/common.json +1 -1
  23. package/locales/en-US/models.json +35 -8
  24. package/locales/en-US/plugin.json +1 -1
  25. package/locales/en-US/welcome.json +1 -1
  26. package/locales/es-ES/chat.json +1 -1
  27. package/locales/es-ES/common.json +1 -1
  28. package/locales/es-ES/models.json +35 -8
  29. package/locales/es-ES/plugin.json +1 -1
  30. package/locales/es-ES/welcome.json +1 -1
  31. package/locales/fa-IR/chat.json +1 -1
  32. package/locales/fa-IR/common.json +1 -1
  33. package/locales/fa-IR/models.json +35 -8
  34. package/locales/fa-IR/plugin.json +1 -1
  35. package/locales/fa-IR/welcome.json +1 -1
  36. package/locales/fr-FR/chat.json +1 -1
  37. package/locales/fr-FR/common.json +1 -1
  38. package/locales/fr-FR/models.json +35 -8
  39. package/locales/fr-FR/plugin.json +1 -1
  40. package/locales/fr-FR/welcome.json +1 -1
  41. package/locales/it-IT/chat.json +1 -1
  42. package/locales/it-IT/common.json +1 -1
  43. package/locales/it-IT/models.json +35 -8
  44. package/locales/it-IT/plugin.json +1 -1
  45. package/locales/it-IT/welcome.json +1 -1
  46. package/locales/ja-JP/chat.json +1 -1
  47. package/locales/ja-JP/common.json +1 -1
  48. package/locales/ja-JP/models.json +35 -8
  49. package/locales/ja-JP/plugin.json +1 -1
  50. package/locales/ja-JP/welcome.json +1 -1
  51. package/locales/ko-KR/chat.json +1 -1
  52. package/locales/ko-KR/common.json +1 -1
  53. package/locales/ko-KR/models.json +35 -8
  54. package/locales/ko-KR/plugin.json +1 -1
  55. package/locales/ko-KR/welcome.json +1 -1
  56. package/locales/nl-NL/chat.json +1 -1
  57. package/locales/nl-NL/common.json +1 -1
  58. package/locales/nl-NL/models.json +35 -8
  59. package/locales/nl-NL/plugin.json +1 -1
  60. package/locales/nl-NL/welcome.json +1 -1
  61. package/locales/pl-PL/chat.json +1 -1
  62. package/locales/pl-PL/common.json +1 -1
  63. package/locales/pl-PL/models.json +35 -8
  64. package/locales/pl-PL/plugin.json +1 -1
  65. package/locales/pl-PL/welcome.json +1 -1
  66. package/locales/pt-BR/chat.json +1 -1
  67. package/locales/pt-BR/common.json +1 -1
  68. package/locales/pt-BR/models.json +35 -8
  69. package/locales/pt-BR/plugin.json +1 -1
  70. package/locales/pt-BR/welcome.json +1 -1
  71. package/locales/ru-RU/chat.json +1 -1
  72. package/locales/ru-RU/common.json +1 -1
  73. package/locales/ru-RU/models.json +35 -8
  74. package/locales/ru-RU/plugin.json +1 -1
  75. package/locales/ru-RU/welcome.json +1 -1
  76. package/locales/tr-TR/chat.json +1 -1
  77. package/locales/tr-TR/common.json +1 -1
  78. package/locales/tr-TR/models.json +35 -8
  79. package/locales/tr-TR/plugin.json +1 -1
  80. package/locales/tr-TR/welcome.json +1 -1
  81. package/locales/vi-VN/chat.json +1 -1
  82. package/locales/vi-VN/common.json +1 -1
  83. package/locales/vi-VN/models.json +35 -8
  84. package/locales/vi-VN/plugin.json +1 -1
  85. package/locales/vi-VN/welcome.json +1 -1
  86. package/locales/zh-CN/common.json +1 -1
  87. package/locales/zh-CN/models.json +35 -8
  88. package/locales/zh-CN/plugin.json +1 -1
  89. package/locales/zh-CN/welcome.json +1 -1
  90. package/locales/zh-TW/chat.json +1 -1
  91. package/locales/zh-TW/common.json +1 -1
  92. package/locales/zh-TW/models.json +35 -8
  93. package/locales/zh-TW/plugin.json +1 -1
  94. package/locales/zh-TW/welcome.json +1 -1
  95. package/package.json +1 -1
  96. package/packages/const/src/branding.ts +2 -2
  97. package/packages/const/src/index.ts +1 -0
  98. package/packages/const/src/version.ts +1 -1
  99. package/packages/database/src/models/topic.ts +0 -1
  100. package/packages/database/src/repositories/aiInfra/index.ts +19 -13
  101. package/packages/obervability-otel/package.json +4 -4
  102. package/packages/prompts/CLAUDE.md +289 -43
  103. package/packages/prompts/package.json +2 -1
  104. package/packages/prompts/promptfoo/supervisor/productive/eval.yaml +51 -0
  105. package/packages/prompts/promptfoo/supervisor/productive/prompt.ts +18 -0
  106. package/packages/prompts/promptfoo/supervisor/productive/tests/basic-case.ts +54 -0
  107. package/packages/prompts/promptfoo/supervisor/productive/tests/role.ts +58 -0
  108. package/packages/prompts/promptfoo/supervisor/productive/tools.json +80 -0
  109. package/packages/prompts/src/contexts/index.ts +1 -0
  110. package/packages/prompts/src/contexts/supervisor/index.ts +2 -0
  111. package/packages/prompts/src/contexts/supervisor/makeDecision.ts +68 -0
  112. package/packages/prompts/src/contexts/supervisor/tools.ts +102 -0
  113. package/packages/prompts/src/index.ts +1 -0
  114. package/packages/types/src/aiChat.ts +9 -3
  115. package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +4 -4
  116. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/{OpeningQuestions.tsx → AgentWelcome/OpeningQuestions.tsx} +2 -2
  117. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/{InboxWelcome → AgentWelcome}/index.tsx +38 -17
  118. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/index.tsx +2 -2
  119. package/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/page.tsx +1 -1
  120. package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/page.tsx +1 -1
  121. package/src/config/modelProviders/lobehub.ts +1 -1
  122. package/src/locales/default/common.ts +1 -1
  123. package/src/locales/default/plugin.ts +1 -1
  124. package/src/locales/default/welcome.ts +1 -1
  125. package/src/server/ld.ts +1 -1
  126. package/src/server/routers/lambda/aiChat.ts +1 -1
  127. package/src/server/services/aiChat/index.test.ts +1 -1
  128. package/src/server/services/aiChat/index.ts +1 -1
  129. package/src/services/topic/client.ts +1 -1
  130. package/src/store/chat/slices/message/supervisor.test.ts +12 -5
  131. package/src/store/chat/slices/message/supervisor.ts +16 -129
  132. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +0 -114
  133. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +0 -104
  134. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx +0 -65
  135. /package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/{InboxWelcome → AgentWelcome}/AddButton.tsx +0 -0
@@ -1,4 +1,4 @@
1
- import { groupChatPrompts, groupSupervisorPrompts } from '@lobechat/prompts';
1
+ import { contextSupervisorMakeDecision } from '@lobechat/prompts';
2
2
  import { ChatMessage, GroupMemberWithAgent } from '@lobechat/types';
3
3
 
4
4
  import { aiChatService } from '@/services/aiChat';
@@ -61,7 +61,7 @@ export class GroupChatSupervisor {
61
61
  * Make decision on who should speak next
62
62
  */
63
63
  async makeDecision(context: SupervisorContext): Promise<SupervisorDecisionResult> {
64
- const { messages, availableAgents, userName, systemPrompt, allowDM, todoList } = context;
64
+ const { availableAgents } = context;
65
65
 
66
66
  // If no agents available, stop conversation
67
67
  if (availableAgents.length === 0) {
@@ -69,22 +69,7 @@ export class GroupChatSupervisor {
69
69
  }
70
70
 
71
71
  try {
72
- // Create supervisor prompt with conversation context
73
- const conversationHistory = groupSupervisorPrompts(messages);
74
-
75
- const supervisorPrompt = groupChatPrompts.buildSupervisorPrompt({
76
- allowDM,
77
- availableAgents: availableAgents
78
- .filter((agent) => agent.id)
79
- .map((agent) => ({ id: agent.id!, title: agent.title })),
80
- conversationHistory,
81
- scene: context.scene,
82
- systemPrompt,
83
- todoList,
84
- userName,
85
- });
86
-
87
- const response = await this.callLLMForDecision(supervisorPrompt, context);
72
+ const response = await this.callLLMForDecision(context);
88
73
  const result = this.parseSupervisorResponse(response, availableAgents, context);
89
74
 
90
75
  console.log('Supervisor TODO list:', result.todos);
@@ -102,123 +87,25 @@ export class GroupChatSupervisor {
102
87
  * Call LLM service to get supervisor decision
103
88
  */
104
89
  private async callLLMForDecision(
105
- prompt: string,
106
90
  context: SupervisorContext,
107
91
  ): Promise<SupervisorToolCall[] | string> {
108
- const supervisorConfig = {
109
- model: context.model,
110
- provider: context.provider,
111
- temperature: 0.3,
112
- };
113
-
114
- // Build tools array
115
- const tools: any[] = [
116
- {
117
- description: 'Trigger an agent to speak (group message).',
118
- name: 'trigger_agent',
119
- parameters: {
120
- properties: {
121
- id: {
122
- description: 'The agent id to trigger.',
123
- type: 'string',
124
- },
125
- instruction: {
126
- description:
127
- 'The instruction or message for the agent. No longer than 10 words. Always use English.',
128
- type: 'string',
129
- },
130
- },
131
- required: ['id', 'instruction'],
132
- type: 'object',
133
- },
134
- },
135
- {
136
- description:
137
- 'Wait for user input. Use this when the conversation history looks likes fine for now, or agents are waiting for user input.',
138
- name: 'wait_for_user_input',
139
- parameters: {
140
- properties: {
141
- reason: {
142
- description: 'Optional reason for pausing the conversation.',
143
- type: 'string',
144
- },
145
- },
146
- required: [],
147
- type: 'object',
148
- },
149
- },
150
- ];
151
-
152
- // Add DM tool if allowed
153
- if (context.allowDM) {
154
- tools.push({
155
- description: 'Trigger an agent to DM another agent or user.',
156
- name: 'trigger_agent_dm',
157
- parameters: {
158
- properties: {
159
- id: {
160
- description: 'The agent id to trigger.',
161
- type: 'string',
162
- },
163
- instruction: {
164
- description: 'The instruction or message for the agent.',
165
- type: 'string',
166
- },
167
- target: {
168
- description: 'The target agent id. Only used when need DM.',
169
- type: 'string',
170
- },
171
- },
172
- required: ['id', 'instruction', 'target'],
173
- type: 'object',
174
- },
175
- });
176
- }
177
-
178
- // Add todo tools if in productive scene
179
- if (context.scene === 'productive') {
180
- tools.push(
181
- {
182
- description: 'Create a new todo item',
183
- name: 'create_todo',
184
- parameters: {
185
- properties: {
186
- assignee: {
187
- description: 'Who will do the todo. Can be agent id or empty.',
188
- type: 'string',
189
- },
190
- content: {
191
- description: 'The todo content or description.',
192
- type: 'string',
193
- },
194
- },
195
- required: ['content', 'assignee'],
196
- type: 'object',
197
- },
198
- },
199
- {
200
- description: 'Finish a todo by index',
201
- name: 'finish_todo',
202
- parameters: {
203
- properties: {
204
- index: {
205
- description: 'The index of the todo to finish.',
206
- type: 'number',
207
- },
208
- },
209
- required: ['index'],
210
- type: 'object',
211
- },
212
- },
213
- );
214
- }
92
+ const contexts = contextSupervisorMakeDecision({
93
+ allowDM: context.allowDM,
94
+ availableAgents: context.availableAgents
95
+ .filter((agent) => agent.id)
96
+ .map((agent) => ({ id: agent.id, title: agent.title })),
97
+ messages: context.messages,
98
+ scene: context.scene,
99
+ todoList: context.todoList,
100
+ userName: context.userName,
101
+ });
215
102
 
216
103
  try {
217
104
  const response = await aiChatService.generateJSON(
218
105
  {
219
- messages: [{ content: prompt, role: 'user' }] as any,
220
- tools,
221
- ...supervisorConfig,
106
+ ...(contexts as any),
107
+ model: context.model,
108
+ provider: context.provider,
222
109
  },
223
110
  context.abortController || new AbortController(),
224
111
  );
@@ -1,114 +0,0 @@
1
- 'use client';
2
-
3
- import { ActionIcon, Avatar, Block, Grid, Text } from '@lobehub/ui';
4
- import { Skeleton } from 'antd';
5
- import { createStyles } from 'antd-style';
6
- import { RefreshCw } from 'lucide-react';
7
- import Link from 'next/link';
8
- import { memo, useState } from 'react';
9
- import { useTranslation } from 'react-i18next';
10
- import { Flexbox } from 'react-layout-kit';
11
- import urlJoin from 'url-join';
12
-
13
- import { useDiscoverStore } from '@/store/discover';
14
- import { DiscoverAssistantItem } from '@/types/discover';
15
-
16
- const useStyles = createStyles(({ css, token, responsive }) => ({
17
- card: css`
18
- position: relative;
19
-
20
- overflow: hidden;
21
-
22
- height: 100%;
23
- min-height: 110px;
24
- padding: 16px;
25
- border-radius: ${token.borderRadiusLG}px;
26
-
27
- background: ${token.colorBgContainer};
28
-
29
- ${responsive.mobile} {
30
- min-height: 72px;
31
- }
32
- `,
33
- cardDesc: css`
34
- margin-block: 0 !important;
35
- color: ${token.colorTextDescription};
36
- `,
37
- cardTitle: css`
38
- margin-block: 0 !important;
39
- font-size: 16px;
40
- font-weight: bold;
41
- `,
42
- icon: css`
43
- color: ${token.colorTextSecondary};
44
- `,
45
- title: css`
46
- color: ${token.colorTextDescription};
47
- `,
48
- }));
49
-
50
- const AgentsSuggest = memo<{ mobile?: boolean }>(({ mobile }) => {
51
- const { t } = useTranslation('welcome');
52
- const [page, setPage] = useState(1);
53
- const useAssistantList = useDiscoverStore((s) => s.useAssistantList);
54
-
55
- const { data: assistantList, isLoading } = useAssistantList({
56
- page,
57
- pageSize: mobile ? 2 : 4,
58
- });
59
-
60
- const { styles } = useStyles();
61
-
62
- const loadingCards = Array.from({ length: mobile ? 2 : 4 }).map((_, index) => (
63
- <Block className={styles.card} key={index}>
64
- <Skeleton active avatar paragraph={{ rows: 2 }} title={false} />
65
- </Block>
66
- ));
67
-
68
- const handleRefresh = () => {
69
- if (!assistantList) return;
70
- setPage(page + 1);
71
- };
72
-
73
- // if no assistant data, just hide the component
74
- if (!isLoading && !assistantList?.items?.length) return null;
75
-
76
- return (
77
- <Flexbox gap={8} width={'100%'}>
78
- <Flexbox align={'center'} horizontal justify={'space-between'}>
79
- <div className={styles.title}>{t('guide.agents.title')}</div>
80
- <ActionIcon
81
- icon={RefreshCw}
82
- onClick={handleRefresh}
83
- size={{ blockSize: 24, size: 14 }}
84
- title={t('guide.agents.replaceBtn')}
85
- />
86
- </Flexbox>
87
- <Grid gap={8} rows={2}>
88
- {isLoading || !assistantList
89
- ? loadingCards
90
- : assistantList.items.map((item: DiscoverAssistantItem) => (
91
- <Link
92
- href={urlJoin('/discover/assistant', item.identifier)}
93
- key={item.identifier}
94
- prefetch={false}
95
- >
96
- <Block className={styles.card} clickable gap={12} horizontal variant={'outlined'}>
97
- <Avatar avatar={item.avatar} style={{ flex: 'none' }} />
98
- <Flexbox gap={2} style={{ overflow: 'hidden', width: '100%' }}>
99
- <Text className={styles.cardTitle} ellipsis={{ rows: 1 }}>
100
- {item.title}
101
- </Text>
102
- <Text className={styles.cardDesc} ellipsis={{ rows: mobile ? 1 : 2 }}>
103
- {item.description}
104
- </Text>
105
- </Flexbox>
106
- </Block>
107
- </Link>
108
- ))}
109
- </Grid>
110
- </Flexbox>
111
- );
112
- });
113
-
114
- export default AgentsSuggest;
@@ -1,104 +0,0 @@
1
- 'use client';
2
-
3
- import { ActionIcon, Block } from '@lobehub/ui';
4
- import { createStyles } from 'antd-style';
5
- import { shuffle } from 'lodash-es';
6
- import { ArrowRight } from 'lucide-react';
7
- import Link from 'next/link';
8
- import { memo } from 'react';
9
- import { useTranslation } from 'react-i18next';
10
- import { Flexbox } from 'react-layout-kit';
11
-
12
- import { BRANDING_NAME } from '@/const/branding';
13
- import { USAGE_DOCUMENTS } from '@/const/url';
14
- import { useChatStore } from '@/store/chat';
15
-
16
- import { useSend } from '../../../ChatInput/useSend';
17
-
18
- const useStyles = createStyles(({ css, token, responsive }) => ({
19
- card: css`
20
- padding-block: 12px;
21
- padding-inline: 24px;
22
- border-radius: 48px;
23
-
24
- color: ${token.colorText};
25
-
26
- background: ${token.colorBgContainer};
27
-
28
- ${responsive.mobile} {
29
- padding-block: 8px;
30
- padding-inline: 16px;
31
- }
32
- `,
33
- icon: css`
34
- color: ${token.colorTextSecondary};
35
- `,
36
- title: css`
37
- color: ${token.colorTextDescription};
38
- `,
39
- }));
40
-
41
- const qa = shuffle([
42
- 'q01',
43
- 'q02',
44
- 'q03',
45
- 'q04',
46
- 'q05',
47
- 'q06',
48
- 'q07',
49
- 'q08',
50
- 'q09',
51
- 'q10',
52
- 'q11',
53
- 'q12',
54
- 'q13',
55
- 'q14',
56
- 'q15',
57
- ]);
58
-
59
- const QuestionSuggest = memo<{ mobile?: boolean }>(({ mobile }) => {
60
- const [updateInputMessage] = useChatStore((s) => [s.updateInputMessage]);
61
-
62
- const { t } = useTranslation('welcome');
63
- const { styles } = useStyles();
64
- const { send: sendMessage } = useSend();
65
-
66
- return (
67
- <Flexbox gap={8} width={'100%'}>
68
- <Flexbox align={'center'} horizontal justify={'space-between'}>
69
- <div className={styles.title}>{t('guide.questions.title')}</div>
70
- <Link href={USAGE_DOCUMENTS} target={'_blank'}>
71
- <ActionIcon
72
- icon={ArrowRight}
73
- size={{ blockSize: 24, size: 16 }}
74
- title={t('guide.questions.moreBtn')}
75
- />
76
- </Link>
77
- </Flexbox>
78
- <Flexbox gap={8} horizontal wrap={'wrap'}>
79
- {qa.slice(0, mobile ? 2 : 5).map((item) => {
80
- const text = t(`guide.qa.${item}` as any, { appName: BRANDING_NAME });
81
- return (
82
- <Block
83
- align={'center'}
84
- className={styles.card}
85
- clickable
86
- gap={8}
87
- horizontal
88
- key={item}
89
- onClick={() => {
90
- updateInputMessage(text);
91
- sendMessage({ isWelcomeQuestion: true });
92
- }}
93
- variant={'outlined'}
94
- >
95
- {t(text)}
96
- </Block>
97
- );
98
- })}
99
- </Flexbox>
100
- </Flexbox>
101
- );
102
- });
103
-
104
- export default QuestionSuggest;
@@ -1,65 +0,0 @@
1
- import isEqual from 'fast-deep-equal';
2
- import qs from 'query-string';
3
- import React, { useMemo } from 'react';
4
- import { useTranslation } from 'react-i18next';
5
- import { Flexbox } from 'react-layout-kit';
6
-
7
- import { ChatItem } from '@/features/ChatItem';
8
- import { useAgentStore } from '@/store/agent';
9
- import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selectors';
10
- import { useChatStore } from '@/store/chat';
11
- import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
12
- import { useSessionStore } from '@/store/session';
13
- import { sessionMetaSelectors } from '@/store/session/selectors';
14
-
15
- import OpeningQuestions from './OpeningQuestions';
16
-
17
- const WelcomeMessage = () => {
18
- const mobile = useServerConfigStore((s) => s.isMobile);
19
- const { t } = useTranslation('chat');
20
- const type = useAgentStore(agentChatConfigSelectors.displayMode);
21
- const openingMessage = useAgentStore(agentSelectors.openingMessage);
22
- const openingQuestions = useAgentStore(agentSelectors.openingQuestions);
23
-
24
- const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual);
25
- const { isAgentEditable } = useServerConfigStore(featureFlagsSelectors);
26
- const activeId = useChatStore((s) => s.activeId);
27
-
28
- const agentSystemRoleMsg = t('agentDefaultMessageWithSystemRole', {
29
- name: meta.title || t('defaultAgent'),
30
- systemRole: meta.description,
31
- });
32
-
33
- const agentMsg = t(isAgentEditable ? 'agentDefaultMessage' : 'agentDefaultMessageWithoutEdit', {
34
- name: meta.title || t('defaultAgent'),
35
- url: qs.stringifyUrl({
36
- query: mobile ? { session: activeId, showMobileWorkspace: mobile } : { session: activeId },
37
- url: '/chat/settings',
38
- }),
39
- });
40
-
41
- const message = useMemo(() => {
42
- if (openingMessage) return openingMessage;
43
- return !!meta.description ? agentSystemRoleMsg : agentMsg;
44
- }, [openingMessage, agentSystemRoleMsg, agentMsg, meta.description]);
45
-
46
- const chatItem = (
47
- <ChatItem
48
- avatar={meta}
49
- editing={false}
50
- message={message}
51
- placement={'left'}
52
- variant={type === 'chat' ? 'bubble' : 'docs'}
53
- />
54
- );
55
-
56
- return openingQuestions.length > 0 ? (
57
- <Flexbox>
58
- {chatItem}
59
- <OpeningQuestions mobile={mobile} questions={openingQuestions} />
60
- </Flexbox>
61
- ) : (
62
- chatItem
63
- );
64
- };
65
- export default WelcomeMessage;