diff --git a/cli/src/chat.tsx b/cli/src/chat.tsx
index 97eb0a0a3d..22422e1918 100644
--- a/cli/src/chat.tsx
+++ b/cli/src/chat.tsx
@@ -14,6 +14,7 @@ import { useShallow } from 'zustand/react/shallow'
import { getAdsEnabled, handleAdsDisable } from './commands/ads'
import { routeUserPrompt, addBashMessageToHistory } from './commands/router'
import { AdBanner } from './components/ad-banner'
+import { ChoiceAdBanner } from './components/choice-ad-banner'
import { ChatInputBar } from './components/chat-input-bar'
import { LoadPreviousButton } from './components/load-previous-button'
import { ReviewScreen } from './components/review-screen'
@@ -168,7 +169,7 @@ export const Chat = ({
})
const hasSubscription = subscriptionData?.hasSubscription ?? false
- const { ad } = useGravityAd({ enabled: IS_FREEBUFF || !hasSubscription })
+ const { ad, adData, recordImpression } = useGravityAd({ enabled: IS_FREEBUFF || !hasSubscription })
const [adsManuallyDisabled, setAdsManuallyDisabled] = useState(false)
const handleDisableAds = useCallback(() => {
@@ -1445,11 +1446,18 @@ export const Chat = ({
)}
{ad && (IS_FREEBUFF || (!adsManuallyDisabled && getAdsEnabled())) && (
-
+ adData?.variant === 'choice' ? (
+
+ ) : (
+
+ )
)}
{reviewMode ? (
diff --git a/cli/src/commands/ads.ts b/cli/src/commands/ads.ts
index f111f3a66b..6170047b27 100644
--- a/cli/src/commands/ads.ts
+++ b/cli/src/commands/ads.ts
@@ -16,7 +16,7 @@ export const handleAdsEnable = (): {
return {
postUserMessage: (messages) => [
...messages,
- getSystemMessage('Ads enabled. You will see contextual ads above the input and earn credits from impressions.'),
+ getSystemMessage('Ads enabled. You will see contextual ads above the input.'),
],
}
}
diff --git a/cli/src/components/ad-banner.tsx b/cli/src/components/ad-banner.tsx
index 08ccf4ad40..4910952a73 100644
--- a/cli/src/components/ad-banner.tsx
+++ b/cli/src/components/ad-banner.tsx
@@ -150,10 +150,7 @@ export const AdBanner: React.FC = ({ ad, onDisableAds, isFreeMode
{domain}
)}
-
- {!IS_FREEBUFF && ad.credits != null && ad.credits > 0 && (
- +{ad.credits} credits
- )}
+
{/* Info panel: shown when Ad label is clicked, below the ad */}
@@ -179,7 +176,7 @@ export const AdBanner: React.FC = ({ ad, onDisableAds, isFreeMode
{IS_FREEBUFF
? 'Ads help keep Freebuff free.'
- : 'Ads are optional and earn you credits on each impression. Feel free to hide them anytime.'}
+ : 'Ads are optional. Feel free to hide them anytime.'}