@@ -54,13 +54,6 @@ import { supabase } from "@/lib/supabase";
5454import { Checkbox } from "@/components/ui/checkbox" ;
5555import { Badge } from "@/components/ui/badge" ;
5656import { Separator } from "@/components/ui/separator" ;
57- import {
58- Dialog ,
59- DialogContent ,
60- DialogDescription ,
61- DialogHeader ,
62- DialogTitle ,
63- } from "@/components/ui/dialog" ;
6457import {
6558 Claude ,
6659 DeepSeek ,
@@ -173,9 +166,7 @@ export function AIChatInterface({
173166 const [ mode , setMode ] = useState < AnalysisMode > ( "Explorer" ) ;
174167 const [ loading , setLoading ] = useState ( false ) ;
175168 const [ isAnalyzing , setIsAnalyzing ] = useState ( false ) ;
176- const [ isMonitoringMode , setIsMonitoringMode ] = useState (
177- true
178- ) ;
169+ const [ isMonitoringMode , setIsMonitoringMode ] = useState ( true ) ;
179170 const [ attachedBrand , setAttachedBrand ] = useState < Brand | null > (
180171 attachedBrandId
181172 ? ( {
@@ -368,9 +359,14 @@ export function AIChatInterface({
368359 const checkInactivity = ( ) => {
369360 const now = Date . now ( ) ;
370361 const timeSinceLastTyping = now - lastTypingTime ;
371-
362+
372363 // Show modal if user hasn't typed for 10 seconds and input is empty
373- if ( timeSinceLastTyping >= 40000 && ! value . trim ( ) && ! showInactivityModal && ! isAnalyzing ) {
364+ if (
365+ timeSinceLastTyping >= 40000 &&
366+ ! value . trim ( ) &&
367+ ! showInactivityModal &&
368+ ! isAnalyzing
369+ ) {
374370 setShowInactivityModal ( true ) ;
375371 }
376372 } ;
@@ -949,7 +945,8 @@ export function AIChatInterface({
949945 < div className = "space-y-4 mt-4" >
950946 < div className = "flex items-center justify-between" >
951947 < h4 className = "font-medium text-sm text-neutral-600 dark:text-white" >
952- AI Models for { modes . find ( ( item ) => item . key === mode ) ?. label }
948+ AI Models for{ " " }
949+ { modes . find ( ( item ) => item . key === mode ) ?. label }
953950 </ h4 >
954951 < Badge
955952 variant = "secondary"
@@ -1244,9 +1241,9 @@ export function AIChatInterface({
12441241 Voyager Mode
12451242 </ h4 >
12461243 < p className = "text-sm text-neutral-500 dark:text-neutral-400 mt-1" >
1247- Leverages Llama 4 Maverick, DeepSeek v3, Grok 4, and many more top LLMs
1248- to create in-depth brand ranking and keyword analysis.
1249- No native search support.
1244+ Leverages Llama 4 Maverick, DeepSeek v3, Grok 4, and many
1245+ more top LLMs to create in-depth brand ranking and keyword
1246+ analysis. No native search support.
12501247 </ p >
12511248 </ div >
12521249 </ div >
@@ -1268,20 +1265,34 @@ export function AIChatInterface({
12681265 ) }
12691266
12701267 < div className = "pt-2 border-t border-[#e2e2e2]/50 dark:border-neutral-800" >
1271- { /* <div className="flex items-start gap-3 mb-3">
1272- <Zap className="w-4 h-4 text-purple-500 mt-0.5" / >
1273- <div >
1274- <h4 className="font-medium text-sm text-neutral-700 dark:text-foreground">
1275- Credit System
1268+ < div className = "flex flex-col items-start gap-3 mb-3" >
1269+ < div className = "flex items-center gap-2" >
1270+ < Zap className = "w-4 h-4 text-purple-500" / >
1271+ < h4 className = "text-lg font-bold text-neutral-700 dark:text-foreground" >
1272+ Not sure what to search and monitor?
12761273 </ h4 >
1277- <p className="text-sm text-neutral-500 dark:text-neutral-400 mt-1">
1278- Select specific AI models to optimize your credit usage. You
1279- can choose individual models or use all available models for
1280- comprehensive analysis. Google Search is always included at
1281- no extra cost.
1274+ </ div >
1275+ < div className = "flex" >
1276+ < p className = " text-neutral-500 dark:text-neutral-400 text-sm mt-2" >
1277+ Let's give you{ " " }
1278+ < span className = "font-black text-primary" > 50 Prompts</ span > { " " }
1279+ with monthly demand, trends, intent and cpc
12821280 </ p >
1281+ < Button
1282+ variant = "link"
1283+ onClick = { ( ) => {
1284+ toastSonner . success ( "Redirecting to keywords..." ) ;
1285+ setTimeout ( ( ) => {
1286+ router . push ( "/dashboard/keywords" ) ;
1287+ } , 1000 ) ;
1288+ } }
1289+ className = "group transition-all duration-300 text-white font-medium text-sm"
1290+ >
1291+ Let's Go
1292+ < ChevronRight className = "w-4 h-4 group-hover:translate-x-1 transition-all duration-300" />
1293+ </ Button >
12831294 </ div >
1284- </div> */ }
1295+ </ div >
12851296 < p className = "text-xs text-muted-foreground/30 dark:text-neutral-500" >
12861297 { isMonitoringMode
12871298 ? "Monitored queries run automatically with your selected models. View their status and results in the Monitoring tab."
@@ -1291,39 +1302,7 @@ export function AIChatInterface({
12911302 </ div >
12921303 </ div >
12931304 </ div >
1294-
1295- { /* Inactivity Modal */ }
1296- < Dialog open = { showInactivityModal } onOpenChange = { ( ) => {
1297- setShowInactivityModal ( false ) ;
1298- setLastTypingTime ( Date . now ( ) ) ;
1299- } } >
1300- < DialogContent className = "sm:max-w-xl p-12 bg-gradient-to-b from-background to-blue-600 rounded-2xl outline-2 outline-blue-600" >
1301- < DialogHeader >
1302- < DialogTitle className = "text-center text-3xl font-bold" >
1303- Not sure what to search and monitor?
1304- </ DialogTitle >
1305- < DialogDescription className = "text-center text-white text-base mt-2" >
1306- Let's give you < span className = "font-black text-primary" > 50 Prompts</ span > with monthly demand, trends, intent and cpc
1307- </ DialogDescription >
1308- </ DialogHeader >
1309- < div className = "flex justify-center mt-6" >
1310- < Button
1311- onClick = { ( ) => {
1312- setShowInactivityModal ( false ) ;
1313- toastSonner . success ( "Redirecting to keywords..." )
1314- setTimeout ( ( ) => {
1315- router . push ( "/dashboard/keywords" )
1316- } , 1000 )
1317- } }
1318- className = "w-full rounded-full sm:w-auto h-14 !px-10 bg-gradient-to-b from-blue-600 to-background/50 hover:bg-blue-600 transition-all duration-300 text-primary-foreground font-bold"
1319- >
1320- Let's Go
1321- < ChevronRight className = "w-4 h-4" />
1322- </ Button >
1323- </ div >
1324- </ DialogContent >
1325- </ Dialog >
1326-
1305+
13271306 < AttachBrandModal
13281307 showBrandModal = { openModal }
13291308 setShowBrandModal = { setOpenModal }
0 commit comments