Skip to content

Commit 34328eb

Browse files
authored
Merge pull request #3417 from RedisInsight/fe/feature/RI-5782
#RI-5782 - update messages
2 parents 09d200f + b05e6cb commit 34328eb

File tree

7 files changed

+19
-51
lines changed

7 files changed

+19
-51
lines changed

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/ExpertChat.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ describe('ExpertChat', () => {
233233
(sendEventTelemetry as jest.Mock).mockRestore()
234234
})
235235

236-
it('should call proper actions after click tutorial in the initial message', async () => {
236+
it.skip('should call proper actions after click tutorial in the initial message', async () => {
237237
const sendEventTelemetryMock = jest.fn();
238238
(sendEventTelemetry as jest.Mock).mockImplementation(() => sendEventTelemetryMock);
239239

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/ExpertChat.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ import { openTutorialByPath } from 'uiSrc/slices/panels/sidePanels'
2222
import { SAMPLE_DATA_TUTORIAL } from 'uiSrc/constants'
2323
import NoIndexesInitialMessage from './components/no-indexes-initial-message'
2424
import ExpertChatHeader from './components/expert-chat-header'
25-
import InitialMessage from './components/initial-message'
2625

27-
import { EXPERT_CHAT_AGREEMENTS } from '../texts'
26+
import { EXPERT_CHAT_AGREEMENTS, EXPERT_CHAT_INITIAL_MESSAGE } from '../texts'
2827
import { ChatForm, ChatHistory } from '../shared'
2928

3029
import styles from './styles.module.scss'
@@ -231,7 +230,7 @@ const ExpertChat = () => {
231230
modules={modules}
232231
initialMessage={isNoIndexes
233232
? <NoIndexesInitialMessage onClickTutorial={handleClickTutorial} onSuccess={getIndexes} />
234-
: <InitialMessage onClickTutorial={handleClickTutorial} />}
233+
: EXPERT_CHAT_INITIAL_MESSAGE}
235234
inProgressMessage={inProgressMessage}
236235
history={messages}
237236
scrollDivRef={scrollDivRef}

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/components/initial-message/InitialMessage.tsx

Lines changed: 0 additions & 37 deletions
This file was deleted.

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/components/initial-message/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/components/no-indexes-initial-message/NoIndexesInitialMessage.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ const NoIndexesInitialMessage = (props: Props) => {
2424
<EuiText size="xs">Hi!</EuiText>
2525
<EuiText size="xs">I am here to help you get started with data querying. I noticed that you have no indexes created.</EuiText>
2626
<EuiSpacer />
27-
<EuiText size="xs">Would you like to load the sample data to see what Redis Copilot can help you do?</EuiText>
28-
<EuiSpacer />
29-
<LoadSampleData anchorClassName={styles.anchorClassName} onSuccess={onSuccess} />
30-
<EuiSpacer />
31-
<EuiText size="xs">
32-
Explore several common Redis use cases with our
27+
<EuiText size="xs">Would you like to load the sample data and indexes (from this
3328
{' '}
3429
<EuiLink
3530
color="subdued"
@@ -40,8 +35,11 @@ const NoIndexesInitialMessage = (props: Props) => {
4035
>
4136
tutorial
4237
</EuiLink>
43-
, utilizing the provided sample data.
38+
) to see what Redis Copilot can help you do?
4439
</EuiText>
40+
<EuiSpacer />
41+
<LoadSampleData anchorClassName={styles.anchorClassName} onSuccess={onSuccess} />
42+
<EuiSpacer />
4543
</div>
4644
)
4745
}

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/texts.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,13 @@ export const EXPERT_CHAT_AGREEMENTS = (
7979
</EuiText>
8080
</>
8181
)
82+
83+
export const EXPERT_CHAT_INITIAL_MESSAGE = (
84+
<>
85+
<EuiText size="xs">Welcome!</EuiText>
86+
<EuiText size="xs">I am here to help you get started with data querying.</EuiText>
87+
<EuiText size="xs">Type <b>/help</b> to get more info on what questions I can answer.</EuiText>
88+
<EuiSpacer />
89+
<EuiText size="xs">With <span style={{ color: 'red' }}>&hearts;</span>, your Redis Copilot!</EuiText>
90+
</>
91+
)

redisinsight/ui/src/templates/explore-panel/styles.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
height: 100%;
55
width: 100%;
66
position: relative;
7+
overflow: hidden;
78
}
89

910
.mainPanel {

0 commit comments

Comments
 (0)