diff --git a/Core/FeatureFlag.swift b/Core/FeatureFlag.swift index fbb919a464..128886a15c 100644 --- a/Core/FeatureFlag.swift +++ b/Core/FeatureFlag.swift @@ -49,6 +49,7 @@ public enum FeatureFlag: String { case textZoom case adAttributionReporting case aiChat + case aiChatDeepLink /// https://app.asana.com/0/72649045549333/1208231259093710/f case networkProtectionUserTips @@ -140,6 +141,8 @@ extension FeatureFlag: FeatureFlagDescribing { return .remoteDevelopment(.subfeature(PrivacyProSubfeature.privacyProFreeTrialJan25)) case .aiChat: return .remoteReleasable(.feature(.aiChat)) + case .aiChatDeepLink: + return .remoteReleasable(.subfeature(AIChatSubfeature.deepLink)) } } } diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 03ddd3bd47..e848c85cd0 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11901,7 +11901,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 224.5.0; + version = 224.6.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 98a84e0316..5deb5a6b25 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "1700c54067b6676974676ca9a81d654317a093f1", - "version" : "224.5.0" + "revision" : "20316b105d8874e10cf544a9c97e97237441ae01", + "version" : "224.6.0" } }, { diff --git a/DuckDuckGo/TabURLInterceptor.swift b/DuckDuckGo/TabURLInterceptor.swift index ce694a817f..408e8a62e4 100644 --- a/DuckDuckGo/TabURLInterceptor.swift +++ b/DuckDuckGo/TabURLInterceptor.swift @@ -53,7 +53,7 @@ final class TabURLInterceptorDefault: TabURLInterceptor { ] func allowsNavigatingTo(url: URL) -> Bool { - if url.isDuckAIURL { + if featureFlagger.isFeatureOn(.aiChatDeepLink), url.isDuckAIURL { return handleURLInterception(interceptedURL: .aiChat, queryItems: nil) } @@ -102,7 +102,7 @@ extension TabURLInterceptorDefault { return false } case .aiChat: - if featureFlagger.isFeatureOn(.aiChat) { + if featureFlagger.isFeatureOn(.aiChatDeepLink) { NotificationCenter.default.post( name: .urlInterceptAIChat, object: nil, diff --git a/DuckDuckGoTests/TabURLInterceptorTests.swift b/DuckDuckGoTests/TabURLInterceptorTests.swift index 154066f15c..cdc113a2f4 100644 --- a/DuckDuckGoTests/TabURLInterceptorTests.swift +++ b/DuckDuckGoTests/TabURLInterceptorTests.swift @@ -103,7 +103,7 @@ class TabURLInterceptorDefaultTests: XCTestCase { } func testNotificationForInterceptedAIChatPathWhenFeatureFlagIsOn() { - urlInterceptor = TabURLInterceptorDefault(featureFlagger: MockFeatureFlagger(enabledFeatureFlags: [.aiChat]), canPurchase: { true }) + urlInterceptor = TabURLInterceptorDefault(featureFlagger: MockFeatureFlagger(enabledFeatureFlags: [.aiChatDeepLink]), canPurchase: { true }) _ = self.expectation(forNotification: .urlInterceptAIChat, object: nil, handler: nil)