diff --git a/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ChatInputToolbar.tsx b/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ChatInputToolbar.tsx index d9e661d6..5b6774b8 100644 --- a/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ChatInputToolbar.tsx +++ b/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ChatInputToolbar.tsx @@ -8,6 +8,8 @@ import { ModelPickerMenu } from '../model-picker/ModelPickerMenu'; import { ThinkingLevelControl } from './ThinkingLevelControl'; import { ToolbarActions } from './ToolbarActions'; import { ModelPickerState } from '../hooks/useModelPicker'; +import { useAppSelector } from '@/shared/hooks'; +import { hasFreeTrialActive, hasModelConnected } from '@/app/components/Onboarding/steps/skipPredicates'; type ThinkingLevel = 'off' | 'low' | 'medium' | 'high' | 'auto'; @@ -79,6 +81,11 @@ export const ChatInputToolbar: React.FC = (p) => { }, }; + // On the free trial the run is fixed (model + thinking forced server-side), so hide both + // the model picker and the thinking selector, there's nothing to choose. Returns the moment + // a real model is connected. + const hideForTrial = useAppSelector((s) => hasFreeTrialActive(s) && !hasModelConnected(s)); + return ( = (p) => { pendingPayloadEstimate={pendingPayloadEstimate} /> - + {!hideForTrial && ( + + )} diff --git a/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ModeControl.tsx b/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ModeControl.tsx index 7352a4ef..ec452af8 100644 --- a/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ModeControl.tsx +++ b/frontend/src/app/pages/AgentChat/ChatInput/toolbar/ModeControl.tsx @@ -8,7 +8,7 @@ import Typography from '@mui/material/Typography'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import { ClaudeTokens } from '@/shared/styles/claudeTokens'; import { useAppSelector } from '@/shared/hooks'; -import { hasFreeTrialActive } from '@/app/components/Onboarding/steps/skipPredicates'; +import { hasFreeTrialActive, hasModelConnected } from '@/app/components/Onboarding/steps/skipPredicates'; interface ModeConf { label: string; icon: React.ReactNode; color: string } @@ -31,8 +31,9 @@ export const ModeControl: React.FC = ({ c, menuPaperProps, modeConf, modesArr, mode, onModeChange, iconMap, modeAnchor, setModeAnchor, setModelAnchor, allModelFlat, model, }) => { // On the free trial the model is fixed server-side, so there's nothing to pick: hide the - // whole model control (no picker, no model name) until the user connects their own model. - const freeTrialActive = useAppSelector(hasFreeTrialActive); + // model control. The moment a real model is connected we show it again, even if trial state + // lingers (gate on !hasModelConnected, not just the trial flag). + const hideModelPicker = useAppSelector((s) => hasFreeTrialActive(s) && !hasModelConnected(s)); return ( <> = ({ })} - {!freeTrialActive && ( + {!hideModelPicker && ( setModelAnchor(e.currentTarget)} sx={{