From 6167a7d89cb717f0300179f1368ba46a3457b42a Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 17 Dec 2024 14:19:51 -0800 Subject: [PATCH] Update Leo help links fix https://github.com/brave/brave-browser/issues/42941 --- browser/ui/webui/ai_chat/ai_chat_untrusted_conversation_ui.cc | 2 +- components/ai_chat/core/browser/constants.h | 4 ++-- .../Components/Messages/AIChatResponseMessageView.swift | 2 +- ios/brave-ios/Sources/AIChat/Constants/AIChatConstants.swift | 3 +++ ios/brave-ios/Sources/BraveShared/BraveURLs.swift | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/browser/ui/webui/ai_chat/ai_chat_untrusted_conversation_ui.cc b/browser/ui/webui/ai_chat/ai_chat_untrusted_conversation_ui.cc index adaa05832dd5..b5efed6eb8cd 100644 --- a/browser/ui/webui/ai_chat/ai_chat_untrusted_conversation_ui.cc +++ b/browser/ui/webui/ai_chat/ai_chat_untrusted_conversation_ui.cc @@ -37,7 +37,7 @@ namespace { constexpr char kURLLearnMoreBraveSearchLeo[] = - "https://support.brave.com/hc/en-us/categories/20990938292237-Brave-Leo"; + "https://support.brave.com/hc/en-us/articles/27586048343309-How-does-Leo-get-current-information"; // Implments the interface to calls from the UI to the browser class UIHandler : public ai_chat::mojom::UntrustedUIHandler { diff --git a/components/ai_chat/core/browser/constants.h b/components/ai_chat/core/browser/constants.h index 698343cb172c..694b53d503fd 100644 --- a/components/ai_chat/core/browser/constants.h +++ b/components/ai_chat/core/browser/constants.h @@ -31,8 +31,8 @@ inline constexpr auto kPrintPreviewRetrievalHosts = inline constexpr uint8_t kMaxPreviewPages = 20; inline constexpr char kLeoModelSupportUrl[] = - "https://support.brave.com/hc/en-us/categories/" - "20990938292237-Brave-Leo"; + "https://support.brave.com/hc/en-us/articles/26727364100493-" + "What-are-the-differences-between-Leo-s-AI-Models"; // Upon registering a custom model, users have the ability to explicitly // provide a context size (in tokens). When present, we'll use this value to diff --git a/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatResponseMessageView.swift b/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatResponseMessageView.swift index 79daa64647f1..14c4364dc986 100644 --- a/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatResponseMessageView.swift +++ b/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatResponseMessageView.swift @@ -236,7 +236,7 @@ struct AIChatResponseMessageView: View { period.foregroundColor = Color(braveSystemName: .textPrimary) var learnMoreLink = AttributedString(Strings.learnMore) - learnMoreLink.link = AIChatConstants.braveLeoLearnMore + learnMoreLink.link = AIChatConstants.braveLeoSearchLearnMore learnMoreLink.font = font learnMoreLink.foregroundColor = Color(braveSystemName: .textTertiary) learnMoreLink.underlineColor = UIColor(braveSystemName: .textTertiary) diff --git a/ios/brave-ios/Sources/AIChat/Constants/AIChatConstants.swift b/ios/brave-ios/Sources/AIChat/Constants/AIChatConstants.swift index 0b609dfe439a..45b14f9b5a54 100644 --- a/ios/brave-ios/Sources/AIChat/Constants/AIChatConstants.swift +++ b/ios/brave-ios/Sources/AIChat/Constants/AIChatConstants.swift @@ -10,5 +10,8 @@ public struct AIChatConstants { static let braveLeoLearnMore = URL( string: "https://support.brave.com/hc/en-us/categories/20990938292237-Brave-Leo" )! + static let braveLeoSearchLearnMore = URL( + string: "https://support.brave.com/hc/en-us/articles/27586048343309-How-does-Leo-get-current-information" + )! static let braveSearchURL = URL(string: "https://search.brave.com/search")! } diff --git a/ios/brave-ios/Sources/BraveShared/BraveURLs.swift b/ios/brave-ios/Sources/BraveShared/BraveURLs.swift index 3dc74bd870a8..46bac3f9728b 100644 --- a/ios/brave-ios/Sources/BraveShared/BraveURLs.swift +++ b/ios/brave-ios/Sources/BraveShared/BraveURLs.swift @@ -71,7 +71,7 @@ extension URL { string: "https://account.brave.com/?intent=recover&product=leo&ux=mobile" )! public static let braveLeoModelCategorySupport = URL( - string: "https://support.brave.com/hc/en-us/categories/20990938292237-Brave-Leo" + string: "https://support.brave.com/hc/en-us/articles/26727364100493-What-are-the-differences-between-Leo-s-AI-Models" )! public static let braveVPNSmartProxySupport = URL( string: