Skip to content

Commit

Permalink
conversation history menu item l18n and feature-flag condition
Browse files Browse the repository at this point in the history
  • Loading branch information
petemill committed Oct 23, 2024
1 parent 0944d8a commit dca362b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/ai_chat/core/browser/constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ base::span<const webui::LocalizedString> GetLocalizedStrings() {
{"closeLabel", IDS_CHAT_UI_LABEL_CLOSE},
{"menuGoPremium", IDS_CHAT_UI_MENU_GO_PREMIUM},
{"menuManageSubscription", IDS_CHAT_UI_MENU_MANAGE_SUBSCRIPTION},
{"menuConversationHistory", IDS_CHAT_UI_MENU_CONVERSATION_HISTORY},
{"menuSettings", IDS_CHAT_UI_MENU_SETTINGS},
{"menuTitleModels", IDS_CHAT_UI_MENU_TITLE_MODELS},
{"suggestQuestionsLabel", IDS_CHAT_UI_SUGGEST_QUESTIONS_LABEL},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default function FeatureMenu(props: Props) {
</div>
</leo-menu-item>
)}
{!aiChatContext.isStandalone && (
{!aiChatContext.isStandalone && aiChatContext.isHistoryEnabled && (
<>
<leo-menu-item
onClick={() => props.setIsConversationListOpen?.(true)}
Expand All @@ -191,7 +191,7 @@ export default function FeatureMenu(props: Props) {
)}
>
<Icon name='history' />
<span className={styles.menuText}>Search and history</span>
<span className={styles.menuText}>{getLocale('menuConversationHistory')}</span>
</div>
</leo-menu-item>
</>
Expand Down
3 changes: 3 additions & 0 deletions components/resources/ai_chat_ui_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
<message name="IDS_CHAT_UI_MENU_MANAGE_SUBSCRIPTION" desc="Menu item for managing premium subscription">
Manage subscription
</message>
<message name="IDS_CHAT_UI_MENU_CONVERSATION_HISTORY" desc="Menu item for opening the list of conversations">
Conversation history
</message>
<message name="IDS_CHAT_UI_MENU_SETTINGS" desc="Menu item for Settings">
Advanced Settings
</message>
Expand Down

0 comments on commit dca362b

Please sign in to comment.