Files
g-butandClaude Opus 4.5 50a04ec062 feat(chat): add model indicator, selector, privacy tiers & auth CTA
Add model visibility and switching UI for AI professionals:
- ModelIndicator: shows current model with icon in chat header
- ModelSelector: dropdown to switch models (auth-gated for guests)
- PrivacyTierInfo: expandable Cloud vs Self-Hosted comparison
- ChatAuthCTA: dismissible guest conversion banner

Config files (SSOT):
- privacy-tiers.ts: tier definitions, model display config
- auth-cta.ts: CTA content for guest/authenticated users

Also increases quick-chat maxTokens from 256 to 1024 to prevent
response cutoff.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:40:12 +01:00

71 lines
1.7 KiB
TypeScript

/**
* Auth CTA Configuration - SSOT
* @module lib/config/auth-cta
*
* Single source of truth for auth-related call-to-action content.
* Used in chat interfaces to encourage guest users to register.
*/
import type { Route } from 'next';
import { ROUTES } from '@/lib/routes';
/**
* CTA configuration for different auth states
*/
export interface AuthCTAContent {
headline: string;
benefits: string[];
primaryAction: {
label: string;
href: Route;
};
secondaryAction?: {
label: string;
href: Route;
};
}
export const AUTH_CTA_CONFIG: Record<'guest' | 'authenticated', AuthCTAContent> = {
guest: {
headline: 'Get personalized answers',
benefits: [
'Save conversation history',
'Add your context for better responses',
'Access all AI professionals',
'Upload documents for analysis',
],
primaryAction: {
label: 'Create Free Account',
href: ROUTES.AUTH.SIGNUP as Route,
},
secondaryAction: {
label: 'Sign In',
href: ROUTES.AUTH.SIGNIN as Route,
},
},
authenticated: {
headline: 'Enhance your experience',
benefits: [
'Add context to your profile',
'Upload documents for deeper insights',
'Switch AI models anytime',
],
primaryAction: {
label: 'Add Context',
href: '/dashboard/profile' as Route,
},
},
} as const;
/**
* Get CTA content based on auth state
*/
export function getAuthCTAContent(isAuthenticated: boolean): AuthCTAContent {
return isAuthenticated ? AUTH_CTA_CONFIG.authenticated : AUTH_CTA_CONFIG.guest;
}
/**
* LocalStorage key for dismissing the CTA
*/
export const AUTH_CTA_DISMISSED_KEY = 'botsmann:auth-cta-dismissed';