diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index a37b2967b..3313b3e1b 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -164,6 +164,7 @@ function PureMultimodalInput({ console.log('[MultimodalInput] Render - isImageModel:', isImageModel); console.log('[MultimodalInput] Render - imageParams:', imageParams); console.log('[MultimodalInput] Render - onImageParamsChange:', !!onImageParamsChange); + const isAgentMode = selectedModelId === "auto"; const router = useRouter(); const textareaRef = useRef(null); @@ -1144,11 +1145,13 @@ function PureMultimodalInput({ selectedModelId={selectedModelId} status={status} /> - + {!isAgentMode ? ( + + ) : null} {isImageModel && onImageParamsChange && ( + {isAgentMode ? ( + + ) : null} + {status === "submitted" || status === "streaming" ? ( ) : ( @@ -1285,11 +1297,13 @@ function PureModelSelectorCompact({ onModelChange, attachments, avatarOnly = false, + readOnly = false, }: { selectedModelId: string; onModelChange?: (modelId: string) => void; attachments: Attachment[]; avatarOnly?: boolean; + readOnly?: boolean; }) { const [optimisticModelId, setOptimisticModelId] = useState(selectedModelId); @@ -1463,6 +1477,36 @@ function PureModelSelectorCompact({ ); } + if (readOnly) { + if (avatarOnly) { + return ( + + ); + } + + return ( + + ); + } + return ( { @@ -1586,6 +1630,9 @@ const ModelSelectorCompact = memo( if (prevProps.avatarOnly !== nextProps.avatarOnly) { return false; } + if (prevProps.readOnly !== nextProps.readOnly) { + return false; + } if (!equal(prevProps.attachments, nextProps.attachments)) { return false; }