Skip to content

Commit

Permalink
feat: refactor start new conversation button text configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
vj-venkatesan committed Feb 27, 2025
1 parent 372df47 commit 1d24eed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions docs/embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ All business hours settings require the setting `embeddingConfiguration.awaitEnd
| welcomeText | string | `"Welcome! How can we help you?"` | Welcome text on the home screen |
| background | object | [Home Screen Background](#home-screen-background) | Configure the Home Screen background |
| startConversationButtonText | string | `"Start conversation"` | Configure the text shown on the "Start Conversation" button |
| startNewConversationButtonText | string | `"Start new conversation"` | Configure the text shown on the "Start new conversation" button |
| previousConversations | object | [Previous Conversations](#previous-conversations) | Configure the Previous Conversations feature |
| conversationStarters | object | [Conversation Starters](#conversation-starters) | Configure Conversation Starters on the Home Screen |

Expand All @@ -228,12 +227,12 @@ All business hours settings require the setting `embeddingConfiguration.awaitEnd
| color | string | `""` | CSS color code or gradient |

##### Previous Conversations

| Name | Type | Default | Description |
| ---------- | ------- | -------------------------- | --------------------------------------------------------------------------- |
| enabled | boolean | `true` | If enabled, the "Previous Conversations" button is shown on the Home Screen |
| buttonText | string | `"Previous conversations"` | Configure the "Previous Conversations" button |
| title | string | `""` | Configure the Header of the "Previous Conversations" page |
| Name | Type | Default | Description |
| - | - | - | - |
| enabled | boolean | `true` | If enabled, the "Previous Conversations" button is shown on the Home Screen |
| startNewConversationButtonText | string | `"Start new conversation"` | Configure the text shown on the "Start new conversation" button |
| buttonText | string | `"Previous conversations"` | Configure the "Previous Conversations" button |
| title | string | `""` | Configure the Header of the "Previous Conversations" page |

##### Conversation Starters

Expand Down
2 changes: 1 addition & 1 deletion src/common/interfaces/webchat-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ export interface IWebchatSettings {
color: string;
};
startConversationButtonText: string;
startNewConversationButtonText: string;
previousConversations: {
startNewConversationButtonText: string;
enabled: boolean;
buttonText: string;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const PrevConversationsList = (props: IPrevConversationsListProps) => {
className="webchat-prev-conversations-send-button"
data-testid="webchat-start-chat-button"
>
{config.settings.homeScreen.startNewConversationButtonText ?? "Start new conversation"}
{config.settings.homeScreen?.previousConversations?.startNewConversationButtonText ?? "Start new conversation"}
</StartButton>
<Branding
id="cognigyConversationListBranding"
Expand Down

0 comments on commit 1d24eed

Please sign in to comment.